From be9a066276700fc36cca65fe3b703297dfd804c0 Mon Sep 17 00:00:00 2001 From: Bilal Mahmoud <7252775+indietyp@users.noreply.github.com> Date: Wed, 13 May 2026 10:43:52 +0200 Subject: [PATCH 01/14] feat: init --- .config/mise/config.toml | 1 + .../rust/src/cli/subcommand/mod.rs | 9 +- .../src/cli/subcommand/sort_package_json.rs | 37 --- libs/@local/repo-chores/rust/src/lib.rs | 5 - .../repo-chores/rust/src/sort_package_json.rs | 125 ---------- oxfmt.config.ts | 41 ++++ package.json | 3 +- yarn.lock | 215 ++++++++++++++++++ 8 files changed, 260 insertions(+), 176 deletions(-) delete mode 100644 libs/@local/repo-chores/rust/src/cli/subcommand/sort_package_json.rs delete mode 100644 libs/@local/repo-chores/rust/src/sort_package_json.rs create mode 100644 oxfmt.config.ts diff --git a/.config/mise/config.toml b/.config/mise/config.toml index eeeb8568437..117cbf7f667 100644 --- a/.config/mise/config.toml +++ b/.config/mise/config.toml @@ -32,6 +32,7 @@ markdownlint-cli2 = "0.19.1" "npm:@napi-rs/cli" = "2.18.4" "npm:@redocly/cli" = "2.19.2" "npm:renovate" = "42.39.1" +oxfmt = "0.49.0" "pipx:sqlfluff" = "3.4.2" sentry-cli = "2.52.0" taplo = "0.10.0" diff --git a/libs/@local/repo-chores/rust/src/cli/subcommand/mod.rs b/libs/@local/repo-chores/rust/src/cli/subcommand/mod.rs index 819f2503aff..2252df4fbeb 100644 --- a/libs/@local/repo-chores/rust/src/cli/subcommand/mod.rs +++ b/libs/@local/repo-chores/rust/src/cli/subcommand/mod.rs @@ -2,13 +2,12 @@ use core::error::Error; use error_stack::ResultExt as _; -use crate::{sort_package_json::SortPackageJsonError, sync_turborepo::SyncTurborepoError}; +use crate::sync_turborepo::SyncTurborepoError; mod benches; mod completions; mod dependency_diagram; mod lcov; -mod sort_package_json; mod sync_turborepo; /// Subcommand for the program. @@ -26,9 +25,6 @@ pub(super) enum Subcommand { /// Sync Cargo.toml metadata to package.json for Turborepo integration. #[clap(name = "sync-turborepo")] SyncTurborepo(sync_turborepo::Args), - /// Sort package.json files to ensure consistent key ordering. - #[clap(name = "sort-package-json")] - SortPackageJson(sort_package_json::Args), } impl Subcommand { @@ -44,9 +40,6 @@ impl Subcommand { Self::SyncTurborepo(args) => Ok(sync_turborepo::run(args) .await .change_context(SyncTurborepoError::UnableToSync)?), - Self::SortPackageJson(args) => Ok(sort_package_json::run(args) - .await - .change_context(SortPackageJsonError::UnableToSort)?), } } } diff --git a/libs/@local/repo-chores/rust/src/cli/subcommand/sort_package_json.rs b/libs/@local/repo-chores/rust/src/cli/subcommand/sort_package_json.rs deleted file mode 100644 index cbe74d0a5ec..00000000000 --- a/libs/@local/repo-chores/rust/src/cli/subcommand/sort_package_json.rs +++ /dev/null @@ -1,37 +0,0 @@ -use std::path::PathBuf; - -use clap::Parser; -use error_stack::Report; - -use crate::sort_package_json::{SortPackageJsonError, sort_package_json_files}; - -/// Arguments for the sort-package-json subcommand. -/// -/// Sorts package.json files to ensure consistent key ordering. -/// If no files are provided, sorts all yarn workspace package.json files. -#[derive(Debug, Parser)] -pub(crate) struct Args { - /// Check if files are sorted without modifying them. - /// Exits with an error if any file is not sorted. - #[arg(long)] - check: bool, - - /// Paths to package.json files to sort. - /// If not provided, sorts all yarn workspace package.json files. - files: Vec, -} - -/// Runs the sort-package-json process on the provided files. -/// -/// # Errors -/// -/// Returns an error if sorting any file fails. -pub(super) async fn run(args: Args) -> Result<(), Report<[SortPackageJsonError]>> { - let files = if args.files.is_empty() { - None - } else { - Some(args.files) - }; - - sort_package_json_files(files, args.check).await -} diff --git a/libs/@local/repo-chores/rust/src/lib.rs b/libs/@local/repo-chores/rust/src/lib.rs index 5174de950a2..b73923eb80e 100644 --- a/libs/@local/repo-chores/rust/src/lib.rs +++ b/libs/@local/repo-chores/rust/src/lib.rs @@ -4,10 +4,6 @@ //! //! ## Workspace dependencies #![cfg_attr(doc, doc = simple_mermaid::mermaid!("../docs/dependency-diagram.mmd"))] -#![feature( - // Library Features - exit_status_error -)] extern crate alloc; @@ -15,5 +11,4 @@ pub mod benches; pub mod cli; pub(crate) mod dependency_diagram; pub(crate) mod lcov; -pub(crate) mod sort_package_json; pub(crate) mod sync_turborepo; diff --git a/libs/@local/repo-chores/rust/src/sort_package_json.rs b/libs/@local/repo-chores/rust/src/sort_package_json.rs deleted file mode 100644 index 5730111e7a0..00000000000 --- a/libs/@local/repo-chores/rust/src/sort_package_json.rs +++ /dev/null @@ -1,125 +0,0 @@ -use core::error; -use std::path::PathBuf; - -use error_stack::{Report, ReportSink, ResultExt as _}; -use tokio::{fs, process::Command}; - -#[derive(Debug, Clone, derive_more::Display)] -pub(crate) enum SortPackageJsonError { - #[display("Failed to read file: {}", _0.display())] - ReadFile(PathBuf), - #[display("Failed to sort file: {}", _0.display())] - SortFile(PathBuf), - #[display("Failed to write file: {}", _0.display())] - WriteFile(PathBuf), - #[display("File is not sorted: {}", _0.display())] - NotSorted(PathBuf), - #[display("Failed to find git root")] - GitRoot, - #[display("Failed to list yarn workspaces")] - YarnWorkspacesList, - #[display("Unable to sort package.json files")] - UnableToSort, -} - -impl error::Error for SortPackageJsonError {} - -async fn get_git_root() -> Result> { - let output = Command::new("git") - .args(["rev-parse", "--show-toplevel"]) - .output() - .await - .change_context(SortPackageJsonError::GitRoot)? - .exit_ok() - .change_context(SortPackageJsonError::GitRoot)?; - - let root = String::from_utf8(output.stdout).change_context(SortPackageJsonError::GitRoot)?; - Ok(PathBuf::from(root.trim())) -} - -async fn get_yarn_workspace_package_jsons() -> Result, Report> { - let git_root = get_git_root().await?; - tracing::debug!(?git_root, "Determined git root"); - - let output = Command::new("mise") - .args(["exec", "--", "yarn", "workspaces", "list", "--json"]) - .current_dir(&git_root) - .output() - .await - .change_context(SortPackageJsonError::YarnWorkspacesList)? - .exit_ok() - .change_context(SortPackageJsonError::YarnWorkspacesList)?; - - let stdout = String::from_utf8(output.stdout) - .change_context(SortPackageJsonError::YarnWorkspacesList)?; - - let mut files = Vec::new(); - for line in stdout.lines() { - let value: serde_json::Value = - serde_json::from_str(line).change_context(SortPackageJsonError::YarnWorkspacesList)?; - if let Some(location) = value.get("location").and_then(|location| location.as_str()) { - files.push(git_root.join(location).join("package.json")); - } - } - - tracing::debug!( - count = files.len(), - "Found yarn workspace package.json files" - ); - Ok(files) -} - -/// Sorts the given package.json files to ensure consistent key ordering. -/// -/// If no files are provided, sorts all yarn workspace package.json files. -/// If `check` is true, only verifies files are sorted without modifying them. -/// -/// # Errors -/// -/// Returns an error if sorting any file fails, or in check mode if any file is not sorted. -#[tracing::instrument(level = "info", skip_all)] -pub(crate) async fn sort_package_json_files( - files: Option>, - check: bool, -) -> Result<(), Report<[SortPackageJsonError]>> { - let files = match files { - Some(files) => files, - None => get_yarn_workspace_package_jsons().await?, - }; - - let mut sink: ReportSink = ReportSink::new_armed(); - - for path in files { - if let Err(error) = process_file(&path, check).await { - sink.append(error); - } - } - - sink.finish() -} - -async fn process_file(path: &PathBuf, check: bool) -> Result<(), Report> { - let contents = fs::read_to_string(path) - .await - .change_context_lazy(|| SortPackageJsonError::ReadFile(path.clone()))?; - - let sorted = sort_package_json::sort_package_json(&contents) - .change_context_lazy(|| SortPackageJsonError::SortFile(path.clone()))?; - - if contents == sorted { - tracing::debug!(?path, "File is already sorted"); - return Ok(()); - } - - if check { - tracing::warn!(?path, "File is not sorted"); - return Err(Report::new(SortPackageJsonError::NotSorted(path.clone()))); - } - - fs::write(path, &sorted) - .await - .change_context_lazy(|| SortPackageJsonError::WriteFile(path.clone()))?; - - tracing::info!(?path, "Sorted package.json"); - Ok(()) -} diff --git a/oxfmt.config.ts b/oxfmt.config.ts new file mode 100644 index 00000000000..9a6269bfa10 --- /dev/null +++ b/oxfmt.config.ts @@ -0,0 +1,41 @@ +import { defineConfig } from "oxfmt"; + +export default defineConfig({ + // Indentation and line length + useTabs: false, + tabWidth: 2, + printWidth: 80, + endOfLine: "lf", + + // Quotes + singleQuote: false, + jsxSingleQuote: false, + quoteProps: "as-needed", + + // Syntax + semi: true, + trailingComma: "all", + arrowParens: "always", + + // Brackets and attributes + bracketSpacing: true, + bracketSameLine: false, + singleAttributePerLine: false, + + // Sorting + sortImports: true, + sortTailwindcss: true, + sortPackageJson: { + sortScripts: true, + }, + + // Per-language overrides + overrides: [ + { + files: ["**/*.json"], + options: { + trailingComma: "none", + }, + }, + ], +}); diff --git a/package.json b/package.json index 22a68b14089..3a2537b6aca 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,8 @@ "@local/claude-hooks": "workspace:*", "@yarnpkg/types": "^4.0.1", "lefthook": "2.0.0", - "npm-run-all2": "8.0.4" + "npm-run-all2": "8.0.4", + "oxfmt": "0.49.0" }, "resolutions": { "@artilleryio/int-commons@npm:2.11.0": "patch:@artilleryio/int-commons@npm%3A2.11.0#~/.yarn/patches/@artilleryio-int-commons-npm-2.11.0-5b69c05121.patch", diff --git a/yarn.lock b/yarn.lock index dc15db99a54..c840ad29e4a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12129,6 +12129,139 @@ __metadata: languageName: node linkType: hard +"@oxfmt/binding-android-arm-eabi@npm:0.49.0": + version: 0.49.0 + resolution: "@oxfmt/binding-android-arm-eabi@npm:0.49.0" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@oxfmt/binding-android-arm64@npm:0.49.0": + version: 0.49.0 + resolution: "@oxfmt/binding-android-arm64@npm:0.49.0" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@oxfmt/binding-darwin-arm64@npm:0.49.0": + version: 0.49.0 + resolution: "@oxfmt/binding-darwin-arm64@npm:0.49.0" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@oxfmt/binding-darwin-x64@npm:0.49.0": + version: 0.49.0 + resolution: "@oxfmt/binding-darwin-x64@npm:0.49.0" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@oxfmt/binding-freebsd-x64@npm:0.49.0": + version: 0.49.0 + resolution: "@oxfmt/binding-freebsd-x64@npm:0.49.0" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@oxfmt/binding-linux-arm-gnueabihf@npm:0.49.0": + version: 0.49.0 + resolution: "@oxfmt/binding-linux-arm-gnueabihf@npm:0.49.0" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@oxfmt/binding-linux-arm-musleabihf@npm:0.49.0": + version: 0.49.0 + resolution: "@oxfmt/binding-linux-arm-musleabihf@npm:0.49.0" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@oxfmt/binding-linux-arm64-gnu@npm:0.49.0": + version: 0.49.0 + resolution: "@oxfmt/binding-linux-arm64-gnu@npm:0.49.0" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@oxfmt/binding-linux-arm64-musl@npm:0.49.0": + version: 0.49.0 + resolution: "@oxfmt/binding-linux-arm64-musl@npm:0.49.0" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@oxfmt/binding-linux-ppc64-gnu@npm:0.49.0": + version: 0.49.0 + resolution: "@oxfmt/binding-linux-ppc64-gnu@npm:0.49.0" + conditions: os=linux & cpu=ppc64 & libc=glibc + languageName: node + linkType: hard + +"@oxfmt/binding-linux-riscv64-gnu@npm:0.49.0": + version: 0.49.0 + resolution: "@oxfmt/binding-linux-riscv64-gnu@npm:0.49.0" + conditions: os=linux & cpu=riscv64 & libc=glibc + languageName: node + linkType: hard + +"@oxfmt/binding-linux-riscv64-musl@npm:0.49.0": + version: 0.49.0 + resolution: "@oxfmt/binding-linux-riscv64-musl@npm:0.49.0" + conditions: os=linux & cpu=riscv64 & libc=musl + languageName: node + linkType: hard + +"@oxfmt/binding-linux-s390x-gnu@npm:0.49.0": + version: 0.49.0 + resolution: "@oxfmt/binding-linux-s390x-gnu@npm:0.49.0" + conditions: os=linux & cpu=s390x & libc=glibc + languageName: node + linkType: hard + +"@oxfmt/binding-linux-x64-gnu@npm:0.49.0": + version: 0.49.0 + resolution: "@oxfmt/binding-linux-x64-gnu@npm:0.49.0" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@oxfmt/binding-linux-x64-musl@npm:0.49.0": + version: 0.49.0 + resolution: "@oxfmt/binding-linux-x64-musl@npm:0.49.0" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@oxfmt/binding-openharmony-arm64@npm:0.49.0": + version: 0.49.0 + resolution: "@oxfmt/binding-openharmony-arm64@npm:0.49.0" + conditions: os=openharmony & cpu=arm64 + languageName: node + linkType: hard + +"@oxfmt/binding-win32-arm64-msvc@npm:0.49.0": + version: 0.49.0 + resolution: "@oxfmt/binding-win32-arm64-msvc@npm:0.49.0" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@oxfmt/binding-win32-ia32-msvc@npm:0.49.0": + version: 0.49.0 + resolution: "@oxfmt/binding-win32-ia32-msvc@npm:0.49.0" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@oxfmt/binding-win32-x64-msvc@npm:0.49.0": + version: 0.49.0 + resolution: "@oxfmt/binding-win32-x64-msvc@npm:0.49.0" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@oxlint-tsgolint/darwin-arm64@npm:0.22.1": version: 0.22.1 resolution: "@oxlint-tsgolint/darwin-arm64@npm:0.22.1" @@ -30549,6 +30682,7 @@ __metadata: "@yarnpkg/types": "npm:^4.0.1" lefthook: "npm:2.0.0" npm-run-all2: "npm:8.0.4" + oxfmt: "npm:0.49.0" languageName: unknown linkType: soft @@ -37417,6 +37551,80 @@ __metadata: languageName: node linkType: hard +"oxfmt@npm:0.49.0": + version: 0.49.0 + resolution: "oxfmt@npm:0.49.0" + dependencies: + "@oxfmt/binding-android-arm-eabi": "npm:0.49.0" + "@oxfmt/binding-android-arm64": "npm:0.49.0" + "@oxfmt/binding-darwin-arm64": "npm:0.49.0" + "@oxfmt/binding-darwin-x64": "npm:0.49.0" + "@oxfmt/binding-freebsd-x64": "npm:0.49.0" + "@oxfmt/binding-linux-arm-gnueabihf": "npm:0.49.0" + "@oxfmt/binding-linux-arm-musleabihf": "npm:0.49.0" + "@oxfmt/binding-linux-arm64-gnu": "npm:0.49.0" + "@oxfmt/binding-linux-arm64-musl": "npm:0.49.0" + "@oxfmt/binding-linux-ppc64-gnu": "npm:0.49.0" + "@oxfmt/binding-linux-riscv64-gnu": "npm:0.49.0" + "@oxfmt/binding-linux-riscv64-musl": "npm:0.49.0" + "@oxfmt/binding-linux-s390x-gnu": "npm:0.49.0" + "@oxfmt/binding-linux-x64-gnu": "npm:0.49.0" + "@oxfmt/binding-linux-x64-musl": "npm:0.49.0" + "@oxfmt/binding-openharmony-arm64": "npm:0.49.0" + "@oxfmt/binding-win32-arm64-msvc": "npm:0.49.0" + "@oxfmt/binding-win32-ia32-msvc": "npm:0.49.0" + "@oxfmt/binding-win32-x64-msvc": "npm:0.49.0" + tinypool: "npm:2.1.0" + peerDependencies: + svelte: ^5.0.0 + dependenciesMeta: + "@oxfmt/binding-android-arm-eabi": + optional: true + "@oxfmt/binding-android-arm64": + optional: true + "@oxfmt/binding-darwin-arm64": + optional: true + "@oxfmt/binding-darwin-x64": + optional: true + "@oxfmt/binding-freebsd-x64": + optional: true + "@oxfmt/binding-linux-arm-gnueabihf": + optional: true + "@oxfmt/binding-linux-arm-musleabihf": + optional: true + "@oxfmt/binding-linux-arm64-gnu": + optional: true + "@oxfmt/binding-linux-arm64-musl": + optional: true + "@oxfmt/binding-linux-ppc64-gnu": + optional: true + "@oxfmt/binding-linux-riscv64-gnu": + optional: true + "@oxfmt/binding-linux-riscv64-musl": + optional: true + "@oxfmt/binding-linux-s390x-gnu": + optional: true + "@oxfmt/binding-linux-x64-gnu": + optional: true + "@oxfmt/binding-linux-x64-musl": + optional: true + "@oxfmt/binding-openharmony-arm64": + optional: true + "@oxfmt/binding-win32-arm64-msvc": + optional: true + "@oxfmt/binding-win32-ia32-msvc": + optional: true + "@oxfmt/binding-win32-x64-msvc": + optional: true + peerDependenciesMeta: + svelte: + optional: true + bin: + oxfmt: bin/oxfmt + checksum: 10c0/2f9e15aa5285dcd7d7ec913b97ba64dbb826c622d2d16fc4c7339bbf628f0d45aace01e1168d654b3ea87b81afbd11b95d68f5fc91eb65d5839f6eceb0968375 + languageName: node + linkType: hard + "oxlint-tsgolint@npm:0.22.1": version: 0.22.1 resolution: "oxlint-tsgolint@npm:0.22.1" @@ -43790,6 +43998,13 @@ __metadata: languageName: node linkType: hard +"tinypool@npm:2.1.0": + version: 2.1.0 + resolution: "tinypool@npm:2.1.0" + checksum: 10c0/9fb1c760558c6264e0f4cfde96a63b12450b43f1730fbe6274aa24ddbdf488745c08924d0dea7a1303b47d555416a6415f2113898c69b6ecf731e75ac95238a5 + languageName: node + linkType: hard + "tinypool@npm:^1.1.1": version: 1.1.1 resolution: "tinypool@npm:1.1.1" From 2effb30904ce807f57cdab75bc09d28b684e005a Mon Sep 17 00:00:00 2001 From: Bilal Mahmoud <7252775+indietyp@users.noreply.github.com> Date: Wed, 13 May 2026 10:47:55 +0200 Subject: [PATCH 02/14] chore: init --- .config/mise/config.toml | 11 ++++------- oxfmt.config.ts | 8 +++++++- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.config/mise/config.toml b/.config/mise/config.toml index 117cbf7f667..293f4fa7e1f 100644 --- a/.config/mise/config.toml +++ b/.config/mise/config.toml @@ -15,18 +15,14 @@ cargo-binstall = "1.15.1" uv = "0.9.26" # Tools to compile the project -'cargo:wasm-opt' = "0.116.1" -"cargo:wasm-pack" = "0.13.1" -java = "25" -protoc = "32.1" - -# CLI tools -biome = "1.9.5-nightly.ff02a0b" "cargo:cargo-codspeed" = "4.1.0" "cargo:cargo-hack" = "0.6.37" "cargo:cargo-insta" = "1.43.1" "cargo:cargo-llvm-cov" = "0.6.18" "cargo:cargo-nextest" = "0.9.103" +'cargo:wasm-opt' = "0.116.1" +"cargo:wasm-pack" = "0.13.1" +java = "25" just = "1.43.1" markdownlint-cli2 = "0.19.1" "npm:@napi-rs/cli" = "2.18.4" @@ -34,6 +30,7 @@ markdownlint-cli2 = "0.19.1" "npm:renovate" = "42.39.1" oxfmt = "0.49.0" "pipx:sqlfluff" = "3.4.2" +protoc = "32.1" sentry-cli = "2.52.0" taplo = "0.10.0" "ubi:terrastruct/d2" = "0.7.1" diff --git a/oxfmt.config.ts b/oxfmt.config.ts index 9a6269bfa10..62575b42848 100644 --- a/oxfmt.config.ts +++ b/oxfmt.config.ts @@ -32,10 +32,16 @@ export default defineConfig({ // Per-language overrides overrides: [ { - files: ["**/*.json"], + files: ["**/*.json", "**/*.jsonc"], options: { trailingComma: "none", }, }, ], + + ignorePatterns: [ + // While supported, it doesn't yet support the full breadth + // of taplo configuration options that we have set + "**/*.toml", + ], }); From b3953e2ed88187dbfd5c697377b20c2ff9c25f70 Mon Sep 17 00:00:00 2001 From: Bilal Mahmoud <7252775+indietyp@users.noreply.github.com> Date: Wed, 13 May 2026 10:48:19 +0200 Subject: [PATCH 03/14] chore: init --- oxfmt.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/oxfmt.config.ts b/oxfmt.config.ts index 62575b42848..dfd50b43d67 100644 --- a/oxfmt.config.ts +++ b/oxfmt.config.ts @@ -42,6 +42,7 @@ export default defineConfig({ ignorePatterns: [ // While supported, it doesn't yet support the full breadth // of taplo configuration options that we have set + // see: https://github.com/oxc-project/oxc/issues/18580 "**/*.toml", ], }); From b09e37946817b3894b63f1fc9ad4521de516046a Mon Sep 17 00:00:00 2001 From: Bilal Mahmoud <7252775+indietyp@users.noreply.github.com> Date: Wed, 13 May 2026 10:52:31 +0200 Subject: [PATCH 04/14] chore: biome ignore -> oxfmt ignore --- .../ui/lowering/pre-expansion-name-resolver/alias-symbol.jsonc | 2 +- .../ui/lowering/pre-expansion-name-resolver/nested-let.jsonc | 2 +- .../ui/lowering/pre-expansion-name-resolver/re-assign.jsonc | 2 +- .../pre-expansion-name-resolver/restoration-bindings.jsonc | 2 +- .../tests/ui/lowering/type-extractor/definition/result.jsonc | 2 +- .../type-extractor/definition/unused-generic-parameter.jsonc | 2 +- .../tests/ui/graph/read/entity/arithmetic-comparisons-and.jsonc | 2 +- .../tests/ui/graph/read/entity/arithmetic-comparisons-or.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/boolean-literal.jsonc | 2 +- .../hashql/eval/tests/ui/graph/read/entity/call-identity.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/complex-object-error.jsonc | 2 +- .../ui/graph/read/entity/computed-path-indexing-error.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/constructor-call-none.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/equality-comparison.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/field-access-struct.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/field-access-tuple.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/field-in-dict-key.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/field-in-dict-value.jsonc | 2 +- .../hashql/eval/tests/ui/graph/read/entity/field-in-list.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/field-in-struct-entry.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/field-in-struct.jsonc | 2 +- .../hashql/eval/tests/ui/graph/read/entity/field-in-tuple.jsonc | 2 +- .../hashql/eval/tests/ui/graph/read/entity/if-filter-expr.jsonc | 2 +- .../hashql/eval/tests/ui/graph/read/entity/if-filter.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/input-field-access.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/input-index-access.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/input-parameter.jsonc | 2 +- .../tests/ui/graph/read/entity/invalid-field-access-error.jsonc | 2 +- .../tests/ui/graph/read/entity/invalid-index-access-error.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/invalid-vertex-query.jsonc | 2 +- .../hashql/eval/tests/ui/graph/read/entity/let-expression.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/let-propagation.jsonc | 2 +- .../hashql/eval/tests/ui/graph/read/entity/logical-and-or.jsonc | 2 +- .../hashql/eval/tests/ui/graph/read/entity/logical-or-and.jsonc | 2 +- .../tests/ui/graph/read/entity/nested-binary-operation.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/nested-let-bindings.jsonc | 2 +- .../tests/ui/graph/read/entity/scalar-property-filter.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/top-level-variable.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/top-type-assertion.jsonc | 2 +- .../ui/graph/read/entity/type-assertion-in-comparison.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/unsupported-closure.jsonc | 2 +- .../ui/graph/read/entity/unsupported-nested-graph-read.jsonc | 2 +- .../ui/graph/read/entity/unsupported-type-constructor.jsonc | 2 +- .../graph-hoisting/nested-boolean-expression-outer-let.jsonc | 2 +- .../ui/lower/graph-hoisting/nested-boolean-expression.jsonc | 2 +- libs/@local/hashql/hir/tests/ui/lower/specialization/bool.jsonc | 2 +- libs/@local/hashql/hir/tests/ui/lower/specialization/cmp.jsonc | 2 +- .../hashql/hir/tests/ui/lower/specialization/complex.jsonc | 2 +- 48 files changed, 48 insertions(+), 48 deletions(-) diff --git a/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/alias-symbol.jsonc b/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/alias-symbol.jsonc index 2662641ad36..8caec921888 100644 --- a/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/alias-symbol.jsonc +++ b/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/alias-symbol.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Should be able to alias to a symbol and from a symbol -// biome-ignore format: readability +// oxfmt-ignore ["let", "!&&", "&&", ["!&&", "a", "b"] ] diff --git a/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/nested-let.jsonc b/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/nested-let.jsonc index 4663ba37ac6..ac94c4b197b 100644 --- a/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/nested-let.jsonc +++ b/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/nested-let.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test nested let expressions with proper scoping -// biome-ignore format: readability +// oxfmt-ignore ["let", "a", "c", ["let", "b", "d", ["let", "a", "e", diff --git a/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/re-assign.jsonc b/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/re-assign.jsonc index df18671dd6b..c43fd557220 100644 --- a/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/re-assign.jsonc +++ b/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/re-assign.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Given b = c; a = b; `a` should be replaced as `d` -// biome-ignore format: readability +// oxfmt-ignore ["let", "c", "d", ["let", "b", "c", ["let", "a", "b", diff --git a/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/restoration-bindings.jsonc b/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/restoration-bindings.jsonc index 2f0f23bf33f..8256e883c54 100644 --- a/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/restoration-bindings.jsonc +++ b/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/restoration-bindings.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test bindings are restored after let expressions -// biome-ignore format: readability +// oxfmt-ignore ["if", {"#literal": true}, ["let", "x", "outer", ["x", {"#literal": 2}, { "#literal": 1 }] diff --git a/libs/@local/hashql/ast/tests/ui/lowering/type-extractor/definition/result.jsonc b/libs/@local/hashql/ast/tests/ui/lowering/type-extractor/definition/result.jsonc index b82dbc37d33..03afd1491bc 100644 --- a/libs/@local/hashql/ast/tests/ui/lowering/type-extractor/definition/result.jsonc +++ b/libs/@local/hashql/ast/tests/ui/lowering/type-extractor/definition/result.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test if we can properly re-declare the Result type -// biome-ignore format: readability +// oxfmt-ignore ["newtype", "Ok", "T", ["newtype", "Err", "E", ["type", "Result", ["|", "Ok", "Err"], diff --git a/libs/@local/hashql/ast/tests/ui/lowering/type-extractor/definition/unused-generic-parameter.jsonc b/libs/@local/hashql/ast/tests/ui/lowering/type-extractor/definition/unused-generic-parameter.jsonc index fab79d32425..60b4d52d6a2 100644 --- a/libs/@local/hashql/ast/tests/ui/lowering/type-extractor/definition/unused-generic-parameter.jsonc +++ b/libs/@local/hashql/ast/tests/ui/lowering/type-extractor/definition/unused-generic-parameter.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Test that we emit an issue if a generic parameter is unused -// biome-ignore format: readability +// oxfmt-ignore ["newtype", "Some", { "#struct": {"value": "T"} }, ["newtype", "None", "Null", ["type", "Option", ["|", {"#tuple": ["Some"]}, {"#tuple": ["None"]}], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/arithmetic-comparisons-and.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/arithmetic-comparisons-and.jsonc index 7acfa28fe34..8a75d7b43fc 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/arithmetic-comparisons-and.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/arithmetic-comparisons-and.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test arithmetic comparison operations (>, >=, <, <=) with numeric literals -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/arithmetic-comparisons-or.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/arithmetic-comparisons-or.jsonc index 5cf915cb8e2..d342ff82c4a 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/arithmetic-comparisons-or.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/arithmetic-comparisons-or.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test arithmetic comparison operations (>, >=, <, <=) with numeric literals -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/boolean-literal.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/boolean-literal.jsonc index 6b707ce7595..bb8accfe191 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/boolean-literal.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/boolean-literal.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test boolean literal values in filter expressions -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/call-identity.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/call-identity.jsonc index da4ef0a50ea..77410e2fefc 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/call-identity.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/call-identity.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Function calls not supported in filter expressions -// biome-ignore format: readability +// oxfmt-ignore ["let", "identity", ["fn", {"#tuple": ["T"]}, {"#struct": {"value": "T"}}, "T", "value"], ["::graph::tail::collect", ["::graph::body::filter", diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/complex-object-error.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/complex-object-error.jsonc index 80b483e8e82..28c1da2c2c2 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/complex-object-error.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/complex-object-error.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Complex objects cannot be queried directly in filter expressions -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/computed-path-indexing-error.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/computed-path-indexing-error.jsonc index e83632c772f..3d92fda1c0f 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/computed-path-indexing-error.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/computed-path-indexing-error.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Test error when using computed paths for indexing in filter expressions -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/constructor-call-none.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/constructor-call-none.jsonc index e39cc03ecd4..f31d6a4aada 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/constructor-call-none.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/constructor-call-none.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test constructor calls with None type in filter expressions -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/equality-comparison.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/equality-comparison.jsonc index af813e57a34..f9bae44f74e 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/equality-comparison.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/equality-comparison.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test equality (==) and inequality (!=) comparison operators -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-access-struct.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-access-struct.jsonc index 84d0a195c96..80b9aecf8b5 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-access-struct.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-access-struct.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Field access on values should succeed -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-access-tuple.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-access-tuple.jsonc index cb4a59483b9..67f3f915f8f 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-access-tuple.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-access-tuple.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Field access on values should succeed -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-dict-key.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-dict-key.jsonc index c786bbcd1d4..4f50392e036 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-dict-key.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-dict-key.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Paths inside data constructs are unsupported -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-dict-value.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-dict-value.jsonc index 2cd2be12596..82f4e96830c 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-dict-value.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-dict-value.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Paths inside data constructs are unsupported -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-list.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-list.jsonc index 2d2bbcc8f44..60f5e0f7561 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-list.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-list.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Paths inside data constructs are unsupported -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-struct-entry.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-struct-entry.jsonc index 94e53df9623..9f61f634b94 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-struct-entry.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-struct-entry.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Mentions of the variable inside data constructs are unsupported -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-struct.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-struct.jsonc index f186112f0ba..5fed7061e38 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-struct.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-struct.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Paths inside data constructs are unsupported -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-tuple.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-tuple.jsonc index 17f8a7020b0..5cd247f1325 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-tuple.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-tuple.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Paths inside data constructs are unsupported -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/if-filter-expr.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/if-filter-expr.jsonc index 7d315f85b3b..25fa03ce065 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/if-filter-expr.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/if-filter-expr.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Test if filter with branch fails -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/if-filter.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/if-filter.jsonc index ac9c50f1e5c..a1a31367543 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/if-filter.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/if-filter.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test if filter with branch fails -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/input-field-access.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/input-field-access.jsonc index f3db5ecb0a8..8f862557bcf 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/input-field-access.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/input-field-access.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test field access on input parameter values -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/input-index-access.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/input-index-access.jsonc index 712ef64ec5f..d4e1e6bd3b1 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/input-index-access.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/input-index-access.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test index access on input parameter values -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/input-parameter.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/input-parameter.jsonc index bed43bfc8c7..ff3eff06aca 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/input-parameter.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/input-parameter.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test input parameter usage in entity filter expressions -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-field-access-error.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-field-access-error.jsonc index f2c414dce7f..32e286d1c9a 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-field-access-error.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-field-access-error.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Test internal compiler error on invalid field access -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-index-access-error.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-index-access-error.jsonc index ba9bed111a7..f6fe4c473ba 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-index-access-error.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-index-access-error.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Test internal compiler error on invalid index access -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-vertex-query.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-vertex-query.jsonc index fbfa3eae3b2..71ac6a4f39c 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-vertex-query.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-vertex-query.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Test error when querying vertex directly without specific path -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/let-expression.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/let-expression.jsonc index cf5b08a6089..b7505636d8b 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/let-expression.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/let-expression.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test let expressions within filter comparisons -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/let-propagation.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/let-propagation.jsonc index 354cf51c53e..4e265919d88 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/let-propagation.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/let-propagation.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Let bindings propagate correctly in graph operations -// biome-ignore format: readability +// oxfmt-ignore ["let", "foo", {"#literal": 2}, ["::graph::tail::collect", ["::graph::body::filter", diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/logical-and-or.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/logical-and-or.jsonc index 62f71ac4e63..4fafc7b78fd 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/logical-and-or.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/logical-and-or.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test logical AND and OR operations with boolean literals -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/logical-or-and.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/logical-or-and.jsonc index 4b7fd3c4ab4..aa8b02f1ae9 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/logical-or-and.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/logical-or-and.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test logical AND and OR operations with boolean literals -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/nested-binary-operation.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/nested-binary-operation.jsonc index 96945da2585..73e4f572fc7 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/nested-binary-operation.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/nested-binary-operation.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Nested binary operations not supported in filter expressions -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/nested-let-bindings.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/nested-let-bindings.jsonc index ecdee9bab95..29289988de5 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/nested-let-bindings.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/nested-let-bindings.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test nested let bindings in filter expressions -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/scalar-property-filter.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/scalar-property-filter.jsonc index c92458fb513..b44645405f8 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/scalar-property-filter.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/scalar-property-filter.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test basic scalar property filtering by entity UUID -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/top-level-variable.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/top-level-variable.jsonc index 7e4dd4defc4..b18e5c70477 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/top-level-variable.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/top-level-variable.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test variables at the top level of filter expressions -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/top-type-assertion.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/top-type-assertion.jsonc index 10b1ec28cb4..cd60475a2d1 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/top-type-assertion.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/top-type-assertion.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test type assertions (is operator) in filter expressions -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/type-assertion-in-comparison.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/type-assertion-in-comparison.jsonc index 31fb7bf9e89..6c709e2a8d7 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/type-assertion-in-comparison.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/type-assertion-in-comparison.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test type assertions within comparison operations -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-closure.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-closure.jsonc index a7baeabe68c..aed7855d673 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-closure.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-closure.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Closures not supported in filter expressions -// biome-ignore format: readability +// oxfmt-ignore ["let", "identity", ["fn", {"#tuple": ["T"]}, {"#struct": {"value": "T"}}, "T", "value"], ["::graph::tail::collect", ["::graph::body::filter", diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-nested-graph-read.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-nested-graph-read.jsonc index ec498eb1520..3c287510741 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-nested-graph-read.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-nested-graph-read.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Nested graph read operations not supported in filter expressions -// biome-ignore format: readability +// oxfmt-ignore ["let", "read", ["::graph::tail::collect", ["::graph::body::filter", diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-type-constructor.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-type-constructor.jsonc index ca584210bf5..a34b2e7e02e 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-type-constructor.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-type-constructor.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Type constructors not supported as values in filter expressions -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/hir/tests/ui/lower/graph-hoisting/nested-boolean-expression-outer-let.jsonc b/libs/@local/hashql/hir/tests/ui/lower/graph-hoisting/nested-boolean-expression-outer-let.jsonc index a6ab60706de..1e0f1d71782 100644 --- a/libs/@local/hashql/hir/tests/ui/lower/graph-hoisting/nested-boolean-expression-outer-let.jsonc +++ b/libs/@local/hashql/hir/tests/ui/lower/graph-hoisting/nested-boolean-expression-outer-let.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test logical AND and OR operations with boolean literals -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/hir/tests/ui/lower/graph-hoisting/nested-boolean-expression.jsonc b/libs/@local/hashql/hir/tests/ui/lower/graph-hoisting/nested-boolean-expression.jsonc index 62f71ac4e63..4fafc7b78fd 100644 --- a/libs/@local/hashql/hir/tests/ui/lower/graph-hoisting/nested-boolean-expression.jsonc +++ b/libs/@local/hashql/hir/tests/ui/lower/graph-hoisting/nested-boolean-expression.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test logical AND and OR operations with boolean literals -// biome-ignore format: readability +// oxfmt-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/hir/tests/ui/lower/specialization/bool.jsonc b/libs/@local/hashql/hir/tests/ui/lower/specialization/bool.jsonc index 10685b5225f..6aba1f77304 100644 --- a/libs/@local/hashql/hir/tests/ui/lower/specialization/bool.jsonc +++ b/libs/@local/hashql/hir/tests/ui/lower/specialization/bool.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test boolean specialization -// biome-ignore format: readability +// oxfmt-ignore ["let", "and", ["&&", { "#literal": true }, { "#literal": false }], ["let", "or", ["||", { "#literal": true }, { "#literal": false }], "and" diff --git a/libs/@local/hashql/hir/tests/ui/lower/specialization/cmp.jsonc b/libs/@local/hashql/hir/tests/ui/lower/specialization/cmp.jsonc index 12ab57b095b..e4fec61f6ea 100644 --- a/libs/@local/hashql/hir/tests/ui/lower/specialization/cmp.jsonc +++ b/libs/@local/hashql/hir/tests/ui/lower/specialization/cmp.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test specialization of comparison functions -// biome-ignore format: readability +// oxfmt-ignore ["let", "greaterThan", [">", { "#literal": 1 }, { "#literal": 2 }], ["let", "greaterThanOrEqual", [">=", { "#literal": 1 }, { "#literal": 2 }], ["let", "lessThan", ["<", { "#literal": 1 }, { "#literal": 2 }], diff --git a/libs/@local/hashql/hir/tests/ui/lower/specialization/complex.jsonc b/libs/@local/hashql/hir/tests/ui/lower/specialization/complex.jsonc index 46a6fb493ff..812244216e0 100644 --- a/libs/@local/hashql/hir/tests/ui/lower/specialization/complex.jsonc +++ b/libs/@local/hashql/hir/tests/ui/lower/specialization/complex.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: complex set of operations -// biome-ignore format: readability +// oxfmt-ignore ["let", "foo", { "#literal": 1 }, ["let", "bar", { "#literal": 1 }, ["let", "equals", From 6cf59e0a78babe442335ab0748f97d4d88a46776 Mon Sep 17 00:00:00 2001 From: Bilal Mahmoud <7252775+indietyp@users.noreply.github.com> Date: Wed, 13 May 2026 10:54:02 +0200 Subject: [PATCH 05/14] chore: oxfmt ignore -> prettier ignore --- .../ui/lowering/pre-expansion-name-resolver/alias-symbol.jsonc | 2 +- .../ui/lowering/pre-expansion-name-resolver/nested-let.jsonc | 2 +- .../ui/lowering/pre-expansion-name-resolver/re-assign.jsonc | 2 +- .../pre-expansion-name-resolver/restoration-bindings.jsonc | 2 +- .../tests/ui/lowering/type-extractor/definition/result.jsonc | 2 +- .../type-extractor/definition/unused-generic-parameter.jsonc | 2 +- .../tests/ui/graph/read/entity/arithmetic-comparisons-and.jsonc | 2 +- .../tests/ui/graph/read/entity/arithmetic-comparisons-or.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/boolean-literal.jsonc | 2 +- .../hashql/eval/tests/ui/graph/read/entity/call-identity.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/complex-object-error.jsonc | 2 +- .../ui/graph/read/entity/computed-path-indexing-error.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/constructor-call-none.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/equality-comparison.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/field-access-struct.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/field-access-tuple.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/field-in-dict-key.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/field-in-dict-value.jsonc | 2 +- .../hashql/eval/tests/ui/graph/read/entity/field-in-list.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/field-in-struct-entry.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/field-in-struct.jsonc | 2 +- .../hashql/eval/tests/ui/graph/read/entity/field-in-tuple.jsonc | 2 +- .../hashql/eval/tests/ui/graph/read/entity/if-filter-expr.jsonc | 2 +- .../hashql/eval/tests/ui/graph/read/entity/if-filter.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/input-field-access.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/input-index-access.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/input-parameter.jsonc | 2 +- .../tests/ui/graph/read/entity/invalid-field-access-error.jsonc | 2 +- .../tests/ui/graph/read/entity/invalid-index-access-error.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/invalid-vertex-query.jsonc | 2 +- .../hashql/eval/tests/ui/graph/read/entity/let-expression.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/let-propagation.jsonc | 2 +- .../hashql/eval/tests/ui/graph/read/entity/logical-and-or.jsonc | 2 +- .../hashql/eval/tests/ui/graph/read/entity/logical-or-and.jsonc | 2 +- .../tests/ui/graph/read/entity/nested-binary-operation.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/nested-let-bindings.jsonc | 2 +- .../tests/ui/graph/read/entity/scalar-property-filter.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/top-level-variable.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/top-type-assertion.jsonc | 2 +- .../ui/graph/read/entity/type-assertion-in-comparison.jsonc | 2 +- .../eval/tests/ui/graph/read/entity/unsupported-closure.jsonc | 2 +- .../ui/graph/read/entity/unsupported-nested-graph-read.jsonc | 2 +- .../ui/graph/read/entity/unsupported-type-constructor.jsonc | 2 +- .../graph-hoisting/nested-boolean-expression-outer-let.jsonc | 2 +- .../ui/lower/graph-hoisting/nested-boolean-expression.jsonc | 2 +- libs/@local/hashql/hir/tests/ui/lower/specialization/bool.jsonc | 2 +- libs/@local/hashql/hir/tests/ui/lower/specialization/cmp.jsonc | 2 +- .../hashql/hir/tests/ui/lower/specialization/complex.jsonc | 2 +- 48 files changed, 48 insertions(+), 48 deletions(-) diff --git a/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/alias-symbol.jsonc b/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/alias-symbol.jsonc index 8caec921888..31959b5ee3e 100644 --- a/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/alias-symbol.jsonc +++ b/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/alias-symbol.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Should be able to alias to a symbol and from a symbol -// oxfmt-ignore +// prettier-ignore ["let", "!&&", "&&", ["!&&", "a", "b"] ] diff --git a/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/nested-let.jsonc b/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/nested-let.jsonc index ac94c4b197b..d5be628419a 100644 --- a/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/nested-let.jsonc +++ b/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/nested-let.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test nested let expressions with proper scoping -// oxfmt-ignore +// prettier-ignore ["let", "a", "c", ["let", "b", "d", ["let", "a", "e", diff --git a/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/re-assign.jsonc b/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/re-assign.jsonc index c43fd557220..f82614ebffd 100644 --- a/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/re-assign.jsonc +++ b/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/re-assign.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Given b = c; a = b; `a` should be replaced as `d` -// oxfmt-ignore +// prettier-ignore ["let", "c", "d", ["let", "b", "c", ["let", "a", "b", diff --git a/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/restoration-bindings.jsonc b/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/restoration-bindings.jsonc index 8256e883c54..0a7c5d13832 100644 --- a/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/restoration-bindings.jsonc +++ b/libs/@local/hashql/ast/tests/ui/lowering/pre-expansion-name-resolver/restoration-bindings.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test bindings are restored after let expressions -// oxfmt-ignore +// prettier-ignore ["if", {"#literal": true}, ["let", "x", "outer", ["x", {"#literal": 2}, { "#literal": 1 }] diff --git a/libs/@local/hashql/ast/tests/ui/lowering/type-extractor/definition/result.jsonc b/libs/@local/hashql/ast/tests/ui/lowering/type-extractor/definition/result.jsonc index 03afd1491bc..15bf89bfdea 100644 --- a/libs/@local/hashql/ast/tests/ui/lowering/type-extractor/definition/result.jsonc +++ b/libs/@local/hashql/ast/tests/ui/lowering/type-extractor/definition/result.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test if we can properly re-declare the Result type -// oxfmt-ignore +// prettier-ignore ["newtype", "Ok", "T", ["newtype", "Err", "E", ["type", "Result", ["|", "Ok", "Err"], diff --git a/libs/@local/hashql/ast/tests/ui/lowering/type-extractor/definition/unused-generic-parameter.jsonc b/libs/@local/hashql/ast/tests/ui/lowering/type-extractor/definition/unused-generic-parameter.jsonc index 60b4d52d6a2..af29e9a1cfc 100644 --- a/libs/@local/hashql/ast/tests/ui/lowering/type-extractor/definition/unused-generic-parameter.jsonc +++ b/libs/@local/hashql/ast/tests/ui/lowering/type-extractor/definition/unused-generic-parameter.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Test that we emit an issue if a generic parameter is unused -// oxfmt-ignore +// prettier-ignore ["newtype", "Some", { "#struct": {"value": "T"} }, ["newtype", "None", "Null", ["type", "Option", ["|", {"#tuple": ["Some"]}, {"#tuple": ["None"]}], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/arithmetic-comparisons-and.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/arithmetic-comparisons-and.jsonc index 8a75d7b43fc..3f92710595d 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/arithmetic-comparisons-and.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/arithmetic-comparisons-and.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test arithmetic comparison operations (>, >=, <, <=) with numeric literals -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/arithmetic-comparisons-or.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/arithmetic-comparisons-or.jsonc index d342ff82c4a..6dfc94df30f 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/arithmetic-comparisons-or.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/arithmetic-comparisons-or.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test arithmetic comparison operations (>, >=, <, <=) with numeric literals -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/boolean-literal.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/boolean-literal.jsonc index bb8accfe191..89a08aa3b0c 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/boolean-literal.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/boolean-literal.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test boolean literal values in filter expressions -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/call-identity.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/call-identity.jsonc index 77410e2fefc..bbfb7bff1f7 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/call-identity.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/call-identity.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Function calls not supported in filter expressions -// oxfmt-ignore +// prettier-ignore ["let", "identity", ["fn", {"#tuple": ["T"]}, {"#struct": {"value": "T"}}, "T", "value"], ["::graph::tail::collect", ["::graph::body::filter", diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/complex-object-error.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/complex-object-error.jsonc index 28c1da2c2c2..6e6495ec3fa 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/complex-object-error.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/complex-object-error.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Complex objects cannot be queried directly in filter expressions -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/computed-path-indexing-error.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/computed-path-indexing-error.jsonc index 3d92fda1c0f..1b731a38bb3 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/computed-path-indexing-error.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/computed-path-indexing-error.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Test error when using computed paths for indexing in filter expressions -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/constructor-call-none.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/constructor-call-none.jsonc index f31d6a4aada..521b9496e92 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/constructor-call-none.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/constructor-call-none.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test constructor calls with None type in filter expressions -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/equality-comparison.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/equality-comparison.jsonc index f9bae44f74e..03f50f7fbce 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/equality-comparison.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/equality-comparison.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test equality (==) and inequality (!=) comparison operators -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-access-struct.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-access-struct.jsonc index 80b9aecf8b5..756ea98cb76 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-access-struct.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-access-struct.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Field access on values should succeed -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-access-tuple.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-access-tuple.jsonc index 67f3f915f8f..33593ee82ec 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-access-tuple.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-access-tuple.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Field access on values should succeed -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-dict-key.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-dict-key.jsonc index 4f50392e036..09a6bd2a85d 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-dict-key.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-dict-key.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Paths inside data constructs are unsupported -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-dict-value.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-dict-value.jsonc index 82f4e96830c..ceb60dd5927 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-dict-value.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-dict-value.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Paths inside data constructs are unsupported -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-list.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-list.jsonc index 60f5e0f7561..3d7a94d26e7 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-list.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-list.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Paths inside data constructs are unsupported -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-struct-entry.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-struct-entry.jsonc index 9f61f634b94..14fc38dfe05 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-struct-entry.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-struct-entry.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Mentions of the variable inside data constructs are unsupported -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-struct.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-struct.jsonc index 5fed7061e38..5e56de0632e 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-struct.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-struct.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Paths inside data constructs are unsupported -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-tuple.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-tuple.jsonc index 5cd247f1325..806f7e9a819 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-tuple.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-tuple.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Paths inside data constructs are unsupported -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/if-filter-expr.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/if-filter-expr.jsonc index 25fa03ce065..19775b76b99 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/if-filter-expr.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/if-filter-expr.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Test if filter with branch fails -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/if-filter.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/if-filter.jsonc index a1a31367543..376b951cac4 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/if-filter.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/if-filter.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test if filter with branch fails -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/input-field-access.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/input-field-access.jsonc index 8f862557bcf..8d90be06e07 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/input-field-access.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/input-field-access.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test field access on input parameter values -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/input-index-access.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/input-index-access.jsonc index d4e1e6bd3b1..b579e9bee9b 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/input-index-access.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/input-index-access.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test index access on input parameter values -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/input-parameter.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/input-parameter.jsonc index ff3eff06aca..fdeac99dfaf 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/input-parameter.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/input-parameter.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test input parameter usage in entity filter expressions -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-field-access-error.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-field-access-error.jsonc index 32e286d1c9a..6def4aa9358 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-field-access-error.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-field-access-error.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Test internal compiler error on invalid field access -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-index-access-error.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-index-access-error.jsonc index f6fe4c473ba..6c18f653947 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-index-access-error.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-index-access-error.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Test internal compiler error on invalid index access -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-vertex-query.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-vertex-query.jsonc index 71ac6a4f39c..977b7d3b5b4 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-vertex-query.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-vertex-query.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Test error when querying vertex directly without specific path -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/let-expression.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/let-expression.jsonc index b7505636d8b..f8a770a832a 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/let-expression.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/let-expression.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test let expressions within filter comparisons -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/let-propagation.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/let-propagation.jsonc index 4e265919d88..47ee09e18a1 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/let-propagation.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/let-propagation.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Let bindings propagate correctly in graph operations -// oxfmt-ignore +// prettier-ignore ["let", "foo", {"#literal": 2}, ["::graph::tail::collect", ["::graph::body::filter", diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/logical-and-or.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/logical-and-or.jsonc index 4fafc7b78fd..ab6c0535913 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/logical-and-or.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/logical-and-or.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test logical AND and OR operations with boolean literals -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/logical-or-and.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/logical-or-and.jsonc index aa8b02f1ae9..39014ed6a57 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/logical-or-and.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/logical-or-and.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test logical AND and OR operations with boolean literals -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/nested-binary-operation.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/nested-binary-operation.jsonc index 73e4f572fc7..3f58d179224 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/nested-binary-operation.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/nested-binary-operation.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Nested binary operations not supported in filter expressions -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/nested-let-bindings.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/nested-let-bindings.jsonc index 29289988de5..93cc67cc2f3 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/nested-let-bindings.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/nested-let-bindings.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test nested let bindings in filter expressions -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/scalar-property-filter.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/scalar-property-filter.jsonc index b44645405f8..19b3da4129b 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/scalar-property-filter.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/scalar-property-filter.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test basic scalar property filtering by entity UUID -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/top-level-variable.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/top-level-variable.jsonc index b18e5c70477..537f19a78af 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/top-level-variable.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/top-level-variable.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test variables at the top level of filter expressions -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/top-type-assertion.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/top-type-assertion.jsonc index cd60475a2d1..d2011129473 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/top-type-assertion.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/top-type-assertion.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test type assertions (is operator) in filter expressions -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/type-assertion-in-comparison.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/type-assertion-in-comparison.jsonc index 6c709e2a8d7..f70cb592e89 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/type-assertion-in-comparison.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/type-assertion-in-comparison.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test type assertions within comparison operations -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-closure.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-closure.jsonc index aed7855d673..655f1a460bf 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-closure.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-closure.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Closures not supported in filter expressions -// oxfmt-ignore +// prettier-ignore ["let", "identity", ["fn", {"#tuple": ["T"]}, {"#struct": {"value": "T"}}, "T", "value"], ["::graph::tail::collect", ["::graph::body::filter", diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-nested-graph-read.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-nested-graph-read.jsonc index 3c287510741..78a54c3bf19 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-nested-graph-read.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-nested-graph-read.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Nested graph read operations not supported in filter expressions -// oxfmt-ignore +// prettier-ignore ["let", "read", ["::graph::tail::collect", ["::graph::body::filter", diff --git a/libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-type-constructor.jsonc b/libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-type-constructor.jsonc index a34b2e7e02e..e647ac27d2f 100644 --- a/libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-type-constructor.jsonc +++ b/libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-type-constructor.jsonc @@ -1,6 +1,6 @@ //@ run: fail //@ description: Type constructors not supported as values in filter expressions -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/hir/tests/ui/lower/graph-hoisting/nested-boolean-expression-outer-let.jsonc b/libs/@local/hashql/hir/tests/ui/lower/graph-hoisting/nested-boolean-expression-outer-let.jsonc index 1e0f1d71782..f8e37b03069 100644 --- a/libs/@local/hashql/hir/tests/ui/lower/graph-hoisting/nested-boolean-expression-outer-let.jsonc +++ b/libs/@local/hashql/hir/tests/ui/lower/graph-hoisting/nested-boolean-expression-outer-let.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test logical AND and OR operations with boolean literals -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/hir/tests/ui/lower/graph-hoisting/nested-boolean-expression.jsonc b/libs/@local/hashql/hir/tests/ui/lower/graph-hoisting/nested-boolean-expression.jsonc index 4fafc7b78fd..ab6c0535913 100644 --- a/libs/@local/hashql/hir/tests/ui/lower/graph-hoisting/nested-boolean-expression.jsonc +++ b/libs/@local/hashql/hir/tests/ui/lower/graph-hoisting/nested-boolean-expression.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test logical AND and OR operations with boolean literals -// oxfmt-ignore +// prettier-ignore ["::graph::tail::collect", ["::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], diff --git a/libs/@local/hashql/hir/tests/ui/lower/specialization/bool.jsonc b/libs/@local/hashql/hir/tests/ui/lower/specialization/bool.jsonc index 6aba1f77304..078be1df586 100644 --- a/libs/@local/hashql/hir/tests/ui/lower/specialization/bool.jsonc +++ b/libs/@local/hashql/hir/tests/ui/lower/specialization/bool.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test boolean specialization -// oxfmt-ignore +// prettier-ignore ["let", "and", ["&&", { "#literal": true }, { "#literal": false }], ["let", "or", ["||", { "#literal": true }, { "#literal": false }], "and" diff --git a/libs/@local/hashql/hir/tests/ui/lower/specialization/cmp.jsonc b/libs/@local/hashql/hir/tests/ui/lower/specialization/cmp.jsonc index e4fec61f6ea..b10f1538961 100644 --- a/libs/@local/hashql/hir/tests/ui/lower/specialization/cmp.jsonc +++ b/libs/@local/hashql/hir/tests/ui/lower/specialization/cmp.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: Test specialization of comparison functions -// oxfmt-ignore +// prettier-ignore ["let", "greaterThan", [">", { "#literal": 1 }, { "#literal": 2 }], ["let", "greaterThanOrEqual", [">=", { "#literal": 1 }, { "#literal": 2 }], ["let", "lessThan", ["<", { "#literal": 1 }, { "#literal": 2 }], diff --git a/libs/@local/hashql/hir/tests/ui/lower/specialization/complex.jsonc b/libs/@local/hashql/hir/tests/ui/lower/specialization/complex.jsonc index 812244216e0..9f27291372e 100644 --- a/libs/@local/hashql/hir/tests/ui/lower/specialization/complex.jsonc +++ b/libs/@local/hashql/hir/tests/ui/lower/specialization/complex.jsonc @@ -1,6 +1,6 @@ //@ run: pass //@ description: complex set of operations -// oxfmt-ignore +// prettier-ignore ["let", "foo", { "#literal": 1 }, ["let", "bar", { "#literal": 1 }, ["let", "equals", From 732afef5f904ef2e2f7ed98212685d503715491c Mon Sep 17 00:00:00 2001 From: Bilal Mahmoud <7252775+indietyp@users.noreply.github.com> Date: Wed, 13 May 2026 11:06:47 +0200 Subject: [PATCH 06/14] feat: format --- .claude/hooks/LICENSE.md | 261 ++- .claude/skills/documenting-rust-code/SKILL.md | 8 +- .../references/examples-and-links.md | 32 +- .../references/function-documentation.md | 4 +- .claude/skills/handling-rust-errors/SKILL.md | 8 +- .../references/documenting-errors.md | 14 +- .claude/skills/skill-creator/SKILL.md | 30 +- .../skill-creator/assets/SKILL.template.md | 8 +- .../references/output-patterns.md | 10 +- .../references/troubleshooting.md | 10 +- .claude/skills/testing-hashql/SKILL.md | 32 +- .../references/compiletest-guide.md | 74 +- .../references/mir-builder-guide.md | 120 +- .../references/mir-fluent-builder.md | 26 +- .../references/testing-strategies.md | 81 +- .../writing-hashql-diagnostics/SKILL.md | 14 +- .../references/guidelines.md | 16 +- .claude/skills/writing-hashql-jexpr/SKILL.md | 48 +- .../references/data-constructors.md | 18 +- .../references/special-forms.md | 122 +- .../references/syntax-reference.md | 91 +- .../references/type-dsl.md | 20 +- .../_examples/vscode/extensions-frontend.json | 2 +- .config/_examples/zed/settings.json | 4 +- .config/agents/README.md | 21 +- .config/agents/rules/ark-ui.md | 156 +- .config/agents/rules/zod.md | 13 +- .github/CONTRIBUTING.md | 2 +- .github/actions/clean-up-disk/action.yml | 1 - .github/actions/prune-repository/action.yml | 2 +- .github/licenses/LICENSE-CC.md | 112 +- .github/workflows/lint.yml | 12 - .lefthook.yml | 6 +- AGENTS.md | 2 +- CITATION.cff | 10 +- LICENSE.md | 1 + README.md | 5 +- apps/hash-ai-worker-ts/README.md | 2 +- apps/hash-ai-worker-ts/docker/Dockerfile | 2 +- .../scripts/bundle-workflow-code.ts | 8 +- .../get-web-page-summary-action.ai.test.ts | 1 - .../infer-entities-from-content-action.ts | 2 +- .../research-entities-action.ai.test.ts | 1 - .../check-delegated-tasks-agent.ai.test.ts | 1 - .../summarize-existing-entities.ai.test.ts | 1 - .../link-follower-agent.ai.test.ts | 1 - ...ant-links-from-content.optimize.ai.test.ts | 1 - .../shared/deduplicate-entities.ai.test.ts | 1 - .../simplify-for-llm-consumption.ai.test.ts | 1 - .../sub-coordinating-agent.ai.test.ts | 1 - .../get-entity-summaries-from-text.ai.test.ts | 1 - ...ty-summaries-from-text.optimize.ai.test.ts | 1 - .../infer-entity-claims-from-text.ai.test.ts | 1 - ...summaries-then-claims-from-text.ai.test.ts | 1 - .../propose-entities-from-claims.ai.test.ts | 1 - .../propose-entity-from-claims.ai.test.ts | 1 - .../get-web-page-activity.ai.test.ts | 1 - .../shared/get-llm-response.ai.test.ts | 1 - .../get-anthropic-response.ts | 4 +- .../get-llm-response/get-openai-reponse.ts | 2 +- .../judge-ai-output.optimize.ai.test.ts | 1 - .../match-existing-entity.optimize.ai.test.ts | 1 - .../shared/optimize-system-prompt.ts | 1 - apps/hash-ai-worker-ts/src/main.ts | 4 +- apps/hash-api/LICENSE.md | 261 ++- apps/hash-api/codegen.config.ts | 2 +- apps/hash-api/package.json | 2 +- .../src/graph/knowledge/primitive/entity.ts | 8 +- apps/hash-api/src/graphql/resolvers/index.ts | 4 +- apps/hash-api/src/instrument.mjs | 1 - apps/hash-api/views/consent.hbs | 67 +- apps/hash-api/views/layouts/main.hbs | 22 +- apps/hash-external-services/LICENSE.md | 261 ++- .../docker-compose.prod.yml | 12 +- .../docker-compose.test.yml | 6 +- .../provisioning/datasources/tempo.yml | 26 +- apps/hash-external-services/mimir/mimir.yml | 2 +- apps/hash-frontend/LICENSE.md | 261 ++- .../src/components/grid/grid.tsx | 1 - .../grid/utils/override-custom-renderers.tsx | 4 +- .../sandbox/framed-block/framed-block.tsx | 1 - .../sandbox/framed-block/index.html | 2 +- .../graphql/queries/knowledge/org.queries.ts | 12 +- .../queries/ontology/data-type.queries.ts | 12 +- apps/hash-frontend/src/pages/404.page.tsx | 2 +- .../pages/@/[shortname].page/profile-bio.tsx | 2 +- .../pages/@/[shortname]/[page-slug].page.tsx | 10 +- .../[page-slug].page/canvas-page.tsx | 1 - .../canvas-page/block-creation-dialog.tsx | 2 +- .../canvas-page/block-shape.tsx | 2 +- .../entities/[entity-uuid].page.tsx | 2 +- .../[entity-uuid].page/create-entity-page.tsx | 2 +- .../select-entity-type-page.tsx | 2 +- .../@/[shortname]/shared/flow-visualizer.tsx | 1 - .../shared/flow-visualizer/swimlane.tsx | 1 - .../types/shared/get-type-base-url.ts | 12 +- apps/hash-frontend/src/pages/_app.page.tsx | 1 - apps/hash-frontend/src/pages/actions.page.tsx | 2 +- .../src/pages/actions.page/draft-entities.tsx | 2 +- .../src/pages/actions.page/draft-entity.tsx | 2 +- .../hash-frontend/src/pages/entities.page.tsx | 2 +- .../pages/notes.page/editable-quick-note.tsx | 2 +- .../process.page/process-editor-wrapper.tsx | 1 - .../[shortname]/general.page.tsx | 2 +- .../[shortname]/integrations.page.tsx | 2 +- .../[shortname]/members.page.tsx | 2 +- .../settings/organizations/index.page.tsx | 2 +- .../src/pages/settings/security.page.tsx | 4 +- .../shared/accept-draft-entity-button.tsx | 4 +- .../block-collection/block-collection.tsx | 1 - .../shared/block-collection/block-view.tsx | 1 + .../collab/editor-connection.ts | 1 + .../comments/comment-block.tsx | 1 + .../comments/comment-text-field.tsx | 1 + .../comments/comment-thread.tsx | 1 + .../comments/create-block-comment-button.tsx | 3 +- .../comments/create-block-comment.tsx | 1 + .../block-collection/create-editor-view.ts | 1 + .../shared/block-collection/style.module.css | 5 +- .../src/pages/shared/data-type.tsx | 2 +- .../abstract-constraint.tsx | 6 +- .../number-constraints.tsx | 20 +- .../shared/constraint-text.tsx | 5 +- .../shared/data-type/data-type-labels.tsx | 6 +- .../src/pages/shared/entities-visualizer.tsx | 2 +- .../entities-visualizer/entities-table.tsx | 5 +- .../inputs/json-input/json-editor.tsx | 7 +- .../src/pages/shared/entity/query-editor.tsx | 2 +- .../src/pages/shared/graph-visualizer.tsx | 1 - .../shared/use-event-handlers.ts | 8 +- .../shared/markdown/elements/snippet.tsx | 22 +- .../src/pages/shared/pdf-preview.tsx | 1 - .../shared/shared/type-editor-styling.tsx | 5 +- apps/hash-frontend/src/pages/signin.page.tsx | 4 +- .../signup.page/accept-org-invitation.tsx | 5 +- .../layout/layout-with-sidebar/sidebar.tsx | 2 +- .../src/shared/layout/plain-layout.tsx | 2 +- apps/hash-frontend/vercel-install.sh | 2 +- apps/hash-graph/LICENSE.md | 261 ++- apps/hash-integration-worker/LICENSE.md | 261 ++- .../hash-integration-worker/docker/Dockerfile | 2 +- .../scripts/bundle-workflow-code.ts | 8 +- .../src/activities/flow-activities.ts | 6 +- apps/hash-integration-worker/src/main.ts | 6 +- apps/mcp/linear/LICENSE.md | 261 ++- apps/mcp/linear/package.json | 2 +- apps/mcp/notion/LICENSE.md | 261 ++- apps/mcp/notion/package.json | 2 +- apps/petrinaut-website/index.html | 62 +- apps/petrinaut-website/package.json | 4 +- apps/petrinaut-website/src/main.tsx | 1 - apps/petrinaut-website/vercel-install.sh | 2 +- apps/plugin-browser/LICENSE.md | 261 ++- apps/plugin-browser/src/pages/options.html | 4 +- .../src/pages/options/options-contents.tsx | 1 - apps/plugin-browser/src/pages/popup.html | 2 +- .../src/pages/popup/popup-contents.tsx | 1 - apps/plugin-browser/src/pages/working.html | 2 +- .../src/pages/working/working-contents.tsx | 1 - biome.jsonc | 79 - infra/docker/LICENSE.md | 261 ++- infra/docker/api/prod/Dockerfile | 2 +- infra/docker/frontend/prod/Dockerfile | 2 +- libs/@blockprotocol/graph/package.json | 4 +- .../graph/src/custom-element.ts | 8 +- .../graph/src/graph-block-handler.ts | 8 +- .../src/stdlib/subgraph/edge/link-entity.ts | 8 +- .../stdlib/subgraph/element/map-revisions.ts | 23 +- .../graph/src/stdlib/subgraph/roots.ts | 2 +- .../graph/src/types/block-graph.ts | 8 +- .../subgraph/edges/generic-outward-edge.ts | 4 +- .../type-system/rust/types/index.snap.d.ts | 176 +- .../type-system/typescript/package.json | 2 +- .../type-system/typescript/src/main.ts | 5 +- .../typescript/src/native/entity.ts | 8 +- libs/@hashintel/block-design-system/README.md | 1 - .../block-design-system/package.json | 4 +- libs/@hashintel/design-system/README.md | 1 - libs/@hashintel/design-system/package.json | 4 +- .../@hashintel/design-system/src/skeleton.tsx | 1 - .../.ladle/components/preview-frame.tsx | 2 +- .../.ladle/components/variant-grid.tsx | 3 +- .../@hashintel/ds-components/.ladle/index.css | 26 +- libs/@hashintel/ds-components/AGENTS.md | 61 +- libs/@hashintel/ds-components/CONTRIBUTING.md | 36 +- .../_docs/research/park-ui-porting-guide.md | 130 +- .../@hashintel/ds-components/eslint.config.js | 3 +- libs/@hashintel/ds-components/package.json | 4 +- .../scripts/generate-colors-radix.ts | 4 +- .../ds-components/scripts/generate-tokens.ts | 2 + .../scripts/migrate-beta-fractal-pilots.ts | 1 + .../ds-components/scripts/transforms.test.ts | 1 + .../ds-components/src/beta/button.tsx | 4 +- .../ds-components/src/beta/loader.tsx | 6 +- .../ds-components/src/beta/pagination.tsx | 3 +- .../ds-components/src/beta/switch.tsx | 5 +- .../ds-components/src/beta/tags-input.tsx | 6 +- .../stories/tokens.color-palettes.story.tsx | 10 +- .../preset/stories/tokens.shadows.story.tsx | 10 +- .../stories/tokens.typography.story.tsx | 5 +- libs/@hashintel/ds-helpers/AGENTS.md | 20 +- .../petrinaut/.storybook/preview.tsx | 1 - libs/@hashintel/petrinaut/README.md | 1 - .../petrinaut/docs/drawing-a-net.md | 40 +- libs/@hashintel/petrinaut/docs/examples.md | 10 +- .../petrinaut/docs/petri-net-extensions.md | 22 +- .../petrinaut/docs/useful-patterns.md | 10 +- .../petrinaut/docs/visual-settings.md | 10 +- libs/@hashintel/petrinaut/package.json | 4 +- .../petrinaut/panda.config.shared.ts | 2 +- .../0001-core-react-ui-split/01-motivation.md | 2 +- .../0001-core-react-ui-split/03-layering.md | 8 +- .../04-core-instance.md | 49 +- .../0001-core-react-ui-split/05-simulation.md | 28 +- .../06-react-bindings.md | 12 +- .../0001-core-react-ui-split/08-migration.md | 26 +- .../0001-core-react-ui-split/10-public-api.md | 26 +- .../11-headless-usage.md | 67 +- .../rfc/0001-core-react-ui-split/README.md | 30 +- libs/@hashintel/petrinaut/src/core/index.ts | 16 +- .../petrinaut/src/core/simulation/README.md | 25 +- .../src/core/simulation/simulation.test.ts | 4 +- .../src/core/simulation/simulator/README.md | 17 +- .../src/core/simulation/worker/README.md | 10 +- .../worker/simulation.worker.test.ts | 6 +- .../petrinaut/src/examples/broken-machines.ts | 2 +- .../src/examples/deployment-pipeline.ts | 2 +- .../src/examples/satellites-launcher.ts | 2 +- .../petrinaut/src/examples/satellites.ts | 2 +- .../petrinaut/src/examples/sir-model.ts | 2 +- .../src/examples/supply-chain-stochastic.ts | 2 +- libs/@hashintel/petrinaut/src/main.ts | 5 +- .../petrinaut/src/react/hooks/use-lsp.ts | 1 + .../petrinaut/src/react/lsp/provider.tsx | 5 +- .../src/react/mutation-provider.test.tsx | 12 +- .../petrinaut/src/react/playback/README.md | 2 +- .../src/react/simulation/provider.tsx | 2 +- .../src/react/state/editor-context.ts | 2 +- .../src/react/state/sdcpn-context.ts | 5 +- .../src/react/state/use-selection.ts | 2 +- .../src/react/state/user-settings-context.ts | 10 +- .../petrinaut/src/ui/clipboard/clipboard.ts | 4 +- .../src/ui/lib/snap-position-to-grid.ts | 4 +- .../petrinaut/src/ui/lib/viewport.test.ts | 5 +- .../petrinaut/src/ui/monaco/provider.tsx | 16 +- .../petrinaut/src/ui/petrinaut.stories.tsx | 2 +- .../@hashintel/petrinaut/src/ui/petrinaut.tsx | 3 +- .../BottomBar/playback-settings-menu.tsx | 4 +- .../components/BottomBar/toolbar-modes.tsx | 2 +- .../BottomBar/use-keyboard-shortcuts.ts | 2 +- .../Editor/components/TopBar/top-bar.tsx | 4 +- .../TopBar/version-history-button.tsx | 2 +- .../src/ui/views/Editor/editor-view.tsx | 14 +- .../views/Editor/panels/BottomPanel/panel.tsx | 12 +- .../BottomPanel/subviews/diagnostics.tsx | 6 +- .../subviews/simulation-settings.tsx | 8 +- .../subviews/simulation-timeline.tsx | 19 +- .../views/Editor/panels/LeftSideBar/panel.tsx | 4 +- .../subviews/differential-equations-list.tsx | 8 +- .../LeftSideBar/subviews/entities-tree.tsx | 10 +- .../subviews/filterable-list-sub-view.tsx | 10 +- .../LeftSideBar/subviews/nodes-list.tsx | 2 +- .../LeftSideBar/subviews/parameters-list.tsx | 8 +- .../LeftSideBar/subviews/search-panel.tsx | 6 +- .../LeftSideBar/subviews/types-list.tsx | 8 +- .../PropertiesPanel/arc-properties/main.tsx | 8 +- .../differential-equation-properties/main.tsx | 4 +- .../subviews/main.tsx | 10 +- .../PropertiesPanel/multi-selection-panel.tsx | 10 +- .../Editor/panels/PropertiesPanel/panel.tsx | 12 +- .../parameter-properties/main.tsx | 2 +- .../parameter-properties/subviews/main.tsx | 4 +- .../PropertiesPanel/place-properties/main.tsx | 4 +- .../place-properties/subviews/main.tsx | 8 +- .../initial-state-editor.tsx | 4 +- .../subviews/place-initial-state/subview.tsx | 4 +- .../subviews/place-visualizer/subview.tsx | 18 +- .../properties-panel.stories.tsx | 2 +- .../transition-properties/main.tsx | 4 +- .../transition-properties/subviews/main.tsx | 4 +- .../transition-firing-time/subview.tsx | 4 +- .../subviews/transition-results/subview.tsx | 4 +- .../PropertiesPanel/type-properties/main.tsx | 2 +- .../type-properties/subviews/main.tsx | 2 +- .../SimulateView/create-experiment-drawer.tsx | 10 +- .../SimulateView/create-metric-drawer.tsx | 6 +- .../create-scenario-drawer.stories.tsx | 2 +- .../SimulateView/create-scenario-drawer.tsx | 6 +- .../panels/SimulateView/metric-form.tsx | 2 +- .../panels/SimulateView/scenario-form.tsx | 16 +- .../panels/SimulateView/simulate-view.tsx | 8 +- .../SimulateView/view-metric-drawer.tsx | 6 +- .../SimulateView/view-scenario-drawer.tsx | 6 +- .../src/ui/views/Editor/run-auto-layout.ts | 2 +- .../SDCPN/components/classic-place-node.tsx | 4 +- .../ui/views/SDCPN/components/mini-map.tsx | 2 +- .../ui/views/SDCPN/components/place-node.tsx | 2 +- .../SDCPN/components/viewport-controls.tsx | 2 +- .../components/viewport-settings-dialog.tsx | 4 +- .../SDCPN/hooks/use-apply-node-changes.ts | 4 +- .../SDCPN/hooks/use-recenter-on-panel-open.ts | 6 +- .../SDCPN/hooks/use-sdcpn-to-react-flow.ts | 10 +- .../src/ui/views/SDCPN/sdcpn-view.tsx | 9 +- libs/@hashintel/petrinaut/vite.config.ts | 2 +- libs/@hashintel/query-editor/LICENSE.md | 163 +- libs/@hashintel/query-editor/eslint.config.js | 2 +- libs/@hashintel/query-editor/package.json | 4 +- libs/@hashintel/refractive/README.md | 2 +- libs/@hashintel/refractive/package.json | 6 +- libs/@hashintel/type-editor/LICENSE.md | 163 +- libs/@hashintel/type-editor/eslint.config.js | 2 +- libs/@hashintel/type-editor/package.json | 4 +- .../property-list-card/property-row.tsx | 4 +- libs/@local/advanced-types/LICENSE.md | 261 ++- .../effect-dns/hickory/tests/dummy.test.ts | 3 +- libs/@local/eslint/LICENSE.md | 261 ++- libs/@local/eslint/src/builtIn.ts | 3 +- libs/@local/eslint/src/deprecated/base.ts | 12 +- libs/@local/eslint/src/deprecated/block.ts | 3 +- libs/@local/eslint/src/index.ts | 6 +- libs/@local/eslint/src/react.ts | 3 +- libs/@local/eslint/src/vitest.ts | 5 +- libs/@local/graph/api/LICENSE.md | 261 ++- libs/@local/graph/api/openapi/openapi.json | 1816 ++++------------- .../graph/authorization/types/index.snap.d.ts | 462 +++-- .../@local/graph/migrations-macros/LICENSE.md | 261 ++- libs/@local/graph/migrations/LICENSE.md | 261 ++- libs/@local/graph/postgres-store/LICENSE.md | 261 ++- libs/@local/graph/sdk/typescript/LICENSE.md | 261 ++- .../@local/graph/sdk/typescript/src/entity.ts | 47 +- .../graph/sdk/typescript/src/subgraph.ts | 4 +- libs/@local/graph/store/LICENSE.md | 261 ++- libs/@local/graph/store/types/index.snap.d.ts | 148 +- libs/@local/graph/type-defs/LICENSE.md | 261 ++- libs/@local/graph/type-fetcher/LICENSE.md | 261 ++- .../typescript/src/binary/MutableBuffer.ts | 1 - .../client/typescript/src/codec/Decoder.ts | 3 +- .../client/typescript/src/codec/Encoder.ts | 3 +- .../typescript/src/codec/JsonDecoder.ts | 1 - .../harpc/client/typescript/src/net/Client.ts | 1 - .../client/typescript/src/net/Connection.ts | 3 +- .../typescript/src/net/NetworkLogger.ts | 1 - .../client/typescript/src/net/Transaction.ts | 1 - .../client/typescript/src/net/internal/dns.ts | 4 +- .../src/net/internal/peerConnection.ts | 5 +- .../typescript/src/net/internal/transport.ts | 1 - .../client/typescript/src/types/ErrorCode.ts | 6 +- .../src/types/ProcedureDescriptor.ts | 5 +- .../typescript/src/types/ProcedureId.ts | 6 +- .../typescript/src/types/ResponseKind.ts | 11 +- .../src/types/SubsystemDescriptor.ts | 5 +- .../typescript/src/types/SubsystemId.ts | 6 +- .../client/typescript/src/types/Version.ts | 6 +- .../src/wire-protocol/RequestIdProducer.ts | 1 - .../src/wire-protocol/models/Payload.ts | 6 +- .../src/wire-protocol/models/Protocol.ts | 7 +- .../wire-protocol/models/ProtocolVersion.ts | 6 +- .../wire-protocol/models/request/Request.ts | 5 +- .../models/request/RequestBegin.ts | 6 +- .../models/request/RequestBody.ts | 5 +- .../models/request/RequestFlags.ts | 7 +- .../models/request/RequestFrame.ts | 6 +- .../models/request/RequestHeader.ts | 5 +- .../wire-protocol/models/request/RequestId.ts | 6 +- .../wire-protocol/models/response/Response.ts | 5 +- .../models/response/ResponseBegin.ts | 6 +- .../models/response/ResponseBody.ts | 5 +- .../models/response/ResponseFlags.ts | 7 +- .../models/response/ResponseFrame.ts | 6 +- .../models/response/ResponseHeader.ts | 5 +- .../stream/RequestToBytesStream.ts | 2 +- .../tests/wire-protocol/decode.test.ts | 3 +- .../tests/wire-protocol/encode.test.ts | 1 - libs/@local/hash-backend-utils/LICENSE.md | 261 ++- .../hash-backend-utils/src/queue/redis.ts | 6 +- .../interceptors/activities/sentry.ts | 4 +- .../temporal/interceptors/workflows/sentry.ts | 4 +- .../src/temporal/worker-bootstrap.ts | 8 +- libs/@local/hash-backend-utils/src/vault.ts | 6 +- libs/@local/hash-isomorphic-utils/LICENSE.md | 261 ++- .../@local/hash-isomorphic-utils/package.json | 2 +- .../src/create-apollo-client.ts | 4 +- .../src/entity-store-plugin.ts | 36 +- .../hash-isomorphic-utils/src/entity-store.ts | 2 +- .../src/flows/action-definitions.ts | 105 +- .../src/flows/temporal-types.ts | 4 +- .../src/graphql/type-defs/embed.typedef.ts | 1 - .../type-defs/knowledge/entity.typedef.ts | 4 +- .../type-defs/knowledge/flow.typedef.ts | 5 +- .../type-defs/knowledge/org.typedef.ts | 4 +- .../type-defs/ontology/data-type.typedef.ts | 17 +- .../src/graphql/type-defs/schema.ts | 2 +- .../src/prosemirror-manager.ts | 22 +- libs/@local/hash-isomorphic-utils/src/save.ts | 2 +- .../src/simplify-properties.ts | 21 +- libs/@local/hash-isomorphic-utils/src/text.ts | 2 +- .../src/wrap-entities-plugin.ts | 2 +- libs/@local/hashql/README.md | 128 +- libs/@local/hashql/compiletest/README.md | 57 +- .../ui/lower/inference/dict-key-var.jsonc | 7 +- .../tests/ui/reify/dict-computed-key.jsonc | 7 +- libs/@local/hashql/syntax-jexpr/README.md | 50 +- .../internal-api-client/typescript/api.ts | 19 +- .../internal-api-client/typescript/base.ts | 3 +- .../internal-api-client/typescript/common.ts | 5 +- .../typescript/package.json | 2 +- libs/@local/repo-chores/node/LICENSE.md | 261 ++- .../repo-chores/node/scripts/prepublish.ts | 2 +- .../node/scripts/shared/update-json.ts | 4 +- .../skill-management/generate-skill-rules.ts | 2 +- libs/@local/status/typescript/README.md | 1 - libs/@local/tsconfig/LICENSE.md | 261 ++- libs/README.md | 12 +- libs/darwin-kperf/README.md | 14 +- package.json | 10 +- tests/graph/benches/LICENSE.md | 261 ++- tests/graph/http/LICENSE.md | 261 ++- tests/graph/integration/LICENSE.md | 261 ++- tests/graph/test-data/rust/LICENSE.md | 261 ++- tests/hash-backend-integration/LICENSE.md | 261 ++- .../src/tests/email.test.ts | 1 - tests/hash-backend-load/LICENSE.md | 261 ++- tests/hash-playwright/LICENSE.md | 261 ++- 423 files changed, 7007 insertions(+), 7919 deletions(-) delete mode 100644 biome.jsonc diff --git a/.claude/hooks/LICENSE.md b/.claude/hooks/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/.claude/hooks/LICENSE.md +++ b/.claude/hooks/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/.claude/skills/documenting-rust-code/SKILL.md b/.claude/skills/documenting-rust-code/SKILL.md index c9ef1df1bda..3bd302c7aef 100644 --- a/.claude/skills/documenting-rust-code/SKILL.md +++ b/.claude/skills/documenting-rust-code/SKILL.md @@ -116,7 +116,7 @@ Use explicit `# Arguments` section: ### Module Documentation -```rust +````rust //! Entity management functionality. //! //! Main types: @@ -128,11 +128,11 @@ Use explicit `# Arguments` section: //! ``` //! use hash_graph::entity::Entity; //! ``` -``` +```` ### Examples with Error Handling -```rust +````rust /// # Examples /// /// ```rust @@ -140,7 +140,7 @@ Use explicit `# Arguments` section: /// assert_eq!(entities.len(), 2); /// # Ok::<(), Box>(()) /// ``` -``` +```` ## Verification diff --git a/.claude/skills/documenting-rust-code/references/examples-and-links.md b/.claude/skills/documenting-rust-code/references/examples-and-links.md index 231c66ddf5c..953746a7c44 100644 --- a/.claude/skills/documenting-rust-code/references/examples-and-links.md +++ b/.claude/skills/documenting-rust-code/references/examples-and-links.md @@ -79,7 +79,7 @@ With link definition: ### Basic Example Structure -```rust +````rust /// # Examples /// /// ```rust @@ -89,7 +89,7 @@ With link definition: /// assert_eq!(entity.id(), id); /// # Ok::<(), Box>(()) /// ``` -``` +```` ### Example Checklist @@ -105,7 +105,7 @@ With link definition: Use `#` to hide necessary setup from docs display: -```rust +````rust /// # Examples /// /// ```rust @@ -118,7 +118,7 @@ Use `#` to hide necessary setup from docs display: /// # Ok(()) /// # } /// ``` -``` +```` **What renders:** @@ -133,7 +133,7 @@ println!("Found: {}", entity.name); ### Using `?` Operator -```rust +````rust /// # Examples /// /// ```rust @@ -141,18 +141,18 @@ println!("Found: {}", entity.name); /// assert!(result.is_valid()); /// # Ok::<(), Box>(()) /// ``` -``` +```` ### Using `expect` for Infallible Cases -```rust +````rust /// # Examples /// /// ```rust /// let config = Config::default(); /// let value = config.get("key").expect("should have default key"); /// ``` -``` +```` --- @@ -160,7 +160,7 @@ println!("Found: {}", entity.name); Show realistic usage patterns: -```rust +````rust /// # Examples /// /// ```rust @@ -179,7 +179,7 @@ Show realistic usage patterns: /// # Ok(()) /// # } /// ``` -``` +```` --- @@ -187,7 +187,7 @@ Show realistic usage patterns: Use `//!` for module-level docs: -```rust +````rust //! Entity management functionality. //! //! This module provides types and functions for creating, updating, @@ -208,7 +208,7 @@ Use `//!` for module-level docs: //! store.save(&entity)?; //! # Ok::<(), Box>(()) //! ``` -``` +```` --- @@ -234,7 +234,7 @@ Document performance characteristics when relevant: ## Async Documentation -```rust +````rust /// Processes entity asynchronously. /// /// # Concurrency @@ -253,13 +253,13 @@ Document performance characteristics when relevant: /// # } /// ``` pub async fn process_async(&self, entity: Entity) -> Result { -``` +```` --- ## Complete Example -```rust +````rust /// Validates and creates entity with type checking. /// /// Takes `properties` and validates them against the entity's type schema. @@ -311,7 +311,7 @@ pub fn create_entity( properties: Vec<(String, Value)>, web_id: WebId, ) -> Result> { -``` +```` --- diff --git a/.claude/skills/documenting-rust-code/references/function-documentation.md b/.claude/skills/documenting-rust-code/references/function-documentation.md index e5eeda2756e..092dec1fea2 100644 --- a/.claude/skills/documenting-rust-code/references/function-documentation.md +++ b/.claude/skills/documenting-rust-code/references/function-documentation.md @@ -212,7 +212,7 @@ Add `# Performance` sections for performance-critical functions: ## Complete Example -```rust +````rust /// Validates and creates a new entity in the system. /// /// Takes the provided `properties` and validates them against the entity's @@ -265,7 +265,7 @@ pub fn create_entity( web_id: WebId, account: &Account, ) -> Result> { -``` +```` --- diff --git a/.claude/skills/handling-rust-errors/SKILL.md b/.claude/skills/handling-rust-errors/SKILL.md index 69bed0220c3..5caa5522117 100644 --- a/.claude/skills/handling-rust-errors/SKILL.md +++ b/.claude/skills/handling-rust-errors/SKILL.md @@ -55,10 +55,10 @@ Code in `libs/@local/hashql/*` uses the `hashql-diagnostics` crate instead of `e **Which approach to use:** -| Location | Error Handling | -|-----------------------------------------|-----------------------------------------------------------------------------------------------------------| -| `libs/@local/hashql/*` (compiler code) | Use `hashql-diagnostics` → See [writing-hashql-diagnostics](../writing-hashql-diagnostics/SKILL.md) skill | -| Everywhere else | Use `error-stack` patterns from this skill | +| Location | Error Handling | +| -------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `libs/@local/hashql/*` (compiler code) | Use `hashql-diagnostics` → See [writing-hashql-diagnostics](../writing-hashql-diagnostics/SKILL.md) skill | +| Everywhere else | Use `error-stack` patterns from this skill | Traditional `error-stack` patterns still apply for HashQL infrastructure code (CLI, file I/O, configuration) that doesn't involve compiler diagnostics. diff --git a/.claude/skills/handling-rust-errors/references/documenting-errors.md b/.claude/skills/handling-rust-errors/references/documenting-errors.md index ad2ebf59886..a2f7bd613fd 100644 --- a/.claude/skills/handling-rust-errors/references/documenting-errors.md +++ b/.claude/skills/handling-rust-errors/references/documenting-errors.md @@ -33,7 +33,7 @@ pub fn create_web(&mut self) -> Result> { - `# Errors` section header - Bullet point for each error variant -- Intra-doc links using `` [`VariantName`] `` syntax +- Intra-doc links using ``[`VariantName`]`` syntax - Link definitions at the bottom --- @@ -227,7 +227,7 @@ When writing `# Examples` sections for fallible functions: Use `?` for error propagation in examples whenever possible: -```rust +````rust /// Fetches and processes user data. /// /// # Examples @@ -242,7 +242,7 @@ Use `?` for error propagation in examples whenever possible: pub fn fetch_user(id: &str) -> Result> { // Implementation } -``` +```` **Key Points:** @@ -254,7 +254,7 @@ pub fn fetch_user(id: &str) -> Result> { Only use explicit error handling when demonstrating error handling itself: -```rust +````rust /// Validates user input. /// /// # Examples @@ -269,7 +269,7 @@ Only use explicit error handling when demonstrating error handling itself: pub fn validate_input(input: &str) -> Result<(), Report> { // Implementation } -``` +```` --- @@ -298,7 +298,7 @@ pub fn validate_input(input: &str) -> Result<(), Report> { ### Complete Function Documentation -```rust +````rust #[derive(Debug, derive_more::Display)] pub enum RegistrationError { #[display("Email already registered")] @@ -339,7 +339,7 @@ impl Error for RegistrationError {} pub fn register_user(email: &str, password: &str) -> Result> { // Implementation } -``` +```` --- diff --git a/.claude/skills/skill-creator/SKILL.md b/.claude/skills/skill-creator/SKILL.md index d03c97aa848..fbbdfeb4af5 100644 --- a/.claude/skills/skill-creator/SKILL.md +++ b/.claude/skills/skill-creator/SKILL.md @@ -76,14 +76,14 @@ skill-name/ Every SKILL.md must have YAML frontmatter with required and optional fields: -| Field | Required | Description | -| ----- | -------- | ----------- | -| `name` | Yes | Max 64 chars. Lowercase letters, numbers, hyphens only. Must match directory name. | -| `description` | Yes | Max 1024 chars. Describes what the skill does and when to use it. | -| `license` | No | License name or reference to a bundled license file. | -| `compatibility` | No | Max 500 chars. Environment requirements (intended product, system packages, etc.). | -| `metadata` | No | Arbitrary key-value mapping for additional metadata. | -| `allowed-tools` | No | Space-delimited list of pre-approved tools. (Experimental) | +| Field | Required | Description | +| --------------- | -------- | ---------------------------------------------------------------------------------- | +| `name` | Yes | Max 64 chars. Lowercase letters, numbers, hyphens only. Must match directory name. | +| `description` | Yes | Max 1024 chars. Describes what the skill does and when to use it. | +| `license` | No | License name or reference to a bundled license file. | +| `compatibility` | No | Max 500 chars. Environment requirements (intended product, system packages, etc.). | +| `metadata` | No | Arbitrary key-value mapping for additional metadata. | +| `allowed-tools` | No | Space-delimited list of pre-approved tools. (Experimental) | #### Trigger Configuration (metadata.triggers) @@ -92,17 +92,17 @@ Skills can define auto-activation triggers in the `metadata.triggers` field: ```yaml metadata: triggers: - type: domain # "domain" (advisory) or "guardrail" (enforced) - enforcement: suggest # "suggest", "warn", or "block" - priority: high # "critical", "high", "medium", or "low" - keywords: # Exact substring matches (case-insensitive) + type: domain # "domain" (advisory) or "guardrail" (enforced) + enforcement: suggest # "suggest", "warn", or "block" + priority: high # "critical", "high", "medium", or "low" + keywords: # Exact substring matches (case-insensitive) - error - Result - error-stack - intent-patterns: # Regex patterns for intent detection + intent-patterns: # Regex patterns for intent detection - "\\b(handle|create)\\b.*?\\berror\\b" - "\\berror\\b.*?\\bhandling\\b" - files: # Optional: file-based triggers + files: # Optional: file-based triggers include: - "**/src/**/*.rs" exclude: @@ -166,9 +166,11 @@ Keep SKILL.md body under 500 lines. Split content into separate files when appro # PDF Processing ## Quick start + Extract text with pdfplumber: [code example] ## Advanced features + - **Form filling**: See [FORMS.md](references/FORMS.md) for complete guide - **API reference**: See [REFERENCE.md](references/REFERENCE.md) for all methods ``` diff --git a/.claude/skills/skill-creator/assets/SKILL.template.md b/.claude/skills/skill-creator/assets/SKILL.template.md index 157df21559c..15b025fa847 100644 --- a/.claude/skills/skill-creator/assets/SKILL.template.md +++ b/.claude/skills/skill-creator/assets/SKILL.template.md @@ -1,12 +1,12 @@ --- -name: {{skill_name}} +name: { { skill_name } } description: "[TODO: Complete and informative explanation of what the skill does and when to use it. Include WHEN to use this skill - specific scenarios, file types, or tasks that trigger it.]" # license: Apache-2.0 # Uncomment and set license if needed metadata: triggers: - type: domain # "domain" (advisory) or "guardrail" (enforced) - enforcement: suggest # "suggest", "warn", or "block" - priority: medium # "critical", "high", "medium", or "low" + type: domain # "domain" (advisory) or "guardrail" (enforced) + enforcement: suggest # "suggest", "warn", or "block" + priority: medium # "critical", "high", "medium", or "low" keywords: - "[TODO: Add keywords that should trigger this skill]" intent-patterns: diff --git a/.claude/skills/skill-creator/references/output-patterns.md b/.claude/skills/skill-creator/references/output-patterns.md index f2a8b7605cb..3f78aae12b1 100644 --- a/.claude/skills/skill-creator/references/output-patterns.md +++ b/.claude/skills/skill-creator/references/output-patterns.md @@ -16,14 +16,17 @@ ALWAYS use this exact template structure: # [Analysis Title] ## Executive summary + [One-paragraph overview of key findings] ## Key findings + - Finding 1 with supporting data - Finding 2 with supporting data - Finding 3 with supporting data ## Recommendations + 1. Specific actionable recommendation 2. Specific actionable recommendation ``` @@ -38,12 +41,15 @@ Here is a sensible default format, but use your best judgment: # [Analysis Title] ## Executive summary + [Overview] ## Key findings + [Adapt sections based on what you discover] ## Recommendations + [Tailor to the specific context] Adjust sections as needed for the specific analysis type. @@ -67,7 +73,7 @@ feat(auth): implement JWT-based authentication Add login endpoint and token validation middleware -```text +````text **Example 2:** Input: Fixed bug where dates displayed incorrectly in reports @@ -81,6 +87,6 @@ Use UTC timestamps consistently across report generation ```text Follow this style: type(scope): brief description, then detailed explanation. -``` +```` Examples help agents understand the desired style and level of detail more clearly than descriptions alone. diff --git a/.claude/skills/skill-creator/references/troubleshooting.md b/.claude/skills/skill-creator/references/troubleshooting.md index 85cdc2d05b6..5a534b40391 100644 --- a/.claude/skills/skill-creator/references/troubleshooting.md +++ b/.claude/skills/skill-creator/references/troubleshooting.md @@ -40,7 +40,7 @@ keywords: ```yaml intent-patterns: - - "(create|add).*?(database.*?table)" # Too specific + - "(create|add).*?(database.*?table)" # Too specific ``` - "create a database table" → ✅ Matches @@ -50,7 +50,7 @@ intent-patterns: ```yaml intent-patterns: - - "(create|add).*?(table|database)" # Better + - "(create|add).*?(table|database)" # Better ``` ### Name Mismatch @@ -109,7 +109,7 @@ keywords: ```yaml intent-patterns: - - "(create)" # Matches everything with "create" + - "(create)" # Matches everything with "create" ``` **Solution:** Add context: @@ -126,7 +126,7 @@ intent-patterns: ```yaml files: include: - - "src/**" # Matches everything in src/ + - "src/**" # Matches everything in src/ ``` **Solution:** Use narrower patterns: @@ -167,7 +167,7 @@ The `name` field in SKILL.md must exactly match the directory name. ```yaml skill-creator/SKILL.md --- -name: skill-creator # Must match directory name +name: skill-creator # Must match directory name ``` ### "Invalid regex in intent-patterns" diff --git a/.claude/skills/testing-hashql/SKILL.md b/.claude/skills/testing-hashql/SKILL.md index 7e7d753dd23..9c26fc6cdbf 100644 --- a/.claude/skills/testing-hashql/SKILL.md +++ b/.claude/skills/testing-hashql/SKILL.md @@ -26,16 +26,16 @@ HashQL uses three testing approaches. **compiletest is the default** for testing ## Quick Reference -| Scenario | Test Type | Location | -| -------- | --------- | -------- | -| Diagnostics/error messages | compiletest | `tests/ui/` | -| Compiler pipeline phases | compiletest | `tests/ui/` | -| MIR/HIR/AST pass integration | compiletest | `tests/ui/` | -| MIR/HIR/AST pass edge cases | insta | `tests/ui//` | -| MIR pass unit tests | MIR builder | `src/**/tests.rs` | -| Core crate (where needed) | insta | `src/**/snapshots/` | -| Parser fragments (syntax-jexpr) | insta | `src/*/snapshots/` | -| Internal functions/logic | Unit tests | `src/*.rs` | +| Scenario | Test Type | Location | +| ------------------------------- | ----------- | ---------------------- | +| Diagnostics/error messages | compiletest | `tests/ui/` | +| Compiler pipeline phases | compiletest | `tests/ui/` | +| MIR/HIR/AST pass integration | compiletest | `tests/ui/` | +| MIR/HIR/AST pass edge cases | insta | `tests/ui//` | +| MIR pass unit tests | MIR builder | `src/**/tests.rs` | +| Core crate (where needed) | insta | `src/**/snapshots/` | +| Parser fragments (syntax-jexpr) | insta | `src/*/snapshots/` | +| Internal functions/logic | Unit tests | `src/*.rs` | ## compiletest (UI Tests) @@ -66,7 +66,7 @@ cargo run -p hashql-compiletest run --bless # Update expected ```jsonc //@ run: fail //@ description: Tests duplicate field detection -["type", "Bad", {"#struct": {"x": "Int", "x": "String"}}, "_"] +["type", "Bad", { "#struct": { "x": "Int", "x": "String" } }, "_"] //~^ ERROR Field `x` first defined here ``` @@ -115,11 +115,11 @@ cargo test --package hashql- --doc # Doc tests Use `insta` crate for snapshot-based output when compiletest (the preferred method) is infeasible. Three categories exist: -| Category | Crates | Snapshot Location | Rationale | -| -------- | ------ | ----------------- | --------- | -| **Pipeline Crates** | mir, hir, ast | `tests/ui//*.snap` | Colocate with compiletest tests | -| **Core** | hashql-core | Default insta (`src/**/snapshots/`) | Separate from pipeline; prefer unit tests | -| **Syntax** | syntax-jexpr | `src/*/snapshots/` | Macro-based for parser fragments | +| Category | Crates | Snapshot Location | Rationale | +| ------------------- | ------------- | ----------------------------------- | ----------------------------------------- | +| **Pipeline Crates** | mir, hir, ast | `tests/ui//*.snap` | Colocate with compiletest tests | +| **Core** | hashql-core | Default insta (`src/**/snapshots/`) | Separate from pipeline; prefer unit tests | +| **Syntax** | syntax-jexpr | `src/*/snapshots/` | Macro-based for parser fragments | ### Pipeline Crates (mir, hir, ast) diff --git a/.claude/skills/testing-hashql/references/compiletest-guide.md b/.claude/skills/testing-hashql/references/compiletest-guide.md index cb5927edee2..1b2ceac669c 100644 --- a/.claude/skills/testing-hashql/references/compiletest-guide.md +++ b/.claude/skills/testing-hashql/references/compiletest-guide.md @@ -83,13 +83,13 @@ package_name/ ### Test Components -| File | Purpose | Required | -| ---- | ------- | -------- | -| `.jsonc` | J-Expr test code | ✅ Yes | -| `.spec.toml` | Test suite specification | ✅ Yes (in dir or parent) | -| `.stdout` | Expected standard output | Optional (empty if none) | -| `.stderr` | Expected diagnostics | Optional (empty if none) | -| `.aux.` | Auxiliary/secondary output | Suite-dependent | +| File | Purpose | Required | +| ------------ | -------------------------- | ------------------------- | +| `.jsonc` | J-Expr test code | ✅ Yes | +| `.spec.toml` | Test suite specification | ✅ Yes (in dir or parent) | +| `.stdout` | Expected standard output | Optional (empty if none) | +| `.stderr` | Expected diagnostics | Optional (empty if none) | +| `.aux.` | Auxiliary/secondary output | Suite-dependent | The harness searches upward from the test file to find `.spec.toml`, stopping at `tests/ui/`. This allows shared specs at directory roots with overrides for specific subdirectories. @@ -132,7 +132,6 @@ Directives control test behavior. They **must** be at the start of the file, bef //@ run: fail // Test should fail with errors (DEFAULT) //@ run: skip // Skip this test //@ run: skip reason=Not implemented yet - //@ name: custom_test_name // Override the default test name //@ description: Tests that... // Describe test purpose (ENCOURAGED) //@ suite#key: value // Suite-specific directive (TOML value) @@ -140,11 +139,11 @@ Directives control test behavior. They **must** be at the start of the file, bef ### Run Modes -| Mode | Behavior | -| ---- | -------- | -| `pass` | Test must succeed with no errors | +| Mode | Behavior | +| ------ | ------------------------------------------------- | +| `pass` | Test must succeed with no errors | | `fail` | Test must produce errors (**default if omitted**) | -| `skip` | Test is skipped entirely | +| `skip` | Test is skipped entirely | **Important:** If you don't specify `//@ run:`, the test defaults to `fail` mode. Always use `//@ run: pass` explicitly for tests that should succeed. @@ -179,17 +178,17 @@ Annotations verify that specific diagnostics appear at expected locations. ### Line Reference Types -| Syntax | Meaning | Example | -| ------ | ------- | ------- | -| `//~ ERROR msg` | Current line | Error on this exact line | -| `//~^ ERROR msg` | Previous line (1 up) | Error on line above | -| `//~^^ ERROR msg` | 2 lines above | | -| `//~^^^ ERROR msg` | 3 lines above | | -| `//~v ERROR msg` | Next line (1 down) | Error on line below | -| `//~vv ERROR msg` | 2 lines below | | -| `//~vvv ERROR msg` | 3 lines below | | -| `//~\| ERROR msg` | Same line as previous | Multiple errors, same location | -| `//~? ERROR msg` | Unknown/any line | Use sparingly | +| Syntax | Meaning | Example | +| ------------------ | --------------------- | ------------------------------ | +| `//~ ERROR msg` | Current line | Error on this exact line | +| `//~^ ERROR msg` | Previous line (1 up) | Error on line above | +| `//~^^ ERROR msg` | 2 lines above | | +| `//~^^^ ERROR msg` | 3 lines above | | +| `//~v ERROR msg` | Next line (1 down) | Error on line below | +| `//~vv ERROR msg` | 2 lines below | | +| `//~vvv ERROR msg` | 3 lines below | | +| `//~\| ERROR msg` | Same line as previous | Multiple errors, same location | +| `//~? ERROR msg` | Unknown/any line | Use sparingly | ### Error Codes @@ -202,21 +201,23 @@ Include optional error codes in brackets: ### Multi-Annotation Example ```jsonc -["let", "x", //~^ ERROR first error on the let line - ["invalid"] //~ ERROR error on this line -] //~| ERROR another error on same line as previous - //~| NOTE additional context +[ + "let", + "x", //~^ ERROR first error on the let line + ["invalid"], //~ ERROR error on this line +] //~| ERROR another error on same line as previous +//~| NOTE additional context ``` ### Severity Levels -| Level | Use Case | -| ----- | -------- | +| Level | Use Case | +| ---------- | -------------------- | | `CRITICAL` | Unrecoverable errors | -| `ERROR` | Standard errors | -| `WARNING` | Non-fatal warnings | -| `NOTE` | Informational notes | -| `DEBUG` | Debug output | +| `ERROR` | Standard errors | +| `WARNING` | Non-fatal warnings | +| `NOTE` | Informational notes | +| `DEBUG` | Debug output | --- @@ -261,8 +262,11 @@ Create a `.jsonc` file with your test code and directives: //@ description: Verifies that undefined variables produce an error //@ run: fail -["let", "x", {"#literal": 42}, - "undefined_var" //~ ERROR unknown variable +[ + "let", + "x", + { "#literal": 42 }, + "undefined_var", //~ ERROR unknown variable ] ``` diff --git a/.claude/skills/testing-hashql/references/mir-builder-guide.md b/.claude/skills/testing-hashql/references/mir-builder-guide.md index 1967b7e4af7..b15303bf163 100644 --- a/.claude/skills/testing-hashql/references/mir-builder-guide.md +++ b/.claude/skills/testing-hashql/references/mir-builder-guide.md @@ -66,41 +66,41 @@ decl result: Bool; ### Header -| Component | Description | Example | -| --------- | ----------- | ------- | -| `` | Body source type | `fn`, `thunk`, `[ctor expr]`, `intrinsic` | -| `` | DefId (literal or variable) | `0`, `42`, `my_def_id` | -| `` | Number of function arguments | `0`, `1`, `2` | -| `` | Return type | `Int`, `Bool`, `(Int, Bool)` | +| Component | Description | Example | +| --------------- | ---------------------------- | ----------------------------------------- | +| `` | Body source type | `fn`, `thunk`, `[ctor expr]`, `intrinsic` | +| `` | DefId (literal or variable) | `0`, `42`, `my_def_id` | +| `` | Number of function arguments | `0`, `1`, `2` | +| `` | Return type | `Int`, `Bool`, `(Int, Bool)` | The `` can be a numeric literal (`0`, `1`, `42`) or a variable identifier (`callee_id`, `my_def_id`). When using a variable, it must be a `DefId` in scope. **Source types:** -| Syntax | Maps to | Use case | -| ------ | ------- | -------- | -| `fn` | `Source::Closure` | Regular closures/functions | -| `thunk` | `Source::Thunk` | Thunk bodies (zero-arg delayed computations) | -| `[ctor sym::path]` | `Source::Ctor(sym)` | Constructor bodies (always inlined) | -| `[graph::read::filter]` | `Source::GraphReadFilter` | Graph read filter bodies (never inlined) | -| `intrinsic` | `Source::Intrinsic` | Intrinsic bodies (never inlined) | +| Syntax | Maps to | Use case | +| ----------------------- | ------------------------- | -------------------------------------------- | +| `fn` | `Source::Closure` | Regular closures/functions | +| `thunk` | `Source::Thunk` | Thunk bodies (zero-arg delayed computations) | +| `[ctor sym::path]` | `Source::Ctor(sym)` | Constructor bodies (always inlined) | +| `[graph::read::filter]` | `Source::GraphReadFilter` | Graph read filter bodies (never inlined) | +| `intrinsic` | `Source::Intrinsic` | Intrinsic bodies (never inlined) | ### Types -| Syntax | Description | Example | -| ------ | ----------- | ------- | -| `Int` | Integer type | `Int` | -| `Num` | Number (float) type | `Num` | -| `Bool` | Boolean type | `Bool` | -| `Null` | Null type | `Null` | -| `?` | Unknown type (dynamic) | `?` | -| `(T1, T2, ...)` | Tuple types | `(Int, Bool, Int)` | -| `(T,)` | Single-element tuple | `(Int,)` | -| `(a: T1, b: T2)` | Struct types | `(a: Int, b: Bool)` | -| `[List T]` | List type (intrinsic) | `[List Int]`, `[List (Int, Bool)]` | -| `[fn(T1, T2) -> R]` | Closure types | `[fn(Int) -> Int]`, `[fn() -> Bool]` | -| `[Opaque path; T]` | Opaque type with symbol path | `[Opaque sym::path::Entity; ?]` | -| `\|types\| types.custom()` | Custom type expression | `\|t\| t.null()` | +| Syntax | Description | Example | +| -------------------------- | ---------------------------- | ------------------------------------ | +| `Int` | Integer type | `Int` | +| `Num` | Number (float) type | `Num` | +| `Bool` | Boolean type | `Bool` | +| `Null` | Null type | `Null` | +| `?` | Unknown type (dynamic) | `?` | +| `(T1, T2, ...)` | Tuple types | `(Int, Bool, Int)` | +| `(T,)` | Single-element tuple | `(Int,)` | +| `(a: T1, b: T2)` | Struct types | `(a: Int, b: Bool)` | +| `[List T]` | List type (intrinsic) | `[List Int]`, `[List (Int, Bool)]` | +| `[fn(T1, T2) -> R]` | Closure types | `[fn(Int) -> Int]`, `[fn() -> Bool]` | +| `[Opaque path; T]` | Opaque type with symbol path | `[Opaque sym::path::Entity; ?]` | +| `\|types\| types.custom()` | Custom type expression | `\|t\| t.null()` | ### Projections (Optional) @@ -148,44 +148,44 @@ let body = body!(interner, env; [graph::read::filter]@0/2 -> Bool { ### Statements -| Syntax | Description | MIR Equivalent | -| ------ | ----------- | -------------- | -| `let x;` | Mark storage live | `StorageLive(x)` | -| `drop x;` | Mark storage dead | `StorageDead(x)` | -| `x = load ;` | Load value | `Assign(x, Load(operand))` | -| `x = apply ;` | Call with no args | `Assign(x, Apply(func, []))` | -| `x = apply , , ;` | Call with args | `Assign(x, Apply(func, [a1, a2]))` | -| `x = tuple , ;` | Create tuple | `Assign(x, Aggregate(Tuple, [a, b]))` | -| `x = struct a: , b: ;` | Create struct | `Assign(x, Aggregate(Struct, [v1, v2]))` | -| `x = closure ;` | Create closure | `Assign(x, Aggregate(Closure, [def, env]))` | -| `x = bin. ;` | Binary operation | `Assign(x, Binary(lhs, op, rhs))` | -| `x = un. ;` | Unary operation | `Assign(x, Unary(op, operand))` | -| `x = input.load! "name";` | Load required input | `Assign(x, Input(Load { required: true }, "name"))` | -| `x = input.load "name";` | Load optional input | `Assign(x, Input(Load { required: false }, "name"))` | -| `x = input.exists "name";` | Check if input exists | `Assign(x, Input(Exists, "name"))` | +| Syntax | Description | MIR Equivalent | +| ------------------------------- | --------------------- | ---------------------------------------------------- | +| `let x;` | Mark storage live | `StorageLive(x)` | +| `drop x;` | Mark storage dead | `StorageDead(x)` | +| `x = load ;` | Load value | `Assign(x, Load(operand))` | +| `x = apply ;` | Call with no args | `Assign(x, Apply(func, []))` | +| `x = apply , , ;` | Call with args | `Assign(x, Apply(func, [a1, a2]))` | +| `x = tuple , ;` | Create tuple | `Assign(x, Aggregate(Tuple, [a, b]))` | +| `x = struct a: , b: ;` | Create struct | `Assign(x, Aggregate(Struct, [v1, v2]))` | +| `x = closure ;` | Create closure | `Assign(x, Aggregate(Closure, [def, env]))` | +| `x = bin. ;` | Binary operation | `Assign(x, Binary(lhs, op, rhs))` | +| `x = un. ;` | Unary operation | `Assign(x, Unary(op, operand))` | +| `x = input.load! "name";` | Load required input | `Assign(x, Input(Load { required: true }, "name"))` | +| `x = input.load "name";` | Load optional input | `Assign(x, Input(Load { required: false }, "name"))` | +| `x = input.exists "name";` | Check if input exists | `Assign(x, Input(Exists, "name"))` | ### Terminators -| Syntax | Description | -| ------ | ----------- | -| `return ;` | Return from function | -| `goto (...);` | Unconditional jump with args | -| `if then () else ();` | Conditional branch | -| `switch [ => (), ...];` | Switch (no otherwise) | -| `switch [ => (), _ => ()];` | Switch with otherwise | -| `unreachable;` | Mark block as unreachable | +| Syntax | Description | +| ------------------------------------------------------ | ---------------------------- | +| `return ;` | Return from function | +| `goto (...);` | Unconditional jump with args | +| `if then () else ();` | Conditional branch | +| `switch [ => (), ...];` | Switch (no otherwise) | +| `switch [ => (), _ => ()];` | Switch with otherwise | +| `unreachable;` | Mark block as unreachable | ### Operands -| Syntax | Description | -| ------ | ----------- | -| `x`, `cond` | Place (local variable or projection) | -| `42`, `-5` | Integer literal (i64) | -| `3.14` | Float literal (f64) | -| `true`, `false` | Boolean literal | -| `()` | Unit | -| `null` | Null | -| `def_id` | DefId variable (for function pointers) | +| Syntax | Description | +| --------------- | -------------------------------------- | +| `x`, `cond` | Place (local variable or projection) | +| `42`, `-5` | Integer literal (i64) | +| `3.14` | Float literal (f64) | +| `true`, `false` | Boolean literal | +| `()` | Unit | +| `null` | Null | +| `def_id` | DefId variable (for function pointers) | ### Operators @@ -451,7 +451,7 @@ fn assert_pass<'heap>( // Run the pass and capture change status let changed = YourPass::new().run(context, &mut bodies[0]); - + // Include Changed value in snapshot write!( text_format.writer, diff --git a/.claude/skills/testing-hashql/references/mir-fluent-builder.md b/.claude/skills/testing-hashql/references/mir-fluent-builder.md index 307a0c468a2..f2aafdb71b8 100644 --- a/.claude/skills/testing-hashql/references/mir-fluent-builder.md +++ b/.claude/skills/testing-hashql/references/mir-fluent-builder.md @@ -102,19 +102,19 @@ builder.build_block(bb).unreachable(); ## RValue Methods -| Method | Creates | Example | -| ------ | ------- | ------- | -| `load(operand)` | Copy/move | `rv.load(x)` | -| `binary(l, op, r)` | Binary op | `rv.binary(x, op![+], y)` | -| `unary(op, val)` | Unary op | `rv.unary(op![!], cond)` | -| `tuple([...])` | Tuple | `rv.tuple([x, y, z])` | -| `list([...])` | List | `rv.list([a, b, c])` | -| `struct([...])` | Struct | `rv.r#struct([("x", val)])` | -| `closure(def, env)` | Closure | `rv.closure(def_id, env_place)` | -| `dict([...])` | Dict | `rv.dict([(k, v)])` | -| `apply(fn, args)` | Call | `rv.apply(func, [arg1])` | -| `call(fn)` | Call (no args) | `rv.call(func)` | -| `input(op, name)` | Input | `rv.input(InputOp::Load { required: true }, "x")` | +| Method | Creates | Example | +| ------------------- | -------------- | ------------------------------------------------- | +| `load(operand)` | Copy/move | `rv.load(x)` | +| `binary(l, op, r)` | Binary op | `rv.binary(x, op![+], y)` | +| `unary(op, val)` | Unary op | `rv.unary(op![!], cond)` | +| `tuple([...])` | Tuple | `rv.tuple([x, y, z])` | +| `list([...])` | List | `rv.list([a, b, c])` | +| `struct([...])` | Struct | `rv.r#struct([("x", val)])` | +| `closure(def, env)` | Closure | `rv.closure(def_id, env_place)` | +| `dict([...])` | Dict | `rv.dict([(k, v)])` | +| `apply(fn, args)` | Call | `rv.apply(func, [arg1])` | +| `call(fn)` | Call (no args) | `rv.call(func)` | +| `input(op, name)` | Input | `rv.input(InputOp::Load { required: true }, "x")` | ## Places with Projections diff --git a/.claude/skills/testing-hashql/references/testing-strategies.md b/.claude/skills/testing-hashql/references/testing-strategies.md index 015471c6e04..420ad368ac1 100644 --- a/.claude/skills/testing-hashql/references/testing-strategies.md +++ b/.claude/skills/testing-hashql/references/testing-strategies.md @@ -6,16 +6,16 @@ This guide helps you choose the right testing approach for HashQL code. ## Decision Matrix -| Question | compiletest | Unit Tests | insta Snapshots | -| -------- | ----------- | ---------- | --------------- | -| Testing error messages/diagnostics? | ✅ **Best** | ❌ | ⚠️ Possible | -| Testing compiler pipeline stages? | ✅ **Best** | ❌ | ⚠️ Possible | -| Testing internal function logic? | ❌ | ✅ **Best** | ❌ | -| MIR/HIR pass integration (end-to-end)? | ✅ **Best** | ❌ | ❌ | -| MIR/HIR pass edge cases (isolated)? | ⚠️ Noisy | ❌ | ✅ **Best** | -| Testing parser output structure? | ⚠️ Possible | ⚠️ Possible | ✅ **Best** | -| Need to verify exact output format? | ✅ **Best** | ❌ | ✅ **Best** | -| Testing edge cases in isolation? | ❌ | ✅ **Best** | ⚠️ Possible | +| Question | compiletest | Unit Tests | insta Snapshots | +| -------------------------------------- | ----------- | ----------- | --------------- | +| Testing error messages/diagnostics? | ✅ **Best** | ❌ | ⚠️ Possible | +| Testing compiler pipeline stages? | ✅ **Best** | ❌ | ⚠️ Possible | +| Testing internal function logic? | ❌ | ✅ **Best** | ❌ | +| MIR/HIR pass integration (end-to-end)? | ✅ **Best** | ❌ | ❌ | +| MIR/HIR pass edge cases (isolated)? | ⚠️ Noisy | ❌ | ✅ **Best** | +| Testing parser output structure? | ⚠️ Possible | ⚠️ Possible | ✅ **Best** | +| Need to verify exact output format? | ✅ **Best** | ❌ | ✅ **Best** | +| Testing edge cases in isolation? | ❌ | ✅ **Best** | ⚠️ Possible | --- @@ -60,10 +60,10 @@ From `libs/@local/hashql/ast/tests/ui/lowering/type-extractor/definition/duplica "another": "Boolean", //~^ ERROR Field `another` first defined here "another": "Number", - "unique": "String" - } + "unique": "String", + }, }, - "_" + "_", ] ``` @@ -77,13 +77,28 @@ From `libs/@local/hashql/hir/tests/ui/lower/graph-hoisting/hoist.jsonc`: //@ run: pass //@ description: TODO [ - "let", "a", { "#literal": true }, - ["let", "b", { "#literal": true }, - ["::graph::tail::collect", - ["::graph::body::filter", + "let", + "a", + { "#literal": true }, + [ + "let", + "b", + { "#literal": true }, + [ + "::graph::tail::collect", + [ + "::graph::body::filter", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], - ["fn", { "#tuple": [] }, { "#struct": { "vertex": "_" } }, "_", - ["==", "a", "b"]]]]] + [ + "fn", + { "#tuple": [] }, + { "#struct": { "vertex": "_" } }, + "_", + ["==", "a", "b"], + ], + ], + ], + ], ] ``` @@ -179,11 +194,11 @@ cargo test --package hashql-syntax-jexpr --doc Uses the `insta` crate for snapshot-based output when compiletest is infeasible. **Three categories exist:** -| Category | Crates | Snapshot Location | Rationale | -| -------- | ------ | ----------------- | --------- | -| **Pipeline Crates** | mir, hir, ast | `tests/ui//*.snap` | Colocate with compiletest tests | -| **Core** | hashql-core | Default insta (`src/**/snapshots/`) | Separate from pipeline; prefer unit tests | -| **Syntax** | syntax-jexpr | `src/*/snapshots/` | Macro-based for parser fragments | +| Category | Crates | Snapshot Location | Rationale | +| ------------------- | ------------- | ----------------------------------- | ----------------------------------------- | +| **Pipeline Crates** | mir, hir, ast | `tests/ui//*.snap` | Colocate with compiletest tests | +| **Core** | hashql-core | Default insta (`src/**/snapshots/`) | Separate from pipeline; prefer unit tests | +| **Syntax** | syntax-jexpr | `src/*/snapshots/` | Macro-based for parser fragments | ### Pipeline Crates (mir, hir, ast) @@ -266,7 +281,7 @@ cargo insta reject # Reject all pending ```jsonc //@ run: fail //@ description: Error when using reserved keyword as identifier -["let", "type", {"#literal": 1}, "type"] +["let", "type", { "#literal": 1 }, "type"] //~^ ERROR `type` is a reserved keyword ``` @@ -289,7 +304,7 @@ fn symbol_table_lookup_returns_none_for_undefined() { ```jsonc //@ run: pass //@ description: Tests new optimization pass integrates correctly -["let", "x", {"#literal": 1}, ["add", "x", "x"]] +["let", "x", { "#literal": 1 }, ["add", "x", "x"]] ``` **Use insta for isolated edge cases** — exercising specific scenarios that are rarely hit in normal pipeline tests, or where compiletest would create too much noise: @@ -318,12 +333,12 @@ test_cases!(parse_new_syntax; ## Summary -| Approach | Test Location | Snapshot Location | Update Command | Best For | -| -------- | ------------ | ----------------- | -------------- | -------- | -| compiletest | `tests/ui/*.jsonc` | `tests/ui/*.stdout/stderr` | `--bless` | Diagnostics, pipeline, pass integration | -| Unit tests | `src/*.rs` | N/A | N/A | Isolated logic | -| insta (pipeline) | `src/**/tests.rs` | `tests/ui//` | `cargo insta accept` | Pass edge cases | -| insta (core) | `src/**/tests` | `src/**/snapshots/` | `cargo insta accept` | Core crate | -| insta (syntax-jexpr) | `src/*/tests` | `src/*/snapshots/` | `cargo insta accept` | Parser fragments | +| Approach | Test Location | Snapshot Location | Update Command | Best For | +| -------------------- | ------------------ | -------------------------- | -------------------- | --------------------------------------- | +| compiletest | `tests/ui/*.jsonc` | `tests/ui/*.stdout/stderr` | `--bless` | Diagnostics, pipeline, pass integration | +| Unit tests | `src/*.rs` | N/A | N/A | Isolated logic | +| insta (pipeline) | `src/**/tests.rs` | `tests/ui//` | `cargo insta accept` | Pass edge cases | +| insta (core) | `src/**/tests` | `src/**/snapshots/` | `cargo insta accept` | Core crate | +| insta (syntax-jexpr) | `src/*/tests` | `src/*/snapshots/` | `cargo insta accept` | Parser fragments | **Default choice: compiletest** for end-to-end pipeline testing; **insta** for isolated edge cases where compiletest would be noisy. diff --git a/.claude/skills/writing-hashql-diagnostics/SKILL.md b/.claude/skills/writing-hashql-diagnostics/SKILL.md index 602adf00876..c839d46283b 100644 --- a/.claude/skills/writing-hashql-diagnostics/SKILL.md +++ b/.claude/skills/writing-hashql-diagnostics/SKILL.md @@ -59,13 +59,13 @@ diagnostic.add_message(Message::help("try using a comparison")); ### Severity Levels -| Severity | When to Use | -| ---------- | -------------------------- | -| `Bug` | Internal compiler error | -| `Fatal` | Unrecoverable error | -| `Error` | Must be fixed to compile | -| `Warning` | Suspicious code to review | -| `Note` | Informational context | +| Severity | When to Use | +| --------- | ------------------------- | +| `Bug` | Internal compiler error | +| `Fatal` | Unrecoverable error | +| `Error` | Must be fixed to compile | +| `Warning` | Suspicious code to review | +| `Note` | Informational context | ### Message Style diff --git a/.claude/skills/writing-hashql-diagnostics/references/guidelines.md b/.claude/skills/writing-hashql-diagnostics/references/guidelines.md index feb7ce57215..c44fb8938d5 100644 --- a/.claude/skills/writing-hashql-diagnostics/references/guidelines.md +++ b/.claude/skills/writing-hashql-diagnostics/references/guidelines.md @@ -58,14 +58,14 @@ A complete diagnostic tells a story: ### Core Rules -| Rule | Example | -| --------------------------- | --------------------------------------------------------- | -| Start with lowercase | `"expected semicolon"` not `"Expected semicolon"` | -| No trailing punctuation | `"missing field"` not `"missing field."` | -| Use backticks for code | `"expected \`bool\`, found \`String\`"` | -| Use "invalid" not "illegal" | `"invalid identifier"` not `"illegal identifier"` | -| Be matter-of-fact | `"type mismatch"` not `"sorry, types don't match"` | -| Be specific | `"cannot find variable \`x\`"` not `"variable not found"` | +| Rule | Example | +| --------------------------- | ------------------------------------------------------- | +| Start with lowercase | `"expected semicolon"` not `"Expected semicolon"` | +| No trailing punctuation | `"missing field"` not `"missing field."` | +| Use backticks for code | `"expected \`bool\`, found \`String\`"` | +| Use "invalid" not "illegal" | `"invalid identifier"` not `"illegal identifier"` | +| Be matter-of-fact | `"type mismatch"` not `"sorry, types don't match"` | +| Be specific | `"cannot find variable \`x\`"`not`"variable not found"` | ### Good vs Bad Messages diff --git a/.claude/skills/writing-hashql-jexpr/SKILL.md b/.claude/skills/writing-hashql-jexpr/SKILL.md index 65a32434fbf..cac504ba09d 100644 --- a/.claude/skills/writing-hashql-jexpr/SKILL.md +++ b/.claude/skills/writing-hashql-jexpr/SKILL.md @@ -1,6 +1,6 @@ --- name: writing-hashql-jexpr -description: 'HashQL J-Expr syntax for writing queries. Use when writing J-Expr code, using #literal/#struct/#list constructs, understanding function call syntax, or working with HashQL query files (.jsonc).' +description: "HashQL J-Expr syntax for writing queries. Use when writing J-Expr code, using #literal/#struct/#list constructs, understanding function call syntax, or working with HashQL query files (.jsonc)." license: AGPL-3.0 metadata: triggers: @@ -29,11 +29,11 @@ J-Expr is a JSON-based expression syntax for HashQL. It represents typed express J-Expr has three expression types: -| JSON Type | J-Expr Meaning | -| --------- | -------------- | -| String | Path/identifier/symbol | -| Array | Function call | -| Object | Data constructor (with `#` keys) | +| JSON Type | J-Expr Meaning | +| --------- | -------------------------------- | +| String | Path/identifier/symbol | +| Array | Function call | +| Object | Data constructor (with `#` keys) | ## Paths (Strings) @@ -68,14 +68,14 @@ Arrays represent function calls: `[function, arg1, arg2, ...]` Objects with special `#` keys construct data: -| Key | Purpose | Example | -| --- | ------- | ------- | -| `#literal` | Primitive values | `{"#literal": 42}` | -| `#struct` | Named fields | `{"#struct": {"x": ...}}` | -| `#list` | Variable-size ordered | `{"#list": [...]}` | -| `#tuple` | Fixed-size ordered | `{"#tuple": [...]}` | -| `#dict` | Key-value map | `{"#dict": {"k": ...}}` | -| `#type` | Type annotation | Used with other keys | +| Key | Purpose | Example | +| ---------- | --------------------- | ------------------------- | +| `#literal` | Primitive values | `{"#literal": 42}` | +| `#struct` | Named fields | `{"#struct": {"x": ...}}` | +| `#list` | Variable-size ordered | `{"#list": [...]}` | +| `#tuple` | Fixed-size ordered | `{"#tuple": [...]}` | +| `#dict` | Key-value map | `{"#dict": {"k": ...}}` | +| `#type` | Type annotation | Used with other keys | ### Literals @@ -104,7 +104,7 @@ Objects with special `#` keys construct data: ### Dict ```jsonc -{"#dict": {"key": {"#literal": "value"}}} +{ "#dict": { "key": { "#literal": "value" } } } ``` ## Common Patterns @@ -112,7 +112,7 @@ Objects with special `#` keys construct data: ### Let Binding ```jsonc -["let", "varName", {"#literal": 10}, ["add", "varName", {"#literal": 5}]] +["let", "varName", { "#literal": 10 }, ["add", "varName", { "#literal": 5 }]] ``` ### Function Definition @@ -159,15 +159,23 @@ Objects with special `#` keys construct data: **Filtering with comparison:** ```jsonc -["filter", "entities", - ["fn", {"#tuple": []}, {"#struct": {"entity": "_"}}, "_", - ["==", "entity.draft_id", {"#literal": null}]]] +[ + "filter", + "entities", + [ + "fn", + { "#tuple": [] }, + { "#struct": { "entity": "_" } }, + "_", + ["==", "entity.draft_id", { "#literal": null }], + ], +] ``` **Struct with type:** ```jsonc -{"#struct": {"value": {"#literal": 100}}, "#type": "Amount"} +{ "#struct": { "value": { "#literal": 100 } }, "#type": "Amount" } ``` ## References diff --git a/.claude/skills/writing-hashql-jexpr/references/data-constructors.md b/.claude/skills/writing-hashql-jexpr/references/data-constructors.md index 0b46669f536..28b3c97752d 100644 --- a/.claude/skills/writing-hashql-jexpr/references/data-constructors.md +++ b/.claude/skills/writing-hashql-jexpr/references/data-constructors.md @@ -298,9 +298,17 @@ Empty tuple for type params, struct for named params: ### Entity Filtering ```jsonc -["filter", "entities", - ["fn", {"#tuple": []}, {"#struct": {"e": "_"}}, "_", - ["==", "e.archived", {"#literal": false}]]] +[ + "filter", + "entities", + [ + "fn", + { "#tuple": [] }, + { "#struct": { "e": "_" } }, + "_", + ["==", "e.archived", { "#literal": false }], + ], +] ``` ## Error Handling @@ -311,7 +319,7 @@ Only one primary `#` key allowed: ```jsonc // ✗ Error - duplicate primary key -{"#literal": 42, "#literal": 24} +{ "#literal": 42, "#literal": 24 } ``` ### Empty Object @@ -329,7 +337,7 @@ Regular keys not allowed in special form objects: ```jsonc // ✗ Error - unknown key -{"#literal": 42, "extra": "value"} +{ "#literal": 42, "extra": "value" } ``` ### Invalid Values diff --git a/.claude/skills/writing-hashql-jexpr/references/special-forms.md b/.claude/skills/writing-hashql-jexpr/references/special-forms.md index b941cf33508..d7d92370f05 100644 --- a/.claude/skills/writing-hashql-jexpr/references/special-forms.md +++ b/.claude/skills/writing-hashql-jexpr/references/special-forms.md @@ -6,18 +6,18 @@ Special forms are syntactic constructs with special evaluation semantics. Unlike HashQL has 10 special forms: -| Form | Arity | Purpose | -| ---- | ----- | ------- | -| `if` | 2, 3 | Conditional branching | -| `let` | 3, 4 | Variable binding | -| `fn` | 4 | Function/closure definition | -| `as` | 2 | Type assertion | -| `type` | 3 | Type alias definition | -| `newtype` | 3 | Nominal type wrapper | -| `use` | 3 | Module imports | -| `input` | 2, 3 | Host input declaration | -| `access` | 2 | Field access (alias: `.`) | -| `index` | 2 | Index access (alias: `[]`) | +| Form | Arity | Purpose | +| --------- | ----- | --------------------------- | +| `if` | 2, 3 | Conditional branching | +| `let` | 3, 4 | Variable binding | +| `fn` | 4 | Function/closure definition | +| `as` | 2 | Type assertion | +| `type` | 3 | Type alias definition | +| `newtype` | 3 | Nominal type wrapper | +| `use` | 3 | Module imports | +| `input` | 2, 3 | Host input declaration | +| `access` | 2 | Field access (alias: `.`) | +| `index` | 2 | Index access (alias: `[]`) | ## if - Conditional @@ -352,13 +352,13 @@ Accesses an element by index. Alias: `[]` Special forms bind names in different namespaces: -| Form | Value Namespace | Type Namespace | -| ---- | --------------- | -------------- | -| `let` | ✓ | - | -| `type` | - | ✓ | -| `newtype` | ✓ (constructor) | ✓ (type) | -| `use` | ✓ | ✓ | -| `fn` | ✓ (parameters) | ✓ (generics) | +| Form | Value Namespace | Type Namespace | +| --------- | --------------- | -------------- | +| `let` | ✓ | - | +| `type` | - | ✓ | +| `newtype` | ✓ (constructor) | ✓ (type) | +| `use` | ✓ | ✓ | +| `fn` | ✓ (parameters) | ✓ (generics) | ## Common Patterns @@ -368,15 +368,34 @@ Create sum types by combining newtypes with union types: ```jsonc // Define enum variants as newtypes -["newtype", "None", "Null", - ["newtype", "Some", "T", +[ + "newtype", + "None", + "Null", + [ + "newtype", + "Some", + "T", // Define the Option type as a union - ["type", "Option", "None | Some", + [ + "type", + "Option", + "None | Some", // Use the constructors - ["let", "value", ["Some", {"#literal": 42}], - ["if", ["==", "value", ["None"]], - {"#literal": "empty"}, - {"#literal": "has value"}]]]]] + [ + "let", + "value", + ["Some", { "#literal": 42 }], + [ + "if", + ["==", "value", ["None"]], + { "#literal": "empty" }, + { "#literal": "has value" }, + ], + ], + ], + ], +] ``` ### Status Enum Pattern @@ -392,27 +411,54 @@ Create sum types by combining newtypes with union types: ### Entity Query with Filter ```jsonc -["let", "entities", +[ + "let", + "entities", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], - ["filter", "entities", - ["fn", {"#tuple": []}, {"#struct": {"e": "_"}}, "_", - ["==", "e.archived", {"#literal": false}]]]] + [ + "filter", + "entities", + [ + "fn", + { "#tuple": [] }, + { "#struct": { "e": "_" } }, + "_", + ["==", "e.archived", { "#literal": false }], + ], + ], +] ``` ### Type-safe Input Processing ```jsonc -["let", "userId", ["input", "userId", "String"], - ["let", "limit", ["input", "limit", "Int", {"#literal": 50}], - ["fetch_user_items", "userId", "limit"]]] +[ + "let", + "userId", + ["input", "userId", "String"], + [ + "let", + "limit", + ["input", "limit", "Int", { "#literal": 50 }], + ["fetch_user_items", "userId", "limit"], + ], +] ``` ### Module Import Pattern ```jsonc -["use", "::graph::head", {"#struct": {"entities": "_"}}, - ["use", "::graph::tmp", {"#struct": {"decision_time_now": "_"}}, - ["entities", ["decision_time_now"]]]] +[ + "use", + "::graph::head", + { "#struct": { "entities": "_" } }, + [ + "use", + "::graph::tmp", + { "#struct": { "decision_time_now": "_" } }, + ["entities", ["decision_time_now"]], + ], +] ``` ## Error Handling @@ -425,7 +471,7 @@ Each special form has specific arity requirements: // ✗ Error - if needs 2 or 3 arguments ["if", "condition"] -// ✗ Error - let needs 3 or 4 arguments +// ✗ Error - let needs 3 or 4 arguments ["let", "x", {"#literal": 1}] // ✗ Error - fn needs exactly 4 arguments @@ -438,7 +484,7 @@ Special forms don't accept labeled arguments: ```jsonc // ✗ Error - labeled argument in special form -["if", {":condition": "x"}, "then", "else"] +["if", { ":condition": "x" }, "then", "else"] ``` ### Binding Name Errors diff --git a/.claude/skills/writing-hashql-jexpr/references/syntax-reference.md b/.claude/skills/writing-hashql-jexpr/references/syntax-reference.md index 6db056653c2..fe46198441b 100644 --- a/.claude/skills/writing-hashql-jexpr/references/syntax-reference.md +++ b/.claude/skills/writing-hashql-jexpr/references/syntax-reference.md @@ -6,11 +6,11 @@ Core syntax reference for J-Expr, the JSON expression syntax for HashQL. J-Expr maps JSON types to expression semantics: -| JSON Type | J-Expr Meaning | -| --------- | ---------------------------------- | -| String | Path/identifier | -| Array | Function call | -| Object | Data constructor (with `#` keys) | +| JSON Type | J-Expr Meaning | +| --------- | -------------------------------- | +| String | Path/identifier | +| Array | Function call | +| Object | Data constructor (with `#` keys) | ## Paths (String Expressions) @@ -73,9 +73,7 @@ Arrays represent function calls: `[function, arg1, arg2, ...]` ### Nested Calls ```jsonc -["add", - ["multiply", {"#literal": 2}, {"#literal": 3}], - {"#literal": 4}] +["add", ["multiply", { "#literal": 2 }, { "#literal": 3 }], { "#literal": 4 }] ``` ### Labeled Arguments @@ -85,13 +83,16 @@ Use `:` prefix for named/labeled arguments. **Object syntax:** ```jsonc -["greet", {":name": {"#literal": "Alice"}, ":greeting": {"#literal": "Hello"}}] +[ + "greet", + { ":name": { "#literal": "Alice" }, ":greeting": { "#literal": "Hello" } }, +] ``` **Shorthand string syntax:** ```jsonc -["func", ":varName"] // References variable "varName" as labeled argument +["func", ":varName"] // References variable "varName" as labeled argument ``` ## Operators @@ -135,9 +136,17 @@ Use `:` prefix for named/labeled arguments. ### Filtering ```jsonc -["filter", "entities", - ["fn", {"#tuple": []}, {"#struct": {"entity": "_"}}, "_", - ["==", "entity.draft_id", {"#literal": null}]]] +[ + "filter", + "entities", + [ + "fn", + { "#tuple": [] }, + { "#struct": { "entity": "_" } }, + "_", + ["==", "entity.draft_id", { "#literal": null }], + ], +] ``` ### Property Access @@ -154,31 +163,59 @@ Use dotted paths: ### Entity Query with Filter ```jsonc -["let", "entities", +[ + "let", + "entities", ["::graph::head::entities", ["::graph::tmp::decision_time_now"]], - ["filter", "entities", - ["fn", {"#tuple": []}, {"#struct": {"e": "_"}}, "_", - ["==", "e.archived", {"#literal": false}]]]] + [ + "filter", + "entities", + [ + "fn", + { "#tuple": [] }, + { "#struct": { "e": "_" } }, + "_", + ["==", "e.archived", { "#literal": false }], + ], + ], +] ``` ### Nested Conditional ```jsonc -["let", "value", {"#literal": 42}, - ["if", [">", "value", {"#literal": 0}], - ["if", ["<", "value", {"#literal": 100}], - {"#literal": "in range"}, - {"#literal": "too high"}], - {"#literal": "too low"}]] +[ + "let", + "value", + { "#literal": 42 }, + [ + "if", + [">", "value", { "#literal": 0 }], + [ + "if", + ["<", "value", { "#literal": 100 }], + { "#literal": "in range" }, + { "#literal": "too high" }, + ], + { "#literal": "too low" }, + ], +] ``` ### Multiple Variable Bindings ```jsonc -["let", "x", {"#literal": 1}, - ["let", "y", {"#literal": 2}, - ["let", "z", ["add", "x", "y"], - ["multiply", "z", {"#literal": 2}]]]] +[ + "let", + "x", + { "#literal": 1 }, + [ + "let", + "y", + { "#literal": 2 }, + ["let", "z", ["add", "x", "y"], ["multiply", "z", { "#literal": 2 }]], + ], +] ``` ## Related References diff --git a/.claude/skills/writing-hashql-jexpr/references/type-dsl.md b/.claude/skills/writing-hashql-jexpr/references/type-dsl.md index 22a3ffafa3c..55a953da56d 100644 --- a/.claude/skills/writing-hashql-jexpr/references/type-dsl.md +++ b/.claude/skills/writing-hashql-jexpr/references/type-dsl.md @@ -197,7 +197,9 @@ Whitespace is allowed around operators and inside structures: ### Complex Entity Types ```jsonc -{"#type": "(id: ID, attrs: (name: String, metadata: (created: Timestamp, modified: Timestamp | Null)))"} +{ + "#type": "(id: ID, attrs: (name: String, metadata: (created: Timestamp, modified: Timestamp | Null)))", +} ``` ### Union and Intersection @@ -237,7 +239,7 @@ Whitespace is allowed around operators and inside structures: Used within function definitions: ```jsonc -["fn", +["fn", {"#tuple": []}, // Type parameters (empty) {"#struct": {"x": "_"}}, // Parameter struct (inferred types) "_", // Return type (inferred) @@ -247,11 +249,13 @@ Used within function definitions: With explicit types: ```jsonc -["fn", - {"#tuple": []}, - {"#struct": {"x": "Int", "y": "Int"}}, // Explicit param types - "Int", // Explicit return type - ["add", "x", "y"]] +[ + "fn", + { "#tuple": [] }, + { "#struct": { "x": "Int", "y": "Int" } }, // Explicit param types + "Int", // Explicit return type + ["add", "x", "y"], +] ``` ## Error Cases @@ -267,7 +271,7 @@ With explicit types: ### Empty Generic Arguments ```jsonc -"Vec<>" // Error - empty generics +"Vec<>" // Error - empty generics ``` ### Missing Elements diff --git a/.config/_examples/vscode/extensions-frontend.json b/.config/_examples/vscode/extensions-frontend.json index a584a705210..30c0b998a82 100644 --- a/.config/_examples/vscode/extensions-frontend.json +++ b/.config/_examples/vscode/extensions-frontend.json @@ -9,6 +9,6 @@ "ms-playwright.playwright", "ms-vscode.vscode-typescript-next", "vitest.explorer", - "biomejs.biome" + "oxc.oxc-vscode" ] } diff --git a/.config/_examples/zed/settings.json b/.config/_examples/zed/settings.json index ed632c3b926..ac07ff67928 100644 --- a/.config/_examples/zed/settings.json +++ b/.config/_examples/zed/settings.json @@ -10,11 +10,11 @@ ] }, "auto_install_extensions": { - "biome": true + "oxc": true }, "formatter": { "language_server": { - "name": "biome" + "name": "oxc" } } } diff --git a/.config/agents/README.md b/.config/agents/README.md index 78ade3d96cc..47128f4b3b7 100644 --- a/.config/agents/README.md +++ b/.config/agents/README.md @@ -1,17 +1,14 @@ -Agent rules and symlinks -======================== +# Agent rules and symlinks This directory defines a single, canonical set of agent rules and then fans them out via symlinks into the various agent-specific locations used in this repo. -Source of truth ---------------- +## Source of truth - Canonical rule files live in: - `.config/agents/rules/*.md` - Each Markdown file in `rules/` represents one logical rule, where the **basename** (e.g. `foo.md` → `foo`) is used as the rule ID. -Frontmatter requirements ------------------------- +## Frontmatter requirements For compatibility across all consumers (Cursor, Augment, Claude, Cline, Windsurf, etc.), **all values in YAML frontmatter must be double-quoted strings**, even when plain YAML would allow unquoted values. @@ -44,8 +41,7 @@ status: experimental Some agents will mis-parse or ignore unquoted values, so always use double quotes. -Where rules are symlinked to ----------------------------- +## Where rules are symlinked to From the `rules/` directory, the `symlink-rules` script creates symlinks into these tool-specific locations: @@ -58,8 +54,7 @@ From the `rules/` directory, the `symlink-rules` script creates symlinks into th The content of each target file is a **symlink** back to the corresponding source file in `.config/agents/rules/`. -Running the sync script ------------------------ +## Running the sync script From the repo root, run: @@ -79,8 +74,7 @@ The script will: - If the expected target path is a **real file or directory**, mark that rule as **disqualified** for that target and skip it (nothing is deleted or overwritten). - For all non-disqualified rules, create a new relative symlink from the target path back to the source rule in `rules/`. -Editing rules -------------- +## Editing rules You can work with rules in two main ways: @@ -95,8 +89,7 @@ Implementation detail: the files in `.cursor/rules/`, `.augment/rules/`, `.claud If you manually create a real (non-symlink) file in a target location where the script expects to place a symlink, that rule will be marked as disqualified for that target and will no longer be auto-synced there. -Summary -------- +## Summary - Put all shared rule content in `.config/agents/rules/*.md`. - Always use **double-quoted YAML frontmatter values**. diff --git a/.config/agents/rules/ark-ui.md b/.config/agents/rules/ark-ui.md index 6752d13a5c3..20b3c58dd27 100644 --- a/.config/agents/rules/ark-ui.md +++ b/.config/agents/rules/ark-ui.md @@ -31,113 +31,113 @@ Headless component library providing accessible, unstyled React primitives for b ## Core Concepts -| Topic | URL | -| --- | --- | -| Getting Started | https://ark-ui.com/react/docs/overview/getting-started | -| Styling (data attributes) | https://ark-ui.com/react/docs/guides/styling | -| Composition (asChild) | https://ark-ui.com/react/docs/guides/composition | -| Component State | https://ark-ui.com/react/docs/guides/component-state | -| Animation | https://ark-ui.com/react/docs/guides/animation | -| Forms Integration | https://ark-ui.com/react/docs/guides/forms | -| Refs | https://ark-ui.com/react/docs/guides/ref | -| Closed Components | https://ark-ui.com/react/docs/guides/closed-components | +| Topic | URL | +| ------------------------- | ------------------------------------------------------ | +| Getting Started | https://ark-ui.com/react/docs/overview/getting-started | +| Styling (data attributes) | https://ark-ui.com/react/docs/guides/styling | +| Composition (asChild) | https://ark-ui.com/react/docs/guides/composition | +| Component State | https://ark-ui.com/react/docs/guides/component-state | +| Animation | https://ark-ui.com/react/docs/guides/animation | +| Forms Integration | https://ark-ui.com/react/docs/guides/forms | +| Refs | https://ark-ui.com/react/docs/guides/ref | +| Closed Components | https://ark-ui.com/react/docs/guides/closed-components | ## Components ### Form Inputs -| Component | URL | -| --- | --- | -| Checkbox | https://ark-ui.com/react/docs/components/checkbox | -| Combobox | https://ark-ui.com/react/docs/components/combobox | -| Color Picker | https://ark-ui.com/react/docs/components/color-picker | -| Date Picker | https://ark-ui.com/react/docs/components/date-picker | -| Editable | https://ark-ui.com/react/docs/components/editable | -| Field | https://ark-ui.com/react/docs/components/field | -| Fieldset | https://ark-ui.com/react/docs/components/fieldset | -| File Upload | https://ark-ui.com/react/docs/components/file-upload | -| Listbox | https://ark-ui.com/react/docs/components/listbox | -| Number Input | https://ark-ui.com/react/docs/components/number-input | +| Component | URL | +| -------------- | ------------------------------------------------------- | +| Checkbox | https://ark-ui.com/react/docs/components/checkbox | +| Combobox | https://ark-ui.com/react/docs/components/combobox | +| Color Picker | https://ark-ui.com/react/docs/components/color-picker | +| Date Picker | https://ark-ui.com/react/docs/components/date-picker | +| Editable | https://ark-ui.com/react/docs/components/editable | +| Field | https://ark-ui.com/react/docs/components/field | +| Fieldset | https://ark-ui.com/react/docs/components/fieldset | +| File Upload | https://ark-ui.com/react/docs/components/file-upload | +| Listbox | https://ark-ui.com/react/docs/components/listbox | +| Number Input | https://ark-ui.com/react/docs/components/number-input | | Password Input | https://ark-ui.com/react/docs/components/password-input | -| Pin Input | https://ark-ui.com/react/docs/components/pin-input | -| Radio Group | https://ark-ui.com/react/docs/components/radio-group | -| Select | https://ark-ui.com/react/docs/components/select | -| Signature Pad | https://ark-ui.com/react/docs/components/signature-pad | -| Slider | https://ark-ui.com/react/docs/components/slider | -| Switch | https://ark-ui.com/react/docs/components/switch | -| Tags Input | https://ark-ui.com/react/docs/components/tags-input | +| Pin Input | https://ark-ui.com/react/docs/components/pin-input | +| Radio Group | https://ark-ui.com/react/docs/components/radio-group | +| Select | https://ark-ui.com/react/docs/components/select | +| Signature Pad | https://ark-ui.com/react/docs/components/signature-pad | +| Slider | https://ark-ui.com/react/docs/components/slider | +| Switch | https://ark-ui.com/react/docs/components/switch | +| Tags Input | https://ark-ui.com/react/docs/components/tags-input | ### Overlays and Popups -| Component | URL | -| --- | --- | -| Dialog | https://ark-ui.com/react/docs/components/dialog | +| Component | URL | +| -------------- | ------------------------------------------------------- | +| Dialog | https://ark-ui.com/react/docs/components/dialog | | Floating Panel | https://ark-ui.com/react/docs/components/floating-panel | -| Hover Card | https://ark-ui.com/react/docs/components/hover-card | -| Menu | https://ark-ui.com/react/docs/components/menu | -| Popover | https://ark-ui.com/react/docs/components/popover | -| Toast | https://ark-ui.com/react/docs/components/toast | -| Tooltip | https://ark-ui.com/react/docs/components/tooltip | -| Tour | https://ark-ui.com/react/docs/components/tour | +| Hover Card | https://ark-ui.com/react/docs/components/hover-card | +| Menu | https://ark-ui.com/react/docs/components/menu | +| Popover | https://ark-ui.com/react/docs/components/popover | +| Toast | https://ark-ui.com/react/docs/components/toast | +| Tooltip | https://ark-ui.com/react/docs/components/tooltip | +| Tour | https://ark-ui.com/react/docs/components/tour | ### Layout and Navigation -| Component | URL | -| --- | --- | -| Accordion | https://ark-ui.com/react/docs/components/accordion | -| Carousel | https://ark-ui.com/react/docs/components/carousel | +| Component | URL | +| ----------- | ---------------------------------------------------- | +| Accordion | https://ark-ui.com/react/docs/components/accordion | +| Carousel | https://ark-ui.com/react/docs/components/carousel | | Collapsible | https://ark-ui.com/react/docs/components/collapsible | -| Pagination | https://ark-ui.com/react/docs/components/pagination | +| Pagination | https://ark-ui.com/react/docs/components/pagination | | Scroll Area | https://ark-ui.com/react/docs/components/scroll-area | -| Splitter | https://ark-ui.com/react/docs/components/splitter | -| Steps | https://ark-ui.com/react/docs/components/steps | -| Tabs | https://ark-ui.com/react/docs/components/tabs | -| Tree View | https://ark-ui.com/react/docs/components/tree-view | +| Splitter | https://ark-ui.com/react/docs/components/splitter | +| Steps | https://ark-ui.com/react/docs/components/steps | +| Tabs | https://ark-ui.com/react/docs/components/tabs | +| Tree View | https://ark-ui.com/react/docs/components/tree-view | ### Display and Feedback -| Component | URL | -| --- | --- | -| Avatar | https://ark-ui.com/react/docs/components/avatar | -| Clipboard | https://ark-ui.com/react/docs/components/clipboard | -| Marquee | https://ark-ui.com/react/docs/components/marquee | +| Component | URL | +| ----------------- | ---------------------------------------------------------- | +| Avatar | https://ark-ui.com/react/docs/components/avatar | +| Clipboard | https://ark-ui.com/react/docs/components/clipboard | +| Marquee | https://ark-ui.com/react/docs/components/marquee | | Progress Circular | https://ark-ui.com/react/docs/components/progress-circular | -| Progress Linear | https://ark-ui.com/react/docs/components/progress-linear | -| QR Code | https://ark-ui.com/react/docs/components/qr-code | -| Rating Group | https://ark-ui.com/react/docs/components/rating-group | -| Timer | https://ark-ui.com/react/docs/components/timer | +| Progress Linear | https://ark-ui.com/react/docs/components/progress-linear | +| QR Code | https://ark-ui.com/react/docs/components/qr-code | +| Rating Group | https://ark-ui.com/react/docs/components/rating-group | +| Timer | https://ark-ui.com/react/docs/components/timer | ### Selection and Toggle -| Component | URL | -| --- | --- | -| Angle Slider | https://ark-ui.com/react/docs/components/angle-slider | +| Component | URL | +| ------------- | ------------------------------------------------------ | +| Angle Slider | https://ark-ui.com/react/docs/components/angle-slider | | Segment Group | https://ark-ui.com/react/docs/components/segment-group | -| Toggle | https://ark-ui.com/react/docs/components/toggle | -| Toggle Group | https://ark-ui.com/react/docs/components/toggle-group | +| Toggle | https://ark-ui.com/react/docs/components/toggle | +| Toggle Group | https://ark-ui.com/react/docs/components/toggle-group | ## Collections -| Collection | URL | -| --- | --- | -| Async List | https://ark-ui.com/react/docs/collections/async-list | +| Collection | URL | +| --------------- | --------------------------------------------------------- | +| Async List | https://ark-ui.com/react/docs/collections/async-list | | List Collection | https://ark-ui.com/react/docs/collections/list-collection | -| List Selection | https://ark-ui.com/react/docs/collections/list-selection | +| List Selection | https://ark-ui.com/react/docs/collections/list-selection | | Tree Collection | https://ark-ui.com/react/docs/collections/tree-collection | ## Utilities -| Utility | URL | -| --- | --- | -| Client Only | https://ark-ui.com/react/docs/utilities/client-only | -| Download Trigger | https://ark-ui.com/react/docs/utilities/download-trigger | -| Environment | https://ark-ui.com/react/docs/utilities/environment | -| Focus Trap | https://ark-ui.com/react/docs/utilities/focus-trap | -| Format Byte | https://ark-ui.com/react/docs/utilities/format-byte | -| Format Number | https://ark-ui.com/react/docs/utilities/format-number | +| Utility | URL | +| -------------------- | ------------------------------------------------------------ | +| Client Only | https://ark-ui.com/react/docs/utilities/client-only | +| Download Trigger | https://ark-ui.com/react/docs/utilities/download-trigger | +| Environment | https://ark-ui.com/react/docs/utilities/environment | +| Focus Trap | https://ark-ui.com/react/docs/utilities/focus-trap | +| Format Byte | https://ark-ui.com/react/docs/utilities/format-byte | +| Format Number | https://ark-ui.com/react/docs/utilities/format-number | | Format Relative Time | https://ark-ui.com/react/docs/utilities/format-relative-time | -| Frame | https://ark-ui.com/react/docs/utilities/frame | -| Highlight | https://ark-ui.com/react/docs/utilities/highlight | -| JSON Tree View | https://ark-ui.com/react/docs/utilities/json-tree-view | -| Locale | https://ark-ui.com/react/docs/utilities/locale | -| Presence | https://ark-ui.com/react/docs/utilities/presence | +| Frame | https://ark-ui.com/react/docs/utilities/frame | +| Highlight | https://ark-ui.com/react/docs/utilities/highlight | +| JSON Tree View | https://ark-ui.com/react/docs/utilities/json-tree-view | +| Locale | https://ark-ui.com/react/docs/utilities/locale | +| Presence | https://ark-ui.com/react/docs/utilities/presence | diff --git a/.config/agents/rules/zod.md b/.config/agents/rules/zod.md index 39d732874e3..2b37ec932a2 100644 --- a/.config/agents/rules/zod.md +++ b/.config/agents/rules/zod.md @@ -32,23 +32,26 @@ Zod v4 stores metadata in registries (primarily `z.globalRegistry`). Use `.meta( ```typescript // ✅ Correct - .meta() at end of chain -z.string().min(1).max(100).meta({ description: "User's full name", label: "Name" }) +z.string() + .min(1) + .max(100) + .meta({ description: "User's full name", label: "Name" }); // ✅ Correct - .describe() shorthand for description only -z.string().email().describe("Primary email address") +z.string().email().describe("Primary email address"); // ❌ Wrong - metadata lost because .optional() creates new instance -z.string().meta({ description: "Lost!" }).optional() +z.string().meta({ description: "Lost!" }).optional(); ``` **Annotating object properties:** ```typescript const userSchema = z.object({ - email: z.string().email().meta({ + email: z.string().email().meta({ description: "Used for login", label: "Email Address", - placeholder: "you@example.com" + placeholder: "you@example.com", }), age: z.number().min(0).describe("User's age in years"), }); diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index e87fd02cf8d..e506b6ee7c4 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -229,7 +229,7 @@ These apply across all projects: - **Once you have receive a pull request review, please bear the following in mind:** - reviewers may make suggestions for _optional_ changes which are not required to get your code merged. It should be obvious which suggestions are optional, and which are required changes. If it is not obvious, ask for clarification. - please do not resolve comment threads unless you opened them - leave it to the person who raised a comment to decide if any further discussion is required (GitHub will also automatically resolve any code suggestions you click 'commit' on). Comment threads may also be left open so that they can be linked to later. -- **We perform automated linting and formatting checks on pull requests using GitHub Actions.** As part of our Continuous Integration (CI) setup, when a pull request is created or updated, GitHub Actions will run a series of checks. This includes running `ESLint`, `TSC`, `Biome`, `Markdownlint`, `rustfmt`, and a few other tools. Some checks may be skipped depending on the files that have been changed in the pull request. First-time contributors need to wait for a HASH maintainer to manually launch CI checks. +- **We perform automated linting and formatting checks on pull requests using GitHub Actions.** As part of our Continuous Integration (CI) setup, when a pull request is created or updated, GitHub Actions will run a series of checks. This includes running `ESLint`, `TSC`, `Oxfmt`, `Markdownlint`, `rustfmt`, and a few other tools. Some checks may be skipped depending on the files that have been changed in the pull request. First-time contributors need to wait for a HASH maintainer to manually launch CI checks. ### How can I find interesting PRs to work on? diff --git a/.github/actions/clean-up-disk/action.yml b/.github/actions/clean-up-disk/action.yml index f3325b8c629..0030ac6717c 100644 --- a/.github/actions/clean-up-disk/action.yml +++ b/.github/actions/clean-up-disk/action.yml @@ -56,7 +56,6 @@ runs: sudo apt-get autoclean -y echo - - name: Check disk space after cleanup shell: bash run: df -h diff --git a/.github/actions/prune-repository/action.yml b/.github/actions/prune-repository/action.yml index 60302a48942..c3eb46ed7c9 100644 --- a/.github/actions/prune-repository/action.yml +++ b/.github/actions/prune-repository/action.yml @@ -17,7 +17,7 @@ runs: - name: Copy required files shell: bash run: | - cp -R Cargo.toml Cargo.lock rust-toolchain.toml biome.jsonc out/ + cp -R Cargo.toml Cargo.lock rust-toolchain.toml oxfmt.config.ts out/ # Globs are fun, especially in Bash. Covers all dot-files except `.`, `..`, and `.git`. shopt -s extglob diff --git a/.github/licenses/LICENSE-CC.md b/.github/licenses/LICENSE-CC.md index d9d661ad4db..0a32a951881 100644 --- a/.github/licenses/LICENSE-CC.md +++ b/.github/licenses/LICENSE-CC.md @@ -6,9 +6,9 @@ Creative Commons Corporation (“Creative Commons”) is not a law firm and does Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. -* __Considerations for licensors:__ Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. [More considerations for licensors](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensors). +- **Considerations for licensors:** Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. [More considerations for licensors](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensors). -* __Considerations for the public:__ By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. [More considerations for the public](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensees). +- **Considerations for the public:** By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. [More considerations for the public](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensees). ## Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License @@ -16,105 +16,103 @@ By exercising the Licensed Rights (defined below), You accept and agree to be bo ### Section 1 – Definitions. -a. __Adapted Material__ means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. +a. **Adapted Material** means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. -b. __Adapter's License__ means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. +b. **Adapter's License** means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. -c. __BY-NC-SA Compatible License__ means a license listed at [creativecommons.org/compatiblelicenses](http://creativecommons.org/compatiblelicenses), approved by Creative Commons as essentially the equivalent of this Public License. +c. **BY-NC-SA Compatible License** means a license listed at [creativecommons.org/compatiblelicenses](http://creativecommons.org/compatiblelicenses), approved by Creative Commons as essentially the equivalent of this Public License. -d. __Copyright and Similar Rights__ means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. +d. **Copyright and Similar Rights** means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. -e. __Effective Technological Measures__ means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. +e. **Effective Technological Measures** means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. -f. __Exceptions and Limitations__ means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. +f. **Exceptions and Limitations** means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. -g. __License Elements__ means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution, NonCommercial, and ShareAlike. +g. **License Elements** means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution, NonCommercial, and ShareAlike. -h. __Licensed Material__ means the artistic or literary work, database, or other material to which the Licensor applied this Public License. +h. **Licensed Material** means the artistic or literary work, database, or other material to which the Licensor applied this Public License. -i. __Licensed Rights__ means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. +i. **Licensed Rights** means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. -h. __Licensor__ means the individual(s) or entity(ies) granting rights under this Public License. +h. **Licensor** means the individual(s) or entity(ies) granting rights under this Public License. -i. __NonCommercial__ means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange. +i. **NonCommercial** means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange. -j. __Share__ means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. +j. **Share** means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. -k. __Sui Generis Database Rights__ means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. +k. **Sui Generis Database Rights** means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. -l. __You__ means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. +l. **You** means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. ### Section 2 – Scope. -a. ___License grant.___ +a. **_License grant._** - 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: +1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: - A. reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and +A. reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and - B. produce, reproduce, and Share Adapted Material for NonCommercial purposes only. +B. produce, reproduce, and Share Adapted Material for NonCommercial purposes only. - 2. __Exceptions and Limitations.__ For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. - - 3. __Term.__ The term of this Public License is specified in Section 6(a). +2. **Exceptions and Limitations.** For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. +3. **Term.** The term of this Public License is specified in Section 6(a). - 4. __Media and formats; technical modifications allowed.__ The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. - - 5. __Downstream recipients.__ +4. **Media and formats; technical modifications allowed.** The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. +5. **Downstream recipients.** - A. __Offer from the Licensor – Licensed Material.__ Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. +A. **Offer from the Licensor – Licensed Material.** Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. - B. __Additional offer from the Licensor – Adapted Material.__ Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter’s License You apply. +B. **Additional offer from the Licensor – Adapted Material.** Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter’s License You apply. - C. __No downstream restrictions.__ You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. +C. **No downstream restrictions.** You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. - 6. __No endorsement.__ Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). - -b. ___Other rights.___ +6. **No endorsement.** Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). - 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. +b. **_Other rights._** - 2. Patent and trademark rights are not licensed under this Public License. +1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. + +2. Patent and trademark rights are not licensed under this Public License. + +3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial purposes. - 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial purposes. - ### Section 3 – License Conditions. Your exercise of the Licensed Rights is expressly made subject to the following conditions. -a. ___Attribution.___ +a. **_Attribution._** - 1. If You Share the Licensed Material (including in modified form), You must: +1. If You Share the Licensed Material (including in modified form), You must: - A. retain the following if it is supplied by the Licensor with the Licensed Material: +A. retain the following if it is supplied by the Licensor with the Licensed Material: - i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); +i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); - ii. a copyright notice; +ii. a copyright notice; - iii. a notice that refers to this Public License; +iii. a notice that refers to this Public License; - iv. a notice that refers to the disclaimer of warranties; +iv. a notice that refers to the disclaimer of warranties; - v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; +v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; - B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and +B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and - C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. +C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. - 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. +2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. - 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. +3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. -b. ___ShareAlike.___ +b. **_ShareAlike._** In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply. - 1. The Adapter’s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-NC-SA Compatible License. +1. The Adapter’s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-NC-SA Compatible License. - 2. You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material. +2. You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material. - 3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply. +3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply. ### Section 4 – Sui Generis Database Rights. @@ -130,9 +128,9 @@ For the avoidance of doubt, this Section 4 supplements and does not replace Your ### Section 5 – Disclaimer of Warranties and Limitation of Liability. -a. __Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.__ +a. **Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.** -b. __To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.__ +b. **To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.** c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. @@ -142,11 +140,11 @@ a. This Public License applies for the term of the Copyright and Similar Rights b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: - 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or +1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or - 2. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or +2. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or - For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. +For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 53fb2de71ec..5deee6bf03d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -270,18 +270,6 @@ jobs: exit 1 fi - - name: Run yarn lint:package-json - if: ${{ success() || failure() }} - run: | - if ! yarn lint:package-json; then - echo '' - echo '' - echo 'ℹ️ ℹ️ ℹ️' - echo 'Try running `yarn fix:package-json` locally to apply autofixes.' - echo 'ℹ️ ℹ️ ℹ️' - exit 1 - fi - - name: Validate Claude Code skills if: ${{ success() || failure() }} run: | diff --git a/.lefthook.yml b/.lefthook.yml index e4098113472..f5dcdb9b442 100644 --- a/.lefthook.yml +++ b/.lefthook.yml @@ -11,15 +11,15 @@ pre-commit: glob: "*.md" run: markdownlint-cli2 --fix --no-globs {staged_files} || true stage_fixed: true - biome: + oxfmt: tags: [frontend, style] glob: "*.{cjs,css,js,json,md,mdx,mjs,scss,ts,tsx,yml}" - run: biome format --write --staged || true + run: oxfmt --write {staged_files} || true stage_fixed: true yarn: tags: [frontend, style] glob: "{*/package.json, package.json}" - run: yarn fix:constraints && yarn fix:yarn-deduplicate && yarn fix:package-json {staged_files} + run: yarn fix:constraints && yarn fix:yarn-deduplicate stage_fixed: true sqlfluff: tags: [backend, style] diff --git a/AGENTS.md b/AGENTS.md index 62096cc9c5a..0b36b5f5471 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -84,7 +84,7 @@ For Rust packages, you can add features as needed with `--all-features`, specifi CRITICAL: For the files referenced below, use your Read tool to load it on a need-to-know basis, ONLY when relevant to the SPECIFIC task at hand: -- .config/agents/rules/*.md +- .config/agents/rules/\*.md Instructions: diff --git a/CITATION.cff b/CITATION.cff index 5c038b7b234..aa688ca096c 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -1,13 +1,13 @@ cff-version: 1.2.0 title: HASH type: software -url: 'https://hash.ai/' -repository-code: 'https://github.com/hashintel/hash' +url: "https://hash.ai/" +repository-code: "https://github.com/hashintel/hash" authors: - given-names: Dei family-names: Vilkinsons affiliation: HASH - orcid: 'https://orcid.org/0000-0001-5348-3913' + orcid: "https://orcid.org/0000-0001-5348-3913" - given-names: Ciaran family-names: Morinan affiliation: HASH @@ -15,7 +15,7 @@ authors: family-names: Diekmann affiliation: HASH - name: HASH - website: 'https://hash.ai/' + website: "https://hash.ai/" email: team@hash.ai abstract: >- HASH is an open, multi-tenant type system and @@ -26,4 +26,4 @@ keywords: - graph database - artificial intelligence - world model -message: 'If you this software, please cite it using this metadata.' \ No newline at end of file +message: "If you this software, please cite it using this metadata." diff --git a/LICENSE.md b/LICENSE.md index 14759c832e7..8b1e75f699f 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -8,6 +8,7 @@ # License The vast majority of the HASH monorepo contains **open-source code** variously licensed under either: + - the [MIT License] and [Apache License 2.0] dually (default); or - the [GNU Affero General Public License 3.0]. diff --git a/README.md b/README.md index c11f27c97c7..d9153904783 100644 --- a/README.md +++ b/README.md @@ -168,11 +168,10 @@ When you first create an account you may be placed on a waitlist. To jump the qu 9. Log in When the HASH API is started, three users are automatically seeded for development purposes. Their passwords are all `password`. - - `alice@example.com`, `bob@example.com` – regular users - `admin@example.com` – an admin - - Note: seeding only runs when `NODE_ENV=development`, start the Graph API separately using `yarn start:graph` then launch the app using `yarn dev` in a separate terminal to start it in development environment. + +Note: seeding only runs when `NODE_ENV=development`, start the Graph API separately using `yarn start:graph` then launch the app using `yarn dev` in a separate terminal to start it in development environment. ##### Running the browser plugin diff --git a/apps/hash-ai-worker-ts/README.md b/apps/hash-ai-worker-ts/README.md index dcf4c17ad8e..8fe975e1ed6 100644 --- a/apps/hash-ai-worker-ts/README.md +++ b/apps/hash-ai-worker-ts/README.md @@ -18,7 +18,7 @@ The service uses the following environment variables: - `INTERNAL_API_KEY`: The API key used to authenticate with the internal API, required for workflows making use of the `getWebSearchResultsActivity` activity - `HASH_VAULT_HOST`: The host address (including protocol) that the Vault server is running on, e.g. `http://127.0.0.1` - `HASH_VAULT_PORT`: The port that the Vault server is running on, e.g. `8200` -- `HASH_VAULT_ROOT_TOKEN`: The token to authenticate with the Vault server. If not present, login via AWS IAM is attempted instead. +- `HASH_VAULT_ROOT_TOKEN`: The token to authenticate with the Vault server. If not present, login via AWS IAM is attempted instead. - `HASH_VAULT_MOUNT_PATH`: The mount path for the KV secrets engine, e.g. `secret`. - `GOOGLE_CLOUD_HASH_PROJECT_ID`: The projectId for a Google Cloud Platform project, used in document analysis (Vertex AI and Cloud Storage). Note that this is the Project ID, _not_ the Project Number. - `GOOGLE_CLOUD_STORAGE_BUCKET`: The name of the Google Cloud Storage bucket to use for document analysis. diff --git a/apps/hash-ai-worker-ts/docker/Dockerfile b/apps/hash-ai-worker-ts/docker/Dockerfile index 8f5e900799a..42935fd9788 100644 --- a/apps/hash-ai-worker-ts/docker/Dockerfile +++ b/apps/hash-ai-worker-ts/docker/Dockerfile @@ -75,7 +75,7 @@ RUN --mount=type=secret,id=GITHUB_TOKEN,env=GITHUB_TOKEN \ apt-get install -y --no-install-recommends build-essential && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* && \ - mise install node npm:turbo java biome npm:@redocly/cli cargo-binstall cargo:wasm-pack cargo:wasm-opt protoc && \ + mise install node npm:turbo java oxfmt npm:@redocly/cli cargo-binstall cargo:wasm-pack cargo:wasm-opt protoc && \ yarn install --immutable && \ yarn cache clean diff --git a/apps/hash-ai-worker-ts/scripts/bundle-workflow-code.ts b/apps/hash-ai-worker-ts/scripts/bundle-workflow-code.ts index 9cf2a65542c..df95d5c8b75 100644 --- a/apps/hash-ai-worker-ts/scripts/bundle-workflow-code.ts +++ b/apps/hash-ai-worker-ts/scripts/bundle-workflow-code.ts @@ -14,17 +14,13 @@ async function bundle() { const { code } = await bundleWorkflowCode({ workflowsPath: require.resolve("../src/workflows"), workflowInterceptorModules: [ - require.resolve( - "@local/hash-backend-utils/temporal/interceptors/workflows/sentry", - ), + require.resolve("@local/hash-backend-utils/temporal/interceptors/workflows/sentry"), // OTEL workflow interceptor must be in the bundle: when the // worker boots with `workflowBundle`, the `interceptors.workflowModules` // option on `Worker.create` is ignored. The interceptor is a no-op // when no global TracerProvider is registered, so it's safe to // include unconditionally. - require.resolve( - "@local/hash-backend-utils/temporal/interceptors/workflows/opentelemetry", - ), + require.resolve("@local/hash-backend-utils/temporal/interceptors/workflows/opentelemetry"), ], }); const codePath = path.join(__dirname, "../dist/workflow-bundle.js"); diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/get-web-page-summary-action.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/get-web-page-summary-action.ai.test.ts index c6ee9547372..cf7aae2b4af 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/get-web-page-summary-action.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/get-web-page-summary-action.ai.test.ts @@ -1,5 +1,4 @@ import "../../shared/testing-utilities/mock-get-flow-context.js"; - import type { InputNameForAiFlowAction } from "@local/hash-isomorphic-utils/flows/action-definitions"; import { actionDefinitions } from "@local/hash-isomorphic-utils/flows/action-definitions"; import type { StepInput } from "@local/hash-isomorphic-utils/flows/types"; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/infer-entities-from-content-action.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/infer-entities-from-content-action.ts index fd06288f415..659b2b9fdb4 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/infer-entities-from-content-action.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/infer-entities-from-content-action.ts @@ -24,11 +24,11 @@ import { StatusCode } from "@local/status"; import { getAiAssistantAccountIdActivity } from "../get-ai-assistant-account-id-activity.js"; import { getDereferencedEntityTypesActivity } from "../get-dereferenced-entity-types-activity.js"; +import { inferEntitiesFromWebPageActivity } from "../infer-entities-from-web-page-activity.js"; import type { DereferencedEntityTypesByTypeId, InferenceState, } from "../infer-entities/inference-types.js"; -import { inferEntitiesFromWebPageActivity } from "../infer-entities-from-web-page-activity.js"; import { getFlowContext } from "../shared/get-flow-context.js"; import { graphApiClient } from "../shared/graph-api-client.js"; import { inferenceModelAliasToSpecificModel } from "../shared/inference-model-alias-to-llm-model.js"; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action.ai.test.ts index 8ed3eaaf86e..2b616fe718c 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action.ai.test.ts @@ -1,5 +1,4 @@ import "../../shared/testing-utilities/mock-get-flow-context.js"; - import { existsSync, mkdirSync, diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/check-delegated-tasks-agent.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/check-delegated-tasks-agent.ai.test.ts index f6a1fdd1efe..a613ca17c5c 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/check-delegated-tasks-agent.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/check-delegated-tasks-agent.ai.test.ts @@ -1,5 +1,4 @@ import "../../../../shared/testing-utilities/mock-get-flow-context.js"; - import { expect, test } from "vitest"; import { getDereferencedEntityTypesActivity } from "../../../get-dereferenced-entity-types-activity.js"; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/summarize-existing-entities.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/summarize-existing-entities.ai.test.ts index 07502b51518..1c377ce99e5 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/summarize-existing-entities.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/summarize-existing-entities.ai.test.ts @@ -1,5 +1,4 @@ import "../../../../shared/testing-utilities/mock-get-flow-context.js"; - import { publicUserAccountId } from "@local/hash-backend-utils/public-user-account-id"; import { queryEntities } from "@local/hash-graph-sdk/entity"; import { diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent.ai.test.ts index e604bb7fe23..889e35fd96e 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent.ai.test.ts @@ -1,5 +1,4 @@ import "../../../shared/testing-utilities/mock-get-flow-context.js"; - import type { Url } from "@blockprotocol/type-system"; import { expect, test } from "vitest"; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent/choose-relevant-links-from-content.optimize.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent/choose-relevant-links-from-content.optimize.ai.test.ts index 6293c938aff..b736b2fbdbb 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent/choose-relevant-links-from-content.optimize.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent/choose-relevant-links-from-content.optimize.ai.test.ts @@ -1,5 +1,4 @@ import "../../../../shared/testing-utilities/mock-get-flow-context.js"; - import path from "node:path"; import { fileURLToPath } from "node:url"; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/deduplicate-entities.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/deduplicate-entities.ai.test.ts index 322e273547e..57b96d65c91 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/deduplicate-entities.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/deduplicate-entities.ai.test.ts @@ -1,5 +1,4 @@ import "../../../../shared/testing-utilities/mock-get-flow-context.js"; - import type { EntityUuid, WebId } from "@blockprotocol/type-system"; import { entityIdFromComponents } from "@blockprotocol/type-system"; import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/simplify-for-llm-consumption.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/simplify-for-llm-consumption.ai.test.ts index b4efcc6dd69..0264facdcff 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/simplify-for-llm-consumption.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/simplify-for-llm-consumption.ai.test.ts @@ -1,5 +1,4 @@ import "../../../../shared/testing-utilities/mock-get-flow-context.js"; - import { expect, test } from "vitest"; import { getDereferencedEntityTypesActivity } from "../../../get-dereferenced-entity-types-activity.js"; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/sub-coordinating-agent.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/sub-coordinating-agent.ai.test.ts index bdefe05386a..2fd15df2612 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/sub-coordinating-agent.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/sub-coordinating-agent.ai.test.ts @@ -1,5 +1,4 @@ import "../../../shared/testing-utilities/mock-get-flow-context.js"; - import { existsSync, mkdirSync, diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.ai.test.ts index 888fe5e4894..ade2b779aba 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.ai.test.ts @@ -1,5 +1,4 @@ import "../../../../shared/testing-utilities/mock-get-flow-context.js"; - import type { Url } from "@blockprotocol/type-system"; import { expect, test } from "vitest"; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.optimize.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.optimize.ai.test.ts index 92fad55bc1f..6c92c9b6e9b 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.optimize.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.optimize.ai.test.ts @@ -8,7 +8,6 @@ /// import "../../../../shared/testing-utilities/mock-get-flow-context.js"; - import path from "node:path"; import { fileURLToPath } from "node:url"; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/infer-entity-claims-from-text.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/infer-entity-claims-from-text.ai.test.ts index 1187c7357b0..6082bd53945 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/infer-entity-claims-from-text.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/infer-entity-claims-from-text.ai.test.ts @@ -1,5 +1,4 @@ import "../../../../shared/testing-utilities/mock-get-flow-context.js"; - import type { EntityUuid, Url, WebId } from "@blockprotocol/type-system"; import { entityIdFromComponents } from "@blockprotocol/type-system"; import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/infer-summaries-then-claims-from-text.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/infer-summaries-then-claims-from-text.ai.test.ts index 0321d6a1bd0..05981b44d31 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/infer-summaries-then-claims-from-text.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/infer-summaries-then-claims-from-text.ai.test.ts @@ -1,5 +1,4 @@ import "../../../../shared/testing-utilities/mock-get-flow-context.js"; - import { readFileSync } from "node:fs"; import path from "node:path"; import { fileURLToPath } from "node:url"; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/propose-entities-from-claims/propose-entities-from-claims.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/propose-entities-from-claims/propose-entities-from-claims.ai.test.ts index 8c923f47ff5..49d9e58a640 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/propose-entities-from-claims/propose-entities-from-claims.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/propose-entities-from-claims/propose-entities-from-claims.ai.test.ts @@ -1,5 +1,4 @@ import "../../../../shared/testing-utilities/mock-get-flow-context.js"; - import type { EntityUuid, Url, WebId } from "@blockprotocol/type-system"; import { currentTimestamp, diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/propose-entities-from-claims/propose-entity-from-claims.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/propose-entities-from-claims/propose-entity-from-claims.ai.test.ts index 088ecf14cd4..d13ecfd5ad7 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/propose-entities-from-claims/propose-entity-from-claims.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/propose-entities-from-claims/propose-entity-from-claims.ai.test.ts @@ -1,5 +1,4 @@ import "../../../../shared/testing-utilities/mock-get-flow-context.js"; - import type { EntityUuid, Timestamp, diff --git a/apps/hash-ai-worker-ts/src/activities/get-web-page-activity.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/get-web-page-activity.ai.test.ts index 2c8ad82118d..b21d1b6e31e 100644 --- a/apps/hash-ai-worker-ts/src/activities/get-web-page-activity.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/get-web-page-activity.ai.test.ts @@ -1,5 +1,4 @@ import "../shared/testing-utilities/mock-get-flow-context.js"; - import type { Url } from "@blockprotocol/type-system"; import { expect, test } from "vitest"; diff --git a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response.ai.test.ts index 72f6bbd8337..891d976d807 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response.ai.test.ts @@ -1,5 +1,4 @@ import "../../shared/testing-utilities/mock-get-flow-context.js"; - import { expect, test } from "vitest"; import { createAnthropicMessagesWithTools } from "./get-llm-response/anthropic-client.js"; diff --git a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-anthropic-response.ts b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-anthropic-response.ts index 8d0293bd972..08e81bea607 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-anthropic-response.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-anthropic-response.ts @@ -135,9 +135,7 @@ const isServerError = (error: unknown): error is APIError => error.status >= 500 && error.status < 600; -const switchProvider = ( - provider: AnthropicApiProvider, -): AnthropicApiProvider => +const switchProvider = (provider: AnthropicApiProvider): AnthropicApiProvider => provider === "anthropic" ? "amazon-bedrock" : "anthropic"; const createAnthropicMessagesWithToolsWithBackoff = async (params: { diff --git a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-openai-reponse.ts b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-openai-reponse.ts index bdb8166d771..f9c44622741 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-openai-reponse.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-openai-reponse.ts @@ -2,8 +2,8 @@ import { Context } from "@temporalio/activity"; import dedent from "dedent"; import { backOff } from "exponential-backoff"; import type { OpenAI } from "openai"; -import { APIError, RateLimitError } from "openai/error"; import { promptTokensEstimate } from "openai-chat-tokens"; +import { APIError, RateLimitError } from "openai/error"; import { logger } from "../activity-logger.js"; import { isActivityCancelled } from "../get-flow-context.js"; diff --git a/apps/hash-ai-worker-ts/src/activities/shared/judge-ai-output.optimize.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/shared/judge-ai-output.optimize.ai.test.ts index 8613fbd324e..1b3baec1a3a 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/judge-ai-output.optimize.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/judge-ai-output.optimize.ai.test.ts @@ -1,5 +1,4 @@ import "../../shared/testing-utilities/mock-get-flow-context.js"; - import path from "node:path"; import { fileURLToPath } from "node:url"; diff --git a/apps/hash-ai-worker-ts/src/activities/shared/match-existing-entity.optimize.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/shared/match-existing-entity.optimize.ai.test.ts index aceee42d4cb..eaa79fd0ad2 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/match-existing-entity.optimize.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/match-existing-entity.optimize.ai.test.ts @@ -1,5 +1,4 @@ import "../../shared/testing-utilities/mock-get-flow-context.js"; - import path from "node:path"; import { fileURLToPath } from "node:url"; diff --git a/apps/hash-ai-worker-ts/src/activities/shared/optimize-system-prompt.ts b/apps/hash-ai-worker-ts/src/activities/shared/optimize-system-prompt.ts index c3083907349..d9e4cd49d0f 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/optimize-system-prompt.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/optimize-system-prompt.ts @@ -1,5 +1,4 @@ import "../../shared/testing-utilities/mock-get-flow-context.js"; - import { existsSync, mkdirSync, writeFileSync } from "node:fs"; import path from "node:path"; diff --git a/apps/hash-ai-worker-ts/src/main.ts b/apps/hash-ai-worker-ts/src/main.ts index 1f93a495494..0dae51b79bf 100644 --- a/apps/hash-ai-worker-ts/src/main.ts +++ b/apps/hash-ai-worker-ts/src/main.ts @@ -1,11 +1,11 @@ /* eslint-disable import/first, import/order, simple-import-sort/imports */ +import * as Sentry from "@sentry/node"; + // Must be the first import so OTEL auto-instrumentations can patch // http / grpc / Sentry's own monkey-patches before they apply. import { otelSetup } from "./instrument.js"; -import * as Sentry from "@sentry/node"; - Sentry.init({ dsn: process.env.HASH_TEMPORAL_WORKER_AI_SENTRY_DSN, enabled: !!process.env.HASH_TEMPORAL_WORKER_AI_SENTRY_DSN, diff --git a/apps/hash-api/LICENSE.md b/apps/hash-api/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/apps/hash-api/LICENSE.md +++ b/apps/hash-api/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/apps/hash-api/codegen.config.ts b/apps/hash-api/codegen.config.ts index 6f65449917b..2fc8e5fd7c3 100644 --- a/apps/hash-api/codegen.config.ts +++ b/apps/hash-api/codegen.config.ts @@ -18,7 +18,7 @@ const config: CodegenConfig = { "../../libs/@local/hash-isomorphic-utils/src/graphql/queries/**/*.ts", ], hooks: { - afterOneFileWrite: ["biome format --write --vcs-use-ignore-file=false"], + afterOneFileWrite: ["oxfmt --write"], }, config: { noSchemaStitching: true, diff --git a/apps/hash-api/package.json b/apps/hash-api/package.json index 58972e49f89..5753e770c19 100644 --- a/apps/hash-api/package.json +++ b/apps/hash-api/package.json @@ -11,7 +11,7 @@ "dev": "NODE_ENV=development NODE_OPTIONS=--max-old-space-size=2048 tsx watch --clear-screen=false --import ./src/instrument.mjs ./src/index.ts", "fix:eslint": "eslint --fix .", "generate-hash-gpt-schema": "tsx ./src/ai/gpt/generate-hashgpt-schema.ts", - "generate-ontology-type-ids": "tsx ./src/generate-ontology-type-ids.ts; biome format --write ../../libs/@local/hash-isomorphic-utils/src/ontology-type-ids.ts", + "generate-ontology-type-ids": "tsx ./src/generate-ontology-type-ids.ts; oxfmt --write ../../libs/@local/hash-isomorphic-utils/src/ontology-type-ids.ts", "lint:eslint": "eslint --report-unused-disable-directives .", "lint:tsc": "tsc --noEmit", "start": "NODE_ENV=production NODE_OPTIONS=--max-old-space-size=2048 tsx --import ./src/instrument.mjs ./src/index.ts", diff --git a/apps/hash-api/src/graph/knowledge/primitive/entity.ts b/apps/hash-api/src/graph/knowledge/primitive/entity.ts index 3cb2f4f94f7..b1431016a77 100644 --- a/apps/hash-api/src/graph/knowledge/primitive/entity.ts +++ b/apps/hash-api/src/graph/knowledge/primitive/entity.ts @@ -166,8 +166,8 @@ export const countEntities: ImpureGraphFunction< graphApi.countEntities(actorId, params).then(({ data }) => data); type GetLatestEntityByIdFunction< - Properties extends - TypeIdsAndPropertiesForEntity = TypeIdsAndPropertiesForEntity, + Properties extends TypeIdsAndPropertiesForEntity = + TypeIdsAndPropertiesForEntity, > = ImpureGraphFunction< { entityId: EntityId; @@ -195,8 +195,8 @@ type GetLatestEntityByIdFunction< * fault */ export const getLatestEntityById = async < - Properties extends - TypeIdsAndPropertiesForEntity = TypeIdsAndPropertiesForEntity, + Properties extends TypeIdsAndPropertiesForEntity = + TypeIdsAndPropertiesForEntity, >( ...args: Parameters> ): ReturnType> => { diff --git a/apps/hash-api/src/graphql/resolvers/index.ts b/apps/hash-api/src/graphql/resolvers/index.ts index 101b28388a2..f3806010fe4 100644 --- a/apps/hash-api/src/graphql/resolvers/index.ts +++ b/apps/hash-api/src/graphql/resolvers/index.ts @@ -27,10 +27,10 @@ import { generatePluralResolver } from "./generation/generate-plural"; import { isGenerationAvailableResolver } from "./generation/is-generation-available"; import { getLinearOrganizationResolver } from "./integrations/linear/linear-organization"; import { syncLinearIntegrationWithWebsMutation } from "./integrations/linear/sync-linear-integration-with-webs"; -import { blocksResolver } from "./knowledge/block/block"; -import { blockChildEntityResolver } from "./knowledge/block/data-entity"; import { blockCollectionContents } from "./knowledge/block-collection/block-collection-contents"; import { updateBlockCollectionContents } from "./knowledge/block-collection/update-block-collection-contents"; +import { blocksResolver } from "./knowledge/block/block"; +import { blockChildEntityResolver } from "./knowledge/block/data-entity"; import { commentAuthorResolver } from "./knowledge/comment/author"; import { createCommentResolver } from "./knowledge/comment/comment"; import { deleteCommentResolver } from "./knowledge/comment/delete"; diff --git a/apps/hash-api/src/instrument.mjs b/apps/hash-api/src/instrument.mjs index 9aff48c593b..68b4df200f7 100644 --- a/apps/hash-api/src/instrument.mjs +++ b/apps/hash-api/src/instrument.mjs @@ -1,6 +1,5 @@ /** Required to load environment variables */ import "@local/hash-backend-utils/environment"; - import { createHttpInstrumentation, createUndiciInstrumentation, diff --git a/apps/hash-api/views/consent.hbs b/apps/hash-api/views/consent.hbs index 03ed3581450..390fcc19f10 100644 --- a/apps/hash-api/views/consent.hbs +++ b/apps/hash-api/views/consent.hbs @@ -1,28 +1,47 @@
-
-

Grant access to HASH

-
- -

{{client.client_name}} wants access to your HASH graph.

+
+

Grant access to HASH

+ + +

{{client.client_name}} + wants access to your HASH graph.

- - + + - - {{#each requested_scope as |scope|}} - - {{/each}} - + + {{#each requested_scope as |scope|}} + + {{/each}} + - - - -
- -
+ + + +
+ + \ No newline at end of file diff --git a/apps/hash-api/views/layouts/main.hbs b/apps/hash-api/views/layouts/main.hbs index c232a9eb719..f94b6cc3947 100644 --- a/apps/hash-api/views/layouts/main.hbs +++ b/apps/hash-api/views/layouts/main.hbs @@ -1,14 +1,16 @@ - - - - + + + HASH - - - + + + -{{{body}}} + {{{body}}} - - + + \ No newline at end of file diff --git a/apps/hash-external-services/LICENSE.md b/apps/hash-external-services/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/apps/hash-external-services/LICENSE.md +++ b/apps/hash-external-services/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/apps/hash-external-services/docker-compose.prod.yml b/apps/hash-external-services/docker-compose.prod.yml index 718bf008226..21cc89b6d24 100644 --- a/apps/hash-external-services/docker-compose.prod.yml +++ b/apps/hash-external-services/docker-compose.prod.yml @@ -63,7 +63,7 @@ services: HASH_GRAPH_LOG_LEVEL: "${HASH_GRAPH_LOG_LEVEL}" RUST_BACKTRACE: 1 healthcheck: - test: [ "CMD", "/hash-graph", "type-fetcher", "--healthcheck" ] + test: ["CMD", "/hash-graph", "type-fetcher", "--healthcheck"] interval: 2s timeout: 2s retries: 10 @@ -132,7 +132,15 @@ services: HASH_TEMPORAL_SERVER_PORT: "${HASH_TEMPORAL_SERVER_PORT}" RUST_BACKTRACE: 0 healthcheck: - test: [ "CMD", "/hash-graph", "server", "--healthcheck", "--api-port", "${HASH_GRAPH_HTTP_PORT}" ] + test: + [ + "CMD", + "/hash-graph", + "server", + "--healthcheck", + "--api-port", + "${HASH_GRAPH_HTTP_PORT}", + ] interval: 2s timeout: 2s retries: 10 diff --git a/apps/hash-external-services/docker-compose.test.yml b/apps/hash-external-services/docker-compose.test.yml index 9cf4f90595f..55fa2d637e4 100644 --- a/apps/hash-external-services/docker-compose.test.yml +++ b/apps/hash-external-services/docker-compose.test.yml @@ -48,7 +48,11 @@ services: condition: on-failure healthcheck: # Port 14269 is the Jaeger admin endpoint - test: [ "CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:14269 || exit 1" ] + test: + [ + "CMD-SHELL", + "wget --no-verbose --tries=1 --spider http://localhost:14269 || exit 1", + ] interval: 2s timeout: 2s retries: 10 diff --git a/apps/hash-external-services/grafana/provisioning/datasources/tempo.yml b/apps/hash-external-services/grafana/provisioning/datasources/tempo.yml index a50d80495f1..52973af0a0a 100644 --- a/apps/hash-external-services/grafana/provisioning/datasources/tempo.yml +++ b/apps/hash-external-services/grafana/provisioning/datasources/tempo.yml @@ -9,27 +9,23 @@ datasources: jsonData: httpMethod: GET tracesToLogs: - datasourceUid: 'loki' - tags: ['service.name'] - mappedTags: [ - { key: 'service.name', value: 'service_name' } - ] + datasourceUid: "loki" + tags: ["service.name"] + mappedTags: [{ key: "service.name", value: "service_name" }] mapTagNamesEnabled: true filterByTraceID: true tracesToMetrics: - datasourceUid: 'mimir' - tags: [ - { key: 'service.name', value: 'service' } - ] + datasourceUid: "mimir" + tags: [{ key: "service.name", value: "service" }] queries: - - name: 'Request rate' - query: 'rate(traces_spanmetrics_latency_bucket{$$__tags}[5m])' - - name: 'Request duration' - query: 'histogram_quantile(0.95, rate(traces_spanmetrics_latency_bucket{$$__tags}[5m]))' + - name: "Request rate" + query: "rate(traces_spanmetrics_latency_bucket{$$__tags}[5m])" + - name: "Request duration" + query: "histogram_quantile(0.95, rate(traces_spanmetrics_latency_bucket{$$__tags}[5m]))" lokiSearch: - datasourceUid: 'loki' + datasourceUid: "loki" serviceMap: - datasourceUid: 'mimir' + datasourceUid: "mimir" search: hide: false nodeGraph: diff --git a/apps/hash-external-services/mimir/mimir.yml b/apps/hash-external-services/mimir/mimir.yml index 76f6d20ac89..4de8d03f708 100644 --- a/apps/hash-external-services/mimir/mimir.yml +++ b/apps/hash-external-services/mimir/mimir.yml @@ -40,4 +40,4 @@ ingester: # Basic limits for development limits: - ingestion_rate: 100000 \ No newline at end of file + ingestion_rate: 100000 diff --git a/apps/hash-frontend/LICENSE.md b/apps/hash-frontend/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/apps/hash-frontend/LICENSE.md +++ b/apps/hash-frontend/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/apps/hash-frontend/src/components/grid/grid.tsx b/apps/hash-frontend/src/components/grid/grid.tsx index 0c6ac77543a..77cebd5d4f7 100644 --- a/apps/hash-frontend/src/components/grid/grid.tsx +++ b/apps/hash-frontend/src/components/grid/grid.tsx @@ -1,5 +1,4 @@ import "@glideapps/glide-data-grid/dist/index.css"; - import type { BaseUrl, VersionedUrl } from "@blockprotocol/type-system"; import type { DataEditorProps, diff --git a/apps/hash-frontend/src/components/grid/utils/override-custom-renderers.tsx b/apps/hash-frontend/src/components/grid/utils/override-custom-renderers.tsx index 319687e10e9..cb70ab9fd55 100644 --- a/apps/hash-frontend/src/components/grid/utils/override-custom-renderers.tsx +++ b/apps/hash-frontend/src/components/grid/utils/override-custom-renderers.tsx @@ -22,7 +22,9 @@ import { InteractableManager } from "./interactable-manager"; */ const ScrollLockWrapper = ({ children, -}: { children: ReactNode | Promise }) => { +}: { + children: ReactNode | Promise; +}) => { const { currentSlideRef } = useSlideStack(); useScrollLock(true, currentSlideRef?.current ?? document.body); diff --git a/apps/hash-frontend/src/components/sandbox/framed-block/framed-block.tsx b/apps/hash-frontend/src/components/sandbox/framed-block/framed-block.tsx index 0bc367d339b..00ec48d969f 100644 --- a/apps/hash-frontend/src/components/sandbox/framed-block/framed-block.tsx +++ b/apps/hash-frontend/src/components/sandbox/framed-block/framed-block.tsx @@ -1,5 +1,4 @@ import "iframe-resizer/js/iframeResizer.contentWindow"; - import type { GraphEmbedderMessageCallbacks } from "@blockprotocol/graph"; import type { Entity } from "@blockprotocol/type-system"; import type * as Sentry from "@sentry/react"; diff --git a/apps/hash-frontend/src/components/sandbox/framed-block/index.html b/apps/hash-frontend/src/components/sandbox/framed-block/index.html index e468f962155..791e2cc3af1 100644 --- a/apps/hash-frontend/src/components/sandbox/framed-block/index.html +++ b/apps/hash-frontend/src/components/sandbox/framed-block/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/hash-frontend/src/graphql/queries/knowledge/org.queries.ts b/apps/hash-frontend/src/graphql/queries/knowledge/org.queries.ts index 5897a5d52f8..f72309a5930 100644 --- a/apps/hash-frontend/src/graphql/queries/knowledge/org.queries.ts +++ b/apps/hash-frontend/src/graphql/queries/knowledge/org.queries.ts @@ -18,8 +18,16 @@ export const acceptOrgInvitationMutation = gql` `; export const inviteUserToOrgMutation = gql` - mutation inviteUserToOrg($orgWebId: WebId!, $userEmail: String, $userShortname: String) { - inviteUserToOrg(orgWebId: $orgWebId, userEmail: $userEmail, userShortname: $userShortname) + mutation inviteUserToOrg( + $orgWebId: WebId! + $userEmail: String + $userShortname: String + ) { + inviteUserToOrg( + orgWebId: $orgWebId + userEmail: $userEmail + userShortname: $userShortname + ) } `; diff --git a/apps/hash-frontend/src/graphql/queries/ontology/data-type.queries.ts b/apps/hash-frontend/src/graphql/queries/ontology/data-type.queries.ts index 62a682206e2..72e726fb5f4 100644 --- a/apps/hash-frontend/src/graphql/queries/ontology/data-type.queries.ts +++ b/apps/hash-frontend/src/graphql/queries/ontology/data-type.queries.ts @@ -30,7 +30,11 @@ export const createDataTypeMutation = gql` $dataType: ConstructDataTypeParams! $conversions: DataTypeDirectConversionsMap ) { - createDataType(webId: $webId, dataType: $dataType, conversions: $conversions) + createDataType( + webId: $webId + dataType: $dataType + conversions: $conversions + ) } `; @@ -40,6 +44,10 @@ export const updateDataTypeMutation = gql` $dataType: ConstructDataTypeParams! $conversions: DataTypeDirectConversionsMap ) { - updateDataType(dataTypeId: $dataTypeId, dataType: $dataType, conversions: $conversions) + updateDataType( + dataTypeId: $dataTypeId + dataType: $dataType + conversions: $conversions + ) } `; diff --git a/apps/hash-frontend/src/pages/404.page.tsx b/apps/hash-frontend/src/pages/404.page.tsx index 54808a8de51..e2b058d25df 100644 --- a/apps/hash-frontend/src/pages/404.page.tsx +++ b/apps/hash-frontend/src/pages/404.page.tsx @@ -1,5 +1,5 @@ -import type { ErrorProps } from "next/error"; import { NextSeo } from "next-seo"; +import type { ErrorProps } from "next/error"; import type { NextPageWithLayout } from "../shared/layout"; import { getLayoutWithHeader } from "../shared/layout"; diff --git a/apps/hash-frontend/src/pages/@/[shortname].page/profile-bio.tsx b/apps/hash-frontend/src/pages/@/[shortname].page/profile-bio.tsx index e8bf0f2d886..b3db579070c 100644 --- a/apps/hash-frontend/src/pages/@/[shortname].page/profile-bio.tsx +++ b/apps/hash-frontend/src/pages/@/[shortname].page/profile-bio.tsx @@ -22,13 +22,13 @@ import { useBlockProtocolCreateEntity } from "../../../components/hooks/block-pr import type { Org, User } from "../../../lib/user-and-org"; import { CheckRegularIcon } from "../../../shared/icons/check-regular-icon"; import { GlobeRegularIcon } from "../../../shared/icons/globe-regular-icon"; -import { BlockCollection } from "../../shared/block-collection/block-collection"; import { blockCollectionContentsTraversalParams, getBlockCollectionContents, isBlockCollectionContentsEmpty, } from "../../shared/block-collection-contents"; import { BlockCollectionContextProvider } from "../../shared/block-collection-context"; +import { BlockCollection } from "../../shared/block-collection/block-collection"; import { useCreateBlockCollection } from "../../shared/use-create-block-collection"; import { ProfileSectionHeading } from "../[shortname]/shared/profile-section-heading"; diff --git a/apps/hash-frontend/src/pages/@/[shortname]/[page-slug].page.tsx b/apps/hash-frontend/src/pages/@/[shortname]/[page-slug].page.tsx index c6a76742e2f..84aa265bbc3 100644 --- a/apps/hash-frontend/src/pages/@/[shortname]/[page-slug].page.tsx +++ b/apps/hash-frontend/src/pages/@/[shortname]/[page-slug].page.tsx @@ -12,8 +12,8 @@ import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-proper import type { PageProperties } from "@local/hash-isomorphic-utils/system-types/shared"; import type { SxProps } from "@mui/material"; import { Box } from "@mui/material"; -import { Router, useRouter } from "next/router"; import { NextSeo } from "next-seo"; +import { Router, useRouter } from "next/router"; import type { PropsWithChildren } from "react"; import { useEffect, useMemo, useRef, useState } from "react"; @@ -42,15 +42,15 @@ import { isPageParsedUrlQuery, parsePageUrlQueryParams, } from "../../../shared/routing/route-page-info"; -import { BlockCollection } from "../../shared/block-collection/block-collection"; -import { CommentThread } from "../../shared/block-collection/comments/comment-thread"; -import { PageContextProvider } from "../../shared/block-collection/page-context"; -import { PageTitle } from "../../shared/block-collection/page-title/page-title"; import { getBlockCollectionContents, getBlockCollectionContentsStructuralQueryVariables, } from "../../shared/block-collection-contents"; import { BlockCollectionContextProvider } from "../../shared/block-collection-context"; +import { BlockCollection } from "../../shared/block-collection/block-collection"; +import { CommentThread } from "../../shared/block-collection/comments/comment-thread"; +import { PageContextProvider } from "../../shared/block-collection/page-context"; +import { PageTitle } from "../../shared/block-collection/page-title/page-title"; import { NotFound } from "../../shared/not-found"; import { TOP_CONTEXT_BAR_HEIGHT, diff --git a/apps/hash-frontend/src/pages/@/[shortname]/[page-slug].page/canvas-page.tsx b/apps/hash-frontend/src/pages/@/[shortname]/[page-slug].page/canvas-page.tsx index 4f9b5d26c81..44d3b9205eb 100644 --- a/apps/hash-frontend/src/pages/@/[shortname]/[page-slug].page/canvas-page.tsx +++ b/apps/hash-frontend/src/pages/@/[shortname]/[page-slug].page/canvas-page.tsx @@ -1,6 +1,5 @@ import "@tldraw/tldraw/editor.css"; import "@tldraw/tldraw/ui.css"; - import type { ComponentIdHashBlockMap } from "@local/hash-isomorphic-utils/blocks"; import { fetchBlock } from "@local/hash-isomorphic-utils/blocks"; import type { BlockCollectionContentItem } from "@local/hash-isomorphic-utils/entity"; diff --git a/apps/hash-frontend/src/pages/@/[shortname]/[page-slug].page/canvas-page/block-creation-dialog.tsx b/apps/hash-frontend/src/pages/@/[shortname]/[page-slug].page/canvas-page/block-creation-dialog.tsx index 72fd81ae4bd..b9db6fc618d 100644 --- a/apps/hash-frontend/src/pages/@/[shortname]/[page-slug].page/canvas-page/block-creation-dialog.tsx +++ b/apps/hash-frontend/src/pages/@/[shortname]/[page-slug].page/canvas-page/block-creation-dialog.tsx @@ -16,9 +16,9 @@ import type { UpdateBlockCollectionContentsMutationVariables, } from "../../../../../graphql/api-types.gen"; import { queryEntitySubgraphQuery } from "../../../../../graphql/queries/knowledge/entity.queries"; +import { getBlockCollectionContentsStructuralQueryVariables } from "../../../../shared/block-collection-contents"; import { BlockSuggester } from "../../../../shared/block-collection/create-suggester/block-suggester"; import { usePageContext } from "../../../../shared/block-collection/page-context"; -import { getBlockCollectionContentsStructuralQueryVariables } from "../../../../shared/block-collection-contents"; import { useRouteNamespace } from "../../shared/use-route-namespace"; import type { BlockShape } from "./block-shape"; import { defaultBlockHeight, defaultBlockWidth } from "./shared"; diff --git a/apps/hash-frontend/src/pages/@/[shortname]/[page-slug].page/canvas-page/block-shape.tsx b/apps/hash-frontend/src/pages/@/[shortname]/[page-slug].page/canvas-page/block-shape.tsx index 9b440a3f704..1a3f4fae8d9 100644 --- a/apps/hash-frontend/src/pages/@/[shortname]/[page-slug].page/canvas-page/block-shape.tsx +++ b/apps/hash-frontend/src/pages/@/[shortname]/[page-slug].page/canvas-page/block-shape.tsx @@ -18,9 +18,9 @@ import { import { BlockLoader } from "../../../../../components/block-loader/block-loader"; import { queryEntitySubgraphQuery } from "../../../../../graphql/queries/knowledge/entity.queries"; import { apolloClient } from "../../../../../lib/apollo-client"; -import { BlockContextProvider } from "../../../../shared/block-collection/block-context"; import { getBlockCollectionContentsStructuralQueryVariables } from "../../../../shared/block-collection-contents"; import { BlockCollectionContext } from "../../../../shared/block-collection-context"; +import { BlockContextProvider } from "../../../../shared/block-collection/block-context"; import type { JsonSerializableBlockLoaderProps } from "./shared"; import { defaultBlockHeight, defaultBlockWidth } from "./shared"; diff --git a/apps/hash-frontend/src/pages/@/[shortname]/entities/[entity-uuid].page.tsx b/apps/hash-frontend/src/pages/@/[shortname]/entities/[entity-uuid].page.tsx index c762041d90d..9edcd430f31 100644 --- a/apps/hash-frontend/src/pages/@/[shortname]/entities/[entity-uuid].page.tsx +++ b/apps/hash-frontend/src/pages/@/[shortname]/entities/[entity-uuid].page.tsx @@ -10,8 +10,8 @@ import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-id import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-properties"; import type { UserProperties } from "@local/hash-isomorphic-utils/system-types/shared"; import { GlobalStyles } from "@mui/system"; -import { useRouter } from "next/router"; import { NextSeo } from "next-seo"; +import { useRouter } from "next/router"; import { useCallback, useMemo, useState } from "react"; import type { NextPageWithLayout } from "../../../../shared/layout"; diff --git a/apps/hash-frontend/src/pages/@/[shortname]/entities/[entity-uuid].page/create-entity-page.tsx b/apps/hash-frontend/src/pages/@/[shortname]/entities/[entity-uuid].page/create-entity-page.tsx index c768a1a31e4..a6b8ab819ca 100644 --- a/apps/hash-frontend/src/pages/@/[shortname]/entities/[entity-uuid].page/create-entity-page.tsx +++ b/apps/hash-frontend/src/pages/@/[shortname]/entities/[entity-uuid].page/create-entity-page.tsx @@ -10,8 +10,8 @@ import { mergePropertyObjectAndMetadata, } from "@local/hash-graph-sdk/entity"; import { GlobalStyles, Typography } from "@mui/material"; -import { useRouter } from "next/router"; import { NextSeo } from "next-seo"; +import { useRouter } from "next/router"; import { useContext, useState } from "react"; import type { diff --git a/apps/hash-frontend/src/pages/@/[shortname]/entities/[entity-uuid].page/select-entity-type-page.tsx b/apps/hash-frontend/src/pages/@/[shortname]/entities/[entity-uuid].page/select-entity-type-page.tsx index b6c83d0131f..15a11362867 100644 --- a/apps/hash-frontend/src/pages/@/[shortname]/entities/[entity-uuid].page/select-entity-type-page.tsx +++ b/apps/hash-frontend/src/pages/@/[shortname]/entities/[entity-uuid].page/select-entity-type-page.tsx @@ -6,11 +6,11 @@ import { useContext, useState } from "react"; import { useSnackbar } from "../../../../../components/hooks/use-snackbar"; import { Button } from "../../../../../shared/ui"; +import { EntityTypeSelector } from "../../../../shared/entity-type-selector"; import { EntityEditorContainer } from "../../../../shared/entity/entity-editor-container"; import { EntityHeader } from "../../../../shared/entity/entity-header"; import { LinksSectionEmptyState } from "../../../../shared/entity/shared/links-section-empty-state"; import { PropertiesSectionEmptyState } from "../../../../shared/entity/shared/properties-section-empty-state"; -import { EntityTypeSelector } from "../../../../shared/entity-type-selector"; import { SectionWrapper } from "../../../../shared/section-wrapper"; import { WorkspaceContext } from "../../../../shared/workspace-context"; diff --git a/apps/hash-frontend/src/pages/@/[shortname]/shared/flow-visualizer.tsx b/apps/hash-frontend/src/pages/@/[shortname]/shared/flow-visualizer.tsx index e5512fa1f23..03aeaa9aff8 100644 --- a/apps/hash-frontend/src/pages/@/[shortname]/shared/flow-visualizer.tsx +++ b/apps/hash-frontend/src/pages/@/[shortname]/shared/flow-visualizer.tsx @@ -1,5 +1,4 @@ import "reactflow/dist/style.css"; - import { useApolloClient, useMutation, useQuery } from "@apollo/client"; import type { EntityRootType, Subgraph } from "@blockprotocol/graph"; import { getRoots } from "@blockprotocol/graph/stdlib"; diff --git a/apps/hash-frontend/src/pages/@/[shortname]/shared/flow-visualizer/swimlane.tsx b/apps/hash-frontend/src/pages/@/[shortname]/shared/flow-visualizer/swimlane.tsx index 925fd08c0e1..40e01070ebe 100644 --- a/apps/hash-frontend/src/pages/@/[shortname]/shared/flow-visualizer/swimlane.tsx +++ b/apps/hash-frontend/src/pages/@/[shortname]/shared/flow-visualizer/swimlane.tsx @@ -1,5 +1,4 @@ import "reactflow/dist/style.css"; - import { customColors } from "@hashintel/design-system/theme"; import { Box, Fade, Stack, Typography } from "@mui/material"; import ELK, { type ElkNode } from "elkjs"; diff --git a/apps/hash-frontend/src/pages/@/[shortname]/types/shared/get-type-base-url.ts b/apps/hash-frontend/src/pages/@/[shortname]/types/shared/get-type-base-url.ts index 037a7532fb5..5c9218d101d 100644 --- a/apps/hash-frontend/src/pages/@/[shortname]/types/shared/get-type-base-url.ts +++ b/apps/hash-frontend/src/pages/@/[shortname]/types/shared/get-type-base-url.ts @@ -17,12 +17,12 @@ export const getTypeBaseUrl = ({ * The localhost:3000/stage.hash.ai condition handles system types correctly having * a https://hash.ai generated, despite being served from a different domain. */ - ( - systemTypeWebShortnames.includes( - namespaceWithAt.slice(1) as SystemTypeWebShortname, - ) && - ["http://localhost:3000", "https://stage.hash.ai"].includes(frontendUrl) - ) || + (systemTypeWebShortnames.includes( + namespaceWithAt.slice(1) as SystemTypeWebShortname, + ) && + ["http://localhost:3000", "https://stage.hash.ai"].includes( + frontendUrl, + )) || /** * @todo H-1172 – Once app is migrated to https://hash.ai, remove this https://app.hash.ai condition. * app.hash.ai uses hash.ai as the base domain for ALL types, despite being served from a different domain. diff --git a/apps/hash-frontend/src/pages/_app.page.tsx b/apps/hash-frontend/src/pages/_app.page.tsx index 35e6fede3d8..5e3e5cf230e 100644 --- a/apps/hash-frontend/src/pages/_app.page.tsx +++ b/apps/hash-frontend/src/pages/_app.page.tsx @@ -8,7 +8,6 @@ require("setimmediate"); import "./globals.scss"; import "./prism.css"; - import { ApolloProvider } from "@apollo/client/react"; import type { EntityRootType, Subgraph } from "@blockprotocol/graph"; import { getRoots } from "@blockprotocol/graph/stdlib"; diff --git a/apps/hash-frontend/src/pages/actions.page.tsx b/apps/hash-frontend/src/pages/actions.page.tsx index 4d76c864153..4949402b013 100644 --- a/apps/hash-frontend/src/pages/actions.page.tsx +++ b/apps/hash-frontend/src/pages/actions.page.tsx @@ -36,12 +36,12 @@ import { getLayoutWithSidebar } from "../shared/layout"; import { MenuItem } from "../shared/ui"; import type { SortOrder } from "./actions.page/draft-entities"; import { DraftEntities } from "./actions.page/draft-entities"; -import type { EntityTypeDisplayInfoByBaseUrl } from "./actions.page/draft-entities/types"; import { DraftEntitiesBulkActionsDropdown } from "./actions.page/draft-entities-bulk-actions-dropdown"; import { DraftEntitiesContextProvider, useDraftEntities, } from "./actions.page/draft-entities-context"; +import type { EntityTypeDisplayInfoByBaseUrl } from "./actions.page/draft-entities/types"; import { InlineSelect } from "./shared/inline-select"; import { TopContextBar } from "./shared/top-context-bar"; diff --git a/apps/hash-frontend/src/pages/actions.page/draft-entities.tsx b/apps/hash-frontend/src/pages/actions.page/draft-entities.tsx index 6b6da1345d0..4624ee8757f 100644 --- a/apps/hash-frontend/src/pages/actions.page/draft-entities.tsx +++ b/apps/hash-frontend/src/pages/actions.page/draft-entities.tsx @@ -22,6 +22,7 @@ import { import { Button } from "../../shared/ui"; import type { MinimalActor } from "../../shared/use-actors"; import { useActors } from "../../shared/use-actors"; +import { useDraftEntities } from "./draft-entities-context"; import { DraftEntitiesContextBar } from "./draft-entities/draft-entities-context-bar"; import type { DraftEntityFilterState } from "./draft-entities/draft-entities-filters"; import { @@ -32,7 +33,6 @@ import { isFilerStateDefaultFilterState, } from "./draft-entities/draft-entities-filters"; import type { EntityTypeDisplayInfoByBaseUrl } from "./draft-entities/types"; -import { useDraftEntities } from "./draft-entities-context"; import { DraftEntity } from "./draft-entity"; const incrementNumberOfEntitiesToDisplay = 20; diff --git a/apps/hash-frontend/src/pages/actions.page/draft-entity.tsx b/apps/hash-frontend/src/pages/actions.page/draft-entity.tsx index ac45a554946..e0c0e92730c 100644 --- a/apps/hash-frontend/src/pages/actions.page/draft-entity.tsx +++ b/apps/hash-frontend/src/pages/actions.page/draft-entity.tsx @@ -13,8 +13,8 @@ import { ArrowUpRightRegularIcon } from "../../shared/icons/arrow-up-right-regul import { Link } from "../../shared/ui"; import { useSlideStack } from "../shared/slide-stack"; import { useEntityHref } from "../shared/use-entity-href"; -import type { EntityTypeDisplayInfoByBaseUrl } from "./draft-entities/types"; import { useDraftEntities } from "./draft-entities-context"; +import type { EntityTypeDisplayInfoByBaseUrl } from "./draft-entities/types"; import { DraftEntityActionButtons } from "./draft-entity/draft-entity-action-buttons"; import { DraftEntityProvenance } from "./draft-entity/draft-entity-provenance"; import { DraftEntityType } from "./draft-entity/draft-entity-type"; diff --git a/apps/hash-frontend/src/pages/entities.page.tsx b/apps/hash-frontend/src/pages/entities.page.tsx index fe044d27685..5a2ea31ecca 100644 --- a/apps/hash-frontend/src/pages/entities.page.tsx +++ b/apps/hash-frontend/src/pages/entities.page.tsx @@ -27,8 +27,8 @@ import { Stack, Typography, } from "@mui/material"; -import { useRouter } from "next/router"; import { NextSeo } from "next-seo"; +import { useRouter } from "next/router"; import type { FunctionComponent } from "react"; import { useCallback, useMemo } from "react"; diff --git a/apps/hash-frontend/src/pages/notes.page/editable-quick-note.tsx b/apps/hash-frontend/src/pages/notes.page/editable-quick-note.tsx index 09f12c1ccd1..26290c87ac6 100644 --- a/apps/hash-frontend/src/pages/notes.page/editable-quick-note.tsx +++ b/apps/hash-frontend/src/pages/notes.page/editable-quick-note.tsx @@ -49,8 +49,8 @@ import { NoteStickyRegularIcon } from "../../shared/icons/note-sticky-regular-ic import { UndoRegularIcon } from "../../shared/icons/undo-regular-icon"; import { Link } from "../../shared/ui"; import { useAuthenticatedUser } from "../shared/auth-info-context"; -import { BlockCollection } from "../shared/block-collection/block-collection"; import { getBlockCollectionContents } from "../shared/block-collection-contents"; +import { BlockCollection } from "../shared/block-collection/block-collection"; import type { PageWithParentLink } from "./convert-quick-note-to-page-modal"; import { ConvertQuickNoteToPageModal } from "./convert-quick-note-to-page-modal"; diff --git a/apps/hash-frontend/src/pages/process.page/process-editor-wrapper.tsx b/apps/hash-frontend/src/pages/process.page/process-editor-wrapper.tsx index c88c71bc8f3..b3a3a071835 100644 --- a/apps/hash-frontend/src/pages/process.page/process-editor-wrapper.tsx +++ b/apps/hash-frontend/src/pages/process.page/process-editor-wrapper.tsx @@ -1,5 +1,4 @@ import "@hashintel/petrinaut/dist/main.css"; - import type { EntityId } from "@blockprotocol/type-system"; import { AlertModal } from "@hashintel/design-system"; import { diff --git a/apps/hash-frontend/src/pages/settings/organizations/[shortname]/general.page.tsx b/apps/hash-frontend/src/pages/settings/organizations/[shortname]/general.page.tsx index d6e1e59bdeb..3339a4ca9c7 100644 --- a/apps/hash-frontend/src/pages/settings/organizations/[shortname]/general.page.tsx +++ b/apps/hash-frontend/src/pages/settings/organizations/[shortname]/general.page.tsx @@ -6,8 +6,8 @@ import { systemPropertyTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { useTheme } from "@mui/material"; -import { useRouter } from "next/router"; import { NextSeo } from "next-seo"; +import { useRouter } from "next/router"; import { useRef } from "react"; import { useOrgs } from "../../../../components/hooks/use-orgs"; diff --git a/apps/hash-frontend/src/pages/settings/organizations/[shortname]/integrations.page.tsx b/apps/hash-frontend/src/pages/settings/organizations/[shortname]/integrations.page.tsx index df20c470699..b47e001d778 100644 --- a/apps/hash-frontend/src/pages/settings/organizations/[shortname]/integrations.page.tsx +++ b/apps/hash-frontend/src/pages/settings/organizations/[shortname]/integrations.page.tsx @@ -14,8 +14,8 @@ import { TableRow, Typography, } from "@mui/material"; -import { useRouter } from "next/router"; import { NextSeo } from "next-seo"; +import { useRouter } from "next/router"; import { useMemo } from "react"; import type { diff --git a/apps/hash-frontend/src/pages/settings/organizations/[shortname]/members.page.tsx b/apps/hash-frontend/src/pages/settings/organizations/[shortname]/members.page.tsx index 47890df8ce0..a3acd7c0b03 100644 --- a/apps/hash-frontend/src/pages/settings/organizations/[shortname]/members.page.tsx +++ b/apps/hash-frontend/src/pages/settings/organizations/[shortname]/members.page.tsx @@ -9,8 +9,8 @@ import { TableRow, Typography, } from "@mui/material"; -import { useRouter } from "next/router"; import { NextSeo } from "next-seo"; +import { useRouter } from "next/router"; import { useEffect, useRef, useState } from "react"; import type { NextPageWithLayout } from "../../../../shared/layout"; diff --git a/apps/hash-frontend/src/pages/settings/organizations/index.page.tsx b/apps/hash-frontend/src/pages/settings/organizations/index.page.tsx index ea8cb842f5d..02ae33eef60 100644 --- a/apps/hash-frontend/src/pages/settings/organizations/index.page.tsx +++ b/apps/hash-frontend/src/pages/settings/organizations/index.page.tsx @@ -1,8 +1,8 @@ import { faPlus } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@hashintel/design-system"; import { Box, TableBody, TableHead, TableRow, Typography } from "@mui/material"; -import { useRouter } from "next/router"; import { NextSeo } from "next-seo"; +import { useRouter } from "next/router"; import { useRef } from "react"; import { PeopleGroupIcon } from "../../../shared/icons/people-group-icon"; diff --git a/apps/hash-frontend/src/pages/settings/security.page.tsx b/apps/hash-frontend/src/pages/settings/security.page.tsx index 2f38292bd4d..bc802d47f8e 100644 --- a/apps/hash-frontend/src/pages/settings/security.page.tsx +++ b/apps/hash-frontend/src/pages/settings/security.page.tsx @@ -527,7 +527,9 @@ const SecurityPage: NextPageWithLayout = () => { ) } helperText={passwordInputUiNode?.messages.map( - ({ id, text }) => {text}, + ({ id, text }) => ( + {text} + ), )} required /> diff --git a/apps/hash-frontend/src/pages/shared/accept-draft-entity-button.tsx b/apps/hash-frontend/src/pages/shared/accept-draft-entity-button.tsx index 0f42afbe87d..1aaa7305c29 100644 --- a/apps/hash-frontend/src/pages/shared/accept-draft-entity-button.tsx +++ b/apps/hash-frontend/src/pages/shared/accept-draft-entity-button.tsx @@ -57,9 +57,7 @@ const LeftOrRightEntityEndAdornment: FunctionComponent<{ ); -const getRightOrLeftEntitySx = (params: { - isDraft: boolean; -}): BoxProps["sx"] => +const getRightOrLeftEntitySx = (params: { isDraft: boolean }): BoxProps["sx"] => params.isDraft ? { backgroundColor: ({ palette }) => palette.gray[15], diff --git a/apps/hash-frontend/src/pages/shared/block-collection/block-collection.tsx b/apps/hash-frontend/src/pages/shared/block-collection/block-collection.tsx index 11d4468f497..29737470bbb 100644 --- a/apps/hash-frontend/src/pages/shared/block-collection/block-collection.tsx +++ b/apps/hash-frontend/src/pages/shared/block-collection/block-collection.tsx @@ -1,5 +1,4 @@ import "prosemirror-view/style/prosemirror.css"; - import { useApolloClient } from "@apollo/client"; import type { EntityId, WebId } from "@blockprotocol/type-system"; import type { BlockCollectionContentItem } from "@local/hash-isomorphic-utils/entity"; diff --git a/apps/hash-frontend/src/pages/shared/block-collection/block-view.tsx b/apps/hash-frontend/src/pages/shared/block-collection/block-view.tsx index 6f16a8b65df..60928b31a2a 100644 --- a/apps/hash-frontend/src/pages/shared/block-collection/block-view.tsx +++ b/apps/hash-frontend/src/pages/shared/block-collection/block-view.tsx @@ -24,6 +24,7 @@ import type { RenderPortal } from "./block-portals"; import { CollabPositionIndicators } from "./collab-position-indicators"; import { CreateBlockCommentButton } from "./comments/create-block-comment-button"; import { InsertBlock } from "./insert-block"; + import styles from "./style.module.css"; /** used to detect whether or not a context value was provided */ diff --git a/apps/hash-frontend/src/pages/shared/block-collection/collab/editor-connection.ts b/apps/hash-frontend/src/pages/shared/block-collection/collab/editor-connection.ts index b809551e086..49ec85852e0 100644 --- a/apps/hash-frontend/src/pages/shared/block-collection/collab/editor-connection.ts +++ b/apps/hash-frontend/src/pages/shared/block-collection/collab/editor-connection.ts @@ -22,6 +22,7 @@ import { Node, Schema } from "prosemirror-model"; import { EditorState, Plugin, Transaction } from "prosemirror-state"; import { Step } from "prosemirror-transform"; import { EditorView } from "prosemirror-view"; + import { AbortingPromise, GET, POST } from "./http"; import { StatusError } from "./status-error"; diff --git a/apps/hash-frontend/src/pages/shared/block-collection/comments/comment-block.tsx b/apps/hash-frontend/src/pages/shared/block-collection/comments/comment-block.tsx index b5b4385dd31..7d3a9a8850b 100644 --- a/apps/hash-frontend/src/pages/shared/block-collection/comments/comment-block.tsx +++ b/apps/hash-frontend/src/pages/shared/block-collection/comments/comment-block.tsx @@ -38,6 +38,7 @@ import { CommentBlockDeleteConfirmationDialog } from "./comment-block-delete-con import { CommentBlockMenu } from "./comment-block-menu"; import { CommentBlockMenuItem } from "./comment-block-menu-item"; import { CommentTextField } from "./comment-text-field"; + import styles from "./style.module.css"; type ToggleTextExpandedButtonProps = { diff --git a/apps/hash-frontend/src/pages/shared/block-collection/comments/comment-text-field.tsx b/apps/hash-frontend/src/pages/shared/block-collection/comments/comment-text-field.tsx index 382577cfd50..509626aef43 100644 --- a/apps/hash-frontend/src/pages/shared/block-collection/comments/comment-text-field.tsx +++ b/apps/hash-frontend/src/pages/shared/block-collection/comments/comment-text-field.tsx @@ -36,6 +36,7 @@ import { commentPlaceholderPlugin, commentPlaceholderPluginkey, } from "./comment-placeholder-plugin"; + import styles from "./style.module.css"; type CommentTextFieldProps = { diff --git a/apps/hash-frontend/src/pages/shared/block-collection/comments/comment-thread.tsx b/apps/hash-frontend/src/pages/shared/block-collection/comments/comment-thread.tsx index 4eb952c4e85..990054f764e 100644 --- a/apps/hash-frontend/src/pages/shared/block-collection/comments/comment-thread.tsx +++ b/apps/hash-frontend/src/pages/shared/block-collection/comments/comment-thread.tsx @@ -16,6 +16,7 @@ import { useAuthenticatedUser } from "../../auth-info-context"; import { CommentActionButtons } from "./comment-action-buttons"; import { CommentBlock } from "./comment-block"; import { CommentTextField } from "./comment-text-field"; + import styles from "./style.module.css"; const UNCOLLAPSIBLE_REPLIES_NUMBER = 2; diff --git a/apps/hash-frontend/src/pages/shared/block-collection/comments/create-block-comment-button.tsx b/apps/hash-frontend/src/pages/shared/block-collection/comments/create-block-comment-button.tsx index e2fee7145f9..aec36609d7d 100644 --- a/apps/hash-frontend/src/pages/shared/block-collection/comments/create-block-comment-button.tsx +++ b/apps/hash-frontend/src/pages/shared/block-collection/comments/create-block-comment-button.tsx @@ -6,9 +6,10 @@ import type { FunctionComponent } from "react"; import { useCallback, useState } from "react"; import { useBlockView } from "../block-view"; -import styles from "../style.module.css"; import { CreateBlockComment } from "./create-block-comment"; +import styles from "../style.module.css"; + type CreateBlockCommentButtonProps = { blockEntityId: EntityId | null; rootNode: HTMLElement; diff --git a/apps/hash-frontend/src/pages/shared/block-collection/comments/create-block-comment.tsx b/apps/hash-frontend/src/pages/shared/block-collection/comments/create-block-comment.tsx index 32b233e4034..28f02454c54 100644 --- a/apps/hash-frontend/src/pages/shared/block-collection/comments/create-block-comment.tsx +++ b/apps/hash-frontend/src/pages/shared/block-collection/comments/create-block-comment.tsx @@ -9,6 +9,7 @@ import { useState } from "react"; import { useCreateComment } from "../../../../components/hooks/use-create-comment"; import { usePageContext } from "../page-context"; import { CommentTextField } from "./comment-text-field"; + import styles from "./style.module.css"; type CreateBlockCommentProps = { diff --git a/apps/hash-frontend/src/pages/shared/block-collection/create-editor-view.ts b/apps/hash-frontend/src/pages/shared/block-collection/create-editor-view.ts index c2c6e109bab..bcfd04ae439 100644 --- a/apps/hash-frontend/src/pages/shared/block-collection/create-editor-view.ts +++ b/apps/hash-frontend/src/pages/shared/block-collection/create-editor-view.ts @@ -29,6 +29,7 @@ import { createSuggester } from "./create-suggester/create-suggester"; import { createTextEditorView } from "./create-text-editor-view"; import { createFocusPageTitlePlugin } from "./focus-page-title-plugin"; import { LoadingView } from "./loading-view"; + import styles from "./style.module.css"; const createSavePlugin = ( diff --git a/apps/hash-frontend/src/pages/shared/block-collection/style.module.css b/apps/hash-frontend/src/pages/shared/block-collection/style.module.css index edc0e08480d..82c4207c7c3 100644 --- a/apps/hash-frontend/src/pages/shared/block-collection/style.module.css +++ b/apps/hash-frontend/src/pages/shared/block-collection/style.module.css @@ -1,6 +1,7 @@ .ProseMirror { - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, - Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-family: + -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, + sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; padding: 0; box-sizing: border-box; diff --git a/apps/hash-frontend/src/pages/shared/data-type.tsx b/apps/hash-frontend/src/pages/shared/data-type.tsx index 2348d49b2cc..78d5329071c 100644 --- a/apps/hash-frontend/src/pages/shared/data-type.tsx +++ b/apps/hash-frontend/src/pages/shared/data-type.tsx @@ -18,8 +18,8 @@ import { fullTransactionTimeAxis } from "@local/hash-isomorphic-utils/graph-quer import type { Theme } from "@mui/material"; import { Box, Container, Stack } from "@mui/material"; import { GlobalStyles } from "@mui/system"; -import { useRouter } from "next/router"; import { NextSeo } from "next-seo"; +import { useRouter } from "next/router"; import { useEffect, useMemo } from "react"; import { FormProvider, useForm, useWatch } from "react-hook-form"; diff --git a/apps/hash-frontend/src/pages/shared/data-type/data-type-constraints/abstract-constraint.tsx b/apps/hash-frontend/src/pages/shared/data-type/data-type-constraints/abstract-constraint.tsx index 605f39003b6..888541ae0a9 100644 --- a/apps/hash-frontend/src/pages/shared/data-type/data-type-constraints/abstract-constraint.tsx +++ b/apps/hash-frontend/src/pages/shared/data-type/data-type-constraints/abstract-constraint.tsx @@ -5,11 +5,7 @@ import type { DataTypeFormData } from "../data-type-form"; import { ItemLabel } from "../shared/item-label"; import { ConstraintText } from "./shared/constraint-text"; -export const AbstractConstraint = ({ - isReadOnly, -}: { - isReadOnly: boolean; -}) => { +export const AbstractConstraint = ({ isReadOnly }: { isReadOnly: boolean }) => { const { control, setValue } = useFormContext(); const abstract = useWatch({ control, name: "abstract" }); diff --git a/apps/hash-frontend/src/pages/shared/data-type/data-type-constraints/number-constraints.tsx b/apps/hash-frontend/src/pages/shared/data-type/data-type-constraints/number-constraints.tsx index c27c6b83387..3d9fb322c0a 100644 --- a/apps/hash-frontend/src/pages/shared/data-type/data-type-constraints/number-constraints.tsx +++ b/apps/hash-frontend/src/pages/shared/data-type/data-type-constraints/number-constraints.tsx @@ -266,14 +266,20 @@ const NumberRangeText = ({ return ( <> {" between "} - {" "} + {" "} ( ){" and "} - {" "} + {" "} ( {" greater than "} - {" "} + {" "} ( {" less than "} - {" "} + {" "} ( { +}: { + text: string; + from?: DataType; +}) => { if (from) { return ( Inherited from {from.title}}> diff --git a/apps/hash-frontend/src/pages/shared/data-type/data-type-labels.tsx b/apps/hash-frontend/src/pages/shared/data-type/data-type-labels.tsx index 649a0783dde..0ae744ff575 100644 --- a/apps/hash-frontend/src/pages/shared/data-type/data-type-labels.tsx +++ b/apps/hash-frontend/src/pages/shared/data-type/data-type-labels.tsx @@ -7,11 +7,7 @@ import { inputStyles } from "./shared/input-styles"; import { ItemLabel } from "./shared/item-label"; import { useInheritedConstraints } from "./shared/use-inherited-constraints"; -export const DataTypeLabels = ({ - isReadOnly, -}: { - isReadOnly: boolean; -}) => { +export const DataTypeLabels = ({ isReadOnly }: { isReadOnly: boolean }) => { const { control } = useFormContext(); const inheritedConstraints = useInheritedConstraints(); diff --git a/apps/hash-frontend/src/pages/shared/entities-visualizer.tsx b/apps/hash-frontend/src/pages/shared/entities-visualizer.tsx index b3a9def5d3a..053a3ae1472 100644 --- a/apps/hash-frontend/src/pages/shared/entities-visualizer.tsx +++ b/apps/hash-frontend/src/pages/shared/entities-visualizer.tsx @@ -50,8 +50,8 @@ import type { SortableEntitiesTableColumnKey, } from "./entities-visualizer/types"; import { useEntitiesVisualizerData } from "./entities-visualizer/use-entities-visualizer-data"; -import type { EntityEditorProps } from "./entity/entity-editor"; import { EntityGraphVisualizer } from "./entity-graph-visualizer"; +import type { EntityEditorProps } from "./entity/entity-editor"; import type { DynamicNodeSizing, GraphVizConfig, diff --git a/apps/hash-frontend/src/pages/shared/entities-visualizer/entities-table.tsx b/apps/hash-frontend/src/pages/shared/entities-visualizer/entities-table.tsx index 589da881880..c5c2e032fb8 100644 --- a/apps/hash-frontend/src/pages/shared/entities-visualizer/entities-table.tsx +++ b/apps/hash-frontend/src/pages/shared/entities-visualizer/entities-table.tsx @@ -871,7 +871,10 @@ export const EntitiesTable: FunctionComponent< ({ columnKey, dataTypeId, - }: { columnKey: BaseUrl; dataTypeId: VersionedUrl | null }) => { + }: { + columnKey: BaseUrl; + dataTypeId: VersionedUrl | null; + }) => { if (!dataTypeId) { if (!activeConversions) { return; diff --git a/apps/hash-frontend/src/pages/shared/entity/entity-editor/properties-section/property-table/cells/value-cell/inputs/json-input/json-editor.tsx b/apps/hash-frontend/src/pages/shared/entity/entity-editor/properties-section/property-table/cells/value-cell/inputs/json-input/json-editor.tsx index 8e22cb9048f..d7d68484a6e 100644 --- a/apps/hash-frontend/src/pages/shared/entity/entity-editor/properties-section/property-table/cells/value-cell/inputs/json-input/json-editor.tsx +++ b/apps/hash-frontend/src/pages/shared/entity/entity-editor/properties-section/property-table/cells/value-cell/inputs/json-input/json-editor.tsx @@ -1,10 +1,9 @@ +import { Box, GlobalStyles } from "@mui/material"; +import "prismjs/components/prism-json"; +import "prismjs/components/prism-json5"; // disabled simple-import-sort, because `Prism` needs to imported first here, otherwise it throws an error // eslint-disable-next-line simple-import-sort/imports import Prism from "prismjs"; -import "prismjs/components/prism-json"; -import "prismjs/components/prism-json5"; - -import { Box, GlobalStyles } from "@mui/material"; import type { ChangeEvent, KeyboardEvent } from "react"; import { useCallback, useEffect, useRef } from "react"; diff --git a/apps/hash-frontend/src/pages/shared/entity/query-editor.tsx b/apps/hash-frontend/src/pages/shared/entity/query-editor.tsx index c393436db5e..65f00c7ae2f 100644 --- a/apps/hash-frontend/src/pages/shared/entity/query-editor.tsx +++ b/apps/hash-frontend/src/pages/shared/entity/query-editor.tsx @@ -14,9 +14,9 @@ import { } from "../../../shared/entity-types-context/hooks"; import { usePropertyTypes } from "../../../shared/property-types-context"; import type { EntityEditorProps } from "./entity-editor"; +import { EntityEditorContainer } from "./entity-editor-container"; import { EntityEditorContextProvider } from "./entity-editor/entity-editor-context"; import { TypesSection } from "./entity-editor/types-section"; -import { EntityEditorContainer } from "./entity-editor-container"; import { EntityHeader } from "./entity-header"; interface QueryEditorProps extends EntityEditorProps { diff --git a/apps/hash-frontend/src/pages/shared/graph-visualizer.tsx b/apps/hash-frontend/src/pages/shared/graph-visualizer.tsx index b6e87d01cd9..acf2c66c0f0 100644 --- a/apps/hash-frontend/src/pages/shared/graph-visualizer.tsx +++ b/apps/hash-frontend/src/pages/shared/graph-visualizer.tsx @@ -1,5 +1,4 @@ import "@react-sigma/core/lib/react-sigma.min.css"; - import dynamic from "next/dynamic"; import { memo } from "react"; diff --git a/apps/hash-frontend/src/pages/shared/graph-visualizer/graph-container/shared/use-event-handlers.ts b/apps/hash-frontend/src/pages/shared/graph-visualizer/graph-container/shared/use-event-handlers.ts index bcea8958bb8..e0d4e8ca9c8 100644 --- a/apps/hash-frontend/src/pages/shared/graph-visualizer/graph-container/shared/use-event-handlers.ts +++ b/apps/hash-frontend/src/pages/shared/graph-visualizer/graph-container/shared/use-event-handlers.ts @@ -15,13 +15,9 @@ export type RegisterEventsArgs = { config: GraphVizConfig; graphContainerRef: RefObject; graphState: GraphState; - onEdgeClick?: (params: { - edgeData: GraphVizEdge; - }) => void; + onEdgeClick?: (params: { edgeData: GraphVizEdge }) => void; onRender?: () => void; - onNodeSecondClick?: (params: { - nodeId: string; - }) => void; + onNodeSecondClick?: (params: { nodeId: string }) => void; setConfigPanelOpen: (open: boolean) => void; setFilterPanelOpen: (open: boolean) => void; setPathFinderPanelOpen: (open: boolean) => void; diff --git a/apps/hash-frontend/src/pages/shared/markdown/elements/snippet.tsx b/apps/hash-frontend/src/pages/shared/markdown/elements/snippet.tsx index d8ad12e1e32..d631428ad92 100644 --- a/apps/hash-frontend/src/pages/shared/markdown/elements/snippet.tsx +++ b/apps/hash-frontend/src/pages/shared/markdown/elements/snippet.tsx @@ -1,3 +1,13 @@ +import type { BoxProps } from "@mui/material"; +import "prismjs/components/prism-javascript"; +import "prismjs/components/prism-json"; +import "prismjs/components/prism-json5"; +import "prismjs/components/prism-markdown"; +import "prismjs/components/prism-python"; +import "prismjs/components/prism-rust"; +import "prismjs/components/prism-typescript"; +import { Box } from "@mui/material"; +import DOMPurify from "dompurify"; /** * Add support for another language: * @@ -12,18 +22,6 @@ // disabled simple-import-sort, because `Prism` needs to imported first here, otherwise it throws an error // eslint-disable-next-line simple-import-sort/imports import Prism from "prismjs"; - -import "prismjs/components/prism-javascript"; -import "prismjs/components/prism-json"; -import "prismjs/components/prism-json5"; -import "prismjs/components/prism-markdown"; -import "prismjs/components/prism-python"; -import "prismjs/components/prism-rust"; -import "prismjs/components/prism-typescript"; - -import type { BoxProps } from "@mui/material"; -import { Box } from "@mui/material"; -import DOMPurify from "dompurify"; import type { FunctionComponent } from "react"; /** diff --git a/apps/hash-frontend/src/pages/shared/pdf-preview.tsx b/apps/hash-frontend/src/pages/shared/pdf-preview.tsx index 31cf6a798ca..e63386801fd 100644 --- a/apps/hash-frontend/src/pages/shared/pdf-preview.tsx +++ b/apps/hash-frontend/src/pages/shared/pdf-preview.tsx @@ -1,6 +1,5 @@ import "react-pdf/dist/Page/TextLayer.css"; import "react-pdf/dist/esm/Page/AnnotationLayer.css"; - import { ArrowDownLeftAndArrowUpRightToCenterIcon, ArrowRightRegularIcon, diff --git a/apps/hash-frontend/src/pages/shared/shared/type-editor-styling.tsx b/apps/hash-frontend/src/pages/shared/shared/type-editor-styling.tsx index 188c19c30ac..8c86111aa48 100644 --- a/apps/hash-frontend/src/pages/shared/shared/type-editor-styling.tsx +++ b/apps/hash-frontend/src/pages/shared/shared/type-editor-styling.tsx @@ -13,7 +13,10 @@ export const typeHeaderContainerStyles: SxProps = ({ palette }) => ({ export const TypeDefinitionContainer = ({ children, inSlide, -}: { children: React.ReactNode; inSlide?: boolean }) => { +}: { + children: React.ReactNode; + inSlide?: boolean; +}) => { return ( { ) } helperText={passwordInputUiNode?.messages.map( - ({ id, text }) => {text}, + ({ id, text }) => ( + {text} + ), )} required inputProps={{ "data-1p-ignore": false }} diff --git a/apps/hash-frontend/src/pages/signup.page/accept-org-invitation.tsx b/apps/hash-frontend/src/pages/signup.page/accept-org-invitation.tsx index 4d95091b03e..366f91a4b98 100644 --- a/apps/hash-frontend/src/pages/signup.page/accept-org-invitation.tsx +++ b/apps/hash-frontend/src/pages/signup.page/accept-org-invitation.tsx @@ -8,7 +8,10 @@ import { Button } from "../../shared/ui/button"; export const AcceptOrgInvitation = ({ invitation, onAccept, -}: { invitation: PendingOrgInvitation; onAccept: () => void }) => { +}: { + invitation: PendingOrgInvitation; + onAccept: () => void; +}) => { const { org, invitedBy } = invitation; return ( diff --git a/apps/hash-frontend/src/shared/layout/layout-with-sidebar/sidebar.tsx b/apps/hash-frontend/src/shared/layout/layout-with-sidebar/sidebar.tsx index b25e56aeb18..9e24b09c24f 100644 --- a/apps/hash-frontend/src/shared/layout/layout-with-sidebar/sidebar.tsx +++ b/apps/hash-frontend/src/shared/layout/layout-with-sidebar/sidebar.tsx @@ -26,13 +26,13 @@ import { useInvites } from "../../invites-context"; import { useNotificationCount } from "../../notification-count-context"; import { useRoutePageInfo } from "../../routing"; import { useUserPreferences } from "../../use-user-preferences"; +import { useSidebarContext } from "./sidebar-context"; import { AccountEntitiesList } from "./sidebar/account-entities-list"; import { AccountEntityTypeList } from "./sidebar/account-entity-type-list"; import { AccountPageList } from "./sidebar/account-page-list"; import { FavoritesList } from "./sidebar/favorites-list"; import { TopNavLink } from "./sidebar/top-nav-link"; import { WorkspaceSwitcher } from "./sidebar/workspace-switcher"; -import { useSidebarContext } from "./sidebar-context"; export const SIDEBAR_WIDTH = 260; diff --git a/apps/hash-frontend/src/shared/layout/plain-layout.tsx b/apps/hash-frontend/src/shared/layout/plain-layout.tsx index 6d67ec0e225..0e83915eb01 100644 --- a/apps/hash-frontend/src/shared/layout/plain-layout.tsx +++ b/apps/hash-frontend/src/shared/layout/plain-layout.tsx @@ -1,7 +1,7 @@ import { useTheme } from "@mui/material"; -import { useRouter } from "next/router"; import type { DefaultSeoProps } from "next-seo"; import { DefaultSeo } from "next-seo"; +import { useRouter } from "next/router"; import NextNProgress from "nextjs-progressbar"; import type { FunctionComponent, ReactNode } from "react"; diff --git a/apps/hash-frontend/vercel-install.sh b/apps/hash-frontend/vercel-install.sh index d194956fdb5..7ebe4f58a44 100755 --- a/apps/hash-frontend/vercel-install.sh +++ b/apps/hash-frontend/vercel-install.sh @@ -23,7 +23,7 @@ echo "Adding wasm32-unknown-unknown target" rustup target add wasm32-unknown-unknown echo "Installing prerequisites" -mise install node npm:turbo java biome npm:@redocly/cli cargo-binstall cargo:wasm-pack cargo:wasm-opt protoc +mise install node npm:turbo java oxfmt npm:@redocly/cli cargo-binstall cargo:wasm-pack cargo:wasm-opt protoc echo "Rust installation completed. Checking versions:" mise list rust diff --git a/apps/hash-graph/LICENSE.md b/apps/hash-graph/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/apps/hash-graph/LICENSE.md +++ b/apps/hash-graph/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/apps/hash-integration-worker/LICENSE.md b/apps/hash-integration-worker/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/apps/hash-integration-worker/LICENSE.md +++ b/apps/hash-integration-worker/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/apps/hash-integration-worker/docker/Dockerfile b/apps/hash-integration-worker/docker/Dockerfile index 4f89c164309..a5a9057478e 100644 --- a/apps/hash-integration-worker/docker/Dockerfile +++ b/apps/hash-integration-worker/docker/Dockerfile @@ -76,7 +76,7 @@ RUN --mount=type=secret,id=GITHUB_TOKEN,env=GITHUB_TOKEN \ apt-get install -y --no-install-recommends build-essential && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* && \ - mise install node npm:turbo java biome npm:@redocly/cli cargo-binstall cargo:wasm-pack cargo:wasm-opt protoc && \ + mise install node npm:turbo java oxfmt npm:@redocly/cli cargo-binstall cargo:wasm-pack cargo:wasm-opt protoc && \ yarn install --immutable && \ yarn cache clean diff --git a/apps/hash-integration-worker/scripts/bundle-workflow-code.ts b/apps/hash-integration-worker/scripts/bundle-workflow-code.ts index 9cf2a65542c..df95d5c8b75 100644 --- a/apps/hash-integration-worker/scripts/bundle-workflow-code.ts +++ b/apps/hash-integration-worker/scripts/bundle-workflow-code.ts @@ -14,17 +14,13 @@ async function bundle() { const { code } = await bundleWorkflowCode({ workflowsPath: require.resolve("../src/workflows"), workflowInterceptorModules: [ - require.resolve( - "@local/hash-backend-utils/temporal/interceptors/workflows/sentry", - ), + require.resolve("@local/hash-backend-utils/temporal/interceptors/workflows/sentry"), // OTEL workflow interceptor must be in the bundle: when the // worker boots with `workflowBundle`, the `interceptors.workflowModules` // option on `Worker.create` is ignored. The interceptor is a no-op // when no global TracerProvider is registered, so it's safe to // include unconditionally. - require.resolve( - "@local/hash-backend-utils/temporal/interceptors/workflows/opentelemetry", - ), + require.resolve("@local/hash-backend-utils/temporal/interceptors/workflows/opentelemetry"), ], }); const codePath = path.join(__dirname, "../dist/workflow-bundle.js"); diff --git a/apps/hash-integration-worker/src/activities/flow-activities.ts b/apps/hash-integration-worker/src/activities/flow-activities.ts index b43325410ee..cb63313eb1f 100644 --- a/apps/hash-integration-worker/src/activities/flow-activities.ts +++ b/apps/hash-integration-worker/src/activities/flow-activities.ts @@ -7,11 +7,7 @@ import { createIntegrationActivities } from "./flow-activities/integration-activ export const createFlowActivities: CreateFlowActivities< IntegrationFlowActionDefinitionId -> = ({ - graphApiClient, -}: { - graphApiClient: GraphApi; -}) => ({ +> = ({ graphApiClient }: { graphApiClient: GraphApi }) => ({ ...createAviationActivities({ graphApiClient }), ...createIntegrationActivities({ graphApiClient }), }); diff --git a/apps/hash-integration-worker/src/main.ts b/apps/hash-integration-worker/src/main.ts index 2e85db0bb75..848d6a243d9 100644 --- a/apps/hash-integration-worker/src/main.ts +++ b/apps/hash-integration-worker/src/main.ts @@ -1,11 +1,11 @@ /* eslint-disable import/first, import/order, simple-import-sort/imports */ +import * as Sentry from "@sentry/node"; + // Must be the first import so OTEL auto-instrumentations can patch // http / grpc / Sentry's own monkey-patches before they apply. import { otelSetup } from "./instrument.js"; -import * as Sentry from "@sentry/node"; - Sentry.init({ dsn: process.env.HASH_TEMPORAL_WORKER_INTEGRATION_SENTRY_DSN, enabled: !!process.env.HASH_TEMPORAL_WORKER_INTEGRATION_SENTRY_DSN, @@ -34,9 +34,9 @@ import { createGraphClient } from "@local/hash-backend-utils/create-graph-client import { getRequiredEnv } from "@local/hash-backend-utils/environment"; import { createCommonFlowActivities } from "@local/hash-backend-utils/flows"; import { Logger } from "@local/hash-backend-utils/logger"; +import type { WorkflowTypeMap } from "@local/hash-backend-utils/temporal-integration-workflow-types"; import type { WorkflowSource } from "@local/hash-backend-utils/temporal/worker-bootstrap"; import { runWorker } from "@local/hash-backend-utils/temporal/worker-bootstrap"; -import type { WorkflowTypeMap } from "@local/hash-backend-utils/temporal-integration-workflow-types"; import { config } from "dotenv-flow"; import { createFlowActivities } from "./activities/flow-activities.js"; diff --git a/apps/mcp/linear/LICENSE.md b/apps/mcp/linear/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/apps/mcp/linear/LICENSE.md +++ b/apps/mcp/linear/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/apps/mcp/linear/package.json b/apps/mcp/linear/package.json index d9868d3ef26..f4d219a8a4d 100644 --- a/apps/mcp/linear/package.json +++ b/apps/mcp/linear/package.json @@ -11,9 +11,9 @@ "dev": "chokidar 'dist/main.js' -c 'chmod +x dist/main.js' & tsc --noCheck --watch & yarn inspector & shx chmod +x dist/*.js", "fix:eslint": "eslint --fix .", "inspector": "npx @modelcontextprotocol/inspector dist/main.js", - "postinstall": "[ \"${CI:-false}\" != \"true\" ] && yarn build || echo 'Skipping Linear MCP build in CI'", "lint:eslint": "eslint --report-unused-disable-directives .", "lint:tsc": "tsc --noEmit", + "postinstall": "[ \"${CI:-false}\" != \"true\" ] && yarn build || echo 'Skipping Linear MCP build in CI'", "start": "node dist/main.js" }, "dependencies": { diff --git a/apps/mcp/notion/LICENSE.md b/apps/mcp/notion/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/apps/mcp/notion/LICENSE.md +++ b/apps/mcp/notion/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/apps/mcp/notion/package.json b/apps/mcp/notion/package.json index 0889725e2a6..dbb5256ab0f 100644 --- a/apps/mcp/notion/package.json +++ b/apps/mcp/notion/package.json @@ -11,9 +11,9 @@ "dev": "chokidar 'dist/main.js' -c 'chmod +x dist/main.js' & tsc --noCheck --watch & yarn inspector & shx chmod +x dist/*.js", "fix:eslint": "eslint --fix .", "inspector": "npx @modelcontextprotocol/inspector dist/main.js", - "postinstall": "[ \"${CI:-false}\" != \"true\" ] && yarn build || echo 'Skipping Notion MCP build in CI'", "lint:eslint": "eslint --report-unused-disable-directives .", "lint:tsc": "tsc --noEmit", + "postinstall": "[ \"${CI:-false}\" != \"true\" ] && yarn build || echo 'Skipping Notion MCP build in CI'", "start": "node dist/main.js" }, "dependencies": { diff --git a/apps/petrinaut-website/index.html b/apps/petrinaut-website/index.html index 86b7582ccc6..aeaf66ace7b 100644 --- a/apps/petrinaut-website/index.html +++ b/apps/petrinaut-website/index.html @@ -1,38 +1,36 @@ - + - - - - - - Petrinaut | SDCPN Demo - - + html, + body { + height: 100%; + width: 100%; + overflow: hidden; + } - -
- - + #root { + height: 100vh; + width: 100vw; + overflow: hidden; + } + + + +
+ + diff --git a/apps/petrinaut-website/package.json b/apps/petrinaut-website/package.json index ed7c36e5eca..b410bd59c66 100644 --- a/apps/petrinaut-website/package.json +++ b/apps/petrinaut-website/package.json @@ -6,9 +6,9 @@ "scripts": { "build": "vite build", "dev": "vite", - "lint:tsc": "tsgo --noEmit", + "fix:eslint": "oxlint --fix --type-aware --report-unused-disable-directives-severity=error .", "lint:eslint": "oxlint --type-aware --report-unused-disable-directives-severity=error .", - "fix:eslint": "oxlint --fix --type-aware --report-unused-disable-directives-severity=error ." + "lint:tsc": "tsgo --noEmit" }, "dependencies": { "@hashintel/petrinaut": "workspace:*", diff --git a/apps/petrinaut-website/src/main.tsx b/apps/petrinaut-website/src/main.tsx index 55211afcf19..e03c58f8b3b 100644 --- a/apps/petrinaut-website/src/main.tsx +++ b/apps/petrinaut-website/src/main.tsx @@ -1,6 +1,5 @@ import "@hashintel/petrinaut/styles.css"; import "./sentry/instrument"; - import * as Sentry from "@sentry/react"; import { StrictMode } from "react"; import { createRoot } from "react-dom/client"; diff --git a/apps/petrinaut-website/vercel-install.sh b/apps/petrinaut-website/vercel-install.sh index 90c53544c46..66beee61bd0 100755 --- a/apps/petrinaut-website/vercel-install.sh +++ b/apps/petrinaut-website/vercel-install.sh @@ -20,7 +20,7 @@ export RUSTUP_AUTO_INSTALL=0 mise use --global rust[profile=minimal]@$(yq '.toolchain.channel' rust-toolchain.toml) echo "Installing prerequisites" -mise install node npm:turbo java biome npm:@redocly/cli cargo-binstall cargo:wasm-pack cargo:wasm-opt protoc +mise install node npm:turbo java oxfmt npm:@redocly/cli cargo-binstall cargo:wasm-pack cargo:wasm-opt protoc echo "Rust installation completed. Checking versions:" mise list rust diff --git a/apps/plugin-browser/LICENSE.md b/apps/plugin-browser/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/apps/plugin-browser/LICENSE.md +++ b/apps/plugin-browser/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/apps/plugin-browser/src/pages/options.html b/apps/plugin-browser/src/pages/options.html index 847bc61b1f7..447480c02b5 100644 --- a/apps/plugin-browser/src/pages/options.html +++ b/apps/plugin-browser/src/pages/options.html @@ -1,9 +1,9 @@ - + - Settings | HASH Browser Extension + Settings | HASH Browser Extension diff --git a/apps/plugin-browser/src/pages/options/options-contents.tsx b/apps/plugin-browser/src/pages/options/options-contents.tsx index 9a50b3dc888..254f0cc3978 100644 --- a/apps/plugin-browser/src/pages/options/options-contents.tsx +++ b/apps/plugin-browser/src/pages/options/options-contents.tsx @@ -1,5 +1,4 @@ import "../shared/common.scss"; - import { Button } from "@hashintel/design-system"; import { theme } from "@hashintel/design-system/theme"; import { Box, Skeleton, Stack, ThemeProvider, Typography } from "@mui/material"; diff --git a/apps/plugin-browser/src/pages/popup.html b/apps/plugin-browser/src/pages/popup.html index 3ce95a85917..aeda5940382 100644 --- a/apps/plugin-browser/src/pages/popup.html +++ b/apps/plugin-browser/src/pages/popup.html @@ -1,4 +1,4 @@ - + diff --git a/apps/plugin-browser/src/pages/popup/popup-contents.tsx b/apps/plugin-browser/src/pages/popup/popup-contents.tsx index ef7137cc330..5b5e29a7725 100644 --- a/apps/plugin-browser/src/pages/popup/popup-contents.tsx +++ b/apps/plugin-browser/src/pages/popup/popup-contents.tsx @@ -1,5 +1,4 @@ import "../shared/common.scss"; - import { theme } from "@hashintel/design-system/theme"; import { Box, Skeleton, ThemeProvider } from "@mui/material"; import { useEffect, useState } from "react"; diff --git a/apps/plugin-browser/src/pages/working.html b/apps/plugin-browser/src/pages/working.html index 37be54f01de..c138d369a85 100644 --- a/apps/plugin-browser/src/pages/working.html +++ b/apps/plugin-browser/src/pages/working.html @@ -1,4 +1,4 @@ - + diff --git a/apps/plugin-browser/src/pages/working/working-contents.tsx b/apps/plugin-browser/src/pages/working/working-contents.tsx index fa9466dfdbf..3cc13c525f9 100644 --- a/apps/plugin-browser/src/pages/working/working-contents.tsx +++ b/apps/plugin-browser/src/pages/working/working-contents.tsx @@ -1,5 +1,4 @@ import "../shared/common.scss"; - import { Button } from "@hashintel/design-system"; import { theme } from "@hashintel/design-system/theme"; import { Box, Link, Stack, ThemeProvider, Typography } from "@mui/material"; diff --git a/biome.jsonc b/biome.jsonc deleted file mode 100644 index 8b33022e485..00000000000 --- a/biome.jsonc +++ /dev/null @@ -1,79 +0,0 @@ -{ - "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", - "vcs": { - "enabled": true, - "clientKind": "git", - "useIgnoreFile": true, - "defaultBranch": "main" - }, - "files": { - "ignoreUnknown": false, - "ignore": [] - }, - "formatter": { - "enabled": true, - "useEditorconfig": true, - "formatWithErrors": false, - "indentStyle": "space", - "indentWidth": 2, - "lineEnding": "lf", - "lineWidth": 80, - "attributePosition": "auto", - "bracketSpacing": true, - "ignore": [ - // Biome 1 doesn't support nested gitignores yet (Biome 2 will gain support) - // see: https://github.com/biomejs/biome/issues/2312 - "**/_temp/**", - "**/.mastra/**", - "**/.build/**", - "**/styled-system/**", - "**/__snapshots__/**", - "@local/graph/api/openapi/**", - "@local/graph/client/typescript/*.ts", - "**/*.snap", - "**/*.snap.*" - ] - }, - "organizeImports": { - // Needs to wait for Biome 2 to support import groups - // see: https://github.com/biomejs/biome/issues/3177 - // see: https://linear.app/hash/issue/H-3764/enable-biome-analyzer - "enabled": false - }, - "linter": { - // To be enabled in the future - // see: https://linear.app/hash/issue/H-3765/augment-eslint-with-biome - "enabled": false, - "rules": { - "recommended": true - } - }, - "javascript": { - "formatter": { - "jsxQuoteStyle": "double", - "quoteProperties": "asNeeded", - "trailingCommas": "all", - "semicolons": "always", - "arrowParentheses": "always", - "bracketSameLine": false, - "quoteStyle": "double", - "attributePosition": "auto", - "bracketSpacing": true - } - }, - "json": { - // Biome 2 will gain proper support for plugins and therefore also package.json sorting - // see: https://linear.app/hash/issue/H-3856/migrate-sort-package-json-to-biome - "formatter": { - "trailingCommas": "none" - } - }, - "overrides": [ - { - "include": ["**/package.json"], - "formatter": { - "lineWidth": 1 - } - } - ] -} diff --git a/infra/docker/LICENSE.md b/infra/docker/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/infra/docker/LICENSE.md +++ b/infra/docker/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/infra/docker/api/prod/Dockerfile b/infra/docker/api/prod/Dockerfile index 43321b2cbe6..d8f903b3cf2 100644 --- a/infra/docker/api/prod/Dockerfile +++ b/infra/docker/api/prod/Dockerfile @@ -75,7 +75,7 @@ RUN --mount=type=secret,id=GITHUB_TOKEN,env=GITHUB_TOKEN \ apt-get install -y --no-install-recommends build-essential && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* && \ - mise install node npm:turbo java biome npm:@redocly/cli cargo-binstall cargo:wasm-pack cargo:wasm-opt protoc && \ + mise install node npm:turbo java oxfmt npm:@redocly/cli cargo-binstall cargo:wasm-pack cargo:wasm-opt protoc && \ yarn install --immutable && \ yarn cache clean diff --git a/infra/docker/frontend/prod/Dockerfile b/infra/docker/frontend/prod/Dockerfile index ab72fe77751..82a3c3b8415 100644 --- a/infra/docker/frontend/prod/Dockerfile +++ b/infra/docker/frontend/prod/Dockerfile @@ -72,7 +72,7 @@ RUN --mount=type=secret,id=GITHUB_TOKEN,env=GITHUB_TOKEN \ apt-get install -y --no-install-recommends build-essential && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* && \ - mise install node npm:turbo java biome npm:@redocly/cli cargo-binstall cargo:wasm-pack cargo:wasm-opt protoc && \ + mise install node npm:turbo java oxfmt npm:@redocly/cli cargo-binstall cargo:wasm-pack cargo:wasm-opt protoc && \ yarn install --immutable && \ yarn cache clean diff --git a/libs/@blockprotocol/graph/package.json b/libs/@blockprotocol/graph/package.json index 959e352002a..1b599d2a527 100644 --- a/libs/@blockprotocol/graph/package.json +++ b/libs/@blockprotocol/graph/package.json @@ -62,8 +62,8 @@ "fix:eslint": "eslint --fix .", "lint:eslint": "eslint --report-unused-disable-directives .", "lint:tsc": "tsc --noEmit", - "prepublishOnly": "turbo run build && tsx scripts/prepublish.ts", - "postpublish": "PACKAGE_DIR=$(pwd) yarn workspace @local/repo-chores exe scripts/postpublish.ts" + "postpublish": "PACKAGE_DIR=$(pwd) yarn workspace @local/repo-chores exe scripts/postpublish.ts", + "prepublishOnly": "turbo run build && tsx scripts/prepublish.ts" }, "dependencies": { "@blockprotocol/core": "0.1.4", diff --git a/libs/@blockprotocol/graph/src/custom-element.ts b/libs/@blockprotocol/graph/src/custom-element.ts index fe70561568a..8e3178d513f 100644 --- a/libs/@blockprotocol/graph/src/custom-element.ts +++ b/libs/@blockprotocol/graph/src/custom-element.ts @@ -8,10 +8,10 @@ import { getOutgoingLinkAndTargetEntities, getRoots } from "./stdlib.js"; export interface BlockElementBase< RootEntity extends Entity = Entity, // eslint-disable-next-line @typescript-eslint/no-unused-vars -- this is used in the class definition - RootEntityLinkedEntities extends - LinkEntityAndRightEntity[] = LinkEntityAndRightEntity[], -> extends LitElement, - BlockGraphProperties {} + RootEntityLinkedEntities extends LinkEntityAndRightEntity[] = + LinkEntityAndRightEntity[], +> + extends LitElement, BlockGraphProperties {} /** * A class to use as a base for implementing Block Protocol blocks as custom elements. diff --git a/libs/@blockprotocol/graph/src/graph-block-handler.ts b/libs/@blockprotocol/graph/src/graph-block-handler.ts index ee99d74d1ab..e4dccc76749 100644 --- a/libs/@blockprotocol/graph/src/graph-block-handler.ts +++ b/libs/@blockprotocol/graph/src/graph-block-handler.ts @@ -118,7 +118,9 @@ export class GraphBlockHandler createEntity({ data, - }: { data?: CreateEntityData & { properties: ValidProperties } }) { + }: { + data?: CreateEntityData & { properties: ValidProperties }; + }) { return this.sendMessage({ message: { messageName: "createEntity", @@ -130,7 +132,9 @@ export class GraphBlockHandler updateEntity({ data, - }: { data?: UpdateEntityData & { properties: ValidProperties } }) { + }: { + data?: UpdateEntityData & { properties: ValidProperties }; + }) { return this.sendMessage({ message: { messageName: "updateEntity", diff --git a/libs/@blockprotocol/graph/src/stdlib/subgraph/edge/link-entity.ts b/libs/@blockprotocol/graph/src/stdlib/subgraph/edge/link-entity.ts index 38f1bd2fd99..6383131e047 100644 --- a/libs/@blockprotocol/graph/src/stdlib/subgraph/edge/link-entity.ts +++ b/libs/@blockprotocol/graph/src/stdlib/subgraph/edge/link-entity.ts @@ -298,8 +298,8 @@ export const getRightEntityForLinkEntity = ( * of time in the {@link Subgraph} */ export const getOutgoingLinkAndTargetEntities = < - LinkAndRightEntities extends - LinkEntityAndRightEntity[] = LinkEntityAndRightEntity[], + LinkAndRightEntities extends LinkEntityAndRightEntity[] = + LinkEntityAndRightEntity[], >( subgraph: Subgraph, entityId: EntityId, @@ -351,8 +351,8 @@ export const getOutgoingLinkAndTargetEntities = < * of time in the {@link Subgraph} */ export const getIncomingLinkAndSourceEntities = < - LinkAndLeftEntities extends - LinkEntityAndLeftEntity[] = LinkEntityAndLeftEntity[], + LinkAndLeftEntities extends LinkEntityAndLeftEntity[] = + LinkEntityAndLeftEntity[], >( subgraph: Subgraph, entityId: EntityId, diff --git a/libs/@blockprotocol/graph/src/stdlib/subgraph/element/map-revisions.ts b/libs/@blockprotocol/graph/src/stdlib/subgraph/element/map-revisions.ts index 9d75b0ce7fc..b38db297a7e 100644 --- a/libs/@blockprotocol/graph/src/stdlib/subgraph/element/map-revisions.ts +++ b/libs/@blockprotocol/graph/src/stdlib/subgraph/element/map-revisions.ts @@ -22,19 +22,16 @@ export const mapElementsIntoRevisions = < >( elements: GraphElementType[], ): BaseIdToRevisions => { - return elements.reduce( - (revisionMap, element) => { - const baseId = - "entityId" in element.metadata.recordId - ? element.metadata.recordId.entityId - : element.metadata.recordId.baseUrl; + return elements.reduce((revisionMap, element) => { + const baseId = + "entityId" in element.metadata.recordId + ? element.metadata.recordId.entityId + : element.metadata.recordId.baseUrl; - // eslint-disable-next-line no-param-reassign - revisionMap[baseId] ??= []; - revisionMap[baseId].push(element); + // eslint-disable-next-line no-param-reassign + revisionMap[baseId] ??= []; + revisionMap[baseId].push(element); - return revisionMap; - }, - {} as BaseIdToRevisions, - ); + return revisionMap; + }, {} as BaseIdToRevisions); }; diff --git a/libs/@blockprotocol/graph/src/stdlib/subgraph/roots.ts b/libs/@blockprotocol/graph/src/stdlib/subgraph/roots.ts index b103c752343..717068ae36b 100644 --- a/libs/@blockprotocol/graph/src/stdlib/subgraph/roots.ts +++ b/libs/@blockprotocol/graph/src/stdlib/subgraph/roots.ts @@ -13,8 +13,8 @@ import { } from "../../types/subgraph.js"; import { mustBeDefined } from "../../util.js"; import { getDataTypeByVertexId } from "./element/data-type.js"; -import { getEntityRevision } from "./element/entity.js"; import { getEntityTypeByVertexId } from "./element/entity-type.js"; +import { getEntityRevision } from "./element/entity.js"; import { getPropertyTypeByVertexId } from "./element/property-type.js"; /** diff --git a/libs/@blockprotocol/graph/src/types/block-graph.ts b/libs/@blockprotocol/graph/src/types/block-graph.ts index 08a28988569..993ca4e93bc 100644 --- a/libs/@blockprotocol/graph/src/types/block-graph.ts +++ b/libs/@blockprotocol/graph/src/types/block-graph.ts @@ -62,8 +62,8 @@ export type GraphBlockMessageCallbacks = { }; export type GraphEmbedderMessages< - Key extends - keyof GraphBlockMessageCallbacks = keyof GraphBlockMessageCallbacks, + Key extends keyof GraphBlockMessageCallbacks = + keyof GraphBlockMessageCallbacks, > = { [key in Key]: ({ data, @@ -220,8 +220,8 @@ export type GraphEmbedderMessageCallbacks = { }; export type GraphBlockMessages< - Key extends - keyof GraphEmbedderMessageCallbacks = keyof GraphEmbedderMessageCallbacks, + Key extends keyof GraphEmbedderMessageCallbacks = + keyof GraphEmbedderMessageCallbacks, > = { [key in Key]: ({ data, diff --git a/libs/@blockprotocol/graph/src/types/subgraph/edges/generic-outward-edge.ts b/libs/@blockprotocol/graph/src/types/subgraph/edges/generic-outward-edge.ts index 681e40aad93..4c095053877 100644 --- a/libs/@blockprotocol/graph/src/types/subgraph/edges/generic-outward-edge.ts +++ b/libs/@blockprotocol/graph/src/types/subgraph/edges/generic-outward-edge.ts @@ -15,8 +15,8 @@ export type GenericOutwardEdge< | OntologyEdgeKind | SharedEdgeKind, Reversed extends boolean = boolean, - Endpoint extends - GraphElementIdentifiers["identifier"] = GraphElementIdentifiers["identifier"], + Endpoint extends GraphElementIdentifiers["identifier"] = + GraphElementIdentifiers["identifier"], > = { kind: EdgeKind; reversed: Reversed; diff --git a/libs/@blockprotocol/type-system/rust/types/index.snap.d.ts b/libs/@blockprotocol/type-system/rust/types/index.snap.d.ts index 75856072b9e..f005cae36c5 100644 --- a/libs/@blockprotocol/type-system/rust/types/index.snap.d.ts +++ b/libs/@blockprotocol/type-system/rust/types/index.snap.d.ts @@ -1,110 +1,136 @@ // This file was generated from `libs/@blockprotocol/type-system/rust/tests/codegen.rs` -import type { Real } from "@rust/hash-codec/types"; import type { Brand } from "@blockprotocol/type-system-rs"; +import type { Real } from "@rust/hash-codec/types"; export type DraftId = Brand; export type EntityEditionId = Brand; export type EntityUuid = Brand; -export type PropertyValue = null | boolean | string | Real | PropertyValue[] | { - [key: string]: PropertyValue; -}; +export type PropertyValue = + | null + | boolean + | string + | Real + | PropertyValue[] + | { + [key: string]: PropertyValue; + }; export type BaseUrl = Brand; export type OntologyTypeVersion = Brand; -export type Principal = { - principalType: "actor"; -} & Actor | { - principalType: "actorGroup"; -} & ActorGroup | { - principalType: "role"; -} & Role; -export type PrincipalId = { - principalType: "actor"; -} & ActorId | { - principalType: "actorGroup"; -} & ActorGroupId | { - principalType: "role"; -} & RoleId; -export type Actor = { - actorType: "user"; -} & User | { - actorType: "machine"; -} & Machine | { - actorType: "ai"; -} & Ai; +export type Principal = + | ({ + principalType: "actor"; + } & Actor) + | ({ + principalType: "actorGroup"; + } & ActorGroup) + | ({ + principalType: "role"; + } & Role); +export type PrincipalId = + | ({ + principalType: "actor"; + } & ActorId) + | ({ + principalType: "actorGroup"; + } & ActorGroupId) + | ({ + principalType: "role"; + } & RoleId); +export type Actor = + | ({ + actorType: "user"; + } & User) + | ({ + actorType: "machine"; + } & Machine) + | ({ + actorType: "ai"; + } & Ai); export type ActorEntityUuid = Brand; -export type ActorId = { - actorType: "user"; - id: UserId; -} | { - actorType: "machine"; - id: MachineId; -} | { - actorType: "ai"; - id: AiId; -}; +export type ActorId = + | { + actorType: "user"; + id: UserId; + } + | { + actorType: "machine"; + id: MachineId; + } + | { + actorType: "ai"; + id: AiId; + }; export type ActorType = "user" | "machine" | "ai"; export interface Ai { - id: AiId; - identifier: string; + id: AiId; + identifier: string; } export type AiId = Brand; export interface Machine { - id: MachineId; - identifier: string; + id: MachineId; + identifier: string; } export type MachineId = Brand; export interface User { - id: UserId; + id: UserId; } export type UserId = Brand; -export type ActorGroup = { - actorGroupType: "web"; -} & Web | { - actorGroupType: "team"; -} & Team; +export type ActorGroup = + | ({ + actorGroupType: "web"; + } & Web) + | ({ + actorGroupType: "team"; + } & Team); export type ActorGroupEntityUuid = Brand; -export type ActorGroupId = { - actorGroupType: "web"; - id: WebId; -} | { - actorGroupType: "team"; - id: TeamId; -}; +export type ActorGroupId = + | { + actorGroupType: "web"; + id: WebId; + } + | { + actorGroupType: "team"; + id: TeamId; + }; export type ActorGroupType = "web" | "team"; export interface Team { - id: TeamId; - parentId: ActorGroupId; - name: string; + id: TeamId; + parentId: ActorGroupId; + name: string; } export type TeamId = Brand; export interface Web { - id: WebId; - shortname: (string | null); + id: WebId; + shortname: string | null; } export type WebId = Brand; -export type Role = { - roleType: "web"; -} & WebRole | { - roleType: "team"; -} & TeamRole; -export type RoleId = { - roleType: "web"; - id: WebRoleId; -} | { - roleType: "team"; - id: TeamRoleId; -}; +export type Role = + | ({ + roleType: "web"; + } & WebRole) + | ({ + roleType: "team"; + } & TeamRole); +export type RoleId = + | { + roleType: "web"; + id: WebRoleId; + } + | { + roleType: "team"; + id: TeamRoleId; + }; export type RoleName = "administrator" | "member"; export type RoleType = "web" | "team"; export interface TeamRole { - id: TeamRoleId; - teamId: TeamId; - name: RoleName; + id: TeamRoleId; + teamId: TeamId; + name: RoleName; } export type TeamRoleId = Brand; export interface WebRole { - id: WebRoleId; - webId: WebId; - name: RoleName; + id: WebRoleId; + webId: WebId; + name: RoleName; } export type WebRoleId = Brand; diff --git a/libs/@blockprotocol/type-system/typescript/package.json b/libs/@blockprotocol/type-system/typescript/package.json index 02cc870f8fc..924c7b088af 100644 --- a/libs/@blockprotocol/type-system/typescript/package.json +++ b/libs/@blockprotocol/type-system/typescript/package.json @@ -45,8 +45,8 @@ "fix:eslint": "eslint --fix .", "lint:eslint": "eslint --report-unused-disable-directives .", "lint:tsc": "tsc --noEmit", - "prepublishOnly": "turbo run build && tsx scripts/prepublish.ts && yarn build", "postpublish": "PACKAGE_DIR=$(pwd) yarn workspace @local/repo-chores exe scripts/postpublish.ts", + "prepublishOnly": "turbo run build && tsx scripts/prepublish.ts && yarn build", "test:unit": "vitest --run" }, "dependencies": { diff --git a/libs/@blockprotocol/type-system/typescript/src/main.ts b/libs/@blockprotocol/type-system/typescript/src/main.ts index f435ddd7d40..f2167095556 100644 --- a/libs/@blockprotocol/type-system/typescript/src/main.ts +++ b/libs/@blockprotocol/type-system/typescript/src/main.ts @@ -4,10 +4,7 @@ import type { EntityMetadata } from "./native/entity.js"; -export { - atLeastOne, - mustHaveAtLeastOne, -} from "./common.js"; +export { atLeastOne, mustHaveAtLeastOne } from "./common.js"; export * from "./native.js"; export type * from "@blockprotocol/type-system-rs"; export type * from "@blockprotocol/type-system-rs/types"; diff --git a/libs/@blockprotocol/type-system/typescript/src/native/entity.ts b/libs/@blockprotocol/type-system/typescript/src/native/entity.ts index 47c1f1efa75..a06f90328e1 100644 --- a/libs/@blockprotocol/type-system/typescript/src/native/entity.ts +++ b/libs/@blockprotocol/type-system/typescript/src/native/entity.ts @@ -41,8 +41,8 @@ export type EntityMetadata< }; export interface Entity< - TypeIdsAndProperties extends - TypeIdsAndPropertiesForEntity = TypeIdsAndPropertiesForEntity, + TypeIdsAndProperties extends TypeIdsAndPropertiesForEntity = + TypeIdsAndPropertiesForEntity, > { metadata: EntityMetadata; @@ -65,8 +65,8 @@ export interface Entity< } export interface LinkEntity< - TypeIdsAndProperties extends - TypeIdsAndPropertiesForEntity = TypeIdsAndPropertiesForEntity, + TypeIdsAndProperties extends TypeIdsAndPropertiesForEntity = + TypeIdsAndPropertiesForEntity, > extends Entity { linkData: LinkData; } diff --git a/libs/@hashintel/block-design-system/README.md b/libs/@hashintel/block-design-system/README.md index efe858f8c06..f4b890978ff 100644 --- a/libs/@hashintel/block-design-system/README.md +++ b/libs/@hashintel/block-design-system/README.md @@ -1,4 +1,3 @@ - # Block Design System Components for specific use in blocks. diff --git a/libs/@hashintel/block-design-system/package.json b/libs/@hashintel/block-design-system/package.json index 4ccba27e56e..da1ccfa7609 100644 --- a/libs/@hashintel/block-design-system/package.json +++ b/libs/@hashintel/block-design-system/package.json @@ -23,8 +23,8 @@ "fix:eslint": "eslint --fix .", "lint:eslint": "eslint --report-unused-disable-directives .", "lint:tsc": "tsc --noEmit", - "prepublishOnly": "PACKAGE_DIR=$(pwd) yarn workspace @local/repo-chores exe scripts/prepublish.ts", - "postpublish": "PACKAGE_DIR=$(pwd) yarn workspace @local/repo-chores exe scripts/postpublish.ts" + "postpublish": "PACKAGE_DIR=$(pwd) yarn workspace @local/repo-chores exe scripts/postpublish.ts", + "prepublishOnly": "PACKAGE_DIR=$(pwd) yarn workspace @local/repo-chores exe scripts/prepublish.ts" }, "dependencies": { "@blockprotocol/graph": "workspace:*", diff --git a/libs/@hashintel/design-system/README.md b/libs/@hashintel/design-system/README.md index e7d1ab8bb81..c712d29d357 100644 --- a/libs/@hashintel/design-system/README.md +++ b/libs/@hashintel/design-system/README.md @@ -1,4 +1,3 @@ - # HASH Design System Components for use in libraries and applications. diff --git a/libs/@hashintel/design-system/package.json b/libs/@hashintel/design-system/package.json index ff1b5d8da72..9288bcf6e9e 100644 --- a/libs/@hashintel/design-system/package.json +++ b/libs/@hashintel/design-system/package.json @@ -52,8 +52,8 @@ "fix:eslint": "eslint --fix .", "lint:eslint": "eslint --report-unused-disable-directives .", "lint:tsc": "tsc --noEmit", - "prepublishOnly": "PACKAGE_DIR=$(pwd) yarn workspace @local/repo-chores exe scripts/prepublish.ts", - "postpublish": "PACKAGE_DIR=$(pwd) yarn workspace @local/repo-chores exe scripts/postpublish.ts" + "postpublish": "PACKAGE_DIR=$(pwd) yarn workspace @local/repo-chores exe scripts/postpublish.ts", + "prepublishOnly": "PACKAGE_DIR=$(pwd) yarn workspace @local/repo-chores exe scripts/prepublish.ts" }, "dependencies": { "@blockprotocol/type-system": "workspace:*", diff --git a/libs/@hashintel/design-system/src/skeleton.tsx b/libs/@hashintel/design-system/src/skeleton.tsx index 4792b810416..678312e0e1e 100644 --- a/libs/@hashintel/design-system/src/skeleton.tsx +++ b/libs/@hashintel/design-system/src/skeleton.tsx @@ -1,5 +1,4 @@ import "react-loading-skeleton/dist/skeleton.css"; - import type { SkeletonProps } from "react-loading-skeleton"; // eslint-disable-next-line import/no-named-default import { default as LibSkeleton } from "react-loading-skeleton"; diff --git a/libs/@hashintel/ds-components/.ladle/components/preview-frame.tsx b/libs/@hashintel/ds-components/.ladle/components/preview-frame.tsx index ae3222f58ee..99245172004 100644 --- a/libs/@hashintel/ds-components/.ladle/components/preview-frame.tsx +++ b/libs/@hashintel/ds-components/.ladle/components/preview-frame.tsx @@ -1,6 +1,6 @@ +import { cx } from "@hashintel/ds-helpers/css"; import { type ComponentProps, Fragment } from "react"; -import { cx } from "@hashintel/ds-helpers/css"; import { useLadleIsPreview } from "../hooks/use-ladle-control"; export const PreviewFrame = ({ diff --git a/libs/@hashintel/ds-components/.ladle/components/variant-grid.tsx b/libs/@hashintel/ds-components/.ladle/components/variant-grid.tsx index b19bf80686e..e6253f8ae46 100644 --- a/libs/@hashintel/ds-components/.ladle/components/variant-grid.tsx +++ b/libs/@hashintel/ds-components/.ladle/components/variant-grid.tsx @@ -1,6 +1,5 @@ -import React, { type CSSProperties } from "react"; - import { cx } from "@hashintel/ds-helpers/css"; +import React, { type CSSProperties } from "react"; // eslint-disable-next-line @typescript-eslint/no-explicit-any type CellProps> = Partial< diff --git a/libs/@hashintel/ds-components/.ladle/index.css b/libs/@hashintel/ds-components/.ladle/index.css index ddf18f14376..858e478d1ac 100644 --- a/libs/@hashintel/ds-components/.ladle/index.css +++ b/libs/@hashintel/ds-components/.ladle/index.css @@ -5,9 +5,10 @@ html, :host { --font-fallback: - ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, - "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", - "Segoe UI Symbol", "Noto Color Emoji"; + ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", + Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, + "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", + "Noto Color Emoji"; line-height: 1.5; -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; @@ -121,7 +122,11 @@ @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) { ::placeholder { - --placeholder-fallback: color-mix(in oklab, currentcolor 50%, transparent); + --placeholder-fallback: color-mix( + in oklab, + currentcolor 50%, + transparent + ); } } @@ -185,8 +190,9 @@ kbd, samp, pre { - --font-mono-fallback: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, - "Liberation Mono", "Courier New"; + --font-mono-fallback: + ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", + "Courier New"; font-family: var(--global-font-mono, var(--font-mono-fallback)); font-size: 1em; font-feature-settings: normal; @@ -223,10 +229,10 @@ :root { /* fonts - Fontsource variable fonts */ --font-inter: "Inter Variable", "Inter", ui-sans-serif, system-ui, sans-serif; - --font-inter-tight: "Inter Tight Variable", "Inter Tight", ui-sans-serif, - system-ui, sans-serif; - --font-geist-mono: "Geist Mono Variable", "Geist Mono", ui-monospace, - SFMono-Regular, monospace; + --font-inter-tight: + "Inter Tight Variable", "Inter Tight", ui-sans-serif, system-ui, sans-serif; + --font-geist-mono: + "Geist Mono Variable", "Geist Mono", ui-monospace, SFMono-Regular, monospace; --global-font-body: var(--font-inter); --global-font-mono: var(--font-geist-mono); diff --git a/libs/@hashintel/ds-components/AGENTS.md b/libs/@hashintel/ds-components/AGENTS.md index 5a353b8855e..ed1ccd83853 100644 --- a/libs/@hashintel/ds-components/AGENTS.md +++ b/libs/@hashintel/ds-components/AGENTS.md @@ -51,9 +51,7 @@ import { preset } from "./src/preset"; export default defineConfig({ importMap: "@hashintel/ds-helpers", outdir: "../ds-helpers/styled-system", - include: [ - "./src/components/**/*.{ts,tsx}", - ], + include: ["./src/components/**/*.{ts,tsx}"], jsxFramework: "react", outExtension: "mjs", preflight: false, @@ -75,7 +73,7 @@ Key points: With `strictTokens: true`, you must use the exact token names: -| Token Type | ❌ Invalid | ✅ Valid | +| Token Type | ❌ Invalid | ✅ Valid | | ---------------- | --------------------- | ------------------------------------------------ | | Spacing | `spacing.4`, `"4"` | `default.4`, `compact.4`, `comfortable.4` | | Radii | `radius.2`, `md` | `md.2`, `sm.3`, `lg.full`, `component.button.sm` | @@ -90,14 +88,14 @@ Token types for stories and public token access should come from `@hashintel/ds- Component implementation continues to use the generated styling runtime from `@hashintel/ds-helpers`: ```tsx -import { css, cva, cx } from '@hashintel/ds-helpers/css'; -import { Box, Flex, Stack } from '@hashintel/ds-helpers/jsx'; +import { css, cva, cx } from "@hashintel/ds-helpers/css"; +import { Box, Flex, Stack } from "@hashintel/ds-helpers/jsx"; ``` When you need token lookup helpers or token types, use: ```ts -import { token, type Token } from '@hashintel/ds-helpers/tokens'; +import { token, type Token } from "@hashintel/ds-helpers/tokens"; ``` ## Color Token Naming @@ -119,6 +117,7 @@ neutral.{white,black} Semantic tokens reference core colors: **Backgrounds (`bg.*`):** + ``` bg.accent.subtle.{default,hover,active} bg.accent.bold.{default,hover,pressed,active} @@ -130,6 +129,7 @@ bg.status.critical.strong.{default,hover,active} ``` **Text (`text.*`):** + ``` text.{primary,secondary,tertiary,disabled,inverted} text.{link,linkHover} @@ -137,12 +137,14 @@ text.status.{info,success,warning,critical} ``` **Borders (`border.*`):** + ``` border.neutral.{muted,subtle,default,emphasis,hover,active} border.status.{info,success,caution,warning,critical} ``` **Surfaces (`surface.*`):** + ``` surface.{default,subtle,muted,emphasis,alt,inverted} ``` @@ -167,7 +169,7 @@ When updating components, use this mapping: Components use `cva()` for variant-based styling: ```tsx -import { cva } from '@hashintel/ds-helpers/css'; +import { cva } from "@hashintel/ds-helpers/css"; const buttonRecipe = cva({ base: { @@ -206,15 +208,22 @@ const buttonRecipe = cva({ Components wrap Ark UI primitives with Panda styling: ```tsx -import { Checkbox as ArkCheckbox } from '@ark-ui/react/checkbox'; -import { css } from '@hashintel/ds-helpers/css'; +import { Checkbox as ArkCheckbox } from "@ark-ui/react/checkbox"; +import { css } from "@hashintel/ds-helpers/css"; export const Checkbox = (props) => ( - - - - {/* check icon */} - + + + {/* check icon */} {props.children} @@ -223,17 +232,17 @@ export const Checkbox = (props) => ( ## Scripts -| Script | Description | -| --- | --- | -| `yarn dev` | Start the primary Ladle-based demo loop | -| `yarn dev:lib` | Watch the publishable component library build | -| `yarn codegen` | Generate token source files and `../ds-helpers/styled-system` | -| `yarn build` | Build the component library entrypoints | -| `yarn build:ladle` | Build the Ladle demo surface | -| `yarn lint:eslint` | Lint the publishable package surface | -| `yarn lint:tsc` | TypeScript type checking | -| `yarn test:unit` | Run the Vitest unit suites without the Playwright snapshot harness | -| `yarn test:snapshots` | Build Ladle and run the Playwright snapshot suite | +| Script | Description | +| --------------------- | ------------------------------------------------------------------ | +| `yarn dev` | Start the primary Ladle-based demo loop | +| `yarn dev:lib` | Watch the publishable component library build | +| `yarn codegen` | Generate token source files and `../ds-helpers/styled-system` | +| `yarn build` | Build the component library entrypoints | +| `yarn build:ladle` | Build the Ladle demo surface | +| `yarn lint:eslint` | Lint the publishable package surface | +| `yarn lint:tsc` | TypeScript type checking | +| `yarn test:unit` | Run the Vitest unit suites without the Playwright snapshot harness | +| `yarn test:snapshots` | Build Ladle and run the Playwright snapshot suite | ## File Structure diff --git a/libs/@hashintel/ds-components/CONTRIBUTING.md b/libs/@hashintel/ds-components/CONTRIBUTING.md index e39a8090638..6f0b0edd733 100644 --- a/libs/@hashintel/ds-components/CONTRIBUTING.md +++ b/libs/@hashintel/ds-components/CONTRIBUTING.md @@ -15,17 +15,17 @@ For new internal work, treat `ds-components` as the only source of truth. ## Where To Change Things -| Area | Location | Notes | -| --- | --- | --- | -| Components | `src/components//.tsx` and `src/components/*/*.stories.tsx` | Public component entrypoints live at the top of `src/components/` and are built by `tsdown`. | -| Panda preset source | `src/preset.ts`, `src/preset/**` | This is the live preset consumed by `@hashintel/ds-components/preset`. | -| Package-owned token facade | `src/tokens.ts`, `src/preset/tokens.ts` | This is the public `@hashintel/ds-components/tokens` surface and its internal source of truth. | -| Token and color generators | `scripts/**` | Reads `scripts/figma-variables.json` and writes generated preset files under `src/preset/theme/**`. | -| Token demo stories | `src/tokens/**` | Token reference and migration/demo stories live here now. | -| Intro docs | `src/stories/Intro.mdx` | Shared intro documentation for the Ladle surface. | -| Local demo config | `panda.local.config.ts` | Shared Panda config for local demo surfaces such as Ladle. | -| Ladle harness | `.ladle/**` | Used for the token/demo surface and Playwright snapshots. | -| Snapshot tests | `tests/**` | Snapshot harness for the Ladle surface. | +| Area | Location | Notes | +| -------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| Components | `src/components//.tsx` and `src/components/*/*.stories.tsx` | Public component entrypoints live at the top of `src/components/` and are built by `tsdown`. | +| Panda preset source | `src/preset.ts`, `src/preset/**` | This is the live preset consumed by `@hashintel/ds-components/preset`. | +| Package-owned token facade | `src/tokens.ts`, `src/preset/tokens.ts` | This is the public `@hashintel/ds-components/tokens` surface and its internal source of truth. | +| Token and color generators | `scripts/**` | Reads `scripts/figma-variables.json` and writes generated preset files under `src/preset/theme/**`. | +| Token demo stories | `src/tokens/**` | Token reference and migration/demo stories live here now. | +| Intro docs | `src/stories/Intro.mdx` | Shared intro documentation for the Ladle surface. | +| Local demo config | `panda.local.config.ts` | Shared Panda config for local demo surfaces such as Ladle. | +| Ladle harness | `.ladle/**` | Used for the token/demo surface and Playwright snapshots. | +| Snapshot tests | `tests/**` | Snapshot harness for the Ladle surface. | ## Import Rules @@ -157,13 +157,13 @@ extraction. The package runs Panda with strict token validation. Use the live token names, not the pre-restructure aliases. -| Token Type | Avoid | Use Instead | -| --- | --- | --- | -| Spacing | `spacing.4`, `"4"` | `default.4`, `compact.4`, `comfortable.4` | -| Radii | `radius.2`, `md` | `md.2`, `sm.3`, `lg.full`, `component.button.sm` | -| Font sizes | `size.textsm` | `xs`, `sm`, `base`, `lg`, `xl`, `2xl` | -| Line heights | `leading.none.textsm` | `none.text-sm`, `normal.text-base` | -| Literal values | `64px` | `[64px]` | +| Token Type | Avoid | Use Instead | +| -------------- | --------------------- | ------------------------------------------------ | +| Spacing | `spacing.4`, `"4"` | `default.4`, `compact.4`, `comfortable.4` | +| Radii | `radius.2`, `md` | `md.2`, `sm.3`, `lg.full`, `component.button.sm` | +| Font sizes | `size.textsm` | `xs`, `sm`, `base`, `lg`, `xl`, `2xl` | +| Line heights | `leading.none.textsm` | `none.text-sm`, `normal.text-base` | +| Literal values | `64px` | `[64px]` | Color tokens should come from the semantic palette already defined in the preset, for example `bg.accent.bold.default`, `border.neutral.default`, and `text.primary`. diff --git a/libs/@hashintel/ds-components/_docs/research/park-ui-porting-guide.md b/libs/@hashintel/ds-components/_docs/research/park-ui-porting-guide.md index fdcbb6da29a..84edbda2043 100644 --- a/libs/@hashintel/ds-components/_docs/research/park-ui-porting-guide.md +++ b/libs/@hashintel/ds-components/_docs/research/park-ui-porting-guide.md @@ -13,10 +13,10 @@ This guide was originally written before the FE-612 ownership restructure. Apply ## Reference Repositories -| Repository | Local Path | Description | -|------------|------------|-------------| -| chakra-ui/ark | `~/Clones/chakra-ui/ark` | Headless component primitives | -| chakra-ui/panda | `~/Clones/chakra-ui/panda` | CSS-in-JS framework | +| Repository | Local Path | Description | +| ----------------- | ---------------------------- | --------------------------------- | +| chakra-ui/ark | `~/Clones/chakra-ui/ark` | Headless component primitives | +| chakra-ui/panda | `~/Clones/chakra-ui/panda` | CSS-in-JS framework | | chakra-ui/park-ui | `~/Clones/chakra-ui/park-ui` | Styled components (our reference) | ## Park UI Architecture @@ -40,23 +40,29 @@ park-ui/ Recipes use `defineSlotRecipe` with anatomy from Ark UI: ```ts -import { checkboxAnatomy } from '@ark-ui/react/anatomy' -import { defineSlotRecipe } from '@pandacss/dev' +import { checkboxAnatomy } from "@ark-ui/react/anatomy"; +import { defineSlotRecipe } from "@pandacss/dev"; export const checkbox = defineSlotRecipe({ slots: checkboxAnatomy.keys(), - className: 'checkbox', + className: "checkbox", base: { - root: { /* styles */ }, - control: { /* styles */ }, - label: { /* styles */ }, + root: { + /* styles */ + }, + control: { + /* styles */ + }, + label: { + /* styles */ + }, }, variants: { size: { sm: {}, md: {}, lg: {} }, variant: { solid: {}, subtle: {}, outline: {} }, }, - defaultVariants: { variant: 'solid', size: 'md' }, -}) + defaultVariants: { variant: "solid", size: "md" }, +}); ``` ### Component Pattern @@ -64,15 +70,15 @@ export const checkbox = defineSlotRecipe({ Components wrap Ark UI primitives with style context: ```tsx -import { Checkbox } from '@ark-ui/react/checkbox' -import { createStyleContext } from 'styled-system/jsx' -import { checkbox } from 'styled-system/recipes' +import { Checkbox } from "@ark-ui/react/checkbox"; +import { createStyleContext } from "styled-system/jsx"; +import { checkbox } from "styled-system/recipes"; -const { withProvider, withContext } = createStyleContext(checkbox) +const { withProvider, withContext } = createStyleContext(checkbox); -export const Root = withProvider(Checkbox.Root, 'root') -export const Control = withContext(Checkbox.Control, 'control') -export const Label = withContext(Checkbox.Label, 'label') +export const Root = withProvider(Checkbox.Root, "root"); +export const Control = withContext(Checkbox.Control, "control"); +export const Label = withContext(Checkbox.Label, "label"); ``` ### Testing Pattern @@ -90,13 +96,13 @@ Park UI uses **Story examples only** — no unit tests. Stories are organized as Park UI uses Radix colors with semantic meaning per step: -| Steps | Purpose | -|-------|---------| -| 1-2 | Backgrounds (app, subtle) | -| 3-5 | Interactive UI (default, hover, active) | -| 6-8 | Borders (subtle, default, emphasis) | -| 9-10 | Solid backgrounds (default, hover) | -| 11-12 | Text (low-contrast, high-contrast) | +| Steps | Purpose | +| ----- | --------------------------------------- | +| 1-2 | Backgrounds (app, subtle) | +| 3-5 | Interactive UI (default, hover, active) | +| 6-8 | Borders (subtle, default, emphasis) | +| 9-10 | Solid backgrounds (default, hover) | +| 11-12 | Text (low-contrast, high-contrast) | Plus alpha variants `a1-a12` for translucent overlays. @@ -104,20 +110,20 @@ Plus alpha variants `a1-a12` for translucent overlays. Established mapping from Radix neutral → HASH gray: -| Radix | HASH | Purpose | -|-------|------|---------| -| 1 | 10 | Lightest background | -| 2 | 10 | Subtle background | -| 3 | 20 | UI element background | -| 4 | 20 | Hovered UI element | -| 5 | 30 | Active/selected UI | -| 6 | 30 | Subtle borders | -| 7 | 40 | Border / focus ring | -| 8 | 40 | Solid border | -| 9 | 50 | Solid backgrounds | -| 10 | 50 | Hovered solid | -| 11 | 60 | Low-contrast text | -| 12 | 90 | High-contrast text | +| Radix | HASH | Purpose | +| ----- | ---- | --------------------- | +| 1 | 10 | Lightest background | +| 2 | 10 | Subtle background | +| 3 | 20 | UI element background | +| 4 | 20 | Hovered UI element | +| 5 | 30 | Active/selected UI | +| 6 | 30 | Subtle borders | +| 7 | 40 | Border / focus ring | +| 8 | 40 | Solid border | +| 9 | 50 | Solid backgrounds | +| 10 | 50 | Hovered solid | +| 11 | 60 | Low-contrast text | +| 12 | 90 | High-contrast text | Visual comparison story: `libs/@hashintel/ds-components/src/tokens/tokens.color-migration.story.tsx` @@ -126,15 +132,15 @@ Visual comparison story: `libs/@hashintel/ds-components/src/tokens/tokens.color- Since HASH doesn't have alpha variants, alpha references map to solid equivalents: | Radix Alpha | HASH Solid | -|-------------|------------| -| a1-a2 | 00 | -| a3-a4 | 10 | -| a5-a6 | 20 | -| a7 | 30 | -| a8 | 40 | -| a9-a10 | 50 | -| a11 | 60 | -| a12 | 90 | +| ----------- | ---------- | +| a1-a2 | 00 | +| a3-a4 | 10 | +| a5-a6 | 20 | +| a7 | 30 | +| a8 | 40 | +| a9-a10 | 50 | +| a11 | 60 | +| a12 | 90 | **Limitation**: Loses translucency effects for hover states and layered surfaces. @@ -216,9 +222,9 @@ error → red.9 ### 1. `colorPalette.*` (dynamic) ```ts -bg: 'colorPalette.solid.bg' -color: 'colorPalette.subtle.fg' -borderColor: 'colorPalette.surface.border.hover' +bg: "colorPalette.solid.bg"; +color: "colorPalette.subtle.fg"; +borderColor: "colorPalette.surface.border.hover"; ``` Resolves based on `colorPalette` prop (e.g., `colorPalette="blue"`). @@ -226,8 +232,8 @@ Resolves based on `colorPalette` prop (e.g., `colorPalette="blue"`). ### 2. `gray.*` semantic ```ts -bg: 'gray.surface.bg' -borderColor: 'gray.outline.border' +bg: "gray.surface.bg"; +borderColor: "gray.outline.border"; ``` References gray palette's semantic variants directly. @@ -243,9 +249,9 @@ Direct scale reference for edge cases. ### 4. Global aliases ```ts -color: 'fg.default' -bg: 'border' -bg: 'error' +color: "fg.default"; +bg: "border"; +bg: "error"; ``` --- @@ -280,10 +286,10 @@ Keep current HASH token structure, refactor each recipe: ```ts // Before (park-ui) -bg: 'colorPalette.solid.bg' +bg: "colorPalette.solid.bg"; // After (HASH) -bg: 'bg.accent.bold.default' +bg: "bg.accent.bold.default"; ``` **Pros**: Token structure stays aligned with Figma @@ -299,10 +305,10 @@ bg: 'bg.accent.bold.default' ## Files Created -| File | Purpose | -|------|---------| +| File | Purpose | +| --------------------------------------------------------------------------- | ---------------------------------------- | | `libs/@hashintel/ds-components/src/tokens/tokens.color-migration.story.tsx` | Visual comparison tool for scale mapping | -| `libs/@hashintel/ds-components/_ai/park-ui-porting-guide.md` | This document | +| `libs/@hashintel/ds-components/_ai/park-ui-porting-guide.md` | This document | ## Next Steps diff --git a/libs/@hashintel/ds-components/eslint.config.js b/libs/@hashintel/ds-components/eslint.config.js index ecd909c4f9e..47d2a7f08bf 100644 --- a/libs/@hashintel/ds-components/eslint.config.js +++ b/libs/@hashintel/ds-components/eslint.config.js @@ -1,8 +1,7 @@ +import { createBase, disableRules } from "@local/eslint/deprecated"; import typescriptEslint from "@typescript-eslint/eslint-plugin"; import reactHooks from "eslint-plugin-react-hooks"; -import { createBase, disableRules } from "@local/eslint/deprecated"; - const disableTypeCheckedRules = typescriptEslint.configs["disable-type-checked"]?.rules ?? {}; diff --git a/libs/@hashintel/ds-components/package.json b/libs/@hashintel/ds-components/package.json index 6a3f83ff702..6bcbeccd203 100644 --- a/libs/@hashintel/ds-components/package.json +++ b/libs/@hashintel/ds-components/package.json @@ -48,17 +48,17 @@ "build:buildinfo": "panda ship --config panda.config.ts --outfile dist/panda.buildinfo.json", "build:ladle": "ladle build", "build:lib": "tsup --config tsup.config.ts", - "codemod:beta-fractal-pilots": "tsx scripts/migrate-beta-fractal-pilots.ts", "codegen": "yarn run codegen:colors && yarn run codegen:tokens && yarn run codegen:panda", "codegen:colors": "tsx scripts/generate-colors-radix.ts", "codegen:panda": "panda codegen --clean", "codegen:tokens": "tsx scripts/generate-tokens.ts", + "codemod:beta-fractal-pilots": "tsx scripts/migrate-beta-fractal-pilots.ts", "dev": "yarn dev:ladle", "dev:ladle": "ladle serve", "dev:lib": "tsup --config tsup.config.ts --watch", "fix": "npm-run-all --continue-on-error \"fix:*\"", "fix:eslint": "eslint --cache --fix .", - "fix:format": "biome format --write", + "fix:format": "oxfmt --write", "lint": "npm-run-all --continue-on-error \"lint:*\"", "lint:eslint": "eslint --cache --report-unused-disable-directives .", "lint:tsc": "tsc --noEmit", diff --git a/libs/@hashintel/ds-components/scripts/generate-colors-radix.ts b/libs/@hashintel/ds-components/scripts/generate-colors-radix.ts index d21200003a8..f867078a2ff 100644 --- a/libs/@hashintel/ds-components/scripts/generate-colors-radix.ts +++ b/libs/@hashintel/ds-components/scripts/generate-colors-radix.ts @@ -10,8 +10,10 @@ import fs from "node:fs"; import { join } from "node:path"; -import Color from "colorjs.io"; + import * as radixColors from "@radix-ui/colors"; +import Color from "colorjs.io"; + import { withSemantics, type PaletteKind } from "../src/preset/tokens/utils"; const OUTPUT_DIR = "src/preset/tokens/gen/colors"; diff --git a/libs/@hashintel/ds-components/scripts/generate-tokens.ts b/libs/@hashintel/ds-components/scripts/generate-tokens.ts index dfb51eab5ea..be7f61d966f 100644 --- a/libs/@hashintel/ds-components/scripts/generate-tokens.ts +++ b/libs/@hashintel/ds-components/scripts/generate-tokens.ts @@ -1,7 +1,9 @@ import fs from "node:fs"; import { join } from "node:path"; + import { camelCase } from "case-anything"; import { z } from "zod"; + import figmaVariables from "./figma-variables.json" with { type: "json" }; import { formatTokensForOutput, diff --git a/libs/@hashintel/ds-components/scripts/migrate-beta-fractal-pilots.ts b/libs/@hashintel/ds-components/scripts/migrate-beta-fractal-pilots.ts index b0a58879664..1cb0be4bf3b 100644 --- a/libs/@hashintel/ds-components/scripts/migrate-beta-fractal-pilots.ts +++ b/libs/@hashintel/ds-components/scripts/migrate-beta-fractal-pilots.ts @@ -1,6 +1,7 @@ import fs from "node:fs/promises"; import path from "node:path"; import { pathToFileURL } from "node:url"; + import { camelCase, pascalCase } from "case-anything"; import * as ts from "typescript"; diff --git a/libs/@hashintel/ds-components/scripts/transforms.test.ts b/libs/@hashintel/ds-components/scripts/transforms.test.ts index e347d251d39..adb8fd3bc28 100644 --- a/libs/@hashintel/ds-components/scripts/transforms.test.ts +++ b/libs/@hashintel/ds-components/scripts/transforms.test.ts @@ -1,4 +1,5 @@ import { describe, expect, it } from "vitest"; + import { cleanDescription, shouldSkipKey, diff --git a/libs/@hashintel/ds-components/src/beta/button.tsx b/libs/@hashintel/ds-components/src/beta/button.tsx index 6bab675de85..0de13aae4fc 100644 --- a/libs/@hashintel/ds-components/src/beta/button.tsx +++ b/libs/@hashintel/ds-components/src/beta/button.tsx @@ -41,9 +41,7 @@ type BaseButtonProps = HTMLStyledProps<"button"> & NonNullable; export interface ButtonProps - extends BaseButtonProps, - ButtonCompositionProps, - ButtonLoadingProps {} + extends BaseButtonProps, ButtonCompositionProps, ButtonLoadingProps {} export const Button = forwardRef( (props, ref) => { diff --git a/libs/@hashintel/ds-components/src/beta/loader.tsx b/libs/@hashintel/ds-components/src/beta/loader.tsx index 4f7d7082701..a726189682a 100644 --- a/libs/@hashintel/ds-components/src/beta/loader.tsx +++ b/libs/@hashintel/ds-components/src/beta/loader.tsx @@ -32,10 +32,8 @@ export interface LoaderProps extends HTMLStyledProps<"span"> { export const Loader = forwardRef((props, ref) => { const { - spinner = ( - // @ts-expect-error - "inherit" is not a valid color token - - ), + // @ts-expect-error - "inherit" is not a valid color token + spinner = , spinnerPlacement = "start", children, text, diff --git a/libs/@hashintel/ds-components/src/beta/pagination.tsx b/libs/@hashintel/ds-components/src/beta/pagination.tsx index 51f8006841f..c1dc2f29f10 100644 --- a/libs/@hashintel/ds-components/src/beta/pagination.tsx +++ b/libs/@hashintel/ds-components/src/beta/pagination.tsx @@ -22,8 +22,7 @@ export const NextTrigger = withContext(Pagination.NextTrigger, "nextTrigger"); export { PaginationContext as Context } from "@ark-ui/react/pagination"; -export interface PaginationItemsProps - extends React.HTMLAttributes { +export interface PaginationItemsProps extends React.HTMLAttributes { render: (page: { type: "page"; value: number; diff --git a/libs/@hashintel/ds-components/src/beta/switch.tsx b/libs/@hashintel/ds-components/src/beta/switch.tsx index 776ff2ff35d..05022f5c532 100644 --- a/libs/@hashintel/ds-components/src/beta/switch.tsx +++ b/libs/@hashintel/ds-components/src/beta/switch.tsx @@ -43,8 +43,9 @@ export const Indicator = forwardRef( }, ); -interface ThumbIndicatorProps - extends ComponentProps { +interface ThumbIndicatorProps extends ComponentProps< + typeof StyledThumbIndicator +> { fallback?: React.ReactNode | undefined; } diff --git a/libs/@hashintel/ds-components/src/beta/tags-input.tsx b/libs/@hashintel/ds-components/src/beta/tags-input.tsx index 2c6a8694579..a6de630de53 100644 --- a/libs/@hashintel/ds-components/src/beta/tags-input.tsx +++ b/libs/@hashintel/ds-components/src/beta/tags-input.tsx @@ -40,8 +40,10 @@ export const Label = withContext(TagsInput.Label, "label"); export { TagsInputContext as Context } from "@ark-ui/react/tags-input"; -export interface TagsInputItemsProps - extends Omit {} +export interface TagsInputItemsProps extends Omit< + ItemProps, + "value" | "index" +> {} export const Items = (props: TagsInputItemsProps) => { const context = useTagsInputContext(); diff --git a/libs/@hashintel/ds-components/src/preset/stories/tokens.color-palettes.story.tsx b/libs/@hashintel/ds-components/src/preset/stories/tokens.color-palettes.story.tsx index 977094f009b..0fe709e7a95 100644 --- a/libs/@hashintel/ds-components/src/preset/stories/tokens.color-palettes.story.tsx +++ b/libs/@hashintel/ds-components/src/preset/stories/tokens.color-palettes.story.tsx @@ -159,7 +159,10 @@ const aliasStyles = css({ const ColorSwatch = ({ colorName, step, -}: { colorName: string; step: string }) => { +}: { + colorName: string; + step: string; +}) => { const tokenPath = `colors.${colorName}.${step}` as Token; const isAlpha = step.startsWith("a"); @@ -182,7 +185,10 @@ const ColorSwatch = ({ const ColorRow = ({ name, steps, -}: { name: string; steps: readonly string[] }) => { +}: { + name: string; + steps: readonly string[]; +}) => { const alias = STATUS_ALIASES[name]; return ( diff --git a/libs/@hashintel/ds-components/src/preset/stories/tokens.shadows.story.tsx b/libs/@hashintel/ds-components/src/preset/stories/tokens.shadows.story.tsx index f916d7bcf59..86fe1f25d8b 100644 --- a/libs/@hashintel/ds-components/src/preset/stories/tokens.shadows.story.tsx +++ b/libs/@hashintel/ds-components/src/preset/stories/tokens.shadows.story.tsx @@ -61,7 +61,10 @@ const sectionTitleStyles = css({ const ShadowSwatch = ({ name, tokenPath, -}: { name: string; tokenPath: string }) => { +}: { + name: string; + tokenPath: string; +}) => { const shadowValue = token(`shadows.${tokenPath}` as Token); return ( @@ -84,7 +87,10 @@ const ShadowSwatch = ({ const InsetSwatch = ({ name, tokenPath, -}: { name: string; tokenPath: string }) => { +}: { + name: string; + tokenPath: string; +}) => { const shadowValue = token(`shadows.${tokenPath}` as Token); return ( diff --git a/libs/@hashintel/ds-components/src/preset/stories/tokens.typography.story.tsx b/libs/@hashintel/ds-components/src/preset/stories/tokens.typography.story.tsx index b6925c07b46..4494899e054 100644 --- a/libs/@hashintel/ds-components/src/preset/stories/tokens.typography.story.tsx +++ b/libs/@hashintel/ds-components/src/preset/stories/tokens.typography.story.tsx @@ -107,7 +107,10 @@ const LeadingComparisonRow = ({ style }: { style: TextStyleName }) => ( const FontFamilyDemo = ({ name, tokenPath, -}: { name: string; tokenPath: Token }) => ( +}: { + name: string; + tokenPath: Token; +}) => ( {name} { - return - {tokens.map(({ x, y }, i) => ( - - ))} - + return ( + + {tokens.map(({ x, y }, i) => ( + + ))} + + ); }); ``` @@ -117,10 +119,12 @@ Use `.map(fn)` to transform a sampled value: ```ts const angle = Distribution.Uniform(0, 2 * Math.PI); return { - Space: [{ - x: angle.map(a => Math.cos(a) * 80), - y: angle.map(a => Math.sin(a) * 80), - }], + Space: [ + { + x: angle.map((a) => Math.cos(a) * 80), + y: angle.map((a) => Math.sin(a) * 80), + }, + ], }; ``` diff --git a/libs/@hashintel/petrinaut/docs/useful-patterns.md b/libs/@hashintel/petrinaut/docs/useful-patterns.md index a21a8d8713c..cf0f9b5d663 100644 --- a/libs/@hashintel/petrinaut/docs/useful-patterns.md +++ b/libs/@hashintel/petrinaut/docs/useful-patterns.md @@ -24,10 +24,12 @@ For other distributions (e.g. log-normal, deterministic), place dynamics and dur ```ts export default TransitionKernel((tokensByPlace, parameters) => { return { - InProgress: [{ - remaining_time: Distribution.Lognormal(2.0, 0.5), - // ... other dimensions - }], + InProgress: [ + { + remaining_time: Distribution.Lognormal(2.0, 0.5), + // ... other dimensions + }, + ], }; }); ``` diff --git a/libs/@hashintel/petrinaut/docs/visual-settings.md b/libs/@hashintel/petrinaut/docs/visual-settings.md index 38f7875d07f..a3f370aa67b 100644 --- a/libs/@hashintel/petrinaut/docs/visual-settings.md +++ b/libs/@hashintel/petrinaut/docs/visual-settings.md @@ -44,8 +44,8 @@ Replaces the tabbed left sidebar with a unified **tree view** showing all entiti Choose how arcs are drawn between nodes: -| Style | Description | -| ------------------- | -------------------------------------------------------------| -| **Square** | Right-angle paths (smoothstep routing). | -| **Bezier** | Smooth curved paths. | -| **Adaptive Bezier** | Curved paths that adjust based on node positions. (Default) | +| Style | Description | +| ------------------- | ----------------------------------------------------------- | +| **Square** | Right-angle paths (smoothstep routing). | +| **Bezier** | Smooth curved paths. | +| **Adaptive Bezier** | Curved paths that adjust based on node positions. (Default) | diff --git a/libs/@hashintel/petrinaut/package.json b/libs/@hashintel/petrinaut/package.json index 4c4f7c548a3..9668f70128e 100644 --- a/libs/@hashintel/petrinaut/package.json +++ b/libs/@hashintel/petrinaut/package.json @@ -48,9 +48,9 @@ "scripts": { "build": "vite build", "dev": "storybook dev", - "lint:tsc": "tsgo --noEmit", - "lint:eslint": "oxlint --type-aware --report-unused-disable-directives-severity=error .", "fix:eslint": "oxlint --fix --type-aware --report-unused-disable-directives-severity=error .", + "lint:eslint": "oxlint --type-aware --report-unused-disable-directives-severity=error .", + "lint:tsc": "tsgo --noEmit", "prepublishOnly": "turbo run build", "test:unit": "vitest" }, diff --git a/libs/@hashintel/petrinaut/panda.config.shared.ts b/libs/@hashintel/petrinaut/panda.config.shared.ts index 7384aed1396..546cb984e6c 100644 --- a/libs/@hashintel/petrinaut/panda.config.shared.ts +++ b/libs/@hashintel/petrinaut/panda.config.shared.ts @@ -1,7 +1,7 @@ import { createRequire } from "node:module"; -import { defineConfig } from "@pandacss/dev"; import { scopedThemeConfig } from "@hashintel/ds-components/preset"; +import { defineConfig } from "@pandacss/dev"; import { CODE_FONT_FAMILY } from "./src/ui/constants/ui"; diff --git a/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/01-motivation.md b/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/01-motivation.md index 05581b87714..afe172b0975 100644 --- a/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/01-motivation.md +++ b/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/01-motivation.md @@ -8,7 +8,7 @@ Restructure `@hashintel/petrinaut` into three import paths so that: - **`@hashintel/petrinaut/react`** carries the React-specific glue (hooks, contexts, bridge providers) that turns a Core instance into something React components can subscribe to. No visual widgets — anyone wanting to build a different UI on top of Core uses this layer. - **`@hashintel/petrinaut/ui`** is the opinionated, polished editor we ship today. Most consumers continue to use just `` and never see `/core` or `/react`. -The split should make the boundary between *what the system does* (core) and *how it is rendered* (ui) explicit, with `/react` as the bridge. +The split should make the boundary between _what the system does_ (core) and _how it is rendered_ (ui) explicit, with `/react` as the bridge. ## Non-goals diff --git a/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/03-layering.md b/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/03-layering.md index f7296d59e60..3a125103475 100644 --- a/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/03-layering.md +++ b/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/03-layering.md @@ -9,7 +9,7 @@ - **File format** — `file-format/import-sdcpn.ts`, `file-format/types.ts`. Pure deserialization. Browser-download trigger lives in `/ui` (it touches the DOM). - **Clipboard (logic)** — `clipboard/serialize.ts`, `clipboard/paste.ts`. Pure marshaling. `navigator.clipboard` wrapper stays in `/ui`. - **Examples** — `examples/*`. Static SDCPN data; useful for tests and demos in any layer. -- **Selection types** — `state/selection.ts`. Pure data; the *concept* of a selection map. (Whether the selection itself is owned by core or by the UI is an open question — see [07-open-questions.md](./07-open-questions.md).) +- **Selection types** — `state/selection.ts`. Pure data; the _concept_ of a selection map. (Whether the selection itself is owned by core or by the UI is an open question — see [07-open-questions.md](./07-open-questions.md).) - **Layout** — `lib/layout/*` (elkjs auto-layout, if pure). Verify no DOM deps. - **Deep-equal** — `lib/deep-equal.ts`. Pure. - **The Core instance** — new: `core/instance.ts`. Top-level factory `createPetrinaut(...)` returning a stateful object with input/output streams. See [04-core-instance.md](./04-core-instance.md). @@ -30,9 +30,9 @@ The `/react` layer is everything you'd need to build a different UI on top of Co - **Top-level component** — `petrinaut.tsx` rebuilt as a thin wrapper. Creates a Core instance, mounts the `/react` providers, then renders `EditorView`. - **Editor view + components** — `views/`, `components/`. All visual UI. - **Monaco integration** — `monaco/*`. Loads + configures the editor; subscribes to LSP via `/react` hooks. -- **Notifications UI** — `notifications/*` (rendering side). Toast components. The *event stream* lives in core; the *toast UI* lives here. +- **Notifications UI** — `notifications/*` (rendering side). Toast components. The _event stream_ lives in core; the _toast UI_ lives here. - **Resize / portal helpers** — `resize/`, `state/portal-container-context.tsx`. UI infra. -- **File-format download** — `file-format/export-sdcpn.ts` (DOM bits only). The *serialization* moves to core; the *trigger-a-browser-download* part stays here. +- **File-format download** — `file-format/export-sdcpn.ts` (DOM bits only). The _serialization_ moves to core; the _trigger-a-browser-download_ part stays here. - **Clipboard browser wrapper** — `clipboard/clipboard.ts` (`navigator.clipboard` calls). Pure marshaling moves to core; the browser API call stays here. ## 3.4 Ambiguous items (pending decisions in [07-open-questions.md](./07-open-questions.md)) @@ -40,4 +40,4 @@ The `/react` layer is everything you'd need to build a different UI on top of Co - **Editor state** (selection, current mode, panel layout, user settings): leaning toward **react-only**, because nothing in core needs to know which node is highlighted. But if a non-React consumer wants "what is the user pointing at" semantics, we may want a thin selection slice in core. - **Undo/redo:** today it's a pass-through interface — host implements it. Should core own a default in-memory history (with the host able to replace it), or stay pass-through? Probably pass-through stays. - **LSP**: the worker logic is pure and headless; the React provider is just glue. The worker itself fits in core, but Monaco's binding to it stays in `/ui` (via `/react` hooks). The diagnostics stream is a clean core output. -- **Notifications**: today these are toasts. Notifications are *outputs*; core should emit them as events, and `/ui` can render them as toasts. +- **Notifications**: today these are toasts. Notifications are _outputs_; core should emit them as events, and `/ui` can render them as toasts. diff --git a/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/04-core-instance.md b/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/04-core-instance.md index 6ee81cedc1c..a6e51d08359 100644 --- a/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/04-core-instance.md +++ b/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/04-core-instance.md @@ -16,8 +16,8 @@ import { createPetrinaut } from "@hashintel/petrinaut/core"; import type { PetrinautDocHandle } from "@hashintel/petrinaut/core"; const instance = createPetrinaut({ - document: handle, // PetrinautDocHandle - readonly: false, // optional, defaults to false + document: handle, // PetrinautDocHandle + readonly: false, // optional, defaults to false }); ``` @@ -135,11 +135,11 @@ Most editors do both. Locking the API is a Phase 3 concern; for now the limit is ### Why a handle, not a document or repo -| Level | Why not | -| ----- | ------- | -| **Document** (raw value + 3 callbacks — today's prop shape) | Three loose primitives, no unifying type, no lifecycle (loading / ready / deleted). | -| **Repo** (multi-document, load-by-id, storage / network adapters) | Persistence and sync are host concerns. Core handles one document at a time. | -| **Handle** ✓ | Right scope. One document, observable lifecycle, mutate + subscribe in one type. Matches Automerge `DocHandle` so collaboration plugs in cleanly. | +| Level | Why not | +| ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Document** (raw value + 3 callbacks — today's prop shape) | Three loose primitives, no unifying type, no lifecycle (loading / ready / deleted). | +| **Repo** (multi-document, load-by-id, storage / network adapters) | Persistence and sync are host concerns. Core handles one document at a time. | +| **Handle** ✓ | Right scope. One document, observable lifecycle, mutate + subscribe in one type. Matches Automerge `DocHandle` so collaboration plugs in cleanly. | ### Adapters @@ -165,9 +165,9 @@ For **Automerge**, no adapter is shipped (would require `@automerge/automerge-re Conversion lives **at the handle adapter boundary, inbound only.** Core itself never converts; it only consumes `PetrinautPatch[]`. -| Adapter | Direction | Where it lives | What it does | -| ------- | --------- | -------------- | ------------ | -| `createJsonDocHandle` | Immer → `PetrinautPatch` | `/core` (shipped) | Near-identity. Immer's `produceWithPatches` already emits `{ op, path, value }`; the adapter passes them through (or coerces the type). | +| Adapter | Direction | Where it lives | What it does | +| --------------------- | ---------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `createJsonDocHandle` | Immer → `PetrinautPatch` | `/core` (shipped) | Near-identity. Immer's `produceWithPatches` already emits `{ op, path, value }`; the adapter passes them through (or coerces the type). | | `fromAutomergeHandle` | Automerge → `PetrinautPatch` | Consumer code (documented snippet) | Switch on `action`: `put` → `replace`, `del` → `remove`, `splice`/`insert` → fan out into per-element `add`. Drops `inc`/`mark`/`unmark` (not used by SDCPN). | There is **no outbound direction in Core**. Core never needs to turn a `PetrinautPatch` back into an Immer or Automerge patch — the handle is the only thing that applies mutations, and it does so via `change(fn)`, not via patches. If a downstream consumer ever wants to re-apply patches against a separate Immer or Automerge doc (e.g. mirror the document somewhere else), that conversion is their problem and lives in their code. @@ -231,12 +231,12 @@ type EventStream = { ### Alternatives considered -| Option | Why rejected | -| ------ | ------------ | -| Standard `Observable` (TC39 / zen-observable) | Adds a base class for little gain; `error`/`complete` channels rarely apply to state slices. | -| RxJS | Heavy for `/core`; conflicts with consumers' own RxJS versions. | -| `AsyncIterable` | No native "current value" semantics; awkward to multicast. | -| Signals (`@preact/signals-core`) | Push-pull model; less idiomatic outside React-likes. | +| Option | Why rejected | +| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| Standard `Observable` (TC39 / zen-observable) | Adds a base class for little gain; `error`/`complete` channels rarely apply to state slices. | +| RxJS | Heavy for `/core`; conflicts with consumers' own RxJS versions. | +| `AsyncIterable` | No native "current value" semantics; awkward to multicast. | +| Signals (`@preact/signals-core`) | Push-pull model; less idiomatic outside React-likes. | | Listener-as-ping (React `useSyncExternalStore` shape) | Slightly cheaper for React, but worse ergonomics for non-React consumers who'd then have to chase a `get()` after every notification. | ## 4.3 The surface @@ -244,12 +244,12 @@ type EventStream = { ```ts type Petrinaut = { // --- Document (derived from the handle) --- - readonly handle: PetrinautDocHandle; // the handle Core was constructed with - readonly definition: ReadableStore; // current snapshot store, sourced from `handle` + readonly handle: PetrinautDocHandle; // the handle Core was constructed with + readonly definition: ReadableStore; // current snapshot store, sourced from `handle` readonly patches: EventStream; // only fires for handles that produce them // --- Mutation --- - mutate(fn: (draft: SDCPN) => void): void; // delegates to handle.change; no-op if readonly + mutate(fn: (draft: SDCPN) => void): void; // delegates to handle.change; no-op if readonly // --- Config echo --- readonly readonly: boolean; @@ -283,13 +283,16 @@ The host produces a `PetrinautDocHandle` and passes it to Core. The four shapes: ### A. Plain JSON (in-memory, headless or React) ```ts -import { createPetrinaut, createJsonDocHandle } from "@hashintel/petrinaut/core"; +import { + createPetrinaut, + createJsonDocHandle, +} from "@hashintel/petrinaut/core"; const handle = createJsonDocHandle({ id: "net-1", initial: emptyNet() }); const instance = createPetrinaut({ document: handle }); instance.mutate((draft) => { - draft.places.push({ id: "p1", /* … */ }); + draft.places.push({ id: "p1" /* … */ }); }); ``` @@ -301,7 +304,9 @@ instance.mutate((draft) => { import { createPetrinaut } from "@hashintel/petrinaut/core"; import { Repo } from "@automerge/automerge-repo"; -const repo = new Repo({ /* storage, network, … */ }); +const repo = new Repo({ + /* storage, network, … */ +}); const automergeHandle = repo.find("automerge:abc123"); const handle = fromAutomergeHandle(automergeHandle); // 5-line adapter, see docs diff --git a/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/05-simulation.md b/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/05-simulation.md index f75436ae158..9773281021d 100644 --- a/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/05-simulation.md +++ b/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/05-simulation.md @@ -12,7 +12,7 @@ So the entry point is a top-level function, **not** a method on the instance: import { createSimulation } from "@hashintel/petrinaut/core"; const sim = await createSimulation({ - sdcpn: someSDCPN, // frozen snapshot + sdcpn: someSDCPN, // frozen snapshot initialMarking: new Map(), parameterValues: {}, seed: 42, @@ -56,14 +56,14 @@ When you pass a `transport`, ownership transfers to the simulation — `simulati ### Transport matrix -| Environment | Off-thread? | Recommended path | Status | -| ----------- | :---------: | ---------------- | :----: | -| Browser, fast | ✅ | `createWorkerTransport(() => new Worker(...))` | 🟢 | -| Browser, simple / tests | ❌ | `createInlineTransport()` | 🟡 | -| Node `worker_threads` | ✅ | Custom `SimulationTransport` (see snippet below) — *or* `web-worker` polyfill + `createWorkerTransport` | 🟢 (DIY) | -| Node, simple / tests | ❌ | `createInlineTransport()` | 🟡 | -| Bun / Deno workers | ✅ | Custom `SimulationTransport`, or use the runtime's built-in browser-`Worker`-shim with `createWorkerTransport` | 🟢 (DIY) | -| Edge / process pools / IPC | ✅ | Custom `SimulationTransport` over whatever message-passing primitive you have | 🟢 (DIY) | +| Environment | Off-thread? | Recommended path | Status | +| -------------------------- | :---------: | -------------------------------------------------------------------------------------------------------------- | :------: | +| Browser, fast | ✅ | `createWorkerTransport(() => new Worker(...))` | 🟢 | +| Browser, simple / tests | ❌ | `createInlineTransport()` | 🟡 | +| Node `worker_threads` | ✅ | Custom `SimulationTransport` (see snippet below) — _or_ `web-worker` polyfill + `createWorkerTransport` | 🟢 (DIY) | +| Node, simple / tests | ❌ | `createInlineTransport()` | 🟡 | +| Bun / Deno workers | ✅ | Custom `SimulationTransport`, or use the runtime's built-in browser-`Worker`-shim with `createWorkerTransport` | 🟢 (DIY) | +| Edge / process pools / IPC | ✅ | Custom `SimulationTransport` over whatever message-passing primitive you have | 🟢 (DIY) | `/core` ships only `createWorkerTransport` (browser-shaped) and the planned `createInlineTransport`. Other environments are DIY because the message-passing API differs between runtimes (browser `addEventListener` vs Node `EventEmitter`, etc.) and importing `node:worker_threads` from `/core` would compromise the browser bundle. Writing a transport is ~10 lines. @@ -95,7 +95,9 @@ export function createNodeWorkerTransport( // usage const sim = await createSimulation({ - transport: createNodeWorkerTransport(new URL("./sim.worker.mjs", import.meta.url)), + transport: createNodeWorkerTransport( + new URL("./sim.worker.mjs", import.meta.url), + ), sdcpn: net, initialMarking: new Map(), parameterValues: {}, @@ -144,7 +146,11 @@ type Simulation = { // outputs (subscribe-and-read) status: ReadableStore; frames: ReadableStore<{ count: number; latest: SimulationFrame | null }>; - events: EventStream<{ type: "complete" | "error"; reason?: string; itemId?: string | null }>; + events: EventStream<{ + type: "complete" | "error"; + reason?: string; + itemId?: string | null; + }>; // inputs (imperative) run(): void; diff --git a/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/06-react-bindings.md b/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/06-react-bindings.md index e7d78623986..53484f40314 100644 --- a/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/06-react-bindings.md +++ b/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/06-react-bindings.md @@ -6,7 +6,10 @@ The `/react` layer exposes a `` that takes a Core instance an ```tsx // @hashintel/petrinaut/react -export const PetrinautProvider: FC<{ instance: Petrinaut; children: ReactNode }> = ({ instance, children }) => ( +export const PetrinautProvider: FC<{ + instance: Petrinaut; + children: ReactNode; +}> = ({ instance, children }) => ( @@ -210,7 +213,10 @@ export type PetrinautProps = { }; export const Petrinaut: FC = (props) => { - const instance = useMemo(() => createPetrinaut({ document: props.handle, readonly: props.readonly }), [props.handle, props.readonly]); + const instance = useMemo( + () => createPetrinaut({ document: props.handle, readonly: props.readonly }), + [props.handle, props.readonly], + ); useEffect(() => () => instance.dispose(), [instance]); return ( @@ -227,7 +233,7 @@ export const Petrinaut: FC = (props) => { }; ``` -The existing context API to child components stays roughly the same — only the *source* of context values changes (from local React state to the Core instance). That keeps the diff inside `views/` and `components/` close to zero. +The existing context API to child components stays roughly the same — only the _source_ of context values changes (from local React state to the Core instance). That keeps the diff inside `views/` and `components/` close to zero. ### 6.4.1 Host-controlled workers (locked) diff --git a/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/08-migration.md b/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/08-migration.md index da5dbb9a5f0..62e6a883b8e 100644 --- a/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/08-migration.md +++ b/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/08-migration.md @@ -83,18 +83,18 @@ Public exports added in `main.ts`: `createSimulation`, `createWorkerTransport`, The visual editor and its supporting subsystems moved from flat `src/` into `src/ui/`: -| From | To | Files | -| ---- | -- | ----- | -| `src/monaco/` | `src/ui/monaco/` | 9 | -| `src/views/` | `src/ui/views/` | 88 | -| `src/components/` | `src/ui/components/` | 30 | -| `src/resize/` | `src/ui/resize/` | 1 | -| `src/constants/` | `src/ui/constants/` | 4 | -| `src/petrinaut.tsx` | `src/ui/petrinaut.tsx` | 1 | -| `src/petrinaut.stories.tsx` | `src/ui/petrinaut.stories.tsx` | 1 | -| `src/petrinaut-story-provider.tsx` | `src/ui/petrinaut-story-provider.tsx` | 1 | -| `src/index.css` | `src/ui/index.css` | 1 | -| `src/fontsource.d.ts` | `src/ui/fontsource.d.ts` | 1 | +| From | To | Files | +| ---------------------------------- | ------------------------------------- | ----- | +| `src/monaco/` | `src/ui/monaco/` | 9 | +| `src/views/` | `src/ui/views/` | 88 | +| `src/components/` | `src/ui/components/` | 30 | +| `src/resize/` | `src/ui/resize/` | 1 | +| `src/constants/` | `src/ui/constants/` | 4 | +| `src/petrinaut.tsx` | `src/ui/petrinaut.tsx` | 1 | +| `src/petrinaut.stories.tsx` | `src/ui/petrinaut.stories.tsx` | 1 | +| `src/petrinaut-story-provider.tsx` | `src/ui/petrinaut-story-provider.tsx` | 1 | +| `src/index.css` | `src/ui/index.css` | 1 | +| `src/fontsource.d.ts` | `src/ui/fontsource.d.ts` | 1 | All 137 files moved via `git mv` (history preserved). @@ -107,7 +107,7 @@ All 137 files moved via `git mv` (history preserved). **Verified**: yarn lint:tsc + yarn lint:eslint clean; yarn build succeeds; 485 unit tests pass. -**Layer rule status**: spot-checked that `/ui` files don't import `/core` *values* directly. They do import `/core` *types* (e.g. `SDCPN`, `PetrinautDocHandle`, `Diagnostic`), which is fine — type-only imports don't create runtime dependencies. The "no `/ui` → `/core` value imports" rule is honored. A formal audit (e.g. an eslint plugin enforcing layer direction) is a future cleanup, not blocking. +**Layer rule status**: spot-checked that `/ui` files don't import `/core` _values_ directly. They do import `/core` _types_ (e.g. `SDCPN`, `PetrinautDocHandle`, `Diagnostic`), which is fine — type-only imports don't create runtime dependencies. The "no `/ui` → `/core` value imports" rule is honored. A formal audit (e.g. an eslint plugin enforcing layer direction) is a future cleanup, not blocking. **Pending Phase 1 moves** (no forcing function — done as a single tidiness commit later if desired): diff --git a/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/10-public-api.md b/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/10-public-api.md index abc2cb961ac..216bf68fc6a 100644 --- a/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/10-public-api.md +++ b/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/10-public-api.md @@ -4,18 +4,32 @@ ```ts // Headless engine — live document -import { createPetrinaut, createJsonDocHandle } from "@hashintel/petrinaut/core"; +import { + createPetrinaut, + createJsonDocHandle, +} from "@hashintel/petrinaut/core"; import type { - SDCPN, Place, Transition, - PetrinautDocHandle, PetrinautPatch, DocChangeEvent, DocumentId, + SDCPN, + Place, + Transition, + PetrinautDocHandle, + PetrinautPatch, + DocChangeEvent, + DocumentId, /* … */ } from "@hashintel/petrinaut/core"; // Headless engine — simulation (standalone; not tied to an instance) -import { createSimulation, createWorkerTransport } from "@hashintel/petrinaut/core"; +import { + createSimulation, + createWorkerTransport, +} from "@hashintel/petrinaut/core"; import type { - Simulation, CreateSimulationConfig, SimulationConfig, - SimulationTransport, WorkerFactory, + Simulation, + CreateSimulationConfig, + SimulationConfig, + SimulationTransport, + WorkerFactory, /* … */ } from "@hashintel/petrinaut/core"; diff --git a/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/11-headless-usage.md b/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/11-headless-usage.md index 0333cc89853..86ad01ad9f0 100644 --- a/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/11-headless-usage.md +++ b/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/11-headless-usage.md @@ -23,7 +23,7 @@ const instance = createPetrinaut({ document: handle }); // mutate instance.mutate((draft) => { - draft.places.push({ id: "p1", name: "Place 1", /* … */ }); + draft.places.push({ id: "p1", name: "Place 1" /* … */ }); }); // observe @@ -72,9 +72,9 @@ function createPetrinaut(config: { import { createJsonDocHandle } from "@hashintel/petrinaut/core"; const handle = createJsonDocHandle({ - id: "my-net", // optional; auto-generated if omitted - initial: someSDCPN, // required initial document - historyLimit: 50, // optional, default 50; pass 0 to disable history + id: "my-net", // optional; auto-generated if omitted + initial: someSDCPN, // required initial document + historyLimit: 50, // optional, default 50; pass 0 to disable history }); ``` @@ -181,12 +181,12 @@ Things to consider when writing your own handle: ```ts const h = createJsonDocHandle({ initial }); -h.change(addPlace); // history entry 1 -h.change(addTransition); // history entry 2 +h.change(addPlace); // history entry 1 +h.change(addTransition); // history entry 2 -h.history?.undo(); // back to state after entry 1 -h.history?.canRedo.get(); // → true -h.history?.redo(); // forward again +h.history?.undo(); // back to state after entry 1 +h.history?.canRedo.get(); // → true +h.history?.redo(); // forward again // Subscribe to canUndo/canRedo for UI gating without a render framework: const offCanUndo = h.history?.canUndo.subscribe((can) => { @@ -194,7 +194,7 @@ const offCanUndo = h.history?.canUndo.subscribe((can) => { }); // Jump arbitrarily (used by version-history dropdowns): -h.history?.goToIndex(0); // back to initial state +h.history?.goToIndex(0); // back to initial state ``` Each `undo` / `redo` / `goToIndex` emits a normal `DocChangeEvent` with the patches applied (so simulation, validators, etc. react the same way as for fresh mutations). @@ -212,12 +212,12 @@ Two ways, equivalent except for the readonly check: ```ts // Through the instance — respects `readonly: true` instance.mutate((draft) => { - draft.transitions.push({ id: "t1", /* … */ }); + draft.transitions.push({ id: "t1" /* … */ }); }); // Directly through the handle — bypasses the instance's readonly flag handle.change((draft) => { - draft.transitions.push({ id: "t1", /* … */ }); + draft.transitions.push({ id: "t1" /* … */ }); }); ``` @@ -239,14 +239,14 @@ A simulation is **standalone** — it doesn't live on a `Petrinaut` instance. It import { createSimulation } from "@hashintel/petrinaut/core"; const sim = await createSimulation({ - sdcpn: someSDCPN, // any SDCPN value; from a handle, file, fixture, … - initialMarking: new Map(), // empty = all places start with zero tokens + sdcpn: someSDCPN, // any SDCPN value; from a handle, file, fixture, … + initialMarking: new Map(), // empty = all places start with zero tokens parameterValues: {}, seed: 42, dt: 0.01, maxTime: 10, backpressure: { maxFramesAhead: 40, batchSize: 10 }, - signal: abortController.signal, // optional cancellation + signal: abortController.signal, // optional cancellation createWorker: () => new Worker( // Today: use the bundled worker URL via your bundler's resolution. @@ -385,7 +385,9 @@ Alternative path: the [`web-worker`](https://www.npmjs.com/package/web-worker) p import Worker from "web-worker"; const sim = await createSimulation({ createWorker: () => - new Worker(new URL("./sim.worker.mjs", import.meta.url), { type: "module" }), + new Worker(new URL("./sim.worker.mjs", import.meta.url), { + type: "module", + }), /* … */ }); ``` @@ -485,7 +487,7 @@ process.on("beforeExit", off); ```ts const instance = createPetrinaut({ document: handle }); -const sim = await createSimulation({ sdcpn: handle.doc()!, /* … */ }); +const sim = await createSimulation({ sdcpn: handle.doc()! /* … */ }); // Tear down the simulation: sim.dispose(); @@ -494,7 +496,7 @@ sim.dispose(); instance.dispose(); ``` -The instance and the simulation are **independent lifecycles**. Disposing the instance does *not* dispose any simulations you spawned — they're standalone (§5.1). Disposing the simulation does not affect the instance. The host owns both. +The instance and the simulation are **independent lifecycles**. Disposing the instance does _not_ dispose any simulations you spawned — they're standalone (§5.1). Disposing the simulation does not affect the instance. The host owns both. Disposal is **idempotent** — safe to call twice. The handle itself is owned by the host; Core does not call any teardown on it (e.g. it doesn't close localStorage adapters or detach Automerge listeners). @@ -538,7 +540,10 @@ await new Promise((resolve, reject) => { // Trigger LSP to lint every URI in the SDCPN for (const t of sdcpn.transitions) { - instance.lsp.notifyDocumentChanged(`net://transition/${t.id}/guard`, t.guard ?? ""); + instance.lsp.notifyDocumentChanged( + `net://transition/${t.id}/guard`, + t.guard ?? "", + ); } }); @@ -552,15 +557,15 @@ This script is the canonical motivator for the headless surface — every part o ## 11.9 Status summary -| Capability | Status | -| ---------- | :----: | -| `createJsonDocHandle` (with history) | 🟢 | -| `createPetrinaut` (document + readonly) | 🟢 | -| `instance.mutate` / `instance.definition` / `instance.patches` | 🟢 | -| `createSimulation` (standalone, with `createWorker` or `transport`) | 🟢 | -| `createWorkerTransport` (build a transport for explicit reuse) | 🟢 | -| Automerge handle adapter | 🟡 (pasted snippet, not shipped) | -| `createInlineTransport` / `createRecordedTransport` | 🟡 | -| `instance.lsp.*` (headless type-checking) | 🟡 | -| `instance.playback.*` (frame loop in Core) | 🟡 | -| `./core/simulation.worker` `package.json` sub-entry | 🟡 (Phase 5) | +| Capability | Status | +| ------------------------------------------------------------------- | :------------------------------: | +| `createJsonDocHandle` (with history) | 🟢 | +| `createPetrinaut` (document + readonly) | 🟢 | +| `instance.mutate` / `instance.definition` / `instance.patches` | 🟢 | +| `createSimulation` (standalone, with `createWorker` or `transport`) | 🟢 | +| `createWorkerTransport` (build a transport for explicit reuse) | 🟢 | +| Automerge handle adapter | 🟡 (pasted snippet, not shipped) | +| `createInlineTransport` / `createRecordedTransport` | 🟡 | +| `instance.lsp.*` (headless type-checking) | 🟡 | +| `instance.playback.*` (frame loop in Core) | 🟡 | +| `./core/simulation.worker` `package.json` sub-entry | 🟡 (Phase 5) | diff --git a/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/README.md b/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/README.md index 04c1b79ba5a..7fc1e881396 100644 --- a/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/README.md +++ b/libs/@hashintel/petrinaut/rfc/0001-core-react-ui-split/README.md @@ -23,23 +23,23 @@ Layer dependency direction: **`ui` → `react` → `core`**, never the reverse, - Enable non-React consumers (CLI tools, headless automation, server-side simulation). - Let advanced consumers build alternative UIs against `/react` without forking the editor. - Keep the polished editor available out of the box via `/ui`. -- Make the boundary between *what the system does* and *how it is rendered* explicit. +- Make the boundary between _what the system does_ and _how it is rendered_ explicit. ## Reading order -| # | File | Purpose | -| - | ---- | ------- | -| 01 | [01-motivation.md](./01-motivation.md) | Goals + non-goals | -| 02 | [02-current-state.md](./02-current-state.md) | The provider stack today and the SDCPN ownership model | -| 03 | [03-layering.md](./03-layering.md) | What goes in `core` / `react` / `ui` | -| 04 | [04-core-instance.md](./04-core-instance.md) | `createPetrinaut()` surface, streams, instantiation | -| 05 | [05-simulation.md](./05-simulation.md) | Simulation patterns (locked) | -| 06 | [06-react-bindings.md](./06-react-bindings.md) | `` + hooks; how `/ui` consumes them | -| 07 | [07-open-questions.md](./07-open-questions.md) | The hot file while the RFC is in flight | -| 08 | [08-migration.md](./08-migration.md) | Phased migration plan | -| 09 | [09-risks.md](./09-risks.md) | Risks and likely surprises | -| 10 | [10-public-api.md](./10-public-api.md) | Final import surface summary | -| 11 | [11-headless-usage.md](./11-headless-usage.md) | Using Petrinaut without any UI — handle setup, simulation, type-checking, subscriptions | +| # | File | Purpose | +| --- | ---------------------------------------------- | --------------------------------------------------------------------------------------- | +| 01 | [01-motivation.md](./01-motivation.md) | Goals + non-goals | +| 02 | [02-current-state.md](./02-current-state.md) | The provider stack today and the SDCPN ownership model | +| 03 | [03-layering.md](./03-layering.md) | What goes in `core` / `react` / `ui` | +| 04 | [04-core-instance.md](./04-core-instance.md) | `createPetrinaut()` surface, streams, instantiation | +| 05 | [05-simulation.md](./05-simulation.md) | Simulation patterns (locked) | +| 06 | [06-react-bindings.md](./06-react-bindings.md) | `` + hooks; how `/ui` consumes them | +| 07 | [07-open-questions.md](./07-open-questions.md) | The hot file while the RFC is in flight | +| 08 | [08-migration.md](./08-migration.md) | Phased migration plan | +| 09 | [09-risks.md](./09-risks.md) | Risks and likely surprises | +| 10 | [10-public-api.md](./10-public-api.md) | Final import surface summary | +| 11 | [11-headless-usage.md](./11-headless-usage.md) | Using Petrinaut without any UI — handle setup, simulation, type-checking, subscriptions | ## Decisions locked so far @@ -77,7 +77,7 @@ Layer dependency direction: **`ui` → `react` → `core`**, never the reverse, - `src/examples/` stays at root (decision: 2026-05-05 — will become its own `@hashintel/petrinaut/examples` subpath export with per-example demo-site routes; revisit when that flow lands). - `src/error-tracker/error-tracker.context.ts` → `src/react/error-tracker-context.ts` — `ErrorTracker` is a React context (host plugs Sentry / Datadog in via the provider), so `/react` is the layer-correct home. Considered placing it in `/core` so the simulation worker / handle could call it directly, but rejected: `/core` already has typed error channels (`simulation.events`, `lsp.diagnostics`, `handle.state`) for everything observable, and a generic capture callback would duplicate them. The wiring-fix (actually using it from worker error paths and React error boundaries) is folded into FE-694. -## What this RFC does *not* cover +## What this RFC does _not_ cover - Collaborative editing (Automerge / Yjs) wire-up — only the document-ownership decision that affects it. - Worker pool strategies (one worker per instance vs shared pool). diff --git a/libs/@hashintel/petrinaut/src/core/index.ts b/libs/@hashintel/petrinaut/src/core/index.ts index 0083cc24aac..09382cc503d 100644 --- a/libs/@hashintel/petrinaut/src/core/index.ts +++ b/libs/@hashintel/petrinaut/src/core/index.ts @@ -21,17 +21,10 @@ export { // --- Instance --- export { createPetrinaut } from "./instance"; -export type { - CreatePetrinautConfig, - EventStream, - Petrinaut, -} from "./instance"; +export type { CreatePetrinautConfig, EventStream, Petrinaut } from "./instance"; // --- Simulation --- -export { - createSimulation, - createWorkerTransport, -} from "./simulation"; +export { createSimulation, createWorkerTransport } from "./simulation"; export type { BackpressureConfig, CreateSimulationConfig, @@ -54,10 +47,7 @@ export type { } from "./simulation/types"; // --- LSP --- -export { - createLanguageClient, - createWorkerLspTransport, -} from "./lsp"; +export { createLanguageClient, createWorkerLspTransport } from "./lsp"; export type { CreateLanguageClientConfig, DiagnosticsSnapshot, diff --git a/libs/@hashintel/petrinaut/src/core/simulation/README.md b/libs/@hashintel/petrinaut/src/core/simulation/README.md index 5b851794c39..3b0ef942739 100644 --- a/libs/@hashintel/petrinaut/src/core/simulation/README.md +++ b/libs/@hashintel/petrinaut/src/core/simulation/README.md @@ -9,16 +9,16 @@ SimulationProvider wraps the WebWorker-based simulation and exposes it through R ## Simulation State ```typescript -type SimulationState = 'NotRun' | 'Paused' | 'Running' | 'Complete' | 'Error'; +type SimulationState = "NotRun" | "Paused" | "Running" | "Complete" | "Error"; ``` -| WorkerStatus | SimulationState | -| ------------------------ | --------------- | -| `idle`, `initializing` | `NotRun` | -| `ready`, `paused` | `Paused` | -| `running` | `Running` | -| `complete` | `Complete` | -| `error` | `Error` | +| WorkerStatus | SimulationState | +| ---------------------- | --------------- | +| `idle`, `initializing` | `NotRun` | +| `ready`, `paused` | `Paused` | +| `running` | `Running` | +| `complete` | `Complete` | +| `error` | `Error` | ## Configuration @@ -70,10 +70,15 @@ type SimulationState = 'NotRun' | 'Paused' | 'Running' | 'Complete' | 'Error'; - +; // In component: const simulation = use(SimulationContext); -await simulation.initialize({ seed: 42, dt: 0.01, maxFramesAhead: 100, batchSize: 50 }); +await simulation.initialize({ + seed: 42, + dt: 0.01, + maxFramesAhead: 100, + batchSize: 50, +}); simulation.run(); ``` diff --git a/libs/@hashintel/petrinaut/src/core/simulation/simulation.test.ts b/libs/@hashintel/petrinaut/src/core/simulation/simulation.test.ts index 7c3a10bc6bc..91b3e3e75a6 100644 --- a/libs/@hashintel/petrinaut/src/core/simulation/simulation.test.ts +++ b/libs/@hashintel/petrinaut/src/core/simulation/simulation.test.ts @@ -1,10 +1,10 @@ import { describe, expect, it, vi } from "vitest"; -import type { SimulationFrame } from "./types"; -import type { ToMainMessage, ToWorkerMessage } from "./worker/messages"; import type { SDCPN } from "../types/sdcpn"; import { createSimulation, type SimulationFrameSummary } from "./simulation"; import type { SimulationTransport } from "./transport"; +import type { SimulationFrame } from "./types"; +import type { ToMainMessage, ToWorkerMessage } from "./worker/messages"; const empty = (): SDCPN => ({ places: [], diff --git a/libs/@hashintel/petrinaut/src/core/simulation/simulator/README.md b/libs/@hashintel/petrinaut/src/core/simulation/simulator/README.md index 977acff8d5e..dc38124212b 100644 --- a/libs/@hashintel/petrinaut/src/core/simulation/simulator/README.md +++ b/libs/@hashintel/petrinaut/src/core/simulation/simulator/README.md @@ -8,10 +8,10 @@ The simulator compiles an SDCPN definition into a runnable `SimulationInstance` ## Core Functions -| Function | Description | -| -------------------------- | ------------------------------------------------- | -| `buildSimulation(input)` | Compiles SDCPN into SimulationInstance | -| `computeNextFrame(sim)` | Computes next frame, checks completion conditions | +| Function | Description | +| ------------------------ | ------------------------------------------------- | +| `buildSimulation(input)` | Compiles SDCPN into SimulationInstance | +| `computeNextFrame(sim)` | Computes next frame, checks completion conditions | ## Computation Flow @@ -38,9 +38,12 @@ A snapshot of simulation state at a point in time. ```typescript type SimulationFrame = { time: number; - places: Record; - transitions: Record; - buffer: Float64Array; // Token values storage + places: Record; + transitions: Record< + string, + { timeSinceLastFiringMs; firedInThisFrame; firingCount } + >; + buffer: Float64Array; // Token values storage }; ``` diff --git a/libs/@hashintel/petrinaut/src/core/simulation/worker/README.md b/libs/@hashintel/petrinaut/src/core/simulation/worker/README.md index 3afff14f611..b168bcc4ffe 100644 --- a/libs/@hashintel/petrinaut/src/core/simulation/worker/README.md +++ b/libs/@hashintel/petrinaut/src/core/simulation/worker/README.md @@ -41,11 +41,11 @@ The worker blocks computation until it receives an `ack` message, then computes **Play mode configuration (set by PlaybackProvider):** -| Play Mode | maxFramesAhead | batchSize | Ack Behavior | -| ---------------- | -------------- | --------- | -------------------------------- | -| `viewOnly` | 0 | 0 | Never acks (no computation) | -| `computeBuffer` | 40 | 10 | Acks when near end of frames | -| `computeMax` | 10000 | 500 | Acks on every new frame arrival | +| Play Mode | maxFramesAhead | batchSize | Ack Behavior | +| --------------- | -------------- | --------- | ------------------------------- | +| `viewOnly` | 0 | 0 | Never acks (no computation) | +| `computeBuffer` | 40 | 10 | Acks when near end of frames | +| `computeMax` | 10000 | 500 | Acks on every new frame arrival | --- diff --git a/libs/@hashintel/petrinaut/src/core/simulation/worker/simulation.worker.test.ts b/libs/@hashintel/petrinaut/src/core/simulation/worker/simulation.worker.test.ts index 5ae9aa65c7d..6b3413c711f 100644 --- a/libs/@hashintel/petrinaut/src/core/simulation/worker/simulation.worker.test.ts +++ b/libs/@hashintel/petrinaut/src/core/simulation/worker/simulation.worker.test.ts @@ -22,9 +22,9 @@ const mockSelf = { postMessage: (message: ToMainMessage) => { postedMessages.push(message); }, - set onmessage(handler: - | ((event: MessageEvent) => void) - | null,) { + set onmessage( + handler: ((event: MessageEvent) => void) | null, + ) { messageHandler = handler; }, get onmessage() { diff --git a/libs/@hashintel/petrinaut/src/examples/broken-machines.ts b/libs/@hashintel/petrinaut/src/examples/broken-machines.ts index 24006ae3ccb..663b370bbc4 100644 --- a/libs/@hashintel/petrinaut/src/examples/broken-machines.ts +++ b/libs/@hashintel/petrinaut/src/examples/broken-machines.ts @@ -1,5 +1,5 @@ -import { SNAP_GRID_SIZE } from "../ui/constants/ui"; import type { SDCPN } from "../core/types/sdcpn"; +import { SNAP_GRID_SIZE } from "../ui/constants/ui"; export const productionMachines: { title: string; petriNetDefinition: SDCPN } = { diff --git a/libs/@hashintel/petrinaut/src/examples/deployment-pipeline.ts b/libs/@hashintel/petrinaut/src/examples/deployment-pipeline.ts index 127f9c753ce..167847a4c02 100644 --- a/libs/@hashintel/petrinaut/src/examples/deployment-pipeline.ts +++ b/libs/@hashintel/petrinaut/src/examples/deployment-pipeline.ts @@ -1,5 +1,5 @@ -import { SNAP_GRID_SIZE } from "../ui/constants/ui"; import type { SDCPN } from "../core/types/sdcpn"; +import { SNAP_GRID_SIZE } from "../ui/constants/ui"; export const deploymentPipelineSDCPN: { title: string; diff --git a/libs/@hashintel/petrinaut/src/examples/satellites-launcher.ts b/libs/@hashintel/petrinaut/src/examples/satellites-launcher.ts index 262a3a67ab8..0b34b4aeae5 100644 --- a/libs/@hashintel/petrinaut/src/examples/satellites-launcher.ts +++ b/libs/@hashintel/petrinaut/src/examples/satellites-launcher.ts @@ -1,5 +1,5 @@ -import { SNAP_GRID_SIZE } from "../ui/constants/ui"; import type { SDCPN } from "../core/types/sdcpn"; +import { SNAP_GRID_SIZE } from "../ui/constants/ui"; export const probabilisticSatellitesSDCPN: { title: string; diff --git a/libs/@hashintel/petrinaut/src/examples/satellites.ts b/libs/@hashintel/petrinaut/src/examples/satellites.ts index 40f31b8e0e8..6b9c8f34044 100644 --- a/libs/@hashintel/petrinaut/src/examples/satellites.ts +++ b/libs/@hashintel/petrinaut/src/examples/satellites.ts @@ -1,5 +1,5 @@ -import { SNAP_GRID_SIZE } from "../ui/constants/ui"; import type { SDCPN } from "../core/types/sdcpn"; +import { SNAP_GRID_SIZE } from "../ui/constants/ui"; export const satellitesSDCPN: { title: string; petriNetDefinition: SDCPN } = { title: "Satellites in Orbit", diff --git a/libs/@hashintel/petrinaut/src/examples/sir-model.ts b/libs/@hashintel/petrinaut/src/examples/sir-model.ts index b7540efad73..4292e3304a0 100644 --- a/libs/@hashintel/petrinaut/src/examples/sir-model.ts +++ b/libs/@hashintel/petrinaut/src/examples/sir-model.ts @@ -1,5 +1,5 @@ -import { SNAP_GRID_SIZE } from "../ui/constants/ui"; import type { SDCPN } from "../core/types/sdcpn"; +import { SNAP_GRID_SIZE } from "../ui/constants/ui"; export const sirModel: { title: string; petriNetDefinition: SDCPN } = { title: "SIR Epidemic Model", diff --git a/libs/@hashintel/petrinaut/src/examples/supply-chain-stochastic.ts b/libs/@hashintel/petrinaut/src/examples/supply-chain-stochastic.ts index a4b1f368276..e62dcb5db54 100644 --- a/libs/@hashintel/petrinaut/src/examples/supply-chain-stochastic.ts +++ b/libs/@hashintel/petrinaut/src/examples/supply-chain-stochastic.ts @@ -1,5 +1,5 @@ -import { SNAP_GRID_SIZE } from "../ui/constants/ui"; import type { SDCPN } from "../core/types/sdcpn"; +import { SNAP_GRID_SIZE } from "../ui/constants/ui"; export const supplyChainStochasticSDCPN: { title: string; diff --git a/libs/@hashintel/petrinaut/src/main.ts b/libs/@hashintel/petrinaut/src/main.ts index 5be8888a443..0e24c86f61f 100644 --- a/libs/@hashintel/petrinaut/src/main.ts +++ b/libs/@hashintel/petrinaut/src/main.ts @@ -39,10 +39,7 @@ export type { EventStream, Petrinaut as PetrinautInstance, } from "./core/instance"; -export { - createSimulation, - createWorkerTransport, -} from "./core/simulation"; +export { createSimulation, createWorkerTransport } from "./core/simulation"; export type { BackpressureConfig, CreateSimulationConfig, diff --git a/libs/@hashintel/petrinaut/src/react/hooks/use-lsp.ts b/libs/@hashintel/petrinaut/src/react/hooks/use-lsp.ts index f179ad219ac..13e8b7e3ab4 100644 --- a/libs/@hashintel/petrinaut/src/react/hooks/use-lsp.ts +++ b/libs/@hashintel/petrinaut/src/react/hooks/use-lsp.ts @@ -1,5 +1,6 @@ import { use } from "react"; import type { Diagnostic, DocumentUri } from "vscode-languageserver-types"; + import { LanguageClientContext, type LanguageClientContextValue, diff --git a/libs/@hashintel/petrinaut/src/react/lsp/provider.tsx b/libs/@hashintel/petrinaut/src/react/lsp/provider.tsx index 996f0a23b37..5634178a955 100644 --- a/libs/@hashintel/petrinaut/src/react/lsp/provider.tsx +++ b/libs/@hashintel/petrinaut/src/react/lsp/provider.tsx @@ -13,9 +13,8 @@ import { LanguageClientContext } from "./context"; /** Dynamically import and instantiate the language server worker (inlined as blob URL). */ async function createLanguageServerWorker(): Promise { - const LanguageServerWorker = await import( - "../../core/lsp/worker/language-server.worker.ts?worker&inline" - ); + const LanguageServerWorker = + await import("../../core/lsp/worker/language-server.worker.ts?worker&inline"); // eslint-disable-next-line new-cap return new LanguageServerWorker.default(); } diff --git a/libs/@hashintel/petrinaut/src/react/mutation-provider.test.tsx b/libs/@hashintel/petrinaut/src/react/mutation-provider.test.tsx index c286b3ca385..8722c903749 100644 --- a/libs/@hashintel/petrinaut/src/react/mutation-provider.test.tsx +++ b/libs/@hashintel/petrinaut/src/react/mutation-provider.test.tsx @@ -7,6 +7,12 @@ import { describe, expect, test, vi } from "vitest"; import type { Petrinaut } from "../core/instance"; import type { SDCPN } from "../core/types/sdcpn"; +import { PetrinautInstanceContext } from "./instance-context"; +import { MutationProvider } from "./mutation-provider"; +import { + SimulationContext, + type SimulationContextValue, +} from "./simulation/context"; import { EditorContext, type EditorContextValue, @@ -19,12 +25,6 @@ import { UserSettingsContext, type UserSettingsContextValue, } from "./state/user-settings-context"; -import { PetrinautInstanceContext } from "./instance-context"; -import { MutationProvider } from "./mutation-provider"; -import { - SimulationContext, - type SimulationContextValue, -} from "./simulation/context"; // --------------------------------------------------------------------------- // Helpers diff --git a/libs/@hashintel/petrinaut/src/react/playback/README.md b/libs/@hashintel/petrinaut/src/react/playback/README.md index 06752e985f5..f3f7f3827cf 100644 --- a/libs/@hashintel/petrinaut/src/react/playback/README.md +++ b/libs/@hashintel/petrinaut/src/react/playback/README.md @@ -70,7 +70,7 @@ Playback auto-pauses when reaching the end of available frames (if simulation is - +; // In component: const playback = use(PlaybackContext); diff --git a/libs/@hashintel/petrinaut/src/react/simulation/provider.tsx b/libs/@hashintel/petrinaut/src/react/simulation/provider.tsx index 840968ea70c..41d227cff36 100644 --- a/libs/@hashintel/petrinaut/src/react/simulation/provider.tsx +++ b/libs/@hashintel/petrinaut/src/react/simulation/provider.tsx @@ -17,7 +17,6 @@ import { useLatest } from "../hooks/use-latest"; import { useStableCallback } from "../hooks/use-stable-callback"; import { SDCPNContext } from "../state/sdcpn-context"; import { useStore } from "../use-store"; -import { SimulationToaster, type SimulationToast } from "./toaster"; import { type InitialMarking, SimulationContext, @@ -25,6 +24,7 @@ import { type SimulationFrame, type SimulationState, } from "./context"; +import { SimulationToaster, type SimulationToast } from "./toaster"; /** * Internal state for the simulation provider. diff --git a/libs/@hashintel/petrinaut/src/react/state/editor-context.ts b/libs/@hashintel/petrinaut/src/react/state/editor-context.ts index bd01cc1a7f2..0e1b8204c72 100644 --- a/libs/@hashintel/petrinaut/src/react/state/editor-context.ts +++ b/libs/@hashintel/petrinaut/src/react/state/editor-context.ts @@ -1,11 +1,11 @@ import { createContext, createRef } from "react"; +import type { SelectionItem, SelectionMap } from "../../core/types/selection"; import { DEFAULT_BOTTOM_PANEL_HEIGHT, DEFAULT_LEFT_SIDEBAR_WIDTH, DEFAULT_PROPERTIES_PANEL_WIDTH, } from "./panel-defaults"; -import type { SelectionItem, SelectionMap } from "../../core/types/selection"; export type DraggingStateByNodeId = Record< string, diff --git a/libs/@hashintel/petrinaut/src/react/state/sdcpn-context.ts b/libs/@hashintel/petrinaut/src/react/state/sdcpn-context.ts index 972f8deb386..2b60ab5215c 100644 --- a/libs/@hashintel/petrinaut/src/react/state/sdcpn-context.ts +++ b/libs/@hashintel/petrinaut/src/react/state/sdcpn-context.ts @@ -3,10 +3,7 @@ import { createContext } from "react"; import type { MinimalNetMetadata, SDCPN } from "../../core/types/sdcpn"; export type SDCPNProviderProps = { - createNewNet: (params: { - petriNetDefinition: SDCPN; - title: string; - }) => void; + createNewNet: (params: { petriNetDefinition: SDCPN; title: string }) => void; existingNets: MinimalNetMetadata[]; loadPetriNet: (petriNetId: string) => void; petriNetId: string | null; diff --git a/libs/@hashintel/petrinaut/src/react/state/use-selection.ts b/libs/@hashintel/petrinaut/src/react/state/use-selection.ts index 38aaccdbc01..a8aa8a4c3bf 100644 --- a/libs/@hashintel/petrinaut/src/react/state/use-selection.ts +++ b/libs/@hashintel/petrinaut/src/react/state/use-selection.ts @@ -1,7 +1,7 @@ import { use, useMemo } from "react"; -import { EditorContext } from "./editor-context"; import type { PanelTarget } from "../../core/types/selection"; +import { EditorContext } from "./editor-context"; export function usePanelTarget(): PanelTarget { const { selection } = use(EditorContext); diff --git a/libs/@hashintel/petrinaut/src/react/state/user-settings-context.ts b/libs/@hashintel/petrinaut/src/react/state/user-settings-context.ts index 24c1be2943b..b0a26439218 100644 --- a/libs/@hashintel/petrinaut/src/react/state/user-settings-context.ts +++ b/libs/@hashintel/petrinaut/src/react/state/user-settings-context.ts @@ -1,15 +1,15 @@ import { createContext } from "react"; -import { - DEFAULT_BOTTOM_PANEL_HEIGHT, - DEFAULT_LEFT_SIDEBAR_WIDTH, - DEFAULT_PROPERTIES_PANEL_WIDTH, -} from "./panel-defaults"; import type { BottomPanelTab, CursorMode, TimelineChartType, } from "./editor-context"; +import { + DEFAULT_BOTTOM_PANEL_HEIGHT, + DEFAULT_LEFT_SIDEBAR_WIDTH, + DEFAULT_PROPERTIES_PANEL_WIDTH, +} from "./panel-defaults"; export type ArcRendering = "smoothstep" | "bezier" | "custom"; diff --git a/libs/@hashintel/petrinaut/src/ui/clipboard/clipboard.ts b/libs/@hashintel/petrinaut/src/ui/clipboard/clipboard.ts index e0397229cb7..1d72bf9ad05 100644 --- a/libs/@hashintel/petrinaut/src/ui/clipboard/clipboard.ts +++ b/libs/@hashintel/petrinaut/src/ui/clipboard/clipboard.ts @@ -1,10 +1,10 @@ -import type { SDCPN } from "../../core/types/sdcpn"; -import type { SelectionMap } from "../../core/types/selection"; import { pastePayloadIntoSDCPN } from "../../core/clipboard/paste"; import { parseClipboardPayload, serializeSelection, } from "../../core/clipboard/serialize"; +import type { SDCPN } from "../../core/types/sdcpn"; +import type { SelectionMap } from "../../core/types/selection"; /** * Copy the current selection to the system clipboard. diff --git a/libs/@hashintel/petrinaut/src/ui/lib/snap-position-to-grid.ts b/libs/@hashintel/petrinaut/src/ui/lib/snap-position-to-grid.ts index cf36f219b47..3b358388ec6 100644 --- a/libs/@hashintel/petrinaut/src/ui/lib/snap-position-to-grid.ts +++ b/libs/@hashintel/petrinaut/src/ui/lib/snap-position-to-grid.ts @@ -7,10 +7,10 @@ import { SNAP_GRID_SIZE } from "../constants/ui"; * it doesn't account for `nodeOrigin` — it snaps the top-left corner * rather than the center. See https://github.com/xyflow/xyflow/issues/5185 */ -export function snapPositionToGrid(position: { +export function snapPositionToGrid(position: { x: number; y: number }): { x: number; y: number; -}): { x: number; y: number } { +} { return { x: Math.round(position.x / SNAP_GRID_SIZE) * SNAP_GRID_SIZE, y: Math.round(position.y / SNAP_GRID_SIZE) * SNAP_GRID_SIZE, diff --git a/libs/@hashintel/petrinaut/src/ui/lib/viewport.test.ts b/libs/@hashintel/petrinaut/src/ui/lib/viewport.test.ts index e16489bf926..c27283b6a69 100644 --- a/libs/@hashintel/petrinaut/src/ui/lib/viewport.test.ts +++ b/libs/@hashintel/petrinaut/src/ui/lib/viewport.test.ts @@ -1,10 +1,11 @@ -import { describe, expect, it } from "vitest"; -import { recenterToFitViewport } from "./viewport"; import { getNodesBounds } from "@xyflow/react"; +import { describe, expect, it } from "vitest"; + import type { PetrinautReactFlowInstance, NodeType, } from "../views/SDCPN/reactflow-types"; +import { recenterToFitViewport } from "./viewport"; const reactFlow = { getNodesBounds } as PetrinautReactFlowInstance; diff --git a/libs/@hashintel/petrinaut/src/ui/monaco/provider.tsx b/libs/@hashintel/petrinaut/src/ui/monaco/provider.tsx index 02fd50f6480..4b23ea55418 100644 --- a/libs/@hashintel/petrinaut/src/ui/monaco/provider.tsx +++ b/libs/@hashintel/petrinaut/src/ui/monaco/provider.tsx @@ -16,21 +16,13 @@ async function initMonaco(): Promise { import("@monaco-editor/react"), // Language contribution (side-effect) — enables TypeScript syntax highlighting. // Does not import the TS worker; our custom LSP provides language features. - import( - "monaco-editor/esm/vs/basic-languages/typescript/typescript.contribution.js" - ), + import("monaco-editor/esm/vs/basic-languages/typescript/typescript.contribution.js"), // Editor feature contributions (side-effects) — without these explicit // imports the production bundler tree-shakes them out, since `editor.api.js` // is the tree-shakeable ESM entry point. - import( - "monaco-editor/esm/vs/editor/contrib/hover/browser/hoverContribution.js" - ), - import( - "monaco-editor/esm/vs/editor/contrib/suggest/browser/suggestController.js" - ), - import( - "monaco-editor/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js" - ), + import("monaco-editor/esm/vs/editor/contrib/hover/browser/hoverContribution.js"), + import("monaco-editor/esm/vs/editor/contrib/suggest/browser/suggestController.js"), + import("monaco-editor/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js"), import("monaco-editor/esm/vs/editor/contrib/folding/browser/folding.js"), ]); diff --git a/libs/@hashintel/petrinaut/src/ui/petrinaut.stories.tsx b/libs/@hashintel/petrinaut/src/ui/petrinaut.stories.tsx index 6a62fefbc75..d5507935ae9 100644 --- a/libs/@hashintel/petrinaut/src/ui/petrinaut.stories.tsx +++ b/libs/@hashintel/petrinaut/src/ui/petrinaut.stories.tsx @@ -4,8 +4,8 @@ import { useEffect, useMemo, useState } from "react"; import { createJsonDocHandle } from "../core/handle"; import type { SDCPN } from "../core/types/sdcpn"; import { sirModel } from "../examples/sir-model"; -import { PetrinautStoryProvider } from "./petrinaut-story-provider"; import { Petrinaut } from "../ui/petrinaut"; +import { PetrinautStoryProvider } from "./petrinaut-story-provider"; const emptySDCPN: SDCPN = { places: [], diff --git a/libs/@hashintel/petrinaut/src/ui/petrinaut.tsx b/libs/@hashintel/petrinaut/src/ui/petrinaut.tsx index 61575ecae6d..00e5a7f3257 100644 --- a/libs/@hashintel/petrinaut/src/ui/petrinaut.tsx +++ b/libs/@hashintel/petrinaut/src/ui/petrinaut.tsx @@ -3,7 +3,6 @@ import "@fontsource-variable/inter-tight"; import "@fontsource-variable/jetbrains-mono"; import "@xyflow/react/dist/style.css"; import "./index.css"; - import { type FunctionComponent, useEffect, useMemo } from "react"; import type { PetrinautDocHandle } from "../core/handle"; @@ -13,8 +12,8 @@ import type { WorkerFactory } from "../core/simulation"; import type { MinimalNetMetadata, SDCPN } from "../core/types/sdcpn"; import type { NetManagement } from "../react/net-management-context"; import { PetrinautProvider } from "../react/petrinaut-provider"; -import type { ViewportAction } from "./types/viewport-action"; import { MonacoProvider } from "./monaco/provider"; +import type { ViewportAction } from "./types/viewport-action"; import { EditorView } from "./views/Editor/editor-view"; export type PetrinautProps = { diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/components/BottomBar/playback-settings-menu.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/components/BottomBar/playback-settings-menu.tsx index f9444f6a66f..26fe3d430c0 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/components/BottomBar/playback-settings-menu.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/components/BottomBar/playback-settings-menu.tsx @@ -9,8 +9,6 @@ import { TbSettings, } from "react-icons/tb"; -import { NumberInput } from "../../../../components/number-input"; -import { Popover } from "../../../../components/popover"; import { formatPlaybackSpeed, PLAYBACK_SPEEDS, @@ -18,6 +16,8 @@ import { type PlaybackSpeed, } from "../../../../../react/playback/context"; import { SimulationContext } from "../../../../../react/simulation/context"; +import { NumberInput } from "../../../../components/number-input"; +import { Popover } from "../../../../components/popover"; import { ToolbarButton } from "./toolbar-button"; const contentWidthStyle = css({ diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/components/BottomBar/toolbar-modes.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/components/BottomBar/toolbar-modes.tsx index e7c8acaacde..4bbf2888e3d 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/components/BottomBar/toolbar-modes.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/components/BottomBar/toolbar-modes.tsx @@ -3,12 +3,12 @@ import { FaChevronDown, FaRegHand } from "react-icons/fa6"; import { LuMousePointerClick } from "react-icons/lu"; import { TbCirclePlus2, TbSquarePlus2 } from "react-icons/tb"; -import { Menu, type MenuItem } from "../../../../components/menu"; import type { CursorMode, EditorState, } from "../../../../../react/state/editor-context"; import { useIsReadOnly } from "../../../../../react/state/use-is-read-only"; +import { Menu, type MenuItem } from "../../../../components/menu"; import { ToolbarButton } from "./toolbar-button"; import { ToolbarDivider } from "./toolbar-divider"; diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/components/BottomBar/use-keyboard-shortcuts.ts b/libs/@hashintel/petrinaut/src/ui/views/Editor/components/BottomBar/use-keyboard-shortcuts.ts index 188e39744ad..47b1bc5c353 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/components/BottomBar/use-keyboard-shortcuts.ts +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/components/BottomBar/use-keyboard-shortcuts.ts @@ -1,7 +1,6 @@ import { use, useEffect, useEffectEvent } from "react"; import type { SelectionItem } from "../../../../../core/types/selection"; -import { usePetrinautInstance } from "../../../../../react/use-petrinaut-instance"; import type { CursorMode, EditorState, @@ -11,6 +10,7 @@ import { MutationContext } from "../../../../../react/state/mutation-context"; import { SDCPNContext } from "../../../../../react/state/sdcpn-context"; import { UndoRedoContext } from "../../../../../react/state/undo-redo-context"; import { useIsReadOnly } from "../../../../../react/state/use-is-read-only"; +import { usePetrinautInstance } from "../../../../../react/use-petrinaut-instance"; import { copySelectionToClipboard, pasteFromClipboard, diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/components/TopBar/top-bar.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/components/TopBar/top-bar.tsx index d69befbce96..8d37fa95552 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/components/TopBar/top-bar.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/components/TopBar/top-bar.tsx @@ -6,13 +6,13 @@ import { TbLayoutSidebarRightCollapse, } from "react-icons/tb"; -import { IconButton } from "../../../../components/icon-button"; -import { Menu, type MenuItem } from "../../../../components/menu"; import { EditorContext, type EditorState, } from "../../../../../react/state/editor-context"; import { UndoRedoContext } from "../../../../../react/state/undo-redo-context"; +import { IconButton } from "../../../../components/icon-button"; +import { Menu, type MenuItem } from "../../../../components/menu"; import { FloatingTitle } from "./floating-title"; import { ModeSelector } from "./mode-selector"; import { VersionHistoryButton } from "./version-history-button"; diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/components/TopBar/version-history-button.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/components/TopBar/version-history-button.tsx index 639c721c999..da9f1681553 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/components/TopBar/version-history-button.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/components/TopBar/version-history-button.tsx @@ -1,9 +1,9 @@ import { use, useMemo } from "react"; import { LuCheck, LuHistory } from "react-icons/lu"; +import { UndoRedoContext } from "../../../../../react/state/undo-redo-context"; import { IconButton } from "../../../../components/icon-button"; import { Menu, type MenuItem } from "../../../../components/menu"; -import { UndoRedoContext } from "../../../../../react/state/undo-redo-context"; function formatTime(timestamp: string): string { const date = new Date(timestamp); diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/editor-view.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/editor-view.tsx index ba5d58acf02..f21e3daee70 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/editor-view.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/editor-view.tsx @@ -1,24 +1,25 @@ import { css, cx } from "@hashintel/ds-helpers/css"; import { use, useRef, useState } from "react"; -import { Box } from "../../components/box"; -import { Stack } from "../../components/stack"; import { productionMachines } from "../../../examples/broken-machines"; import { deploymentPipelineSDCPN } from "../../../examples/deployment-pipeline"; import { satellitesSDCPN } from "../../../examples/satellites"; import { probabilisticSatellitesSDCPN } from "../../../examples/satellites-launcher"; import { sirModel } from "../../../examples/sir-model"; import { supplyChainStochasticSDCPN } from "../../../examples/supply-chain-stochastic"; -import { importSDCPN } from "../../file-io/import-sdcpn"; -import { exportSDCPN } from "../../file-io/export-sdcpn"; -import { calculateGraphLayout } from "../../lib/calculate-graph-layout"; import { EditorContext } from "../../../react/state/editor-context"; import { MutationContext } from "../../../react/state/mutation-context"; import { PortalContainerContext } from "../../../react/state/portal-container-context"; import { SDCPNContext } from "../../../react/state/sdcpn-context"; import { useSelectionCleanup } from "../../../react/state/use-selection-cleanup"; -import type { ViewportAction } from "../../types/viewport-action"; import { UserSettingsContext } from "../../../react/state/user-settings-context"; +import { Box } from "../../components/box"; +import { Stack } from "../../components/stack"; +import { exportSDCPN } from "../../file-io/export-sdcpn"; +import { exportTikZ } from "../../file-io/export-tikz"; +import { importSDCPN } from "../../file-io/import-sdcpn"; +import { calculateGraphLayout } from "../../lib/calculate-graph-layout"; +import type { ViewportAction } from "../../types/viewport-action"; import { classicNodeDimensions, compactNodeDimensions, @@ -27,7 +28,6 @@ import { SDCPNView } from "../SDCPN/sdcpn-view"; import { BottomBar } from "./components/BottomBar/bottom-bar"; import { ImportErrorDialog } from "./components/import-error-dialog"; import { TopBar } from "./components/TopBar/top-bar"; -import { exportTikZ } from "../../file-io/export-tikz"; import { BottomPanel } from "./panels/BottomPanel/panel"; import { LeftSideBar } from "./panels/LeftSideBar/panel"; import { PropertiesPanel } from "./panels/PropertiesPanel/panel"; diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/panel.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/panel.tsx index 719a46b8764..843453dcb89 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/panel.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/panel.tsx @@ -2,6 +2,12 @@ import { css, cva, cx } from "@hashintel/ds-helpers/css"; import { use, useEffect, useRef } from "react"; import { FaXmark } from "react-icons/fa6"; +import { SimulationContext } from "../../../../../react/simulation/context"; +import { + type BottomPanelTab, + EditorContext, +} from "../../../../../react/state/editor-context"; +import { UserSettingsContext } from "../../../../../react/state/user-settings-context"; import { GlassPanel } from "../../../../components/glass-panel"; import { IconButton } from "../../../../components/icon-button"; import { @@ -18,12 +24,6 @@ import { BOTTOM_PANEL_SUBVIEWS, SIMULATION_ONLY_SUBVIEWS, } from "../../../../constants/ui-subviews"; -import { SimulationContext } from "../../../../../react/simulation/context"; -import { - type BottomPanelTab, - EditorContext, -} from "../../../../../react/state/editor-context"; -import { UserSettingsContext } from "../../../../../react/state/user-settings-context"; const glassPanelBaseStyle = css({ position: "absolute", diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/subviews/diagnostics.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/subviews/diagnostics.tsx index a455cf667d7..c5ec9ccc6b6 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/subviews/diagnostics.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/subviews/diagnostics.tsx @@ -4,13 +4,13 @@ import { FaChevronDown, FaChevronRight } from "react-icons/fa6"; import { TbArrowRight } from "react-icons/tb"; import type { Diagnostic } from "vscode-languageserver-types"; -import type { SubView } from "../../../../../components/sub-view/types"; +import type { SelectionItemType } from "../../../../../../core/types/selection"; import { LanguageClientContext } from "../../../../../../react/lsp/context"; -import { parseDocumentUri } from "../../../../../monaco/editor-paths"; import { SimulationContext } from "../../../../../../react/simulation/context"; import { EditorContext } from "../../../../../../react/state/editor-context"; import { SDCPNContext } from "../../../../../../react/state/sdcpn-context"; -import type { SelectionItemType } from "../../../../../../core/types/selection"; +import type { SubView } from "../../../../../components/sub-view/types"; +import { parseDocumentUri } from "../../../../../monaco/editor-paths"; const emptyMessageStyle = css({ color: "neutral.s100", diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/subviews/simulation-settings.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/subviews/simulation-settings.tsx index 2836c0b0033..727683c4b83 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/subviews/simulation-settings.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/subviews/simulation-settings.tsx @@ -2,16 +2,16 @@ import { css } from "@hashintel/ds-helpers/css"; import { use, useState } from "react"; import { TbList, TbMinus, TbPencil, TbPlus } from "react-icons/tb"; +import { SimulationContext } from "../../../../../../react/simulation/context"; +import { EditorContext } from "../../../../../../react/state/editor-context"; +import { SDCPNContext } from "../../../../../../react/state/sdcpn-context"; import { IconButton } from "../../../../../components/icon-button"; import { NumberInput } from "../../../../../components/number-input"; import { Select } from "../../../../../components/select"; import { Slider } from "../../../../../components/slider"; -import { Switch } from "../../../../../components/switch"; import type { SubView } from "../../../../../components/sub-view/types"; +import { Switch } from "../../../../../components/switch"; import { InfoIconTooltip } from "../../../../../components/tooltip"; -import { SimulationContext } from "../../../../../../react/simulation/context"; -import { EditorContext } from "../../../../../../react/state/editor-context"; -import { SDCPNContext } from "../../../../../../react/state/sdcpn-context"; import { CreateScenarioDrawer } from "../../SimulateView/create-scenario-drawer"; import { ViewScenarioDrawer } from "../../SimulateView/view-scenario-drawer"; diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/subviews/simulation-timeline.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/subviews/simulation-timeline.tsx index 54da3d730c2..6d4345cc7c8 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/subviews/simulation-timeline.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/subviews/simulation-timeline.tsx @@ -2,31 +2,32 @@ import { css } from "@hashintel/ds-helpers/css"; import { use, useEffect, useMemo, useRef, useState } from "react"; import { TbList, TbPencil, TbPlus } from "react-icons/tb"; import uPlot from "uplot"; + import "uplot/dist/uPlot.min.css"; -import { IconButton } from "../../../../../components/icon-button"; -import { SegmentGroup } from "../../../../../components/segment-group"; -import { Select } from "../../../../../components/select"; -import type { SubView } from "../../../../../components/sub-view/types"; -import { useElementSize } from "../../../../../../react/hooks/use-element-size"; -import { useLatest } from "../../../../../../react/hooks/use-latest"; -import { useStableCallback } from "../../../../../../react/hooks/use-stable-callback"; -import { PlaybackContext } from "../../../../../../react/playback/context"; import { type CompiledMetric, compileMetric, } from "../../../../../../core/simulation/compile-metric"; +import { buildMetricState } from "../../../../../../core/simulation/metric-state"; +import { useElementSize } from "../../../../../../react/hooks/use-element-size"; +import { useLatest } from "../../../../../../react/hooks/use-latest"; +import { useStableCallback } from "../../../../../../react/hooks/use-stable-callback"; +import { PlaybackContext } from "../../../../../../react/playback/context"; import { SimulationContext, type SimulationFrame, } from "../../../../../../react/simulation/context"; -import { buildMetricState } from "../../../../../../core/simulation/metric-state"; import { EditorContext, type TimelineChartType, type TimelineView, } from "../../../../../../react/state/editor-context"; import { SDCPNContext } from "../../../../../../react/state/sdcpn-context"; +import { IconButton } from "../../../../../components/icon-button"; +import { SegmentGroup } from "../../../../../components/segment-group"; +import { Select } from "../../../../../components/select"; +import type { SubView } from "../../../../../components/sub-view/types"; import { CreateMetricDrawer } from "../../SimulateView/create-metric-drawer"; import { ViewMetricDrawer } from "../../SimulateView/view-metric-drawer"; diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/panel.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/panel.tsx index ca465fa5ec5..23c9bd4dba5 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/panel.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/panel.tsx @@ -1,6 +1,8 @@ import { css, cva, cx } from "@hashintel/ds-helpers/css"; import { use, useMemo } from "react"; +import { EditorContext } from "../../../../../react/state/editor-context"; +import { UserSettingsContext } from "../../../../../react/state/user-settings-context"; import { GlassPanel } from "../../../../components/glass-panel"; import { VerticalSubViewsContainer } from "../../../../components/sub-view/vertical/vertical-sub-views-container"; import { @@ -11,8 +13,6 @@ import { LEFT_SIDEBAR_SUBVIEWS, LEFT_SIDEBAR_TREE_SUBVIEWS, } from "../../../../constants/ui-subviews"; -import { EditorContext } from "../../../../../react/state/editor-context"; -import { UserSettingsContext } from "../../../../../react/state/user-settings-context"; import { searchSubView } from "./subviews/search-panel"; const glassPanelBaseStyle = css({ diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/differential-equations-list.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/differential-equations-list.tsx index 12f50e755a5..9836408f0c3 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/differential-equations-list.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/differential-equations-list.tsx @@ -2,15 +2,15 @@ import { use } from "react"; import { TbPlus, TbTrash } from "react-icons/tb"; import { v4 as uuidv4 } from "uuid"; -import { IconButton } from "../../../../../components/icon-button"; -import type { SubView } from "../../../../../components/sub-view/types"; -import { DifferentialEquationIcon } from "../../../../../constants/entity-icons"; -import { UI_MESSAGES } from "../../../../../constants/ui-messages"; import { DEFAULT_DIFFERENTIAL_EQUATION_CODE } from "../../../../../../core/default-codes"; import { EditorContext } from "../../../../../../react/state/editor-context"; import { MutationContext } from "../../../../../../react/state/mutation-context"; import { SDCPNContext } from "../../../../../../react/state/sdcpn-context"; import { useIsReadOnly } from "../../../../../../react/state/use-is-read-only"; +import { IconButton } from "../../../../../components/icon-button"; +import type { SubView } from "../../../../../components/sub-view/types"; +import { DifferentialEquationIcon } from "../../../../../constants/entity-icons"; +import { UI_MESSAGES } from "../../../../../constants/ui-messages"; import { RowMenu, createFilterableListSubView, diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/entities-tree.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/entities-tree.tsx index f439d73e342..ce30da6c220 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/entities-tree.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/entities-tree.tsx @@ -3,6 +3,11 @@ import type { ComponentType } from "react"; import { use } from "react"; import { TbTrash } from "react-icons/tb"; +import type { SelectionItem } from "../../../../../../core/types/selection"; +import { EditorContext } from "../../../../../../react/state/editor-context"; +import { MutationContext } from "../../../../../../react/state/mutation-context"; +import { SDCPNContext } from "../../../../../../react/state/sdcpn-context"; +import { useIsReadOnly } from "../../../../../../react/state/use-is-read-only"; import type { SubView } from "../../../../../components/sub-view/types"; import { DifferentialEquationIcon, @@ -11,11 +16,6 @@ import { TokenTypeIcon, TransitionFilledIcon, } from "../../../../../constants/entity-icons"; -import { EditorContext } from "../../../../../../react/state/editor-context"; -import { MutationContext } from "../../../../../../react/state/mutation-context"; -import { SDCPNContext } from "../../../../../../react/state/sdcpn-context"; -import type { SelectionItem } from "../../../../../../core/types/selection"; -import { useIsReadOnly } from "../../../../../../react/state/use-is-read-only"; import { DifferentialEquationsSectionHeaderAction } from "./differential-equations-list"; import { RowMenu, diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/filterable-list-sub-view.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/filterable-list-sub-view.tsx index ccde5e0dd9d..a8ccb8e33d0 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/filterable-list-sub-view.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/filterable-list-sub-view.tsx @@ -4,6 +4,11 @@ import { Fragment, use, useEffect, useRef, useState } from "react"; import { LuChevronRight, LuSearch } from "react-icons/lu"; import { TbDots } from "react-icons/tb"; +import type { + SelectionItem, + SelectionMap, +} from "../../../../../../core/types/selection"; +import { EditorContext } from "../../../../../../react/state/editor-context"; import { IconButton } from "../../../../../components/icon-button"; import type { MenuItem } from "../../../../../components/menu"; import { Menu } from "../../../../../components/menu"; @@ -11,11 +16,6 @@ import type { SubView, SubViewResizeConfig, } from "../../../../../components/sub-view/types"; -import { EditorContext } from "../../../../../../react/state/editor-context"; -import type { - SelectionItem, - SelectionMap, -} from "../../../../../../core/types/selection"; const listContainerStyle = css({ display: "flex", diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/nodes-list.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/nodes-list.tsx index b39fce43853..0ece78bbf32 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/nodes-list.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/nodes-list.tsx @@ -1,11 +1,11 @@ import { use } from "react"; +import { SDCPNContext } from "../../../../../../react/state/sdcpn-context"; import type { SubView } from "../../../../../components/sub-view/types"; import { PlaceFilledIcon, TransitionFilledIcon, } from "../../../../../constants/entity-icons"; -import { SDCPNContext } from "../../../../../../react/state/sdcpn-context"; import { createFilterableListSubView } from "./filterable-list-sub-view"; interface NodeItem { diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/parameters-list.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/parameters-list.tsx index fa5284404c1..13cc3303cc7 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/parameters-list.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/parameters-list.tsx @@ -3,14 +3,14 @@ import { use } from "react"; import { TbPlus, TbTrash } from "react-icons/tb"; import { v4 as uuidv4 } from "uuid"; -import { IconButton } from "../../../../../components/icon-button"; -import type { SubView } from "../../../../../components/sub-view/types"; -import { ParameterIcon } from "../../../../../constants/entity-icons"; -import { UI_MESSAGES } from "../../../../../constants/ui-messages"; import { EditorContext } from "../../../../../../react/state/editor-context"; import { MutationContext } from "../../../../../../react/state/mutation-context"; import { SDCPNContext } from "../../../../../../react/state/sdcpn-context"; import { useIsReadOnly } from "../../../../../../react/state/use-is-read-only"; +import { IconButton } from "../../../../../components/icon-button"; +import type { SubView } from "../../../../../components/sub-view/types"; +import { ParameterIcon } from "../../../../../constants/entity-icons"; +import { UI_MESSAGES } from "../../../../../constants/ui-messages"; import { RowMenu, createFilterableListSubView, diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/search-panel.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/search-panel.tsx index 211690d5001..e059ff1212e 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/search-panel.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/search-panel.tsx @@ -4,6 +4,9 @@ import type { ComponentType, ReactNode } from "react"; import { use, useEffect, useRef, useState } from "react"; import { LuSearch } from "react-icons/lu"; +import type { SelectionItem } from "../../../../../../core/types/selection"; +import { EditorContext } from "../../../../../../react/state/editor-context"; +import { SDCPNContext } from "../../../../../../react/state/sdcpn-context"; import { IconButton } from "../../../../../components/icon-button"; import type { SubView } from "../../../../../components/sub-view/types"; import { @@ -13,9 +16,6 @@ import { TokenTypeIcon, TransitionFilledIcon, } from "../../../../../constants/entity-icons"; -import { EditorContext } from "../../../../../../react/state/editor-context"; -import { SDCPNContext } from "../../../../../../react/state/sdcpn-context"; -import type { SelectionItem } from "../../../../../../core/types/selection"; // -- Styles ------------------------------------------------------------------- diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/types-list.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/types-list.tsx index 1c81f6b7442..a16cf9affc6 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/types-list.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/types-list.tsx @@ -1,14 +1,14 @@ import { use } from "react"; import { TbPlus, TbTrash } from "react-icons/tb"; -import { IconButton } from "../../../../../components/icon-button"; -import type { SubView } from "../../../../../components/sub-view/types"; -import { TokenTypeIcon } from "../../../../../constants/entity-icons"; -import { UI_MESSAGES } from "../../../../../constants/ui-messages"; import { EditorContext } from "../../../../../../react/state/editor-context"; import { MutationContext } from "../../../../../../react/state/mutation-context"; import { SDCPNContext } from "../../../../../../react/state/sdcpn-context"; import { useIsReadOnly } from "../../../../../../react/state/use-is-read-only"; +import { IconButton } from "../../../../../components/icon-button"; +import type { SubView } from "../../../../../components/sub-view/types"; +import { TokenTypeIcon } from "../../../../../constants/entity-icons"; +import { UI_MESSAGES } from "../../../../../constants/ui-messages"; import { RowMenu, createFilterableListSubView, diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/arc-properties/main.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/arc-properties/main.tsx index c7579973681..a9698042f9e 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/arc-properties/main.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/arc-properties/main.tsx @@ -3,6 +3,10 @@ import { createContext, use } from "react"; import { PiScribbleLoopBold } from "react-icons/pi"; import { TbTrash } from "react-icons/tb"; +import type { SDCPN } from "../../../../../../core/types/sdcpn"; +import { parseArcId } from "../../../../../../core/types/selection"; +import { EditorContext } from "../../../../../../react/state/editor-context"; +import { useIsReadOnly } from "../../../../../../react/state/use-is-read-only"; import { IconButton } from "../../../../../components/icon-button"; import { NumberInput } from "../../../../../components/number-input"; import { Section, SectionList } from "../../../../../components/section"; @@ -10,10 +14,6 @@ import { Select } from "../../../../../components/select"; import type { SubView } from "../../../../../components/sub-view/types"; import { VerticalSubViewsContainer } from "../../../../../components/sub-view/vertical/vertical-sub-views-container"; import { UI_MESSAGES } from "../../../../../constants/ui-messages"; -import type { SDCPN } from "../../../../../../core/types/sdcpn"; -import { EditorContext } from "../../../../../../react/state/editor-context"; -import { parseArcId } from "../../../../../../core/types/selection"; -import { useIsReadOnly } from "../../../../../../react/state/use-is-read-only"; const containerStyle = css({ display: "flex", diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/differential-equation-properties/main.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/differential-equation-properties/main.tsx index 55b7d2f6383..26182a3f785 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/differential-equation-properties/main.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/differential-equation-properties/main.tsx @@ -1,12 +1,12 @@ import { css } from "@hashintel/ds-helpers/css"; -import type { SubView } from "../../../../../components/sub-view/types"; -import { VerticalSubViewsContainer } from "../../../../../components/sub-view/vertical/vertical-sub-views-container"; import type { Color, DifferentialEquation, Place, } from "../../../../../../core/types/sdcpn"; +import type { SubView } from "../../../../../components/sub-view/types"; +import { VerticalSubViewsContainer } from "../../../../../components/sub-view/vertical/vertical-sub-views-container"; import { DiffEqPropertiesContext } from "./context"; import { diffEqMainContentSubView } from "./subviews/main"; diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/differential-equation-properties/subviews/main.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/differential-equation-properties/subviews/main.tsx index 13695d5d558..b52e8020563 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/differential-equation-properties/subviews/main.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/differential-equation-properties/subviews/main.tsx @@ -2,6 +2,11 @@ import { css } from "@hashintel/ds-helpers/css"; import { useState } from "react"; import { TbDotsVertical, TbSparkles } from "react-icons/tb"; +import { + DEFAULT_DIFFERENTIAL_EQUATION_CODE, + generateDefaultDifferentialEquationCode, +} from "../../../../../../../core/default-codes"; +import { useIsReadOnly } from "../../../../../../../react/state/use-is-read-only"; import { Button } from "../../../../../../components/button"; import { IconButton } from "../../../../../../components/icon-button"; import { Input } from "../../../../../../components/input"; @@ -12,13 +17,8 @@ import type { SubView } from "../../../../../../components/sub-view/types"; import { Tooltip } from "../../../../../../components/tooltip"; import { DifferentialEquationIcon } from "../../../../../../constants/entity-icons"; import { UI_MESSAGES } from "../../../../../../constants/ui-messages"; -import { - DEFAULT_DIFFERENTIAL_EQUATION_CODE, - generateDefaultDifferentialEquationCode, -} from "../../../../../../../core/default-codes"; import { CodeEditor } from "../../../../../../monaco/code-editor"; import { getDocumentUri } from "../../../../../../monaco/editor-paths"; -import { useIsReadOnly } from "../../../../../../../react/state/use-is-read-only"; import { useDiffEqPropertiesContext } from "../context"; const colorDotStyle = css({ diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/multi-selection-panel.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/multi-selection-panel.tsx index e013b3c3883..71ffab5f41f 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/multi-selection-panel.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/multi-selection-panel.tsx @@ -3,16 +3,16 @@ import { createContext, use } from "react"; import { GrMultiple } from "react-icons/gr"; import { TbTrash } from "react-icons/tb"; -import { IconButton } from "../../../../components/icon-button"; -import type { SubView } from "../../../../components/sub-view/types"; -import { VerticalSubViewsContainer } from "../../../../components/sub-view/vertical/vertical-sub-views-container"; -import { UI_MESSAGES } from "../../../../constants/ui-messages"; -import { EditorContext } from "../../../../../react/state/editor-context"; import type { SelectionItem, SelectionMap, } from "../../../../../core/types/selection"; +import { EditorContext } from "../../../../../react/state/editor-context"; import { useIsReadOnly } from "../../../../../react/state/use-is-read-only"; +import { IconButton } from "../../../../components/icon-button"; +import type { SubView } from "../../../../components/sub-view/types"; +import { VerticalSubViewsContainer } from "../../../../components/sub-view/vertical/vertical-sub-views-container"; +import { UI_MESSAGES } from "../../../../constants/ui-messages"; const containerStyle = css({ display: "flex", diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/panel.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/panel.tsx index e4fd59570da..56695bbf4d6 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/panel.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/panel.tsx @@ -1,18 +1,18 @@ import { css, cva, cx } from "@hashintel/ds-helpers/css"; import { use, useCallback, useEffect, useState } from "react"; +import { EditorContext } from "../../../../../react/state/editor-context"; +import { MutationContext } from "../../../../../react/state/mutation-context"; +import { DEFAULT_PROPERTIES_PANEL_WIDTH } from "../../../../../react/state/panel-defaults"; +import { SDCPNContext } from "../../../../../react/state/sdcpn-context"; +import { usePanelTarget } from "../../../../../react/state/use-selection"; +import { UserSettingsContext } from "../../../../../react/state/user-settings-context"; import { GlassPanel } from "../../../../components/glass-panel"; import { MAX_PROPERTIES_PANEL_WIDTH, MIN_PROPERTIES_PANEL_WIDTH, PANEL_MARGIN, } from "../../../../constants/ui"; -import { DEFAULT_PROPERTIES_PANEL_WIDTH } from "../../../../../react/state/panel-defaults"; -import { EditorContext } from "../../../../../react/state/editor-context"; -import { MutationContext } from "../../../../../react/state/mutation-context"; -import { SDCPNContext } from "../../../../../react/state/sdcpn-context"; -import { usePanelTarget } from "../../../../../react/state/use-selection"; -import { UserSettingsContext } from "../../../../../react/state/user-settings-context"; import { ArcProperties } from "./arc-properties/main"; import { DifferentialEquationProperties } from "./differential-equation-properties/main"; import { MultiSelectionPanel } from "./multi-selection-panel"; diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/parameter-properties/main.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/parameter-properties/main.tsx index 9fc302d65d5..1624e9248c6 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/parameter-properties/main.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/parameter-properties/main.tsx @@ -1,8 +1,8 @@ import { css } from "@hashintel/ds-helpers/css"; +import type { Parameter } from "../../../../../../core/types/sdcpn"; import type { SubView } from "../../../../../components/sub-view/types"; import { VerticalSubViewsContainer } from "../../../../../components/sub-view/vertical/vertical-sub-views-container"; -import type { Parameter } from "../../../../../../core/types/sdcpn"; import { ParameterPropertiesContext } from "./context"; import { parameterMainContentSubView } from "./subviews/main"; diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/parameter-properties/subviews/main.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/parameter-properties/subviews/main.tsx index cd902adaa52..2b82aa66ec3 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/parameter-properties/subviews/main.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/parameter-properties/subviews/main.tsx @@ -1,13 +1,13 @@ import { css } from "@hashintel/ds-helpers/css"; import { useEffect, useState } from "react"; +import { validateVariableName } from "../../../../../../../core/validation/variable-name"; +import { useIsReadOnly } from "../../../../../../../react/state/use-is-read-only"; import { Input } from "../../../../../../components/input"; import { Section, SectionList } from "../../../../../../components/section"; import type { SubView } from "../../../../../../components/sub-view/types"; import { ParameterIcon } from "../../../../../../constants/entity-icons"; import { UI_MESSAGES } from "../../../../../../constants/ui-messages"; -import { useIsReadOnly } from "../../../../../../../react/state/use-is-read-only"; -import { validateVariableName } from "../../../../../../../core/validation/variable-name"; import { useParameterPropertiesContext } from "../context"; const errorMessageStyle = css({ diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/place-properties/main.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/place-properties/main.tsx index acceb5024c8..529f09b7227 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/place-properties/main.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/place-properties/main.tsx @@ -1,9 +1,9 @@ import { css } from "@hashintel/ds-helpers/css"; -import type { SubView } from "../../../../../components/sub-view/types"; -import { VerticalSubViewsContainer } from "../../../../../components/sub-view/vertical/vertical-sub-views-container"; import type { Color, Place } from "../../../../../../core/types/sdcpn"; import { useIsReadOnly } from "../../../../../../react/state/use-is-read-only"; +import type { SubView } from "../../../../../components/sub-view/types"; +import { VerticalSubViewsContainer } from "../../../../../components/sub-view/vertical/vertical-sub-views-container"; import { PlacePropertiesProvider } from "./context"; import { placeMainContentSubView } from "./subviews/main"; import { placeInitialStateSubView } from "./subviews/place-initial-state/subview"; diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/place-properties/subviews/main.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/place-properties/subviews/main.tsx index c2170705aed..ccf4e127ed7 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/place-properties/subviews/main.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/place-properties/subviews/main.tsx @@ -3,6 +3,10 @@ import { css } from "@hashintel/ds-helpers/css"; import { use, useEffect, useRef, useState } from "react"; import { TbArrowRight, TbTrash } from "react-icons/tb"; +import { validateEntityName } from "../../../../../../../core/validation/entity-name"; +import { EditorContext } from "../../../../../../../react/state/editor-context"; +import { MutationContext } from "../../../../../../../react/state/mutation-context"; +import { SDCPNContext } from "../../../../../../../react/state/sdcpn-context"; import { Button } from "../../../../../../components/button"; import { IconButton } from "../../../../../../components/icon-button"; import { Input } from "../../../../../../components/input"; @@ -12,10 +16,6 @@ import type { SubView } from "../../../../../../components/sub-view/types"; import { Switch } from "../../../../../../components/switch"; import { PlaceIcon } from "../../../../../../constants/entity-icons"; import { UI_MESSAGES } from "../../../../../../constants/ui-messages"; -import { EditorContext } from "../../../../../../../react/state/editor-context"; -import { MutationContext } from "../../../../../../../react/state/mutation-context"; -import { SDCPNContext } from "../../../../../../../react/state/sdcpn-context"; -import { validateEntityName } from "../../../../../../../core/validation/entity-name"; import { usePlacePropertiesContext } from "../context"; const errorMessageStyle = css({ diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/place-properties/subviews/place-initial-state/initial-state-editor.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/place-properties/subviews/place-initial-state/initial-state-editor.tsx index d75d8061733..7564b7aedf9 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/place-properties/subviews/place-initial-state/initial-state-editor.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/place-properties/subviews/place-initial-state/initial-state-editor.tsx @@ -1,10 +1,10 @@ import { use, useMemo } from "react"; -import type { SpreadsheetColumn } from "../../../../../../../components/spreadsheet"; -import { Spreadsheet } from "../../../../../../../components/spreadsheet"; import type { Color } from "../../../../../../../../core/types/sdcpn"; import { PlaybackContext } from "../../../../../../../../react/playback/context"; import { SimulationContext } from "../../../../../../../../react/simulation/context"; +import type { SpreadsheetColumn } from "../../../../../../../components/spreadsheet"; +import { Spreadsheet } from "../../../../../../../components/spreadsheet"; /** * InitialStateEditor - A component for editing initial tokens in a place diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/place-properties/subviews/place-initial-state/subview.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/place-properties/subviews/place-initial-state/subview.tsx index d5308e48110..1bbd6041fd0 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/place-properties/subviews/place-initial-state/subview.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/place-properties/subviews/place-initial-state/subview.tsx @@ -3,11 +3,11 @@ import { use } from "react"; import { LuLayers2 } from "react-icons/lu"; import { TbTrash } from "react-icons/tb"; +import { PlaybackContext } from "../../../../../../../../react/playback/context"; +import { SimulationContext } from "../../../../../../../../react/simulation/context"; import { NumberInput } from "../../../../../../../components/number-input"; import type { SubView } from "../../../../../../../components/sub-view/types"; import { UI_MESSAGES } from "../../../../../../../constants/ui-messages"; -import { PlaybackContext } from "../../../../../../../../react/playback/context"; -import { SimulationContext } from "../../../../../../../../react/simulation/context"; import { usePlacePropertiesContext } from "../../context"; import { InitialStateEditor } from "./initial-state-editor"; diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/place-properties/subviews/place-visualizer/subview.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/place-properties/subviews/place-visualizer/subview.tsx index aa90453ecd8..dee3e667e3c 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/place-properties/subviews/place-visualizer/subview.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/place-properties/subviews/place-visualizer/subview.tsx @@ -2,26 +2,26 @@ import { css } from "@hashintel/ds-helpers/css"; import { use, useEffect, useMemo, useState } from "react"; import { TbDotsVertical, TbSparkles } from "react-icons/tb"; -import { IconButton } from "../../../../../../../components/icon-button"; -import { Menu } from "../../../../../../../components/menu"; -import { SegmentGroup } from "../../../../../../../components/segment-group"; -import type { SubView } from "../../../../../../../components/sub-view/types"; -import { Switch } from "../../../../../../../components/switch"; -import { Tooltip } from "../../../../../../../components/tooltip"; -import { UI_MESSAGES } from "../../../../../../../constants/ui-messages"; import { DEFAULT_VISUALIZER_CODE, generateDefaultVisualizerCode, } from "../../../../../../../../core/default-codes"; +import { compileVisualizer } from "../../../../../../../../core/simulation/simulator/compile-visualizer"; import { mergeParameterValues, useDefaultParameterValues, } from "../../../../../../../../react/hooks/use-default-parameter-values"; -import { CodeEditor } from "../../../../../../../monaco/code-editor"; import { PlaybackContext } from "../../../../../../../../react/playback/context"; import { SimulationContext } from "../../../../../../../../react/simulation/context"; -import { compileVisualizer } from "../../../../../../../../core/simulation/simulator/compile-visualizer"; import { EditorContext } from "../../../../../../../../react/state/editor-context"; +import { IconButton } from "../../../../../../../components/icon-button"; +import { Menu } from "../../../../../../../components/menu"; +import { SegmentGroup } from "../../../../../../../components/segment-group"; +import type { SubView } from "../../../../../../../components/sub-view/types"; +import { Switch } from "../../../../../../../components/switch"; +import { Tooltip } from "../../../../../../../components/tooltip"; +import { UI_MESSAGES } from "../../../../../../../constants/ui-messages"; +import { CodeEditor } from "../../../../../../../monaco/code-editor"; import { usePlacePropertiesContext } from "../../context"; import { VisualizerErrorBoundary } from "./visualizer-error-boundary"; diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/properties-panel.stories.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/properties-panel.stories.tsx index b32f25912eb..1cf45777665 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/properties-panel.stories.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/properties-panel.stories.tsx @@ -8,11 +8,11 @@ import type { Place, Transition, } from "../../../../../core/types/sdcpn"; -import { MonacoProvider } from "../../../../monaco/provider"; import { SDCPNContext, type SDCPNContextValue, } from "../../../../../react/state/sdcpn-context"; +import { MonacoProvider } from "../../../../monaco/provider"; import { DifferentialEquationProperties } from "./differential-equation-properties/main"; import { ParameterProperties } from "./parameter-properties/main"; import { PlaceProperties } from "./place-properties/main"; diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/transition-properties/main.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/transition-properties/main.tsx index a7cdcbddb29..df0df94d0c5 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/transition-properties/main.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/transition-properties/main.tsx @@ -1,13 +1,13 @@ import { css } from "@hashintel/ds-helpers/css"; -import type { SubView } from "../../../../../components/sub-view/types"; -import { VerticalSubViewsContainer } from "../../../../../components/sub-view/vertical/vertical-sub-views-container"; import type { Color, Place, Transition, } from "../../../../../../core/types/sdcpn"; import { useIsReadOnly } from "../../../../../../react/state/use-is-read-only"; +import type { SubView } from "../../../../../components/sub-view/types"; +import { VerticalSubViewsContainer } from "../../../../../components/sub-view/vertical/vertical-sub-views-container"; import { TransitionPropertiesProvider } from "./context"; import { transitionMainContentSubView } from "./subviews/main"; import { transitionFiringTimeSubView } from "./subviews/transition-firing-time/subview"; diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/transition-properties/subviews/main.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/transition-properties/subviews/main.tsx index 8cabaad15b4..2fa26e8dcbd 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/transition-properties/subviews/main.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/transition-properties/subviews/main.tsx @@ -2,6 +2,8 @@ import { css } from "@hashintel/ds-helpers/css"; import { use, useEffect, useState } from "react"; import { TbTrash } from "react-icons/tb"; +import { validateDisplayName } from "../../../../../../../core/validation/display-name"; +import { MutationContext } from "../../../../../../../react/state/mutation-context"; import { ArcItem, ArcList, @@ -13,8 +15,6 @@ import { Section, SectionList } from "../../../../../../components/section"; import type { SubView } from "../../../../../../components/sub-view/types"; import { TransitionIcon } from "../../../../../../constants/entity-icons"; import { UI_MESSAGES } from "../../../../../../constants/ui-messages"; -import { MutationContext } from "../../../../../../../react/state/mutation-context"; -import { validateDisplayName } from "../../../../../../../core/validation/display-name"; import { useTransitionPropertiesContext } from "../context"; const errorMessageStyle = css({ diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/transition-properties/subviews/transition-firing-time/subview.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/transition-properties/subviews/transition-firing-time/subview.tsx index 537e40559f0..ecf4bd83058 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/transition-properties/subviews/transition-firing-time/subview.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/transition-properties/subviews/transition-firing-time/subview.tsx @@ -2,16 +2,16 @@ import { css } from "@hashintel/ds-helpers/css"; import { use } from "react"; import { TbDotsVertical, TbSparkles } from "react-icons/tb"; +import { generateDefaultLambdaCode } from "../../../../../../../../core/default-codes"; +import { EditorContext } from "../../../../../../../../react/state/editor-context"; import { IconButton } from "../../../../../../../components/icon-button"; import { Menu } from "../../../../../../../components/menu"; import { SegmentGroup } from "../../../../../../../components/segment-group"; import type { SubView } from "../../../../../../../components/sub-view/types"; import { Tooltip } from "../../../../../../../components/tooltip"; import { UI_MESSAGES } from "../../../../../../../constants/ui-messages"; -import { generateDefaultLambdaCode } from "../../../../../../../../core/default-codes"; import { CodeEditor } from "../../../../../../../monaco/code-editor"; import { getDocumentUri } from "../../../../../../../monaco/editor-paths"; -import { EditorContext } from "../../../../../../../../react/state/editor-context"; import { useTransitionPropertiesContext } from "../../context"; const contentStyle = css({ diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/transition-properties/subviews/transition-results/subview.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/transition-properties/subviews/transition-results/subview.tsx index 7cdf5cd5534..251518c6e84 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/transition-properties/subviews/transition-results/subview.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/transition-properties/subviews/transition-results/subview.tsx @@ -2,15 +2,15 @@ import { css } from "@hashintel/ds-helpers/css"; import { use } from "react"; import { TbDotsVertical, TbSparkles } from "react-icons/tb"; +import { generateDefaultTransitionKernelCode } from "../../../../../../../../core/default-codes"; +import { EditorContext } from "../../../../../../../../react/state/editor-context"; import { IconButton } from "../../../../../../../components/icon-button"; import { Menu } from "../../../../../../../components/menu"; import type { SubView } from "../../../../../../../components/sub-view/types"; import { Tooltip } from "../../../../../../../components/tooltip"; import { UI_MESSAGES } from "../../../../../../../constants/ui-messages"; -import { generateDefaultTransitionKernelCode } from "../../../../../../../../core/default-codes"; import { CodeEditor } from "../../../../../../../monaco/code-editor"; import { getDocumentUri } from "../../../../../../../monaco/editor-paths"; -import { EditorContext } from "../../../../../../../../react/state/editor-context"; import { useTransitionPropertiesContext } from "../../context"; const aiMenuItemStyle = css({ diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/type-properties/main.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/type-properties/main.tsx index ab1414ce771..009abb96da3 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/type-properties/main.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/type-properties/main.tsx @@ -1,8 +1,8 @@ import { css } from "@hashintel/ds-helpers/css"; +import type { Color } from "../../../../../../core/types/sdcpn"; import type { SubView } from "../../../../../components/sub-view/types"; import { VerticalSubViewsContainer } from "../../../../../components/sub-view/vertical/vertical-sub-views-container"; -import type { Color } from "../../../../../../core/types/sdcpn"; import { TypePropertiesContext } from "./context"; import { typeMainContentSubView } from "./subviews/main"; diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/type-properties/subviews/main.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/type-properties/subviews/main.tsx index 87076ad94bf..541c007d1b3 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/type-properties/subviews/main.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/type-properties/subviews/main.tsx @@ -3,6 +3,7 @@ import { useState } from "react"; import { TbPlus, TbX } from "react-icons/tb"; import { v4 as uuidv4 } from "uuid"; +import { useIsReadOnly } from "../../../../../../../react/state/use-is-read-only"; import { IconButton } from "../../../../../../components/icon-button"; import { Input } from "../../../../../../components/input"; import { Section, SectionList } from "../../../../../../components/section"; @@ -10,7 +11,6 @@ import type { SubView } from "../../../../../../components/sub-view/types"; import { Tooltip } from "../../../../../../components/tooltip"; import { TokenTypeIcon } from "../../../../../../constants/entity-icons"; import { UI_MESSAGES } from "../../../../../../constants/ui-messages"; -import { useIsReadOnly } from "../../../../../../../react/state/use-is-read-only"; import { ColorSelect } from "../color-select"; import { useTypePropertiesContext } from "../context"; diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/create-experiment-drawer.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/create-experiment-drawer.tsx index 43225d9973f..dd4a59de439 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/create-experiment-drawer.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/create-experiment-drawer.tsx @@ -2,16 +2,16 @@ import { css } from "@hashintel/ds-helpers/css"; import { use, useState } from "react"; import { TbPlayerPlay } from "react-icons/tb"; -import { Button } from "../../../../components/button"; -import { Drawer } from "../../../../components/drawer"; -import { Section, SectionList } from "../../../../components/section"; -import { Select } from "../../../../components/select"; -import { CodeEditor } from "../../../../monaco/code-editor"; import type { Scenario, ScenarioParameter, } from "../../../../../core/types/sdcpn"; import { SDCPNContext } from "../../../../../react/state/sdcpn-context"; +import { Button } from "../../../../components/button"; +import { Drawer } from "../../../../components/drawer"; +import { Section, SectionList } from "../../../../components/section"; +import { Select } from "../../../../components/select"; +import { CodeEditor } from "../../../../monaco/code-editor"; // -- Styles ------------------------------------------------------------------- diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/create-metric-drawer.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/create-metric-drawer.tsx index a37ada5309e..5b6d1099421 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/create-metric-drawer.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/create-metric-drawer.tsx @@ -2,13 +2,13 @@ import { css } from "@hashintel/ds-helpers/css"; import { useStore } from "@tanstack/react-form"; import { use } from "react"; -import { Button } from "../../../../components/button"; -import { Drawer } from "../../../../components/drawer"; import { metricSchema } from "../../../../../core/schemas/metric-schema"; -import { LanguageClientContext } from "../../../../../react/lsp/context"; import { compileMetric } from "../../../../../core/simulation/compile-metric"; +import { LanguageClientContext } from "../../../../../react/lsp/context"; import { MutationContext } from "../../../../../react/state/mutation-context"; import { SDCPNContext } from "../../../../../react/state/sdcpn-context"; +import { Button } from "../../../../components/button"; +import { Drawer } from "../../../../components/drawer"; import { MetricFormBody, type MetricFormInstance, diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/create-scenario-drawer.stories.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/create-scenario-drawer.stories.tsx index 62849fdfb4c..d8a02988d18 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/create-scenario-drawer.stories.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/create-scenario-drawer.stories.tsx @@ -1,11 +1,11 @@ import type { Meta, StoryObj } from "@storybook/react-vite"; import { LanguageClientProvider } from "../../../../../react/lsp/provider"; -import { MonacoProvider } from "../../../../monaco/provider"; import { SDCPNContext, type SDCPNContextValue, } from "../../../../../react/state/sdcpn-context"; +import { MonacoProvider } from "../../../../monaco/provider"; import { CreateScenarioForm } from "./create-scenario-drawer"; // -- Stub data ---------------------------------------------------------------- diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/create-scenario-drawer.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/create-scenario-drawer.tsx index 3c72481f941..f2682f8f303 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/create-scenario-drawer.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/create-scenario-drawer.tsx @@ -2,20 +2,20 @@ import { css } from "@hashintel/ds-helpers/css"; import { useStore } from "@tanstack/react-form"; import { use } from "react"; -import { Button } from "../../../../components/button"; -import { Drawer } from "../../../../components/drawer"; import { scenarioSchema } from "../../../../../core/schemas/scenario-schema"; import type { Color } from "../../../../../core/types/sdcpn"; import { LanguageClientContext } from "../../../../../react/lsp/context"; import { MutationContext } from "../../../../../react/state/mutation-context"; import { SDCPNContext } from "../../../../../react/state/sdcpn-context"; +import { Button } from "../../../../components/button"; +import { Drawer } from "../../../../components/drawer"; +import { ScenarioErrorDisplay } from "./scenario-error-display"; import { ScenarioFormBody, type ScenarioFormInstance, useScenarioForm, } from "./scenario-form"; import { EMPTY_SCENARIO_FORM_STATE } from "./scenario-form-defaults"; -import { ScenarioErrorDisplay } from "./scenario-error-display"; import { summarizeScenarioLspErrors } from "./scenario-lsp"; import { buildScenarioFromFormState } from "./scenario-mapping"; diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/metric-form.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/metric-form.tsx index 56b2aacf366..ec7672ca183 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/metric-form.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/metric-form.tsx @@ -2,9 +2,9 @@ import { css } from "@hashintel/ds-helpers/css"; import { useForm, useStore } from "@tanstack/react-form"; import { use, useEffect, useRef, useState } from "react"; +import { LanguageClientContext } from "../../../../../react/lsp/context"; import { Input } from "../../../../components/input"; import { Section, SectionList } from "../../../../components/section"; -import { LanguageClientContext } from "../../../../../react/lsp/context"; import { CodeEditor } from "../../../../monaco/code-editor"; import { getMetricDocumentUri } from "../../../../monaco/editor-paths"; diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/scenario-form.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/scenario-form.tsx index 63588390658..db67a6dc7ff 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/scenario-form.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/scenario-form.tsx @@ -3,13 +3,6 @@ import { useForm, useStore } from "@tanstack/react-form"; import { use, useEffect, useRef, useState } from "react"; import { TbPlus, TbTrash } from "react-icons/tb"; -import { IconButton } from "../../../../components/icon-button"; -import { Input } from "../../../../components/input"; -import { Section, SectionList } from "../../../../components/section"; -import { Select } from "../../../../components/select"; -import type { SpreadsheetColumn } from "../../../../components/spreadsheet"; -import { Spreadsheet } from "../../../../components/spreadsheet"; -import { Switch } from "../../../../components/switch"; import type { Color, Parameter, @@ -17,9 +10,16 @@ import type { ScenarioParameter, } from "../../../../../core/types/sdcpn"; import { LanguageClientContext } from "../../../../../react/lsp/context"; +import { IconButton } from "../../../../components/icon-button"; +import { Input } from "../../../../components/input"; +import { NumberInput } from "../../../../components/number-input"; +import { Section, SectionList } from "../../../../components/section"; +import { Select } from "../../../../components/select"; +import type { SpreadsheetColumn } from "../../../../components/spreadsheet"; +import { Spreadsheet } from "../../../../components/spreadsheet"; +import { Switch } from "../../../../components/switch"; import { CodeEditor } from "../../../../monaco/code-editor"; import { getScenarioDocumentUri } from "../../../../monaco/editor-paths"; -import { NumberInput } from "../../../../components/number-input"; // -- Form styles -------------------------------------------------------------- diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/simulate-view.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/simulate-view.tsx index 6d8848e0a07..1b35c6143ac 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/simulate-view.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/simulate-view.tsx @@ -4,16 +4,16 @@ import { LuLayers2 } from "react-icons/lu"; import { PiFlaskBold } from "react-icons/pi"; import { TbChartBar, TbPlus } from "react-icons/tb"; -import { Button } from "../../../../components/button"; -import type { SegmentOption } from "../../../../components/segment-group"; -import { SegmentGroup } from "../../../../components/segment-group"; -import { Stack } from "../../../../components/stack"; import type { Metric, Scenario } from "../../../../../core/types/sdcpn"; import { EditorContext, type SimulateViewMode, } from "../../../../../react/state/editor-context"; import { SDCPNContext } from "../../../../../react/state/sdcpn-context"; +import { Button } from "../../../../components/button"; +import type { SegmentOption } from "../../../../components/segment-group"; +import { SegmentGroup } from "../../../../components/segment-group"; +import { Stack } from "../../../../components/stack"; import { CreateExperimentDrawer } from "./create-experiment-drawer"; import { CreateMetricDrawer } from "./create-metric-drawer"; import { CreateScenarioDrawer } from "./create-scenario-drawer"; diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/view-metric-drawer.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/view-metric-drawer.tsx index 5cfc4510fbc..553a2987820 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/view-metric-drawer.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/view-metric-drawer.tsx @@ -2,14 +2,14 @@ import { css } from "@hashintel/ds-helpers/css"; import { useStore } from "@tanstack/react-form"; import { use } from "react"; -import { Button } from "../../../../components/button"; -import { Drawer } from "../../../../components/drawer"; import { metricSchema } from "../../../../../core/schemas/metric-schema"; +import { compileMetric } from "../../../../../core/simulation/compile-metric"; import type { Metric } from "../../../../../core/types/sdcpn"; import { LanguageClientContext } from "../../../../../react/lsp/context"; -import { compileMetric } from "../../../../../core/simulation/compile-metric"; import { MutationContext } from "../../../../../react/state/mutation-context"; import { SDCPNContext } from "../../../../../react/state/sdcpn-context"; +import { Button } from "../../../../components/button"; +import { Drawer } from "../../../../components/drawer"; import { MetricFormBody, type MetricFormInstance, diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/view-scenario-drawer.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/view-scenario-drawer.tsx index 82a93916532..4a611cb0945 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/view-scenario-drawer.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/view-scenario-drawer.tsx @@ -2,20 +2,20 @@ import { css } from "@hashintel/ds-helpers/css"; import { useStore } from "@tanstack/react-form"; import { use } from "react"; -import { Button } from "../../../../components/button"; -import { Drawer } from "../../../../components/drawer"; import { scenarioSchema } from "../../../../../core/schemas/scenario-schema"; import type { Color, Scenario } from "../../../../../core/types/sdcpn"; import { LanguageClientContext } from "../../../../../react/lsp/context"; import { MutationContext } from "../../../../../react/state/mutation-context"; import { SDCPNContext } from "../../../../../react/state/sdcpn-context"; +import { Button } from "../../../../components/button"; +import { Drawer } from "../../../../components/drawer"; +import { ScenarioErrorDisplay } from "./scenario-error-display"; import { ScenarioFormBody, type ScenarioFormInstance, type ScenarioFormState, useScenarioForm, } from "./scenario-form"; -import { ScenarioErrorDisplay } from "./scenario-error-display"; import { summarizeScenarioLspErrors } from "./scenario-lsp"; import { buildScenarioFromFormState } from "./scenario-mapping"; diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/run-auto-layout.ts b/libs/@hashintel/petrinaut/src/ui/views/Editor/run-auto-layout.ts index 0eb8e18c761..e028bd9ff6e 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/run-auto-layout.ts +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/run-auto-layout.ts @@ -1,6 +1,6 @@ -import { calculateGraphLayout } from "../../lib/calculate-graph-layout"; import type { SDCPN } from "../../../core/types/sdcpn"; import type { MutationContextValue } from "../../../react/state/mutation-context"; +import { calculateGraphLayout } from "../../lib/calculate-graph-layout"; type NodeDimensions = { place: { width: number; height: number }; diff --git a/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/classic-place-node.tsx b/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/classic-place-node.tsx index 40b7e7c4cfb..185251d7752 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/classic-place-node.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/classic-place-node.tsx @@ -3,11 +3,11 @@ import { Handle, type NodeProps, Position } from "@xyflow/react"; import { use } from "react"; import { TbMathFunction } from "react-icons/tb"; -import { hexToHsl } from "../../../lib/hsl-color"; -import { splitPascalCase } from "../../../lib/split-pascal-case"; import { PlaybackContext } from "../../../../react/playback/context"; import { SimulationContext } from "../../../../react/simulation/context"; import { EditorContext } from "../../../../react/state/editor-context"; +import { hexToHsl } from "../../../lib/hsl-color"; +import { splitPascalCase } from "../../../lib/split-pascal-case"; import type { PlaceNodeType } from "../reactflow-types"; import { handleStyling } from "../styles/styling"; diff --git a/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/mini-map.tsx b/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/mini-map.tsx index 203334538ff..6aa62703d4a 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/mini-map.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/mini-map.tsx @@ -3,9 +3,9 @@ import type { MiniMapNodeProps, MiniMapProps } from "@xyflow/react"; import { MiniMap as ReactFlowMiniMap, useStore } from "@xyflow/react"; import { use } from "react"; +import { EditorContext } from "../../../../react/state/editor-context"; import { PANEL_MARGIN } from "../../../constants/ui"; import { hexToHsl } from "../../../lib/hsl-color"; -import { EditorContext } from "../../../../react/state/editor-context"; import type { NodeType } from "../reactflow-types"; const miniMapClassName = css({ diff --git a/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/place-node.tsx b/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/place-node.tsx index 527ebd071f9..0de7136db24 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/place-node.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/place-node.tsx @@ -3,10 +3,10 @@ import type { NodeProps } from "@xyflow/react"; import { use } from "react"; import { TbCircleFilled, TbMathFunction } from "react-icons/tb"; -import { hexToHsl } from "../../../lib/hsl-color"; import { PlaybackContext } from "../../../../react/playback/context"; import { SimulationContext } from "../../../../react/simulation/context"; import { EditorContext } from "../../../../react/state/editor-context"; +import { hexToHsl } from "../../../lib/hsl-color"; import type { PlaceNodeType } from "../reactflow-types"; import { iconBadgeStyle, diff --git a/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/viewport-controls.tsx b/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/viewport-controls.tsx index 28ef11c2cd9..e8f5d071736 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/viewport-controls.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/viewport-controls.tsx @@ -9,9 +9,9 @@ import { TbSettings, } from "react-icons/tb"; +import { EditorContext } from "../../../../react/state/editor-context"; import { IconButton } from "../../../components/icon-button"; import { PANEL_MARGIN } from "../../../constants/ui"; -import { EditorContext } from "../../../../react/state/editor-context"; import type { ViewportAction } from "../../../types/viewport-action"; import { ViewportSettingsDialog } from "./viewport-settings-dialog"; diff --git a/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/viewport-settings-dialog.tsx b/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/viewport-settings-dialog.tsx index a1ded3220f9..44f80bf7e8c 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/viewport-settings-dialog.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/viewport-settings-dialog.tsx @@ -1,12 +1,12 @@ import { css } from "@hashintel/ds-helpers/css"; import { use } from "react"; +import type { ArcRendering } from "../../../../react/state/user-settings-context"; +import { UserSettingsContext } from "../../../../react/state/user-settings-context"; import { Button } from "../../../components/button"; import { Dialog } from "../../../components/dialog"; import { Select } from "../../../components/select"; import { Switch } from "../../../components/switch"; -import type { ArcRendering } from "../../../../react/state/user-settings-context"; -import { UserSettingsContext } from "../../../../react/state/user-settings-context"; const rowStyle = css({ display: "grid", diff --git a/libs/@hashintel/petrinaut/src/ui/views/SDCPN/hooks/use-apply-node-changes.ts b/libs/@hashintel/petrinaut/src/ui/views/SDCPN/hooks/use-apply-node-changes.ts index e552822d125..6d6cada92ff 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/SDCPN/hooks/use-apply-node-changes.ts +++ b/libs/@hashintel/petrinaut/src/ui/views/SDCPN/hooks/use-apply-node-changes.ts @@ -1,12 +1,12 @@ import type { EdgeChange, NodeChange } from "@xyflow/react"; import { use } from "react"; -import { snapPositionToGrid } from "../../../lib/snap-position-to-grid"; +import type { SelectionMap } from "../../../../core/types/selection"; import { EditorContext } from "../../../../react/state/editor-context"; import { MutationContext } from "../../../../react/state/mutation-context"; import { SDCPNContext } from "../../../../react/state/sdcpn-context"; -import type { SelectionMap } from "../../../../core/types/selection"; import { UserSettingsContext } from "../../../../react/state/user-settings-context"; +import { snapPositionToGrid } from "../../../lib/snap-position-to-grid"; /** * A hook that provides a callback to apply ReactFlow node changes to the SDCPN store. diff --git a/libs/@hashintel/petrinaut/src/ui/views/SDCPN/hooks/use-recenter-on-panel-open.ts b/libs/@hashintel/petrinaut/src/ui/views/SDCPN/hooks/use-recenter-on-panel-open.ts index e5d6d6435bb..32ba805d55e 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/SDCPN/hooks/use-recenter-on-panel-open.ts +++ b/libs/@hashintel/petrinaut/src/ui/views/SDCPN/hooks/use-recenter-on-panel-open.ts @@ -1,9 +1,9 @@ -import type { PetrinautReactFlowInstance, NodeType } from "../reactflow-types"; import { use, useEffect, useRef } from "react"; -import { recenterToFitViewport, getViewportRect } from "../../../lib/viewport"; -import { EditorContext } from "../../../../react/state/editor-context"; import { parseArcId } from "../../../../core/types/selection"; +import { EditorContext } from "../../../../react/state/editor-context"; +import { recenterToFitViewport, getViewportRect } from "../../../lib/viewport"; +import type { PetrinautReactFlowInstance, NodeType } from "../reactflow-types"; const RE_CENTER_PADDING = 20; diff --git a/libs/@hashintel/petrinaut/src/ui/views/SDCPN/hooks/use-sdcpn-to-react-flow.ts b/libs/@hashintel/petrinaut/src/ui/views/SDCPN/hooks/use-sdcpn-to-react-flow.ts index d81077e75a5..98e9281d892 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/SDCPN/hooks/use-sdcpn-to-react-flow.ts +++ b/libs/@hashintel/petrinaut/src/ui/views/SDCPN/hooks/use-sdcpn-to-react-flow.ts @@ -1,16 +1,16 @@ import { MarkerType } from "@xyflow/react"; import { use } from "react"; +import { generateArcId } from "../../../../core/arc-id"; +import { PlaybackContext } from "../../../../react/playback/context"; +import { EditorContext } from "../../../../react/state/editor-context"; +import { SDCPNContext } from "../../../../react/state/sdcpn-context"; +import { UserSettingsContext } from "../../../../react/state/user-settings-context"; import { hexToHsl } from "../../../lib/hsl-color"; import { classicNodeDimensions, compactNodeDimensions, } from "../node-dimensions"; -import { PlaybackContext } from "../../../../react/playback/context"; -import { generateArcId } from "../../../../core/arc-id"; -import { EditorContext } from "../../../../react/state/editor-context"; -import { SDCPNContext } from "../../../../react/state/sdcpn-context"; -import { UserSettingsContext } from "../../../../react/state/user-settings-context"; import type { NodeType, PetrinautReactFlowDefinitionObject, diff --git a/libs/@hashintel/petrinaut/src/ui/views/SDCPN/sdcpn-view.tsx b/libs/@hashintel/petrinaut/src/ui/views/SDCPN/sdcpn-view.tsx index 032de322226..de2ca0a1560 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/SDCPN/sdcpn-view.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/SDCPN/sdcpn-view.tsx @@ -1,8 +1,5 @@ import "@xyflow/react/dist/style.css"; - import { css } from "@hashintel/ds-helpers/css"; -import { useResizeObserver } from "./hooks/util/use-resize-observer"; -import { useDebounceCallback } from "./hooks/util/use-debounce-callback"; import type { Connection } from "@xyflow/react"; import { Background, ReactFlow, SelectionMode } from "@xyflow/react"; import { @@ -15,8 +12,6 @@ import { } from "react"; import { v4 as generateUuid } from "uuid"; -import { SNAP_GRID_SIZE } from "../../constants/ui"; -import { snapPositionToGrid } from "../../lib/snap-position-to-grid"; import { DEFAULT_TRANSITION_KERNEL_CODE, generateDefaultLambdaCode, @@ -26,6 +21,8 @@ import { MutationContext } from "../../../react/state/mutation-context"; import { SDCPNContext } from "../../../react/state/sdcpn-context"; import { useIsReadOnly } from "../../../react/state/use-is-read-only"; import { UserSettingsContext } from "../../../react/state/user-settings-context"; +import { SNAP_GRID_SIZE } from "../../constants/ui"; +import { snapPositionToGrid } from "../../lib/snap-position-to-grid"; import type { ViewportAction } from "../../types/viewport-action"; import { Arc } from "./components/arc"; import { ClassicPlaceNode } from "./components/classic-place-node"; @@ -37,6 +34,8 @@ import { ViewportControls } from "./components/viewport-controls"; import { useApplyNodeChanges } from "./hooks/use-apply-node-changes"; import { useRecenterOnPanelOpen } from "./hooks/use-recenter-on-panel-open"; import { useSdcpnToReactFlow } from "./hooks/use-sdcpn-to-react-flow"; +import { useDebounceCallback } from "./hooks/util/use-debounce-callback"; +import { useResizeObserver } from "./hooks/util/use-resize-observer"; import type { PetrinautReactFlowInstance } from "./reactflow-types"; const COMPACT_NODE_TYPES = { diff --git a/libs/@hashintel/petrinaut/vite.config.ts b/libs/@hashintel/petrinaut/vite.config.ts index 6cac9ec231f..b03009d8e84 100644 --- a/libs/@hashintel/petrinaut/vite.config.ts +++ b/libs/@hashintel/petrinaut/vite.config.ts @@ -1,7 +1,7 @@ import babel from "@rolldown/plugin-babel"; import react, { reactCompilerPreset } from "@vitejs/plugin-react"; -import { replacePlugin } from "rolldown/plugins"; import { dts } from "rolldown-plugin-dts"; +import { replacePlugin } from "rolldown/plugins"; import { defineConfig, esmExternalRequirePlugin } from "vite"; /** diff --git a/libs/@hashintel/query-editor/LICENSE.md b/libs/@hashintel/query-editor/LICENSE.md index ceb3970344b..9a70d795493 100644 --- a/libs/@hashintel/query-editor/LICENSE.md +++ b/libs/@hashintel/query-editor/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,20 +200,20 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified +- **a)** The work must carry prominent notices stating that you modified it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is +- **b)** The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no + regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display +- **d)** If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,11 +235,11 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product +- **a)** Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product +- **b)** Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product @@ -251,24 +250,24 @@ in one of these ways: more than your reasonable cost of physically performing this conveying of source, or **(2)** access to copy the Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. -* **d)** Convey the object code by offering access from a designated +- **d)** Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the + Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided +- **e)** Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the +- **a)** Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or +- **b)** Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or +- **c)** Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or +- **d)** Limiting the use for publicity purposes of names of licensors or authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some +- **e)** Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that +- **f)** Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/libs/@hashintel/query-editor/eslint.config.js b/libs/@hashintel/query-editor/eslint.config.js index d350c93c502..ba63cf1afdd 100644 --- a/libs/@hashintel/query-editor/eslint.config.js +++ b/libs/@hashintel/query-editor/eslint.config.js @@ -1,5 +1,5 @@ -import storybook from "eslint-plugin-storybook"; import { createBase, disableRules } from "@local/eslint/deprecated"; +import storybook from "eslint-plugin-storybook"; export default [ ...createBase(import.meta.dirname), diff --git a/libs/@hashintel/query-editor/package.json b/libs/@hashintel/query-editor/package.json index 9b8e89891d6..c7e0935709e 100644 --- a/libs/@hashintel/query-editor/package.json +++ b/libs/@hashintel/query-editor/package.json @@ -17,8 +17,8 @@ "fix:eslint": "eslint --fix .", "lint:eslint": "eslint --report-unused-disable-directives .", "lint:tsc": "tsc --noEmit", - "prepublishOnly": "PACKAGE_DIR=$(pwd) yarn workspace @local/repo-chores exe scripts/prepublish.ts", - "postpublish": "PACKAGE_DIR=$(pwd) yarn workspace @local/repo-chores exe scripts/postpublish.ts" + "postpublish": "PACKAGE_DIR=$(pwd) yarn workspace @local/repo-chores exe scripts/postpublish.ts", + "prepublishOnly": "PACKAGE_DIR=$(pwd) yarn workspace @local/repo-chores exe scripts/prepublish.ts" }, "dependencies": { "@blockprotocol/graph": "workspace:*", diff --git a/libs/@hashintel/refractive/README.md b/libs/@hashintel/refractive/README.md index bef49f33b7c..d18965ecc28 100644 --- a/libs/@hashintel/refractive/README.md +++ b/libs/@hashintel/refractive/README.md @@ -46,5 +46,5 @@ const RefractiveButton = refractive(Button); }} > Click Me - +; ``` diff --git a/libs/@hashintel/refractive/package.json b/libs/@hashintel/refractive/package.json index cdfc715858d..aeb00e017c8 100644 --- a/libs/@hashintel/refractive/package.json +++ b/libs/@hashintel/refractive/package.json @@ -22,13 +22,13 @@ "types": "./dist/index.d.ts", "scripts": { "build": "vite build", + "build-storybook": "storybook build", "dev": "storybook dev -p 6006", "dev:lib": "vite build --watch", - "lint:eslint": "oxlint --type-aware --report-unused-disable-directives-severity=error .", "fix:eslint": "oxlint --fix --type-aware --report-unused-disable-directives-severity=error .", + "lint:eslint": "oxlint --type-aware --report-unused-disable-directives-severity=error .", "lint:tsc": "tsgo --noEmit", - "prepublishOnly": "yarn build", - "build-storybook": "storybook build" + "prepublishOnly": "yarn build" }, "devDependencies": { "@rolldown/plugin-babel": "0.2.1", diff --git a/libs/@hashintel/type-editor/LICENSE.md b/libs/@hashintel/type-editor/LICENSE.md index ceb3970344b..9a70d795493 100644 --- a/libs/@hashintel/type-editor/LICENSE.md +++ b/libs/@hashintel/type-editor/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,20 +200,20 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified +- **a)** The work must carry prominent notices stating that you modified it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is +- **b)** The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no + regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display +- **d)** If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,11 +235,11 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product +- **a)** Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product +- **b)** Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product @@ -251,24 +250,24 @@ in one of these ways: more than your reasonable cost of physically performing this conveying of source, or **(2)** access to copy the Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. -* **d)** Convey the object code by offering access from a designated +- **d)** Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the + Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided +- **e)** Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the +- **a)** Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or +- **b)** Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or +- **c)** Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or +- **d)** Limiting the use for publicity purposes of names of licensors or authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some +- **e)** Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that +- **f)** Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/libs/@hashintel/type-editor/eslint.config.js b/libs/@hashintel/type-editor/eslint.config.js index d350c93c502..ba63cf1afdd 100644 --- a/libs/@hashintel/type-editor/eslint.config.js +++ b/libs/@hashintel/type-editor/eslint.config.js @@ -1,5 +1,5 @@ -import storybook from "eslint-plugin-storybook"; import { createBase, disableRules } from "@local/eslint/deprecated"; +import storybook from "eslint-plugin-storybook"; export default [ ...createBase(import.meta.dirname), diff --git a/libs/@hashintel/type-editor/package.json b/libs/@hashintel/type-editor/package.json index d0e3738de4e..3c4879ebb0f 100644 --- a/libs/@hashintel/type-editor/package.json +++ b/libs/@hashintel/type-editor/package.json @@ -17,8 +17,8 @@ "fix:eslint": "eslint --fix .", "lint:eslint": "eslint --report-unused-disable-directives .", "lint:tsc": "tsc --noEmit", - "prepublishOnly": "PACKAGE_DIR=$(pwd) yarn workspace @local/repo-chores exe scripts/prepublish.ts", - "postpublish": "PACKAGE_DIR=$(pwd) yarn workspace @local/repo-chores exe scripts/postpublish.ts" + "postpublish": "PACKAGE_DIR=$(pwd) yarn workspace @local/repo-chores exe scripts/postpublish.ts", + "prepublishOnly": "PACKAGE_DIR=$(pwd) yarn workspace @local/repo-chores exe scripts/prepublish.ts" }, "dependencies": { "@blockprotocol/graph": "workspace:*", diff --git a/libs/@hashintel/type-editor/src/entity-type-editor/property-list-card/property-row.tsx b/libs/@hashintel/type-editor/src/entity-type-editor/property-list-card/property-row.tsx index 3bee89b2fa7..ab4bd13dbec 100644 --- a/libs/@hashintel/type-editor/src/entity-type-editor/property-list-card/property-row.tsx +++ b/libs/@hashintel/type-editor/src/entity-type-editor/property-list-card/property-row.tsx @@ -133,8 +133,8 @@ export const PropertyRow = ({ const array = "type" in ref; const required = Boolean( selectedProperty && - "required" in selectedProperty && - selectedProperty.required?.includes(propertyId as BaseUrl), + "required" in selectedProperty && + selectedProperty.required?.includes(propertyId as BaseUrl), ); return [ ...childrenArray, diff --git a/libs/@local/advanced-types/LICENSE.md b/libs/@local/advanced-types/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/libs/@local/advanced-types/LICENSE.md +++ b/libs/@local/advanced-types/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/libs/@local/effect-dns/hickory/tests/dummy.test.ts b/libs/@local/effect-dns/hickory/tests/dummy.test.ts index a6fe0c4bbc2..33cf2c19847 100644 --- a/libs/@local/effect-dns/hickory/tests/dummy.test.ts +++ b/libs/@local/effect-dns/hickory/tests/dummy.test.ts @@ -1,6 +1,5 @@ -import { describe, test, expect } from "vitest"; - import { sum } from "@local/effect-dns-hickory"; +import { describe, test, expect } from "vitest"; describe("example", () => { test("should work", () => { diff --git a/libs/@local/eslint/LICENSE.md b/libs/@local/eslint/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/libs/@local/eslint/LICENSE.md +++ b/libs/@local/eslint/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/libs/@local/eslint/src/builtIn.ts b/libs/@local/eslint/src/builtIn.ts index 829e99fce51..050a98a5866 100644 --- a/libs/@local/eslint/src/builtIn.ts +++ b/libs/@local/eslint/src/builtIn.ts @@ -1,6 +1,7 @@ import { Array as ReadonlyArray, Option, pipe, Predicate } from "effect"; import type { PartialDeep } from "type-fest"; +import type { Options } from "./index.js"; import type { NoRestrictedImportsRule, NormalizedNoRestrictedImportsRule, @@ -8,8 +9,6 @@ import type { } from "./types.js"; import { defineConfig, type ESConfig } from "./utils.js"; -import type { Options } from "./index.js"; - const normalizeRestrictedImports = ( rule: Partial, ): NormalizedNoRestrictedImportsRule => ({ diff --git a/libs/@local/eslint/src/deprecated/base.ts b/libs/@local/eslint/src/deprecated/base.ts index d02d8db7c40..bc8b381f4e3 100644 --- a/libs/@local/eslint/src/deprecated/base.ts +++ b/libs/@local/eslint/src/deprecated/base.ts @@ -1,19 +1,19 @@ import path from "node:path"; import { fileURLToPath } from "node:url"; +import { FlatCompat } from "@eslint/eslintrc"; +import js from "@eslint/js"; +import typescriptEslint from "@typescript-eslint/eslint-plugin"; +import tsParser from "@typescript-eslint/parser"; +import { Array, pipe, Record, Struct } from "effect"; import getGitignorePatterns from "eslint-config-flat-gitignore"; -import importPlugin from "eslint-plugin-import"; import { ignores } from "eslint-config-sheriff"; import canonical from "eslint-plugin-canonical"; +import importPlugin from "eslint-plugin-import"; import reactHooks from "eslint-plugin-react-hooks"; import simpleImportSort from "eslint-plugin-simple-import-sort"; import unicorn from "eslint-plugin-unicorn"; import globals from "globals"; -import { FlatCompat } from "@eslint/eslintrc"; -import js from "@eslint/js"; -import typescriptEslint from "@typescript-eslint/eslint-plugin"; -import tsParser from "@typescript-eslint/parser"; -import { Array, pipe, Record, Struct } from "effect"; import { projectIgnoreFiles, type ESConfig } from "../utils.js"; diff --git a/libs/@local/eslint/src/deprecated/block.ts b/libs/@local/eslint/src/deprecated/block.ts index 68ce338ad6e..bdc2f60b359 100644 --- a/libs/@local/eslint/src/deprecated/block.ts +++ b/libs/@local/eslint/src/deprecated/block.ts @@ -1,10 +1,9 @@ +import typescriptEslint from "@typescript-eslint/eslint-plugin"; import react from "eslint-plugin-react"; import reactHooks from "eslint-plugin-react-hooks"; import unicorn from "eslint-plugin-unicorn"; -import typescriptEslint from "@typescript-eslint/eslint-plugin"; import type { ESConfig } from "../utils.js"; - import { create as createBase } from "./base.js"; export const create = (projectDirectory: string) => diff --git a/libs/@local/eslint/src/index.ts b/libs/@local/eslint/src/index.ts index d92cb3e8143..fc86b58366b 100644 --- a/libs/@local/eslint/src/index.ts +++ b/libs/@local/eslint/src/index.ts @@ -1,18 +1,18 @@ -import getGitignorePatterns from "eslint-config-flat-gitignore"; import { Array, pipe } from "effect"; +import getGitignorePatterns from "eslint-config-flat-gitignore"; import { sheriff, type SheriffSettings } from "eslint-config-sheriff"; import type { PartialDeep } from "type-fest"; import { builtIn } from "./builtIn.js"; import { importPlugin } from "./import.js"; +import { jsdoc } from "./jsdoc.js"; import { react } from "./react.js"; import { stylistic } from "./stylistic.js"; import type { NoRestrictedImportsRule } from "./types.js"; import { typescript } from "./typescript.js"; -import { jsdoc } from "./jsdoc.js"; import { unicorn } from "./unicorn.js"; -import { vitest } from "./vitest.js"; import { projectIgnoreFiles, type ESConfig } from "./utils.js"; +import { vitest } from "./vitest.js"; export type * from "./types.js"; diff --git a/libs/@local/eslint/src/react.ts b/libs/@local/eslint/src/react.ts index 4e9c6f9341e..cdb6c8669aa 100644 --- a/libs/@local/eslint/src/react.ts +++ b/libs/@local/eslint/src/react.ts @@ -1,8 +1,7 @@ import type { PartialDeep } from "type-fest"; -import { defineConfig, type ESConfig } from "./utils.js"; - import type { Options } from "./index.js"; +import { defineConfig, type ESConfig } from "./utils.js"; export const react = (options: PartialDeep) => diff --git a/libs/@local/eslint/src/vitest.ts b/libs/@local/eslint/src/vitest.ts index d0efdad0bde..63ee066bd43 100644 --- a/libs/@local/eslint/src/vitest.ts +++ b/libs/@local/eslint/src/vitest.ts @@ -1,10 +1,9 @@ -import type { PartialDeep } from "type-fest"; import { Array } from "effect"; import { testsFilePatterns } from "eslint-config-sheriff"; - -import type { ESConfig } from "./utils.js"; +import type { PartialDeep } from "type-fest"; import type { Options } from "./index.js"; +import type { ESConfig } from "./utils.js"; export const vitest = (options: PartialDeep) => diff --git a/libs/@local/graph/api/LICENSE.md b/libs/@local/graph/api/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/libs/@local/graph/api/LICENSE.md +++ b/libs/@local/graph/api/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/libs/@local/graph/api/openapi/openapi.json b/libs/@local/graph/api/openapi/openapi.json index 3d4c93a04f7..ce5909ea13c 100644 --- a/libs/@local/graph/api/openapi/openapi.json +++ b/libs/@local/graph/api/openapi/openapi.json @@ -14,10 +14,7 @@ "paths": { "/actor-groups/teams/name/{name}": { "get": { - "tags": [ - "Graph", - "Team" - ], + "tags": ["Graph", "Team"], "operationId": "get_team_by_name", "parameters": [ { @@ -58,10 +55,7 @@ }, "/actor-groups/teams/{team_id}/roles": { "get": { - "tags": [ - "Graph", - "Team" - ], + "tags": ["Graph", "Team"], "operationId": "get_team_roles", "parameters": [ { @@ -103,10 +97,7 @@ }, "/actor-groups/webs": { "post": { - "tags": [ - "Graph", - "Web" - ], + "tags": ["Graph", "Web"], "operationId": "create_org_web", "parameters": [ { @@ -148,10 +139,7 @@ }, "/actor-groups/webs/shortname/{shortname}": { "get": { - "tags": [ - "Graph", - "Web" - ], + "tags": ["Graph", "Web"], "operationId": "get_web_by_shortname", "parameters": [ { @@ -192,10 +180,7 @@ }, "/actor-groups/webs/{web_id}": { "get": { - "tags": [ - "Graph", - "Web" - ], + "tags": ["Graph", "Web"], "operationId": "get_web_by_id", "parameters": [ { @@ -236,10 +221,7 @@ }, "/actor-groups/webs/{web_id}/roles": { "get": { - "tags": [ - "Graph", - "Web" - ], + "tags": ["Graph", "Web"], "operationId": "get_web_roles", "parameters": [ { @@ -281,10 +263,7 @@ }, "/actor-groups/webs/{web_id}/shortname": { "put": { - "tags": [ - "Graph", - "Web" - ], + "tags": ["Graph", "Web"], "operationId": "update_web_shortname", "parameters": [ { @@ -328,10 +307,7 @@ }, "/actor-groups/{actor_group_id}/roles/actors/{actor_id}": { "get": { - "tags": [ - "Graph", - "Principal" - ], + "tags": ["Graph", "Principal"], "operationId": "get_actor_group_role", "parameters": [ { @@ -384,10 +360,7 @@ }, "/actor-groups/{actor_group_id}/roles/{role_name}/actors": { "get": { - "tags": [ - "Graph", - "Principal" - ], + "tags": ["Graph", "Principal"], "operationId": "get_actor_group_role_assignments", "parameters": [ { @@ -443,10 +416,7 @@ }, "/actor-groups/{actor_group_id}/roles/{role_name}/actors/{actor_id}": { "post": { - "tags": [ - "Graph", - "Principal" - ], + "tags": ["Graph", "Principal"], "operationId": "assign_actor_group_role", "parameters": [ { @@ -506,10 +476,7 @@ } }, "delete": { - "tags": [ - "Graph", - "Principal" - ], + "tags": ["Graph", "Principal"], "operationId": "unassign_actor_group_role", "parameters": [ { @@ -571,10 +538,7 @@ }, "/actors/ai": { "post": { - "tags": [ - "Graph", - "Principal" - ], + "tags": ["Graph", "Principal"], "operationId": "create_ai_actor", "parameters": [ { @@ -616,10 +580,7 @@ }, "/actors/ai/identifier/{identifier}": { "get": { - "tags": [ - "Graph", - "Web" - ], + "tags": ["Graph", "Web"], "operationId": "get_ai_by_identifier", "parameters": [ { @@ -660,10 +621,7 @@ }, "/actors/machine/identifier/system/{identifier}": { "get": { - "tags": [ - "Graph", - "Principal" - ], + "tags": ["Graph", "Principal"], "operationId": "get_or_create_system_machine", "parameters": [ { @@ -695,10 +653,7 @@ }, "/actors/machine/identifier/{identifier}": { "get": { - "tags": [ - "Graph", - "Web" - ], + "tags": ["Graph", "Web"], "operationId": "get_machine_by_identifier", "parameters": [ { @@ -739,10 +694,7 @@ }, "/actors/user": { "post": { - "tags": [ - "Graph", - "Principal" - ], + "tags": ["Graph", "Principal"], "operationId": "create_user_actor", "parameters": [ { @@ -784,10 +736,7 @@ }, "/data-types": { "post": { - "tags": [ - "Graph", - "DataType" - ], + "tags": ["Graph", "DataType"], "operationId": "create_data_type", "parameters": [ { @@ -833,10 +782,7 @@ } }, "put": { - "tags": [ - "Graph", - "DataType" - ], + "tags": ["Graph", "DataType"], "operationId": "update_data_type", "parameters": [ { @@ -884,10 +830,7 @@ }, "/data-types/archive": { "put": { - "tags": [ - "Graph", - "DataType" - ], + "tags": ["Graph", "DataType"], "operationId": "archive_data_type", "parameters": [ { @@ -938,10 +881,7 @@ }, "/data-types/bulk": { "put": { - "tags": [ - "Graph", - "DataType" - ], + "tags": ["Graph", "DataType"], "operationId": "update_data_types", "parameters": [ { @@ -995,10 +935,7 @@ }, "/data-types/embeddings": { "post": { - "tags": [ - "Graph", - "DataType" - ], + "tags": ["Graph", "DataType"], "operationId": "update_data_type_embeddings", "parameters": [ { @@ -1036,10 +973,7 @@ }, "/data-types/find/conversions": { "post": { - "tags": [ - "Graph", - "DataType" - ], + "tags": ["Graph", "DataType"], "operationId": "find_data_type_conversion_targets", "parameters": [ { @@ -1081,10 +1015,7 @@ }, "/data-types/load": { "post": { - "tags": [ - "Graph", - "DataType" - ], + "tags": ["Graph", "DataType"], "operationId": "load_external_data_type", "parameters": [ { @@ -1132,10 +1063,7 @@ }, "/data-types/permissions": { "post": { - "tags": [ - "Graph", - "DataType" - ], + "tags": ["Graph", "DataType"], "operationId": "has_permission_for_data_types", "parameters": [ { @@ -1180,10 +1108,7 @@ }, "/data-types/query": { "post": { - "tags": [ - "Graph", - "DataType" - ], + "tags": ["Graph", "DataType"], "operationId": "query_data_types", "parameters": [ { @@ -1228,10 +1153,7 @@ }, "/data-types/query/subgraph": { "post": { - "tags": [ - "Graph", - "DataType" - ], + "tags": ["Graph", "DataType"], "operationId": "query_data_type_subgraph", "parameters": [ { @@ -1276,10 +1198,7 @@ }, "/data-types/unarchive": { "put": { - "tags": [ - "Graph", - "DataType" - ], + "tags": ["Graph", "DataType"], "operationId": "unarchive_data_type", "parameters": [ { @@ -1330,10 +1249,7 @@ }, "/entities": { "post": { - "tags": [ - "Graph", - "Entity" - ], + "tags": ["Graph", "Entity"], "operationId": "create_entity", "parameters": [ { @@ -1379,10 +1295,7 @@ } }, "patch": { - "tags": [ - "Graph", - "Entity" - ], + "tags": ["Graph", "Entity"], "operationId": "patch_entity", "parameters": [ { @@ -1433,10 +1346,7 @@ }, "/entities/bulk": { "post": { - "tags": [ - "Graph", - "Entity" - ], + "tags": ["Graph", "Entity"], "operationId": "create_entities", "parameters": [ { @@ -1490,10 +1400,7 @@ }, "/entities/diff": { "post": { - "tags": [ - "Graph", - "Entity" - ], + "tags": ["Graph", "Entity"], "operationId": "diff_entity", "parameters": [ { @@ -1541,10 +1448,7 @@ }, "/entities/embeddings": { "post": { - "tags": [ - "Graph", - "Entity" - ], + "tags": ["Graph", "Entity"], "operationId": "update_entity_embeddings", "parameters": [ { @@ -1582,10 +1486,7 @@ }, "/entities/permissions": { "post": { - "tags": [ - "Graph", - "Entity" - ], + "tags": ["Graph", "Entity"], "operationId": "has_permission_for_entities", "parameters": [ { @@ -1633,10 +1534,7 @@ }, "/entities/query": { "post": { - "tags": [ - "Graph", - "Entity" - ], + "tags": ["Graph", "Entity"], "operationId": "query_entities", "parameters": [ { @@ -1712,10 +1610,7 @@ }, "/entities/query/count": { "post": { - "tags": [ - "Graph", - "Entity" - ], + "tags": ["Graph", "Entity"], "operationId": "count_entities", "parameters": [ { @@ -1761,10 +1656,7 @@ }, "/entities/query/subgraph": { "post": { - "tags": [ - "Graph", - "Entity" - ], + "tags": ["Graph", "Entity"], "operationId": "query_entity_subgraph", "parameters": [ { @@ -1840,10 +1732,7 @@ }, "/entities/validate": { "post": { - "tags": [ - "Graph", - "Entity" - ], + "tags": ["Graph", "Entity"], "operationId": "validate_entity", "parameters": [ { @@ -1894,10 +1783,7 @@ }, "/entity-types": { "post": { - "tags": [ - "Graph", - "EntityType" - ], + "tags": ["Graph", "EntityType"], "operationId": "create_entity_type", "parameters": [ { @@ -1964,10 +1850,7 @@ } }, "put": { - "tags": [ - "Graph", - "EntityType" - ], + "tags": ["Graph", "EntityType"], "operationId": "update_entity_type", "parameters": [ { @@ -2015,10 +1898,7 @@ }, "/entity-types/archive": { "put": { - "tags": [ - "Graph", - "EntityType" - ], + "tags": ["Graph", "EntityType"], "operationId": "archive_entity_type", "parameters": [ { @@ -2069,10 +1949,7 @@ }, "/entity-types/bulk": { "put": { - "tags": [ - "Graph", - "EntityType" - ], + "tags": ["Graph", "EntityType"], "operationId": "update_entity_types", "parameters": [ { @@ -2126,10 +2003,7 @@ }, "/entity-types/embeddings": { "post": { - "tags": [ - "Graph", - "EntityType" - ], + "tags": ["Graph", "EntityType"], "operationId": "update_entity_type_embeddings", "parameters": [ { @@ -2167,10 +2041,7 @@ }, "/entity-types/load": { "post": { - "tags": [ - "Graph", - "EntityType" - ], + "tags": ["Graph", "EntityType"], "operationId": "load_external_entity_type", "parameters": [ { @@ -2239,10 +2110,7 @@ }, "/entity-types/permissions": { "post": { - "tags": [ - "Graph", - "EntityType" - ], + "tags": ["Graph", "EntityType"], "operationId": "has_permission_for_entity_types", "parameters": [ { @@ -2287,10 +2155,7 @@ }, "/entity-types/query": { "post": { - "tags": [ - "Graph", - "EntityType" - ], + "tags": ["Graph", "EntityType"], "operationId": "query_entity_types", "parameters": [ { @@ -2335,10 +2200,7 @@ }, "/entity-types/query/multi": { "post": { - "tags": [ - "Graph", - "EntityType" - ], + "tags": ["Graph", "EntityType"], "operationId": "get_closed_multi_entity_types", "parameters": [ { @@ -2383,10 +2245,7 @@ }, "/entity-types/query/subgraph": { "post": { - "tags": [ - "Graph", - "EntityType" - ], + "tags": ["Graph", "EntityType"], "operationId": "query_entity_type_subgraph", "parameters": [ { @@ -2431,10 +2290,7 @@ }, "/entity-types/unarchive": { "put": { - "tags": [ - "Graph", - "EntityType" - ], + "tags": ["Graph", "EntityType"], "operationId": "unarchive_entity_type", "parameters": [ { @@ -2485,10 +2341,7 @@ }, "/policies": { "post": { - "tags": [ - "Graph", - "Permission" - ], + "tags": ["Graph", "Permission"], "operationId": "create_policy", "parameters": [ { @@ -2526,10 +2379,7 @@ }, "/policies/query": { "post": { - "tags": [ - "Graph", - "Permission" - ], + "tags": ["Graph", "Permission"], "operationId": "query_policies", "parameters": [ { @@ -2570,10 +2420,7 @@ }, "/policies/resolve/actor": { "post": { - "tags": [ - "Graph", - "Permission" - ], + "tags": ["Graph", "Permission"], "operationId": "resolve_policies_for_actor", "parameters": [ { @@ -2614,10 +2461,7 @@ }, "/policies/seed": { "get": { - "tags": [ - "Graph", - "Permission" - ], + "tags": ["Graph", "Permission"], "operationId": "seed_system_policies", "responses": { "204": { @@ -2631,10 +2475,7 @@ }, "/policies/{policy_id}": { "get": { - "tags": [ - "Graph", - "Permission" - ], + "tags": ["Graph", "Permission"], "operationId": "get_policy_by_id", "parameters": [ { @@ -2674,10 +2515,7 @@ } }, "put": { - "tags": [ - "Graph", - "Permission" - ], + "tags": ["Graph", "Permission"], "operationId": "update_policy_by_id", "parameters": [ { @@ -2726,10 +2564,7 @@ } }, "delete": { - "tags": [ - "Graph", - "Permission" - ], + "tags": ["Graph", "Permission"], "operationId": "archive_policy_by_id", "parameters": [ { @@ -2764,10 +2599,7 @@ }, "/policies/{policy_id}/delete": { "delete": { - "tags": [ - "Graph", - "Permission" - ], + "tags": ["Graph", "Permission"], "operationId": "delete_policy_by_id", "parameters": [ { @@ -2802,10 +2634,7 @@ }, "/property-types": { "post": { - "tags": [ - "Graph", - "PropertyType" - ], + "tags": ["Graph", "PropertyType"], "operationId": "create_property_type", "parameters": [ { @@ -2851,10 +2680,7 @@ } }, "put": { - "tags": [ - "Graph", - "PropertyType" - ], + "tags": ["Graph", "PropertyType"], "operationId": "update_property_type", "parameters": [ { @@ -2902,10 +2728,7 @@ }, "/property-types/archive": { "put": { - "tags": [ - "Graph", - "PropertyType" - ], + "tags": ["Graph", "PropertyType"], "operationId": "archive_property_type", "parameters": [ { @@ -2956,10 +2779,7 @@ }, "/property-types/bulk": { "put": { - "tags": [ - "Graph", - "PropertyType" - ], + "tags": ["Graph", "PropertyType"], "operationId": "update_property_types", "parameters": [ { @@ -3013,10 +2833,7 @@ }, "/property-types/embeddings": { "post": { - "tags": [ - "Graph", - "PropertyType" - ], + "tags": ["Graph", "PropertyType"], "operationId": "update_property_type_embeddings", "parameters": [ { @@ -3054,10 +2871,7 @@ }, "/property-types/load": { "post": { - "tags": [ - "Graph", - "PropertyType" - ], + "tags": ["Graph", "PropertyType"], "operationId": "load_external_property_type", "parameters": [ { @@ -3105,10 +2919,7 @@ }, "/property-types/permissions": { "post": { - "tags": [ - "Graph", - "PropertyType" - ], + "tags": ["Graph", "PropertyType"], "operationId": "has_permission_for_property_types", "parameters": [ { @@ -3153,10 +2964,7 @@ }, "/property-types/query": { "post": { - "tags": [ - "Graph", - "PropertyType" - ], + "tags": ["Graph", "PropertyType"], "operationId": "query_property_types", "parameters": [ { @@ -3201,10 +3009,7 @@ }, "/property-types/query/subgraph": { "post": { - "tags": [ - "Graph", - "PropertyType" - ], + "tags": ["Graph", "PropertyType"], "operationId": "query_property_type_subgraph", "parameters": [ { @@ -3257,10 +3062,7 @@ }, "/property-types/unarchive": { "put": { - "tags": [ - "Graph", - "PropertyType" - ], + "tags": ["Graph", "PropertyType"], "operationId": "unarchive_property_type", "parameters": [ { @@ -3322,16 +3124,11 @@ "oneOf": [ { "type": "object", - "required": [ - "actorGroupType", - "id" - ], + "required": ["actorGroupType", "id"], "properties": { "actorGroupType": { "type": "string", - "enum": [ - "web" - ] + "enum": ["web"] }, "id": { "$ref": "#/components/schemas/WebId" @@ -3340,16 +3137,11 @@ }, { "type": "object", - "required": [ - "actorGroupType", - "id" - ], + "required": ["actorGroupType", "id"], "properties": { "actorGroupType": { "type": "string", - "enum": [ - "team" - ] + "enum": ["team"] }, "id": { "$ref": "#/components/schemas/TeamId" @@ -3366,16 +3158,11 @@ "oneOf": [ { "type": "object", - "required": [ - "actorType", - "id" - ], + "required": ["actorType", "id"], "properties": { "actorType": { "type": "string", - "enum": [ - "user" - ] + "enum": ["user"] }, "id": { "$ref": "#/components/schemas/UserId" @@ -3384,16 +3171,11 @@ }, { "type": "object", - "required": [ - "actorType", - "id" - ], + "required": ["actorType", "id"], "properties": { "actorType": { "type": "string", - "enum": [ - "machine" - ] + "enum": ["machine"] }, "id": { "$ref": "#/components/schemas/MachineId" @@ -3402,16 +3184,11 @@ }, { "type": "object", - "required": [ - "actorType", - "id" - ], + "required": ["actorType", "id"], "properties": { "actorType": { "type": "string", - "enum": [ - "ai" - ] + "enum": ["ai"] }, "id": { "$ref": "#/components/schemas/AiId" @@ -3427,20 +3204,14 @@ "ActorType": { "type": "string", "description": "Types of individual actors in the system.\n\nRepresents the different categories of entities that can perform actions.", - "enum": [ - "user", - "machine", - "ai" - ] + "enum": ["user", "machine", "ai"] }, "AiId": { "$ref": "#/components/schemas/ActorEntityUuid" }, "ArchiveDataTypeParams": { "type": "object", - "required": [ - "dataTypeId" - ], + "required": ["dataTypeId"], "properties": { "dataTypeId": { "$ref": "#/components/schemas/VersionedUrl" @@ -3450,9 +3221,7 @@ }, "ArchiveEntityTypeParams": { "type": "object", - "required": [ - "entityTypeId" - ], + "required": ["entityTypeId"], "properties": { "entityTypeId": { "$ref": "#/components/schemas/VersionedUrl" @@ -3462,9 +3231,7 @@ }, "ArchivePropertyTypeParams": { "type": "object", - "required": [ - "propertyTypeId" - ], + "required": ["propertyTypeId"], "properties": { "propertyTypeId": { "$ref": "#/components/schemas/VersionedUrl" @@ -3476,17 +3243,11 @@ "oneOf": [ { "type": "object", - "required": [ - "type", - "data" - ], + "required": ["type", "data"], "properties": { "data": { "type": "object", - "required": [ - "actual", - "min" - ], + "required": ["actual", "min"], "properties": { "actual": { "type": "integer", @@ -3500,25 +3261,17 @@ }, "type": { "type": "string", - "enum": [ - "tooFew" - ] + "enum": ["tooFew"] } } }, { "type": "object", - "required": [ - "type", - "data" - ], + "required": ["type", "data"], "properties": { "data": { "type": "object", - "required": [ - "actual", - "max" - ], + "required": ["actual", "max"], "properties": { "actual": { "type": "integer", @@ -3532,9 +3285,7 @@ }, "type": { "type": "string", - "enum": [ - "tooMany" - ] + "enum": ["tooMany"] } } } @@ -3587,10 +3338,7 @@ }, "ClosedDataTypeDefinition": { "type": "object", - "required": [ - "schema", - "parents" - ], + "required": ["schema", "parents"], "properties": { "parents": { "type": "array", @@ -3612,9 +3360,7 @@ "ClosedMultiEntityTypeMap": { "type": "object", "description": "A recursive map structure representing a hierarchical combination of entity types.\n\nThis data structure stores the schema information for a combination of entity types,\norganized in a tree-like structure. Each level in the hierarchy represents the addition\nof one more entity type to the combination.\n\n# Structure\n\n- `schema`: Contains the combined closed type information for all entity types in the current\npath of the hierarchy\n- `inner`: Maps from additional entity types to deeper levels in the hierarchy, where each\ndeeper level represents the schema when that entity type is added to the current combination\n\n# Example Hierarchy\n\nFor entity types A, B, and C, the structure might look like:\n```text\nA (schema: closed type for A)\n└── B (schema: combined closed type for A+B)\n└── C (schema: combined closed type for A+B+C)\n```\n\nThis allows efficient lookup of type information for any combination of entity types\nby traversing the hierarchy from root to leaf, accumulating type constraints along the way.", - "required": [ - "schema" - ], + "required": ["schema"], "properties": { "inner": { "type": "object", @@ -3633,16 +3379,11 @@ { "type": "object", "title": "InclusiveBound", - "required": [ - "kind", - "limit" - ], + "required": ["kind", "limit"], "properties": { "kind": { "type": "string", - "enum": [ - "inclusive" - ] + "enum": ["inclusive"] }, "limit": { "$ref": "#/components/schemas/Timestamp" @@ -3656,10 +3397,7 @@ }, "CommonQueryEntityTypesParams": { "type": "object", - "required": [ - "filter", - "temporalAxes" - ], + "required": ["filter", "temporalAxes"], "properties": { "after": { "allOf": [ @@ -3698,9 +3436,7 @@ }, "ConversionDefinition": { "type": "object", - "required": [ - "expression" - ], + "required": ["expression"], "properties": { "expression": { "$ref": "#/components/schemas/ConversionExpression" @@ -3730,19 +3466,14 @@ }, { "type": "object", - "required": [ - "const", - "type" - ], + "required": ["const", "type"], "properties": { "const": { "$ref": "#/components/schemas/Real" }, "type": { "type": "string", - "enum": [ - "number" - ] + "enum": ["number"] } } }, @@ -3753,10 +3484,7 @@ }, "Conversions": { "type": "object", - "required": [ - "from", - "to" - ], + "required": ["from", "to"], "properties": { "from": { "$ref": "#/components/schemas/ConversionDefinition" @@ -3769,11 +3497,7 @@ }, "CountEntitiesParams": { "type": "object", - "required": [ - "filter", - "temporalAxes", - "includeDrafts" - ], + "required": ["filter", "temporalAxes", "includeDrafts"], "properties": { "filter": { "$ref": "#/components/schemas/Filter" @@ -3789,9 +3513,7 @@ }, "CreateAiActorParams": { "type": "object", - "required": [ - "identifier" - ], + "required": ["identifier"], "properties": { "identifier": { "type": "string" @@ -3801,11 +3523,7 @@ }, "CreateDataTypeRequest": { "type": "object", - "required": [ - "schema", - "provenance", - "conversions" - ], + "required": ["schema", "provenance", "conversions"], "properties": { "conversions": { "type": "object", @@ -3899,10 +3617,7 @@ }, "CreateEntityTypeRequest": { "type": "object", - "required": [ - "schema", - "provenance" - ], + "required": ["schema", "provenance"], "properties": { "provenance": { "$ref": "#/components/schemas/ProvidedOntologyEditionProvenance" @@ -3925,9 +3640,7 @@ }, "CreateOrgWebParams": { "type": "object", - "required": [ - "shortname" - ], + "required": ["shortname"], "properties": { "administrator": { "allOf": [ @@ -3945,10 +3658,7 @@ }, "CreatePropertyTypeRequest": { "type": "object", - "required": [ - "schema", - "provenance" - ], + "required": ["schema", "provenance"], "properties": { "provenance": { "$ref": "#/components/schemas/ProvidedOntologyEditionProvenance" @@ -3971,9 +3681,7 @@ }, "CreateUserActorParams": { "type": "object", - "required": [ - "registrationComplete" - ], + "required": ["registrationComplete"], "properties": { "registrationComplete": { "type": "boolean" @@ -3987,10 +3695,7 @@ }, "CreateUserActorResponse": { "type": "object", - "required": [ - "userId", - "machineId" - ], + "required": ["userId", "machineId"], "properties": { "machineId": { "$ref": "#/components/schemas/MachineId" @@ -4003,10 +3708,7 @@ }, "CreateWebResponse": { "type": "object", - "required": [ - "webId", - "machineId" - ], + "required": ["webId", "machineId"], "properties": { "machineId": { "$ref": "#/components/schemas/MachineId" @@ -4024,37 +3726,27 @@ "oneOf": [ { "type": "object", - "required": [ - "error", - "type" - ], + "required": ["error", "type"], "properties": { "error": { "$ref": "#/components/schemas/Report" }, "type": { "type": "string", - "enum": [ - "retrieval" - ] + "enum": ["retrieval"] } } }, { "type": "object", - "required": [ - "data", - "type" - ], + "required": ["data", "type"], "properties": { "data": { "$ref": "#/components/schemas/JsonSchemaValueTypeMismatch" }, "type": { "type": "string", - "enum": [ - "wrongType" - ] + "enum": ["wrongType"] } } } @@ -4067,37 +3759,27 @@ "oneOf": [ { "type": "object", - "required": [ - "error", - "type" - ], + "required": ["error", "type"], "properties": { "error": { "$ref": "#/components/schemas/Report" }, "type": { "type": "string", - "enum": [ - "retrieval" - ] + "enum": ["retrieval"] } } }, { "type": "object", - "required": [ - "data", - "type" - ], + "required": ["data", "type"], "properties": { "data": { "$ref": "#/components/schemas/JsonSchemaValueTypeMismatch" }, "type": { "type": "string", - "enum": [ - "wrongType" - ] + "enum": ["wrongType"] } } } @@ -4108,10 +3790,7 @@ }, "DataTypeConversionTargets": { "type": "object", - "required": [ - "title", - "conversions" - ], + "required": ["title", "conversions"], "properties": { "conversions": { "type": "array", @@ -4128,46 +3807,33 @@ "oneOf": [ { "type": "object", - "required": [ - "error", - "type" - ], + "required": ["error", "type"], "properties": { "error": { "$ref": "#/components/schemas/Report" }, "type": { "type": "string", - "enum": [ - "retrieval" - ] + "enum": ["retrieval"] } } }, { "type": "object", - "required": [ - "data", - "type" - ], + "required": ["data", "type"], "properties": { "data": { "$ref": "#/components/schemas/VersionedUrl" }, "type": { "type": "string", - "enum": [ - "abstract" - ] + "enum": ["abstract"] } } }, { "type": "object", - "required": [ - "data", - "type" - ], + "required": ["data", "type"], "properties": { "data": { "type": "array", @@ -4177,9 +3843,7 @@ }, "type": { "type": "string", - "enum": [ - "ambiguous" - ] + "enum": ["ambiguous"] } } } @@ -4271,10 +3935,7 @@ }, "DataTypeVertexId": { "type": "object", - "required": [ - "baseId", - "revisionId" - ], + "required": ["baseId", "revisionId"], "properties": { "baseId": { "$ref": "#/components/schemas/BaseUrl" @@ -4286,10 +3947,7 @@ }, "DataTypeWithMetadata": { "type": "object", - "required": [ - "schema", - "metadata" - ], + "required": ["schema", "metadata"], "properties": { "metadata": { "$ref": "#/components/schemas/DataTypeMetadata" @@ -4302,9 +3960,7 @@ "DecisionTime": { "type": "string", "description": "Time axis for the decision time.\n\nThis is used as the generic argument to time-related structs and can be used as tag value.", - "enum": [ - "decisionTime" - ] + "enum": ["decisionTime"] }, "DiffEntityParams": { "type": "object", @@ -4381,10 +4037,7 @@ }, "EdgeDirection": { "type": "string", - "enum": [ - "incoming", - "outgoing" - ] + "enum": ["incoming", "outgoing"] }, "Edges": { "type": "object", @@ -4415,10 +4068,7 @@ "Entity": { "type": "object", "description": "A record of an entity that has been persisted in the datastore, with its associated metadata.\n\nAn [`Entity`] represents a real-world object, concept, or thing within the knowledge graph.\nIt contains structured data in the form of properties, optional link data for establishing\nrelationships with other entities, and comprehensive metadata that describes the entity's\nprovenance, types, temporal information, and more.\n\nEach entity is an instance of one or more [`EntityType`]s defined in the ontology. The\nrelationship is similar to objects and classes in object-oriented programming:\n- [`EntityType`]s define the schema, structure, and constraints that entities must follow\n- [`Entity`] instances contain actual data conforming to those schemas\n\nAn entity:\n- Is identified by a unique [`EntityId`]\n- Has one or more [`VersionedUrl`]s in its `entity_type_ids` field linking to its types\n- Contains a set of properties structured according to the schemas defined in its types\n- May have links to other entities, establishing relationships in the knowledge graph\n- Includes comprehensive metadata for tracking provenance, versioning, and confidence\n\n[`EntityType`]: crate::ontology::entity_type::EntityType\n[`VersionedUrl`]: crate::ontology::VersionedUrl", - "required": [ - "properties", - "metadata" - ], + "required": ["properties", "metadata"], "properties": { "linkData": { "allOf": [ @@ -4466,9 +4116,7 @@ }, { "type": "object", - "required": [ - "createdById" - ], + "required": ["createdById"], "properties": { "archivedById": { "allOf": [ @@ -4486,9 +4134,7 @@ }, "EntityEmbedding": { "type": "object", - "required": [ - "embedding" - ], + "required": ["embedding"], "properties": { "embedding": { "$ref": "#/components/schemas/Embedding" @@ -4508,10 +4154,7 @@ }, "EntityIdWithInterval": { "type": "object", - "required": [ - "entityId", - "interval" - ], + "required": ["entityId", "interval"], "properties": { "entityId": { "$ref": "#/components/schemas/EntityId" @@ -4583,9 +4226,7 @@ }, { "type": "object", - "required": [ - "edition" - ], + "required": ["edition"], "properties": { "edition": { "$ref": "#/components/schemas/EntityEditionProvenance" @@ -4602,11 +4243,7 @@ }, "EntityQueryOptions": { "type": "object", - "required": [ - "temporalAxes", - "includeDrafts", - "includePermissions" - ], + "required": ["temporalAxes", "includeDrafts", "includePermissions"], "properties": { "conversions": { "type": "array", @@ -4690,11 +4327,7 @@ }, "EntityQuerySortingRecord": { "type": "object", - "required": [ - "path", - "ordering", - "nulls" - ], + "required": ["path", "ordering", "nulls"], "properties": { "nulls": { "$ref": "#/components/schemas/NullOrdering" @@ -4744,10 +4377,7 @@ }, "EntityRecordId": { "type": "object", - "required": [ - "entityId", - "editionId" - ], + "required": ["entityId", "editionId"], "properties": { "editionId": { "$ref": "#/components/schemas/EntityEditionId" @@ -4760,10 +4390,7 @@ "EntityTemporalMetadata": { "type": "object", "description": "Temporal metadata for tracking entity versions over time.\n\n[`EntityTemporalMetadata`] tracks two distinct time dimensions:\n- Decision time: When the entity was decided to exist in the real world\n- Transaction time: When the entity was recorded in the system\n\nThis bi-temporal approach allows precise tracking of when information was known\nversus when it was recorded, enabling accurate historical queries.", - "required": [ - "decisionTime", - "transactionTime" - ], + "required": ["decisionTime", "transactionTime"], "properties": { "decisionTime": { "$ref": "#/components/schemas/LeftClosedTemporalInterval" @@ -4779,38 +4406,28 @@ { "type": "object", "title": "HasLeftEntityEdge", - "required": [ - "direction", - "kind" - ], + "required": ["direction", "kind"], "properties": { "direction": { "$ref": "#/components/schemas/EdgeDirection" }, "kind": { "type": "string", - "enum": [ - "has-left-entity" - ] + "enum": ["has-left-entity"] } } }, { "type": "object", "title": "HasRightEntityEdge", - "required": [ - "direction", - "kind" - ], + "required": ["direction", "kind"], "properties": { "direction": { "$ref": "#/components/schemas/EdgeDirection" }, "kind": { "type": "string", - "enum": [ - "has-right-entity" - ] + "enum": ["has-right-entity"] } } } @@ -4821,9 +4438,7 @@ }, "EntityTraversalPath": { "type": "object", - "required": [ - "edges" - ], + "required": ["edges"], "properties": { "edges": { "type": "array", @@ -4839,10 +4454,7 @@ }, "EntityTypeEmbedding": { "type": "object", - "required": [ - "entityTypeId", - "embedding" - ], + "required": ["entityTypeId", "embedding"], "properties": { "embedding": { "$ref": "#/components/schemas/Embedding" @@ -4856,34 +4468,24 @@ "oneOf": [ { "type": "object", - "required": [ - "added", - "op" - ], + "required": ["added", "op"], "properties": { "added": { "$ref": "#/components/schemas/VersionedUrl" }, "op": { "type": "string", - "enum": [ - "added" - ] + "enum": ["added"] } } }, { "type": "object", - "required": [ - "removed", - "op" - ], + "required": ["removed", "op"], "properties": { "op": { "type": "string", - "enum": [ - "removed" - ] + "enum": ["removed"] }, "removed": { "$ref": "#/components/schemas/VersionedUrl" @@ -4971,11 +4573,7 @@ }, "EntityTypeResolveDefinitions": { "type": "object", - "required": [ - "dataTypes", - "propertyTypes", - "entityTypes" - ], + "required": ["dataTypes", "propertyTypes", "entityTypes"], "properties": { "dataTypes": { "type": "object", @@ -4999,10 +4597,7 @@ }, "EntityTypeVertexId": { "type": "object", - "required": [ - "baseId", - "revisionId" - ], + "required": ["baseId", "revisionId"], "properties": { "baseId": { "$ref": "#/components/schemas/BaseUrl" @@ -5014,10 +4609,7 @@ }, "EntityTypeWithMetadata": { "type": "object", - "required": [ - "schema", - "metadata" - ], + "required": ["schema", "metadata"], "properties": { "metadata": { "$ref": "#/components/schemas/EntityTypeMetadata" @@ -5031,55 +4623,40 @@ "oneOf": [ { "type": "object", - "required": [ - "type", - "error" - ], + "required": ["type", "error"], "properties": { "error": { "$ref": "#/components/schemas/Report" }, "type": { "type": "string", - "enum": [ - "empty" - ] + "enum": ["empty"] } } }, { "type": "object", - "required": [ - "type", - "error" - ], + "required": ["type", "error"], "properties": { "error": { "$ref": "#/components/schemas/Report" }, "type": { "type": "string", - "enum": [ - "entityTypeRetrieval" - ] + "enum": ["entityTypeRetrieval"] } } }, { "type": "object", - "required": [ - "type", - "error" - ], + "required": ["type", "error"], "properties": { "error": { "$ref": "#/components/schemas/Report" }, "type": { "type": "string", - "enum": [ - "resolveClosedEntityType" - ] + "enum": ["resolveClosedEntityType"] } } } @@ -5117,10 +4694,7 @@ }, "EntityVertexId": { "type": "object", - "required": [ - "baseId", - "revisionId" - ], + "required": ["baseId", "revisionId"], "properties": { "baseId": { "$ref": "#/components/schemas/EntityId" @@ -5135,9 +4709,7 @@ { "type": "object", "title": "AllFilter", - "required": [ - "all" - ], + "required": ["all"], "properties": { "all": { "type": "array", @@ -5150,9 +4722,7 @@ { "type": "object", "title": "AnyFilter", - "required": [ - "any" - ], + "required": ["any"], "properties": { "any": { "type": "array", @@ -5165,9 +4735,7 @@ { "type": "object", "title": "NotFilter", - "required": [ - "not" - ], + "required": ["not"], "properties": { "not": { "$ref": "#/components/schemas/Filter" @@ -5177,9 +4745,7 @@ { "type": "object", "title": "EqualFilter", - "required": [ - "equal" - ], + "required": ["equal"], "properties": { "equal": { "type": "array", @@ -5194,9 +4760,7 @@ { "type": "object", "title": "NotEqualFilter", - "required": [ - "notEqual" - ], + "required": ["notEqual"], "properties": { "notEqual": { "type": "array", @@ -5211,9 +4775,7 @@ { "type": "object", "title": "ExistsFilter", - "required": [ - "exists" - ], + "required": ["exists"], "properties": { "exists": { "$ref": "#/components/schemas/PathExpression" @@ -5223,9 +4785,7 @@ { "type": "object", "title": "GreaterFilter", - "required": [ - "notEqual" - ], + "required": ["notEqual"], "properties": { "greater": { "type": "array", @@ -5240,9 +4800,7 @@ { "type": "object", "title": "GreaterOrEqualFilter", - "required": [ - "notEqual" - ], + "required": ["notEqual"], "properties": { "greaterOrEqual": { "type": "array", @@ -5257,9 +4815,7 @@ { "type": "object", "title": "LessFilter", - "required": [ - "notEqual" - ], + "required": ["notEqual"], "properties": { "less": { "type": "array", @@ -5274,9 +4830,7 @@ { "type": "object", "title": "LessOrEqualFilter", - "required": [ - "notEqual" - ], + "required": ["notEqual"], "properties": { "lessOrEqual": { "type": "array", @@ -5291,9 +4845,7 @@ { "type": "object", "title": "CosineDistanceFilter", - "required": [ - "cosineDistance" - ], + "required": ["cosineDistance"], "properties": { "cosineDistance": { "type": "array", @@ -5308,9 +4860,7 @@ { "type": "object", "title": "StartsWithFilter", - "required": [ - "startsWith" - ], + "required": ["startsWith"], "properties": { "startsWith": { "type": "array", @@ -5325,9 +4875,7 @@ { "type": "object", "title": "EndsWithFilter", - "required": [ - "endsWith" - ], + "required": ["endsWith"], "properties": { "endsWith": { "type": "array", @@ -5342,9 +4890,7 @@ { "type": "object", "title": "ContainsSegmentFilter", - "required": [ - "containsSegment" - ], + "required": ["containsSegment"], "properties": { "containsSegment": { "type": "array", @@ -5370,9 +4916,7 @@ }, "FindDataTypeConversionTargetsParams": { "type": "object", - "required": [ - "dataTypeIds" - ], + "required": ["dataTypeIds"], "properties": { "dataTypeIds": { "type": "array", @@ -5385,9 +4929,7 @@ }, "FindDataTypeConversionTargetsResponse": { "type": "object", - "required": [ - "conversions" - ], + "required": ["conversions"], "properties": { "conversions": { "type": "object", @@ -5402,10 +4944,7 @@ }, "GetClosedMultiEntityTypesParams": { "type": "object", - "required": [ - "entityTypeIds", - "temporalAxes" - ], + "required": ["entityTypeIds", "temporalAxes"], "properties": { "entityTypeIds": { "type": "array", @@ -5431,9 +4970,7 @@ }, "GetClosedMultiEntityTypesResponse": { "type": "object", - "required": [ - "entityTypes" - ], + "required": ["entityTypes"], "properties": { "definitions": { "allOf": [ @@ -5502,10 +5039,7 @@ }, "HasPermissionForDataTypesParams": { "type": "object", - "required": [ - "action", - "dataTypeIds" - ], + "required": ["action", "dataTypeIds"], "properties": { "action": { "type": "string" @@ -5521,12 +5055,7 @@ }, "HasPermissionForEntitiesParams": { "type": "object", - "required": [ - "action", - "entityIds", - "temporalAxes", - "includeDrafts" - ], + "required": ["action", "entityIds", "temporalAxes", "includeDrafts"], "properties": { "action": { "type": "string" @@ -5548,10 +5077,7 @@ }, "HasPermissionForEntityTypesParams": { "type": "object", - "required": [ - "action", - "entityTypeIds" - ], + "required": ["action", "entityTypeIds"], "properties": { "action": { "type": "string" @@ -5567,10 +5093,7 @@ }, "HasPermissionForPropertyTypesParams": { "type": "object", - "required": [ - "action", - "propertyTypeIds" - ], + "required": ["action", "propertyTypeIds"], "properties": { "action": { "type": "string" @@ -5586,18 +5109,11 @@ }, "IncludeEntityTypeOption": { "type": "string", - "enum": [ - "closed", - "resolved", - "resolvedWithDataTypeChildren" - ] + "enum": ["closed", "resolved", "resolvedWithDataTypeChildren"] }, "IncludeResolvedEntityTypeOption": { "type": "string", - "enum": [ - "resolved", - "resolvedWithDataTypeChildren" - ] + "enum": ["resolved", "resolvedWithDataTypeChildren"] }, "InferredEntityProvenance": { "type": "object", @@ -5635,21 +5151,11 @@ }, "JsonSchemaValueType": { "type": "string", - "enum": [ - "null", - "boolean", - "number", - "string", - "array", - "object" - ] + "enum": ["null", "boolean", "number", "string", "array", "object"] }, "JsonSchemaValueTypeMismatch": { "type": "object", - "required": [ - "actual", - "expected" - ], + "required": ["actual", "expected"], "properties": { "actual": { "$ref": "#/components/schemas/JsonSchemaValueType" @@ -5661,21 +5167,14 @@ }, "KnowledgeGraphEdgeKind": { "type": "string", - "enum": [ - "HAS_LEFT_ENTITY", - "HAS_RIGHT_ENTITY" - ] + "enum": ["HAS_LEFT_ENTITY", "HAS_RIGHT_ENTITY"] }, "KnowledgeGraphOutwardEdge": { "oneOf": [ { "type": "object", "title": "KnowledgeGraphToKnowledgeGraphOutwardEdge", - "required": [ - "kind", - "reversed", - "rightEndpoint" - ], + "required": ["kind", "reversed", "rightEndpoint"], "properties": { "kind": { "$ref": "#/components/schemas/KnowledgeGraphEdgeKind" @@ -5691,11 +5190,7 @@ { "type": "object", "title": "KnowledgeGraphToOntologyOutwardEdge", - "required": [ - "kind", - "reversed", - "rightEndpoint" - ], + "required": ["kind", "reversed", "rightEndpoint"], "properties": { "kind": { "$ref": "#/components/schemas/SharedEdgeKind" @@ -5715,19 +5210,14 @@ { "type": "object", "title": "EntityVertex", - "required": [ - "kind", - "inner" - ], + "required": ["kind", "inner"], "properties": { "inner": { "$ref": "#/components/schemas/Entity" }, "kind": { "type": "string", - "enum": [ - "entity" - ] + "enum": ["entity"] } } } @@ -5747,10 +5237,7 @@ }, "LeftClosedTemporalInterval": { "type": "object", - "required": [ - "start", - "end" - ], + "required": ["start", "end"], "properties": { "end": { "$ref": "#/components/schemas/OpenTemporalBound" @@ -5765,16 +5252,11 @@ { "type": "object", "title": "InclusiveBound", - "required": [ - "kind", - "limit" - ], + "required": ["kind", "limit"], "properties": { "kind": { "type": "string", - "enum": [ - "inclusive" - ] + "enum": ["inclusive"] }, "limit": { "$ref": "#/components/schemas/Timestamp" @@ -5784,16 +5266,11 @@ { "type": "object", "title": "ExclusiveBound", - "required": [ - "kind", - "limit" - ], + "required": ["kind", "limit"], "properties": { "kind": { "type": "string", - "enum": [ - "exclusive" - ] + "enum": ["exclusive"] }, "limit": { "$ref": "#/components/schemas/Timestamp" @@ -5808,10 +5285,7 @@ "LinkData": { "type": "object", "description": "The associated information for 'Link' entities.", - "required": [ - "leftEntityId", - "rightEntityId" - ], + "required": ["leftEntityId", "rightEntityId"], "properties": { "leftEntityConfidence": { "allOf": [ @@ -5846,37 +5320,27 @@ "oneOf": [ { "type": "object", - "required": [ - "type", - "error" - ], + "required": ["type", "error"], "properties": { "error": { "$ref": "#/components/schemas/Report" }, "type": { "type": "string", - "enum": [ - "missing" - ] + "enum": ["missing"] } } }, { "type": "object", - "required": [ - "type", - "error" - ], + "required": ["type", "error"], "properties": { "error": { "$ref": "#/components/schemas/Report" }, "type": { "type": "string", - "enum": [ - "unexpected" - ] + "enum": ["unexpected"] } } } @@ -5926,19 +5390,14 @@ "oneOf": [ { "type": "object", - "required": [ - "data", - "type" - ], + "required": ["data", "type"], "properties": { "data": { "$ref": "#/components/schemas/UnexpectedEntityType" }, "type": { "type": "string", - "enum": [ - "unexpectedEntityType" - ] + "enum": ["unexpectedEntityType"] } } } @@ -5951,19 +5410,14 @@ "oneOf": [ { "type": "object", - "required": [ - "data", - "type" - ], + "required": ["data", "type"], "properties": { "data": { "$ref": "#/components/schemas/UnexpectedEntityType" }, "type": { "type": "string", - "enum": [ - "unexpectedEntityType" - ] + "enum": ["unexpectedEntityType"] } } } @@ -5996,55 +5450,40 @@ "oneOf": [ { "type": "object", - "required": [ - "type", - "error" - ], + "required": ["type", "error"], "properties": { "error": { "$ref": "#/components/schemas/Report" }, "type": { "type": "string", - "enum": [ - "entityRetrieval" - ] + "enum": ["entityRetrieval"] } } }, { "type": "object", - "required": [ - "type", - "error" - ], + "required": ["type", "error"], "properties": { "error": { "$ref": "#/components/schemas/Report" }, "type": { "type": "string", - "enum": [ - "entityTypeRetrieval" - ] + "enum": ["entityTypeRetrieval"] } } }, { "type": "object", - "required": [ - "type", - "error" - ], + "required": ["type", "error"], "properties": { "error": { "$ref": "#/components/schemas/Report" }, "type": { "type": "string", - "enum": [ - "resolveClosedEntityType" - ] + "enum": ["resolveClosedEntityType"] } } } @@ -6057,9 +5496,7 @@ "oneOf": [ { "type": "object", - "required": [ - "dataTypeId" - ], + "required": ["dataTypeId"], "properties": { "dataTypeId": { "$ref": "#/components/schemas/VersionedUrl" @@ -6068,11 +5505,7 @@ }, { "type": "object", - "required": [ - "schema", - "provenance", - "conversions" - ], + "required": ["schema", "provenance", "conversions"], "properties": { "conversions": { "type": "object", @@ -6094,9 +5527,7 @@ "oneOf": [ { "type": "object", - "required": [ - "entityTypeId" - ], + "required": ["entityTypeId"], "properties": { "entityTypeId": { "$ref": "#/components/schemas/VersionedUrl" @@ -6105,10 +5536,7 @@ }, { "type": "object", - "required": [ - "schema", - "provenance" - ], + "required": ["schema", "provenance"], "properties": { "provenance": { "$ref": "#/components/schemas/ProvidedOntologyEditionProvenance" @@ -6124,9 +5552,7 @@ "oneOf": [ { "type": "object", - "required": [ - "propertyTypeId" - ], + "required": ["propertyTypeId"], "properties": { "propertyTypeId": { "$ref": "#/components/schemas/VersionedUrl" @@ -6135,10 +5561,7 @@ }, { "type": "object", - "required": [ - "schema", - "provenance" - ], + "required": ["schema", "provenance"], "properties": { "provenance": { "$ref": "#/components/schemas/ProvidedOntologyEditionProvenance" @@ -6233,10 +5656,7 @@ }, "NullOrdering": { "type": "string", - "enum": [ - "first", - "last" - ] + "enum": ["first", "last"] }, "NullableTimestamp": { "type": "string", @@ -6263,51 +5683,37 @@ "oneOf": [ { "type": "object", - "required": [ - "type" - ], + "required": ["type"], "properties": { "type": { "type": "string", - "enum": [ - "unexpected" - ] + "enum": ["unexpected"] } } }, { "type": "object", - "required": [ - "error", - "type" - ], + "required": ["error", "type"], "properties": { "error": { "$ref": "#/components/schemas/Report" }, "type": { "type": "string", - "enum": [ - "retrieval" - ] + "enum": ["retrieval"] } } }, { "type": "object", - "required": [ - "data", - "type" - ], + "required": ["data", "type"], "properties": { "data": { "$ref": "#/components/schemas/PropertyValueTypeMismatch" }, "type": { "type": "string", - "enum": [ - "wrongType" - ] + "enum": ["wrongType"] } } }, @@ -6318,15 +5724,11 @@ }, { "type": "object", - "required": [ - "type" - ], + "required": ["type"], "properties": { "type": { "type": "string", - "enum": [ - "value" - ] + "enum": ["value"] } } } @@ -6339,15 +5741,11 @@ }, { "type": "object", - "required": [ - "type" - ], + "required": ["type"], "properties": { "type": { "type": "string", - "enum": [ - "array" - ] + "enum": ["array"] } } } @@ -6360,15 +5758,11 @@ }, { "type": "object", - "required": [ - "type" - ], + "required": ["type"], "properties": { "type": { "type": "string", - "enum": [ - "object" - ] + "enum": ["object"] } } } @@ -6381,15 +5775,11 @@ }, { "type": "object", - "required": [ - "type" - ], + "required": ["type"], "properties": { "type": { "type": "string", - "enum": [ - "propertyArray" - ] + "enum": ["propertyArray"] } } } @@ -6397,15 +5787,11 @@ }, { "type": "object", - "required": [ - "type" - ], + "required": ["type"], "properties": { "type": { "type": "string", - "enum": [ - "missing" - ] + "enum": ["missing"] } } } @@ -6498,9 +5884,7 @@ }, { "type": "object", - "required": [ - "createdById" - ], + "required": ["createdById"], "properties": { "archivedById": { "allOf": [ @@ -6522,11 +5906,7 @@ { "type": "object", "title": "OntologyToOntologyOutwardEdge", - "required": [ - "kind", - "reversed", - "rightEndpoint" - ], + "required": ["kind", "reversed", "rightEndpoint"], "properties": { "kind": { "$ref": "#/components/schemas/OntologyEdgeKind" @@ -6542,11 +5922,7 @@ { "type": "object", "title": "OntologyToKnowledgeGraphOutwardEdge", - "required": [ - "kind", - "reversed", - "rightEndpoint" - ], + "required": ["kind", "reversed", "rightEndpoint"], "properties": { "kind": { "$ref": "#/components/schemas/SharedEdgeKind" @@ -6564,9 +5940,7 @@ "OntologyProvenance": { "type": "object", "description": "Provenance information for an ontology type.\n\nContains tracking information about the creation, modification, and origin of an ontology type.", - "required": [ - "edition" - ], + "required": ["edition"], "properties": { "edition": { "$ref": "#/components/schemas/OntologyEditionProvenance" @@ -6576,9 +5950,7 @@ }, "OntologyTemporalMetadata": { "type": "object", - "required": [ - "transactionTime" - ], + "required": ["transactionTime"], "properties": { "transactionTime": { "$ref": "#/components/schemas/LeftClosedTemporalInterval" @@ -6589,10 +5961,7 @@ "OntologyTypeRecordId": { "type": "object", "description": "An identifier for an ontology type record consisting of a base URL and version.\n\nThis type provides a structured representation of an ontology type identifier\nthat can be used in database records and type definitions. It contains the same\ncomponents as a [`VersionedUrl`] but in a structured form rather than a string.\n\n# Examples\n\n```\nuse std::str::FromStr;\n\nuse type_system::ontology::id::{\nBaseUrl, OntologyTypeRecordId, OntologyTypeVersion, VersionedUrl,\n};\n\n// Create from individual components\nlet base_url = BaseUrl::new(\"https://example.com/types/data-type/text/\".to_owned())?;\nlet version = OntologyTypeVersion::from_str(\"1\")?;\nlet record_id = OntologyTypeRecordId { base_url, version };\n\n// Convert between VersionedUrl and OntologyTypeRecordId\nlet url = VersionedUrl::from_str(\"https://example.com/types/data-type/text/v/1\")?;\nlet record_id = OntologyTypeRecordId::from(url.clone());\nlet url2 = VersionedUrl::from(record_id);\nassert_eq!(url, url2);\n# Ok::<(), Box>(())\n```", - "required": [ - "baseUrl", - "version" - ], + "required": ["baseUrl", "version"], "properties": { "baseUrl": { "$ref": "#/components/schemas/BaseUrl" @@ -6623,57 +5992,42 @@ { "type": "object", "title": "DataTypeVertex", - "required": [ - "kind", - "inner" - ], + "required": ["kind", "inner"], "properties": { "inner": { "$ref": "#/components/schemas/DataTypeWithMetadata" }, "kind": { "type": "string", - "enum": [ - "dataType" - ] + "enum": ["dataType"] } } }, { "type": "object", "title": "PropertyTypeVertex", - "required": [ - "kind", - "inner" - ], + "required": ["kind", "inner"], "properties": { "inner": { "$ref": "#/components/schemas/PropertyTypeWithMetadata" }, "kind": { "type": "string", - "enum": [ - "propertyType" - ] + "enum": ["propertyType"] } } }, { "type": "object", "title": "EntityTypeVertex", - "required": [ - "kind", - "inner" - ], + "required": ["kind", "inner"], "properties": { "inner": { "$ref": "#/components/schemas/EntityTypeWithMetadata" }, "kind": { "type": "string", - "enum": [ - "entityType" - ] + "enum": ["entityType"] } } } @@ -6696,16 +6050,11 @@ { "type": "object", "title": "ExclusiveBound", - "required": [ - "kind", - "limit" - ], + "required": ["kind", "limit"], "properties": { "kind": { "type": "string", - "enum": [ - "exclusive" - ] + "enum": ["exclusive"] }, "limit": { "$ref": "#/components/schemas/Timestamp" @@ -6715,15 +6064,11 @@ { "type": "object", "title": "UnboundedBound", - "required": [ - "kind" - ], + "required": ["kind"], "properties": { "kind": { "type": "string", - "enum": [ - "unbounded" - ] + "enum": ["unbounded"] } } } @@ -6734,27 +6079,17 @@ }, "Operator": { "type": "string", - "enum": [ - "+", - "-", - "*", - "/" - ] + "enum": ["+", "-", "*", "/"] }, "Ordering": { "type": "string", - "enum": [ - "ascending", - "descending" - ] + "enum": ["ascending", "descending"] }, "OriginProvenance": { "oneOf": [ { "type": "object", - "required": [ - "type" - ], + "required": ["type"], "properties": { "apiKeyPublicId": { "type": "string" @@ -6776,9 +6111,7 @@ }, "type": { "type": "string", - "enum": [ - "web-app" - ] + "enum": ["web-app"] }, "userAgent": { "type": "string" @@ -6791,9 +6124,7 @@ }, { "type": "object", - "required": [ - "type" - ], + "required": ["type"], "properties": { "apiKeyPublicId": { "type": "string" @@ -6815,9 +6146,7 @@ }, "type": { "type": "string", - "enum": [ - "mobile-app" - ] + "enum": ["mobile-app"] }, "userAgent": { "type": "string" @@ -6830,9 +6159,7 @@ }, { "type": "object", - "required": [ - "type" - ], + "required": ["type"], "properties": { "apiKeyPublicId": { "type": "string" @@ -6854,9 +6181,7 @@ }, "type": { "type": "string", - "enum": [ - "browser-extension" - ] + "enum": ["browser-extension"] }, "userAgent": { "type": "string" @@ -6869,9 +6194,7 @@ }, { "type": "object", - "required": [ - "type" - ], + "required": ["type"], "properties": { "apiKeyPublicId": { "type": "string" @@ -6893,9 +6216,7 @@ }, "type": { "type": "string", - "enum": [ - "api" - ] + "enum": ["api"] }, "userAgent": { "type": "string" @@ -6908,9 +6229,7 @@ }, { "type": "object", - "required": [ - "type" - ], + "required": ["type"], "properties": { "apiKeyPublicId": { "type": "string" @@ -6938,9 +6257,7 @@ }, "type": { "type": "string", - "enum": [ - "flow" - ] + "enum": ["flow"] }, "userAgent": { "type": "string" @@ -6953,9 +6270,7 @@ }, { "type": "object", - "required": [ - "type" - ], + "required": ["type"], "properties": { "apiKeyPublicId": { "type": "string" @@ -6977,9 +6292,7 @@ }, "type": { "type": "string", - "enum": [ - "migration" - ] + "enum": ["migration"] }, "userAgent": { "type": "string" @@ -6995,16 +6308,11 @@ "ParameterExpression": { "type": "object", "title": "ParameterExpression", - "required": [ - "parameter" - ], + "required": ["parameter"], "properties": { "convert": { "type": "object", - "required": [ - "from", - "to" - ], + "required": ["from", "to"], "properties": { "from": { "$ref": "#/components/schemas/VersionedUrl" @@ -7022,10 +6330,7 @@ }, "PatchEntityParams": { "type": "object", - "required": [ - "entityId", - "provenance" - ], + "required": ["entityId", "provenance"], "properties": { "archived": { "type": "boolean" @@ -7071,9 +6376,7 @@ "PathExpression": { "type": "object", "title": "PathExpression", - "required": [ - "path" - ], + "required": ["path"], "properties": { "path": { "type": "array", @@ -7096,9 +6399,7 @@ }, { "type": "string", - "enum": [ - "convert" - ] + "enum": ["convert"] }, { "type": "string" @@ -7113,9 +6414,7 @@ }, "PermissionResponse": { "type": "object", - "required": [ - "has_permission" - ], + "required": ["has_permission"], "properties": { "has_permission": { "type": "boolean" @@ -7142,9 +6441,7 @@ }, "PropertyArrayMetadata": { "type": "object", - "required": [ - "value" - ], + "required": ["value"], "properties": { "metadata": { "$ref": "#/components/schemas/ArrayMetadata" @@ -7163,37 +6460,27 @@ "oneOf": [ { "type": "object", - "required": [ - "type", - "data" - ], + "required": ["type", "data"], "properties": { "data": { "$ref": "#/components/schemas/PropertyValueTypeMismatch" }, "type": { "type": "string", - "enum": [ - "wrongType" - ] + "enum": ["wrongType"] } } }, { "type": "object", - "required": [ - "type", - "data" - ], + "required": ["type", "data"], "properties": { "data": { "$ref": "#/components/schemas/ArrayValidationReport" }, "type": { "type": "string", - "enum": [ - "arrayValidation" - ] + "enum": ["arrayValidation"] } } } @@ -7204,9 +6491,7 @@ }, "PropertyArrayWithMetadata": { "type": "object", - "required": [ - "value" - ], + "required": ["value"], "properties": { "metadata": { "$ref": "#/components/schemas/ArrayMetadata" @@ -7225,20 +6510,14 @@ { "type": "object", "description": "A property was added at the specified path.\n\nThis variant indicates that a property that didn't exist in the original\nstructure was added in the new one.", - "required": [ - "path", - "added", - "op" - ], + "required": ["path", "added", "op"], "properties": { "added": { "$ref": "#/components/schemas/Property" }, "op": { "type": "string", - "enum": [ - "added" - ] + "enum": ["added"] }, "path": { "$ref": "#/components/schemas/PropertyPath" @@ -7248,17 +6527,11 @@ { "type": "object", "description": "A property was removed from the specified path.\n\nThis variant indicates that a property that existed in the original\nstructure was removed in the new one.", - "required": [ - "path", - "removed", - "op" - ], + "required": ["path", "removed", "op"], "properties": { "op": { "type": "string", - "enum": [ - "removed" - ] + "enum": ["removed"] }, "path": { "$ref": "#/components/schemas/PropertyPath" @@ -7271,12 +6544,7 @@ { "type": "object", "description": "A property at the specified path changed value.\n\nThis variant indicates that a property existed in both structures\nbut had different values.", - "required": [ - "path", - "old", - "new", - "op" - ], + "required": ["path", "old", "new", "op"], "properties": { "new": { "$ref": "#/components/schemas/Property" @@ -7286,9 +6554,7 @@ }, "op": { "type": "string", - "enum": [ - "changed" - ] + "enum": ["changed"] }, "path": { "$ref": "#/components/schemas/PropertyPath" @@ -7327,9 +6593,7 @@ }, "PropertyObjectMetadata": { "type": "object", - "required": [ - "value" - ], + "required": ["value"], "properties": { "metadata": { "$ref": "#/components/schemas/ObjectMetadata" @@ -7348,19 +6612,14 @@ "oneOf": [ { "type": "object", - "required": [ - "data", - "type" - ], + "required": ["data", "type"], "properties": { "data": { "$ref": "#/components/schemas/PropertyValueTypeMismatch" }, "type": { "type": "string", - "enum": [ - "wrongType" - ] + "enum": ["wrongType"] } } }, @@ -7371,15 +6630,11 @@ }, { "type": "object", - "required": [ - "type" - ], + "required": ["type"], "properties": { "type": { "type": "string", - "enum": [ - "objectValidation" - ] + "enum": ["objectValidation"] } } } @@ -7392,9 +6647,7 @@ }, "PropertyObjectWithMetadata": { "type": "object", - "required": [ - "value" - ], + "required": ["value"], "properties": { "metadata": { "$ref": "#/components/schemas/ObjectMetadata" @@ -7412,17 +6665,11 @@ "oneOf": [ { "type": "object", - "required": [ - "path", - "property", - "op" - ], + "required": ["path", "property", "op"], "properties": { "op": { "type": "string", - "enum": [ - "add" - ] + "enum": ["add"] }, "path": { "$ref": "#/components/schemas/PropertyPath" @@ -7434,16 +6681,11 @@ }, { "type": "object", - "required": [ - "path", - "op" - ], + "required": ["path", "op"], "properties": { "op": { "type": "string", - "enum": [ - "remove" - ] + "enum": ["remove"] }, "path": { "$ref": "#/components/schemas/PropertyPath" @@ -7452,17 +6694,11 @@ }, { "type": "object", - "required": [ - "path", - "property", - "op" - ], + "required": ["path", "property", "op"], "properties": { "op": { "type": "string", - "enum": [ - "replace" - ] + "enum": ["replace"] }, "path": { "$ref": "#/components/schemas/PropertyPath" @@ -7513,10 +6749,7 @@ }, "PropertyTypeEmbedding": { "type": "object", - "required": [ - "propertyTypeId", - "embedding" - ], + "required": ["propertyTypeId", "embedding"], "properties": { "embedding": { "$ref": "#/components/schemas/Embedding" @@ -7596,10 +6829,7 @@ }, "PropertyTypeVertexId": { "type": "object", - "required": [ - "baseId", - "revisionId" - ], + "required": ["baseId", "revisionId"], "properties": { "baseId": { "$ref": "#/components/schemas/BaseUrl" @@ -7611,10 +6841,7 @@ }, "PropertyTypeWithMetadata": { "type": "object", - "required": [ - "schema", - "metadata" - ], + "required": ["schema", "metadata"], "properties": { "metadata": { "$ref": "#/components/schemas/PropertyTypeMetadata" @@ -7633,15 +6860,11 @@ }, { "type": "object", - "required": [ - "type" - ], + "required": ["type"], "properties": { "type": { "type": "string", - "enum": [ - "value" - ] + "enum": ["value"] } } } @@ -7654,15 +6877,11 @@ }, { "type": "object", - "required": [ - "type" - ], + "required": ["type"], "properties": { "type": { "type": "string", - "enum": [ - "array" - ] + "enum": ["array"] } } } @@ -7675,15 +6894,11 @@ }, { "type": "object", - "required": [ - "type" - ], + "required": ["type"], "properties": { "type": { "type": "string", - "enum": [ - "object" - ] + "enum": ["object"] } } } @@ -7697,9 +6912,7 @@ "PropertyValue": {}, "PropertyValueMetadata": { "type": "object", - "required": [ - "metadata" - ], + "required": ["metadata"], "properties": { "metadata": { "$ref": "#/components/schemas/ValueMetadata" @@ -7710,18 +6923,11 @@ "PropertyValueType": { "type": "string", "description": "Categorizes property value structures by their basic structural type.\n\nThis enum provides a simple classification of the different kinds of property\nvalue structures in the Block Protocol type system. It's used by the\n[`PropertyValues::property_value_type`] method to indicate which variant a particular property\nvalue represents.", - "enum": [ - "value", - "array", - "object" - ] + "enum": ["value", "array", "object"] }, "PropertyValueTypeMismatch": { "type": "object", - "required": [ - "actual", - "expected" - ], + "required": ["actual", "expected"], "properties": { "actual": { "$ref": "#/components/schemas/PropertyValueType" @@ -7735,37 +6941,27 @@ "oneOf": [ { "type": "object", - "required": [ - "data", - "type" - ], + "required": ["data", "type"], "properties": { "data": { "$ref": "#/components/schemas/PropertyValueTypeMismatch" }, "type": { "type": "string", - "enum": [ - "wrongType" - ] + "enum": ["wrongType"] } } }, { "type": "object", - "required": [ - "data", - "type" - ], + "required": ["data", "type"], "properties": { "data": { "$ref": "#/components/schemas/ValueValidationReport" }, "type": { "type": "string", - "enum": [ - "valueValidation" - ] + "enum": ["valueValidation"] } } } @@ -7777,10 +6973,7 @@ "PropertyValueWithMetadata": { "type": "object", "description": "A primitive value with its associated metadata.\n\n`PropertyValueWithMetadata` combines a [`PropertyValue`] (such as a string, number, or boolean)\nwith its [`ValueMetadata`] containing provenance, confidence, and type information.\n\nThis structure is used as the leaf node in the [`PropertyWithMetadata`] hierarchy,\nrepresenting atomic data values with their context.\n\n[`PropertyWithMetadata`]: crate::knowledge::property::PropertyWithMetadata", - "required": [ - "value", - "metadata" - ], + "required": ["value", "metadata"], "properties": { "metadata": { "$ref": "#/components/schemas/ValueMetadata" @@ -7807,10 +7000,7 @@ }, "ProvidedEntityEditionProvenance": { "type": "object", - "required": [ - "actorType", - "origin" - ], + "required": ["actorType", "origin"], "properties": { "actorType": { "$ref": "#/components/schemas/ActorType" @@ -7830,10 +7020,7 @@ "ProvidedOntologyEditionProvenance": { "type": "object", "description": "User-provided provenance information for an ontology type edition.\n\nContains information provided by the client about the creation context,\nincluding the acting entity's type and the origin of the creation action.", - "required": [ - "actorType", - "origin" - ], + "required": ["actorType", "origin"], "properties": { "actorType": { "$ref": "#/components/schemas/ActorType" @@ -7852,10 +7039,7 @@ }, "QueryConversion": { "type": "object", - "required": [ - "path", - "dataTypeId" - ], + "required": ["path", "dataTypeId"], "properties": { "dataTypeId": { "$ref": "#/components/schemas/VersionedUrl" @@ -7875,9 +7059,7 @@ }, { "type": "object", - "required": [ - "traversalPaths" - ], + "required": ["traversalPaths"], "properties": { "traversalPaths": { "type": "array", @@ -7896,10 +7078,7 @@ }, { "type": "object", - "required": [ - "traversalPaths", - "graphResolveDepths" - ], + "required": ["traversalPaths", "graphResolveDepths"], "properties": { "graphResolveDepths": { "$ref": "#/components/schemas/GraphResolveDepths" @@ -7918,9 +7097,7 @@ }, "QueryDataTypeSubgraphResponse": { "type": "object", - "required": [ - "subgraph" - ], + "required": ["subgraph"], "properties": { "cursor": { "allOf": [ @@ -7937,10 +7114,7 @@ }, "QueryDataTypesParams": { "type": "object", - "required": [ - "filter", - "temporalAxes" - ], + "required": ["filter", "temporalAxes"], "properties": { "after": { "allOf": [ @@ -7967,9 +7141,7 @@ }, "QueryDataTypesResponse": { "type": "object", - "required": [ - "dataTypes" - ], + "required": ["dataTypes"], "properties": { "count": { "type": "integer", @@ -7999,9 +7171,7 @@ }, { "type": "object", - "required": [ - "query" - ], + "required": ["query"], "properties": { "query": {} } @@ -8015,9 +7185,7 @@ }, { "type": "object", - "required": [ - "filter" - ], + "required": ["filter"], "properties": { "filter": { "$ref": "#/components/schemas/Filter" @@ -8030,9 +7198,7 @@ }, "QueryEntitiesResponse": { "type": "object", - "required": [ - "entities" - ], + "required": ["entities"], "properties": { "closedMultiEntityTypes": { "type": "object", @@ -8116,11 +7282,7 @@ }, { "type": "object", - "required": [ - "query", - "traversalPaths", - "graphResolveDepths" - ], + "required": ["query", "traversalPaths", "graphResolveDepths"], "properties": { "graphResolveDepths": { "$ref": "#/components/schemas/GraphResolveDepths" @@ -8143,11 +7305,7 @@ }, { "type": "object", - "required": [ - "filter", - "traversalPaths", - "graphResolveDepths" - ], + "required": ["filter", "traversalPaths", "graphResolveDepths"], "properties": { "filter": { "$ref": "#/components/schemas/Filter" @@ -8172,10 +7330,7 @@ }, { "type": "object", - "required": [ - "query", - "traversalPaths" - ], + "required": ["query", "traversalPaths"], "properties": { "query": {}, "traversalPaths": { @@ -8195,10 +7350,7 @@ }, { "type": "object", - "required": [ - "filter", - "traversalPaths" - ], + "required": ["filter", "traversalPaths"], "properties": { "filter": { "$ref": "#/components/schemas/Filter" @@ -8217,9 +7369,7 @@ }, "QueryEntitySubgraphResponse": { "type": "object", - "required": [ - "subgraph" - ], + "required": ["subgraph"], "properties": { "closedMultiEntityTypes": { "type": "object", @@ -8300,10 +7450,7 @@ }, { "type": "object", - "required": [ - "traversalPaths", - "graphResolveDepths" - ], + "required": ["traversalPaths", "graphResolveDepths"], "properties": { "graphResolveDepths": { "$ref": "#/components/schemas/GraphResolveDepths" @@ -8325,9 +7472,7 @@ }, { "type": "object", - "required": [ - "traversalPaths" - ], + "required": ["traversalPaths"], "properties": { "traversalPaths": { "type": "array", @@ -8343,9 +7488,7 @@ }, "QueryEntityTypeSubgraphResponse": { "type": "object", - "required": [ - "subgraph" - ], + "required": ["subgraph"], "properties": { "count": { "type": "integer", @@ -8399,9 +7542,7 @@ }, "QueryEntityTypesResponse": { "type": "object", - "required": [ - "entityTypes" - ], + "required": ["entityTypes"], "properties": { "closedEntityTypes": { "type": "array", @@ -8458,10 +7599,7 @@ }, { "type": "object", - "required": [ - "traversalPaths", - "graphResolveDepths" - ], + "required": ["traversalPaths", "graphResolveDepths"], "properties": { "graphResolveDepths": { "$ref": "#/components/schemas/GraphResolveDepths" @@ -8483,9 +7621,7 @@ }, { "type": "object", - "required": [ - "traversalPaths" - ], + "required": ["traversalPaths"], "properties": { "traversalPaths": { "type": "array", @@ -8501,9 +7637,7 @@ }, "QueryPropertyTypeSubgraphResponse": { "type": "object", - "required": [ - "subgraph" - ], + "required": ["subgraph"], "properties": { "cursor": { "allOf": [ @@ -8520,10 +7654,7 @@ }, "QueryPropertyTypesParams": { "type": "object", - "required": [ - "filter", - "temporalAxes" - ], + "required": ["filter", "temporalAxes"], "properties": { "after": { "allOf": [ @@ -8550,9 +7681,7 @@ }, "QueryPropertyTypesResponse": { "type": "object", - "required": [ - "propertyTypes" - ], + "required": ["propertyTypes"], "properties": { "count": { "type": "integer", @@ -8578,18 +7707,12 @@ { "type": "object", "title": "QueryTemporalAxesDecisionTime", - "required": [ - "pinned", - "variable" - ], + "required": ["pinned", "variable"], "properties": { "pinned": { "type": "object", "title": "PinnedTransactionAxis", - "required": [ - "axis", - "timestamp" - ], + "required": ["axis", "timestamp"], "properties": { "axis": { "$ref": "#/components/schemas/TransactionTime" @@ -8603,10 +7726,7 @@ "variable": { "type": "object", "title": "VariableDecisionAxis", - "required": [ - "axis", - "interval" - ], + "required": ["axis", "interval"], "properties": { "axis": { "$ref": "#/components/schemas/DecisionTime" @@ -8621,18 +7741,12 @@ { "type": "object", "title": "QueryTemporalAxesTransactionTime", - "required": [ - "pinned", - "variable" - ], + "required": ["pinned", "variable"], "properties": { "pinned": { "type": "object", "title": "PinnedDecisionAxis", - "required": [ - "axis", - "timestamp" - ], + "required": ["axis", "timestamp"], "properties": { "axis": { "$ref": "#/components/schemas/DecisionTime" @@ -8646,10 +7760,7 @@ "variable": { "type": "object", "title": "VariableTransactionAxis", - "required": [ - "axis", - "interval" - ], + "required": ["axis", "interval"], "properties": { "axis": { "$ref": "#/components/schemas/TransactionTime" @@ -8669,18 +7780,12 @@ { "type": "object", "title": "QueryTemporalAxesUnresolvedDecisionTime", - "required": [ - "pinned", - "variable" - ], + "required": ["pinned", "variable"], "properties": { "pinned": { "type": "object", "title": "UnresolvedPinnedTransactionAxis", - "required": [ - "axis", - "timestamp" - ], + "required": ["axis", "timestamp"], "properties": { "axis": { "$ref": "#/components/schemas/TransactionTime" @@ -8693,10 +7798,7 @@ "variable": { "type": "object", "title": "UnresolvedVariableDecisionAxis", - "required": [ - "axis", - "interval" - ], + "required": ["axis", "interval"], "properties": { "axis": { "$ref": "#/components/schemas/DecisionTime" @@ -8711,18 +7813,12 @@ { "type": "object", "title": "QueryTemporalAxesUnresolvedTransactionTime", - "required": [ - "pinned", - "variable" - ], + "required": ["pinned", "variable"], "properties": { "pinned": { "type": "object", "title": "UnresolvedPinnedDecisionAxis", - "required": [ - "axis", - "timestamp" - ], + "required": ["axis", "timestamp"], "properties": { "axis": { "$ref": "#/components/schemas/DecisionTime" @@ -8735,10 +7831,7 @@ "variable": { "type": "object", "title": "UnresolvedVariableTransactionAxis", - "required": [ - "axis", - "interval" - ], + "required": ["axis", "interval"], "properties": { "axis": { "$ref": "#/components/schemas/TransactionTime" @@ -8761,10 +7854,7 @@ }, "RightBoundedTemporalInterval": { "type": "object", - "required": [ - "start", - "end" - ], + "required": ["start", "end"], "properties": { "end": { "$ref": "#/components/schemas/LimitedTemporalBound" @@ -8776,43 +7866,28 @@ }, "RoleAssignmentStatus": { "type": "string", - "enum": [ - "newly-assigned", - "already-assigned" - ] + "enum": ["newly-assigned", "already-assigned"] }, "RoleName": { "type": "string", - "enum": [ - "administrator", - "member" - ] + "enum": ["administrator", "member"] }, "RoleUnassignmentStatus": { "type": "string", - "enum": [ - "unassigned", - "not-assigned" - ] + "enum": ["unassigned", "not-assigned"] }, "Selector": { "type": "string", - "enum": [ - "*" - ] + "enum": ["*"] }, "SharedEdgeKind": { "type": "string", - "enum": [ - "IS_OF_TYPE" - ] + "enum": ["IS_OF_TYPE"] }, "SourceProvenance": { "type": "object", "description": "The source material used in producing a value.", - "required": [ - "type" - ], + "required": ["type"], "properties": { "authors": { "type": "array", @@ -8865,23 +7940,14 @@ "SourceType": { "type": "string", "description": "The type of source material which was used to produce a value.", - "enum": [ - "webpage", - "document", - "integration" - ] + "enum": ["webpage", "document", "integration"] }, "Status": { "$ref": "./models/status.json" }, "Subgraph": { "type": "object", - "required": [ - "roots", - "vertices", - "edges", - "temporalAxes" - ], + "required": ["roots", "vertices", "edges", "temporalAxes"], "properties": { "edges": { "$ref": "#/components/schemas/Edges" @@ -8902,10 +7968,7 @@ }, "SubgraphTemporalAxes": { "type": "object", - "required": [ - "initial", - "resolved" - ], + "required": ["initial", "resolved"], "properties": { "initial": { "$ref": "#/components/schemas/QueryTemporalAxesUnresolved" @@ -8923,31 +7986,22 @@ { "type": "object", "title": "UnboundedBound", - "required": [ - "kind" - ], + "required": ["kind"], "properties": { "kind": { "type": "string", - "enum": [ - "unbounded" - ] + "enum": ["unbounded"] } } }, { "type": "object", "title": "InclusiveBound", - "required": [ - "kind", - "limit" - ], + "required": ["kind", "limit"], "properties": { "kind": { "type": "string", - "enum": [ - "inclusive" - ] + "enum": ["inclusive"] }, "limit": { "$ref": "#/components/schemas/Timestamp" @@ -8957,16 +8011,11 @@ { "type": "object", "title": "ExclusiveBound", - "required": [ - "kind", - "limit" - ], + "required": ["kind", "limit"], "properties": { "kind": { "type": "string", - "enum": [ - "exclusive" - ] + "enum": ["exclusive"] }, "limit": { "$ref": "#/components/schemas/Timestamp" @@ -8985,137 +8034,101 @@ "TransactionTime": { "type": "string", "description": "Time axis for the transaction time.\n\nThis is used as the generic argument to time-related structs and can be used as tag value.", - "enum": [ - "transactionTime" - ] + "enum": ["transactionTime"] }, "TraversalEdge": { "oneOf": [ { "type": "object", "title": "InheritsFromEdge", - "required": [ - "kind" - ], + "required": ["kind"], "properties": { "kind": { "type": "string", - "enum": [ - "inherits-from" - ] + "enum": ["inherits-from"] } } }, { "type": "object", "title": "ConstrainsValuesOnEdge", - "required": [ - "kind" - ], + "required": ["kind"], "properties": { "kind": { "type": "string", - "enum": [ - "constrains-values-on" - ] + "enum": ["constrains-values-on"] } } }, { "type": "object", "title": "ConstrainsPropertiesOnEdge", - "required": [ - "kind" - ], + "required": ["kind"], "properties": { "kind": { "type": "string", - "enum": [ - "constrains-properties-on" - ] + "enum": ["constrains-properties-on"] } } }, { "type": "object", "title": "ConstrainsLinksOnEdge", - "required": [ - "kind" - ], + "required": ["kind"], "properties": { "kind": { "type": "string", - "enum": [ - "constrains-links-on" - ] + "enum": ["constrains-links-on"] } } }, { "type": "object", "title": "ConstrainsLinkDestinationsOnEdge", - "required": [ - "kind" - ], + "required": ["kind"], "properties": { "kind": { "type": "string", - "enum": [ - "constrains-link-destinations-on" - ] + "enum": ["constrains-link-destinations-on"] } } }, { "type": "object", "title": "IsOfTypeEdge", - "required": [ - "kind" - ], + "required": ["kind"], "properties": { "kind": { "type": "string", - "enum": [ - "is-of-type" - ] + "enum": ["is-of-type"] } } }, { "type": "object", "title": "HasLeftEntityEdge", - "required": [ - "direction", - "kind" - ], + "required": ["direction", "kind"], "properties": { "direction": { "$ref": "#/components/schemas/EdgeDirection" }, "kind": { "type": "string", - "enum": [ - "has-left-entity" - ] + "enum": ["has-left-entity"] } } }, { "type": "object", "title": "HasRightEntityEdge", - "required": [ - "direction", - "kind" - ], + "required": ["direction", "kind"], "properties": { "direction": { "$ref": "#/components/schemas/EdgeDirection" }, "kind": { "type": "string", - "enum": [ - "has-right-entity" - ] + "enum": ["has-right-entity"] } } } @@ -9126,9 +8139,7 @@ }, "TraversalPath": { "type": "object", - "required": [ - "edges" - ], + "required": ["edges"], "properties": { "edges": { "type": "array", @@ -9141,10 +8152,7 @@ }, "UnarchiveDataTypeParams": { "type": "object", - "required": [ - "dataTypeId", - "provenance" - ], + "required": ["dataTypeId", "provenance"], "properties": { "dataTypeId": { "$ref": "#/components/schemas/VersionedUrl" @@ -9157,10 +8165,7 @@ }, "UnarchiveEntityTypeParams": { "type": "object", - "required": [ - "entityTypeId", - "provenance" - ], + "required": ["entityTypeId", "provenance"], "properties": { "entityTypeId": { "$ref": "#/components/schemas/VersionedUrl" @@ -9173,10 +8178,7 @@ }, "UnarchivePropertyTypeParams": { "type": "object", - "required": [ - "propertyTypeId", - "provenance" - ], + "required": ["propertyTypeId", "provenance"], "properties": { "propertyTypeId": { "$ref": "#/components/schemas/VersionedUrl" @@ -9189,10 +8191,7 @@ }, "UnexpectedEntityType": { "type": "object", - "required": [ - "actual", - "expected" - ], + "required": ["actual", "expected"], "properties": { "actual": { "type": "array", @@ -9210,10 +8209,7 @@ }, "UnresolvedRightBoundedTemporalInterval": { "type": "object", - "required": [ - "start", - "end" - ], + "required": ["start", "end"], "properties": { "end": { "oneOf": [ @@ -9262,12 +8258,7 @@ }, "UpdateDataTypeRequest": { "type": "object", - "required": [ - "schema", - "typeToUpdate", - "provenance", - "conversions" - ], + "required": ["schema", "typeToUpdate", "provenance", "conversions"], "properties": { "conversions": { "type": "object", @@ -9347,11 +8338,7 @@ }, "UpdateEntityTypeRequest": { "type": "object", - "required": [ - "schema", - "typeToUpdate", - "provenance" - ], + "required": ["schema", "typeToUpdate", "provenance"], "properties": { "provenance": { "$ref": "#/components/schemas/ProvidedOntologyEditionProvenance" @@ -9394,11 +8381,7 @@ }, "UpdatePropertyTypeRequest": { "type": "object", - "required": [ - "schema", - "typeToUpdate", - "provenance" - ], + "required": ["schema", "typeToUpdate", "provenance"], "properties": { "provenance": { "$ref": "#/components/schemas/ProvidedOntologyEditionProvenance" @@ -9414,9 +8397,7 @@ }, "UpdateWebShortnameParams": { "type": "object", - "required": [ - "shortname" - ], + "required": ["shortname"], "properties": { "shortname": { "type": "string" @@ -9447,10 +8428,7 @@ }, "ValidateEntityParams": { "type": "object", - "required": [ - "entityTypes", - "properties" - ], + "required": ["entityTypes", "properties"], "properties": { "components": { "allOf": [ @@ -9477,9 +8455,7 @@ }, "ValueMetadata": { "type": "object", - "required": [ - "dataTypeId" - ], + "required": ["dataTypeId"], "properties": { "canonical": { "type": "object", @@ -9531,37 +8507,27 @@ "oneOf": [ { "type": "object", - "required": [ - "error", - "type" - ], + "required": ["error", "type"], "properties": { "error": { "$ref": "#/components/schemas/Report" }, "type": { "type": "string", - "enum": [ - "retrieval" - ] + "enum": ["retrieval"] } } }, { "type": "object", - "required": [ - "error", - "type" - ], + "required": ["error", "type"], "properties": { "error": { "$ref": "#/components/schemas/Report" }, "type": { "type": "string", - "enum": [ - "constraints" - ] + "enum": ["constraints"] } } } @@ -9609,9 +8575,7 @@ }, "Variable": { "type": "string", - "enum": [ - "self" - ] + "enum": ["self"] }, "VersionedUrl": { "type": "string", diff --git a/libs/@local/graph/authorization/types/index.snap.d.ts b/libs/@local/graph/authorization/types/index.snap.d.ts index 42636d27c01..cc0d39dae7c 100644 --- a/libs/@local/graph/authorization/types/index.snap.d.ts +++ b/libs/@local/graph/authorization/types/index.snap.d.ts @@ -1,205 +1,295 @@ // This file was generated from `libs/@local/graph/authorization/tests/codegen.rs` -import type { ActorId, ActorType, ActorGroupId, BaseUrl, EntityUuid, OntologyTypeVersion, RoleId, WebId } from "@blockprotocol/type-system-rs/types"; import type { VersionedUrl } from "@blockprotocol/type-system-rs"; +import type { + ActorId, + ActorType, + ActorGroupId, + BaseUrl, + EntityUuid, + OntologyTypeVersion, + RoleId, + WebId, +} from "@blockprotocol/type-system-rs/types"; export type Effect = "permit" | "forbid"; export interface Policy { - id: PolicyId; - name?: string; - effect: Effect; - principal: (PrincipalConstraint | null); - actions: ActionName[]; - resource: (ResourceConstraint | null); + id: PolicyId; + name?: string; + effect: Effect; + principal: PrincipalConstraint | null; + actions: ActionName[]; + resource: ResourceConstraint | null; } import type { Brand } from "@blockprotocol/type-system-rs"; export type PolicyId = Brand; export interface ResolvedPolicy { - effect: Effect; - actions: ActionName[]; - resource: (ResourceConstraint | null); + effect: Effect; + actions: ActionName[]; + resource: ResourceConstraint | null; } -export type ActionName = "createPolicy" | "createDataType" | "createEntity" | "createEntityType" | "createPropertyType" | "createWeb" | "viewPolicy" | "viewDataType" | "viewEntity" | "viewEntityType" | "viewPropertyType" | "updatePolicy" | "updateDataType" | "updateEntity" | "updateEntityType" | "updatePropertyType" | "archivePolicy" | "archiveDataType" | "archiveEntity" | "archiveEntityType" | "archivePropertyType" | "deletePolicy" | "instantiate"; -export type PrincipalConstraint = { - type: "actor"; -} & ActorId | { - type: "actorType"; - actorType: ActorType; -} | { - type: "actorGroup"; - actorType?: ActorType; -} & ActorGroupId | { - type: "role"; - actorType?: ActorType; -} & RoleId; -export type ResourceConstraint = { - type: "meta"; -} & MetaResourceConstraint | { - type: "web"; - webId: WebId; -} | { - type: "entity"; -} & EntityResourceConstraint | { - type: "entityType"; -} & EntityTypeResourceConstraint | { - type: "propertyType"; -} & PropertyTypeResourceConstraint | { - type: "dataType"; -} & DataTypeResourceConstraint; +export type ActionName = + | "createPolicy" + | "createDataType" + | "createEntity" + | "createEntityType" + | "createPropertyType" + | "createWeb" + | "viewPolicy" + | "viewDataType" + | "viewEntity" + | "viewEntityType" + | "viewPropertyType" + | "updatePolicy" + | "updateDataType" + | "updateEntity" + | "updateEntityType" + | "updatePropertyType" + | "archivePolicy" + | "archiveDataType" + | "archiveEntity" + | "archiveEntityType" + | "archivePropertyType" + | "deletePolicy" + | "instantiate"; +export type PrincipalConstraint = + | ({ + type: "actor"; + } & ActorId) + | { + type: "actorType"; + actorType: ActorType; + } + | ({ + type: "actorGroup"; + actorType?: ActorType; + } & ActorGroupId) + | ({ + type: "role"; + actorType?: ActorType; + } & RoleId); +export type ResourceConstraint = + | ({ + type: "meta"; + } & MetaResourceConstraint) + | { + type: "web"; + webId: WebId; + } + | ({ + type: "entity"; + } & EntityResourceConstraint) + | ({ + type: "entityType"; + } & EntityTypeResourceConstraint) + | ({ + type: "propertyType"; + } & PropertyTypeResourceConstraint) + | ({ + type: "dataType"; + } & DataTypeResourceConstraint); export type DataTypeId = string; -export type DataTypeResourceConstraint = { - filter: DataTypeResourceFilter; -} | { - id: DataTypeId; -} | { - webId: WebId; - filter: DataTypeResourceFilter; -}; -export type DataTypeResourceFilter = { - type: "all"; - filters: DataTypeResourceFilter[]; -} | { - type: "any"; - filters: DataTypeResourceFilter[]; -} | { - type: "not"; - filter: DataTypeResourceFilter; -} | { - type: "isBaseUrl"; - baseUrl: BaseUrl; -} | { - type: "isVersion"; - version: OntologyTypeVersion; -} | { - type: "isRemote"; -}; -export type EntityResourceConstraint = { - filter: EntityResourceFilter; -} | { - id: EntityUuid; -} | { - webId: WebId; - filter: EntityResourceFilter; -}; -export type EntityResourceFilter = { - type: "all"; - filters: EntityResourceFilter[]; -} | { - type: "any"; - filters: EntityResourceFilter[]; -} | { - type: "not"; - filter: EntityResourceFilter; -} | { - type: "isOfType"; - entityType: VersionedUrl; -} | { - type: "isOfBaseType"; - entityType: BaseUrl; -} | { - type: "createdByPrincipal"; -}; +export type DataTypeResourceConstraint = + | { + filter: DataTypeResourceFilter; + } + | { + id: DataTypeId; + } + | { + webId: WebId; + filter: DataTypeResourceFilter; + }; +export type DataTypeResourceFilter = + | { + type: "all"; + filters: DataTypeResourceFilter[]; + } + | { + type: "any"; + filters: DataTypeResourceFilter[]; + } + | { + type: "not"; + filter: DataTypeResourceFilter; + } + | { + type: "isBaseUrl"; + baseUrl: BaseUrl; + } + | { + type: "isVersion"; + version: OntologyTypeVersion; + } + | { + type: "isRemote"; + }; +export type EntityResourceConstraint = + | { + filter: EntityResourceFilter; + } + | { + id: EntityUuid; + } + | { + webId: WebId; + filter: EntityResourceFilter; + }; +export type EntityResourceFilter = + | { + type: "all"; + filters: EntityResourceFilter[]; + } + | { + type: "any"; + filters: EntityResourceFilter[]; + } + | { + type: "not"; + filter: EntityResourceFilter; + } + | { + type: "isOfType"; + entityType: VersionedUrl; + } + | { + type: "isOfBaseType"; + entityType: BaseUrl; + } + | { + type: "createdByPrincipal"; + }; export type EntityTypeId = string; -export type EntityTypeResourceConstraint = { - filter: EntityTypeResourceFilter; -} | { - id: EntityTypeId; -} | { - webId: WebId; - filter: EntityTypeResourceFilter; -}; -export type EntityTypeResourceFilter = { - type: "all"; - filters: EntityTypeResourceFilter[]; -} | { - type: "any"; - filters: EntityTypeResourceFilter[]; -} | { - type: "not"; - filter: EntityTypeResourceFilter; -} | { - type: "isBaseUrl"; - baseUrl: BaseUrl; -} | { - type: "isVersion"; - version: OntologyTypeVersion; -} | { - type: "isRemote"; -}; -export type MetaResourceConstraint = { - filter: MetaResourceFilter; -} | { - webId: WebId; - filter: MetaResourceFilter; -}; -export type MetaResourceFilter = { - type: "all"; - filters: MetaResourceFilter[]; -} | { - type: "any"; - filters: MetaResourceFilter[]; -} | { - type: "not"; - filter: MetaResourceFilter; -} | { - type: "hasAction"; - action: ActionName; -}; +export type EntityTypeResourceConstraint = + | { + filter: EntityTypeResourceFilter; + } + | { + id: EntityTypeId; + } + | { + webId: WebId; + filter: EntityTypeResourceFilter; + }; +export type EntityTypeResourceFilter = + | { + type: "all"; + filters: EntityTypeResourceFilter[]; + } + | { + type: "any"; + filters: EntityTypeResourceFilter[]; + } + | { + type: "not"; + filter: EntityTypeResourceFilter; + } + | { + type: "isBaseUrl"; + baseUrl: BaseUrl; + } + | { + type: "isVersion"; + version: OntologyTypeVersion; + } + | { + type: "isRemote"; + }; +export type MetaResourceConstraint = + | { + filter: MetaResourceFilter; + } + | { + webId: WebId; + filter: MetaResourceFilter; + }; +export type MetaResourceFilter = + | { + type: "all"; + filters: MetaResourceFilter[]; + } + | { + type: "any"; + filters: MetaResourceFilter[]; + } + | { + type: "not"; + filter: MetaResourceFilter; + } + | { + type: "hasAction"; + action: ActionName; + }; export type PropertyTypeId = string; -export type PropertyTypeResourceConstraint = { - filter: PropertyTypeResourceFilter; -} | { - id: PropertyTypeId; -} | { - webId: WebId; - filter: PropertyTypeResourceFilter; -}; -export type PropertyTypeResourceFilter = { - type: "all"; - filters: PropertyTypeResourceFilter[]; -} | { - type: "any"; - filters: PropertyTypeResourceFilter[]; -} | { - type: "not"; - filter: PropertyTypeResourceFilter; -} | { - type: "isBaseUrl"; - baseUrl: BaseUrl; -} | { - type: "isVersion"; - version: OntologyTypeVersion; -} | { - type: "isRemote"; -}; +export type PropertyTypeResourceConstraint = + | { + filter: PropertyTypeResourceFilter; + } + | { + id: PropertyTypeId; + } + | { + webId: WebId; + filter: PropertyTypeResourceFilter; + }; +export type PropertyTypeResourceFilter = + | { + type: "all"; + filters: PropertyTypeResourceFilter[]; + } + | { + type: "any"; + filters: PropertyTypeResourceFilter[]; + } + | { + type: "not"; + filter: PropertyTypeResourceFilter; + } + | { + type: "isBaseUrl"; + baseUrl: BaseUrl; + } + | { + type: "isVersion"; + version: OntologyTypeVersion; + } + | { + type: "isRemote"; + }; export interface PolicyCreationParams { - name?: string; - effect: Effect; - principal: (PrincipalConstraint | null); - actions: ActionName[]; - resource: (ResourceConstraint | null); + name?: string; + effect: Effect; + principal: PrincipalConstraint | null; + actions: ActionName[]; + resource: ResourceConstraint | null; } export interface PolicyFilter { - name?: string; - principal?: PrincipalFilter; + name?: string; + principal?: PrincipalFilter; } -export type PolicyUpdateOperation = { - type: "add-action"; - action: ActionName; -} | { - type: "remove-action"; - action: ActionName; -} | { - type: "set-resource-constraint"; - resourceConstraint: (ResourceConstraint | null); -} | { - type: "set-effect"; - effect: Effect; -}; -export type PrincipalFilter = { - filter: "unconstrained"; -} | { - filter: "constrained"; -} & PrincipalConstraint; +export type PolicyUpdateOperation = + | { + type: "add-action"; + action: ActionName; + } + | { + type: "remove-action"; + action: ActionName; + } + | { + type: "set-resource-constraint"; + resourceConstraint: ResourceConstraint | null; + } + | { + type: "set-effect"; + effect: Effect; + }; +export type PrincipalFilter = + | { + filter: "unconstrained"; + } + | ({ + filter: "constrained"; + } & PrincipalConstraint); export interface ResolvePoliciesParams { - actions: ActionName[]; + actions: ActionName[]; } diff --git a/libs/@local/graph/migrations-macros/LICENSE.md b/libs/@local/graph/migrations-macros/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/libs/@local/graph/migrations-macros/LICENSE.md +++ b/libs/@local/graph/migrations-macros/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/libs/@local/graph/migrations/LICENSE.md b/libs/@local/graph/migrations/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/libs/@local/graph/migrations/LICENSE.md +++ b/libs/@local/graph/migrations/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/libs/@local/graph/postgres-store/LICENSE.md b/libs/@local/graph/postgres-store/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/libs/@local/graph/postgres-store/LICENSE.md +++ b/libs/@local/graph/postgres-store/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/libs/@local/graph/sdk/typescript/LICENSE.md b/libs/@local/graph/sdk/typescript/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/libs/@local/graph/sdk/typescript/LICENSE.md +++ b/libs/@local/graph/sdk/typescript/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/libs/@local/graph/sdk/typescript/src/entity.ts b/libs/@local/graph/sdk/typescript/src/entity.ts index b0c474c160f..d11fbecc189 100644 --- a/libs/@local/graph/sdk/typescript/src/entity.ts +++ b/libs/@local/graph/sdk/typescript/src/entity.ts @@ -228,8 +228,8 @@ export type QueryEntitiesRequest = DistributiveOmit< export type EntityPermissionsMap = Record; export type QueryEntitiesResponse< - PropertyMap extends - TypeIdsAndPropertiesForEntity = TypeIdsAndPropertiesForEntity, + PropertyMap extends TypeIdsAndPropertiesForEntity = + TypeIdsAndPropertiesForEntity, > = DistributiveOmit< QueryEntitiesResponseGraphApi, | "entities" @@ -254,8 +254,8 @@ export type QueryEntitiesResponse< }; export type SerializedQueryEntitiesResponse< - PropertyMap extends - TypeIdsAndPropertiesForEntity = TypeIdsAndPropertiesForEntity, + PropertyMap extends TypeIdsAndPropertiesForEntity = + TypeIdsAndPropertiesForEntity, > = DistributiveReplaceProperties< QueryEntitiesResponse, { @@ -273,8 +273,8 @@ export type QueryEntitySubgraphRequest = ExclusiveUnion< >; export type QueryEntitySubgraphResponse< - PropertyMap extends - TypeIdsAndPropertiesForEntity = TypeIdsAndPropertiesForEntity, + PropertyMap extends TypeIdsAndPropertiesForEntity = + TypeIdsAndPropertiesForEntity, > = DistributiveOmit< QueryEntitySubgraphResponseGraphApi, | "subgraph" @@ -310,8 +310,8 @@ export type SerializedQueryEntitySubgraphResponse = DistributiveOmit< * @param params.query the structural query to filter entities by. */ export const queryEntitySubgraph = async < - PropertyMap extends - TypeIdsAndPropertiesForEntity = TypeIdsAndPropertiesForEntity, + PropertyMap extends TypeIdsAndPropertiesForEntity = + TypeIdsAndPropertiesForEntity, >( context: { graphApi: GraphApi; temporalClient?: TemporalClient }, authentication: AuthenticationContext, @@ -392,8 +392,8 @@ export const serializeQueryEntitySubgraphResponse = ( }); export const deserializeQueryEntitySubgraphResponse = < - PropertyMap extends - TypeIdsAndPropertiesForEntity = TypeIdsAndPropertiesForEntity, + PropertyMap extends TypeIdsAndPropertiesForEntity = + TypeIdsAndPropertiesForEntity, >( response: SerializedQueryEntitySubgraphResponse, ): QueryEntitySubgraphResponse => ({ @@ -420,8 +420,8 @@ export interface SerializedEntity< } type EntityData< - Properties extends - TypeIdsAndPropertiesForEntity = TypeIdsAndPropertiesForEntity, + Properties extends TypeIdsAndPropertiesForEntity = + TypeIdsAndPropertiesForEntity, > = { metadata: EntityMetadata; properties: Properties["properties"]; @@ -1112,10 +1112,9 @@ export const generateChangedPropertyMetadataObject = ( }; export class HashEntity< - PropertyMap extends - TypeIdsAndPropertiesForEntity = TypeIdsAndPropertiesForEntity, -> implements Entity -{ + PropertyMap extends TypeIdsAndPropertiesForEntity = + TypeIdsAndPropertiesForEntity, +> implements Entity { #entity: EntityData; constructor(entity: EntityInput) { @@ -1398,8 +1397,8 @@ export class HashEntity< } export class HashLinkEntity< - Properties extends - TypeIdsAndPropertiesForEntity = TypeIdsAndPropertiesForEntity, + Properties extends TypeIdsAndPropertiesForEntity = + TypeIdsAndPropertiesForEntity, > extends HashEntity { constructor(entity: EntityInput | HashEntity) { const input = (entity instanceof HashEntity ? entity.toJSON() : entity) as @@ -1502,8 +1501,8 @@ export class HashLinkEntity< } export const queryEntities = async < - PropertyMap extends - TypeIdsAndPropertiesForEntity = TypeIdsAndPropertiesForEntity, + PropertyMap extends TypeIdsAndPropertiesForEntity = + TypeIdsAndPropertiesForEntity, >( context: { graphApi: GraphApi; @@ -1548,8 +1547,8 @@ export const queryEntities = async < }; export const serializeQueryEntitiesResponse = < - PropertyMap extends - TypeIdsAndPropertiesForEntity = TypeIdsAndPropertiesForEntity, + PropertyMap extends TypeIdsAndPropertiesForEntity = + TypeIdsAndPropertiesForEntity, >( response: QueryEntitiesResponse, ): SerializedQueryEntitiesResponse => ({ @@ -1558,8 +1557,8 @@ export const serializeQueryEntitiesResponse = < }); export const deserializeQueryEntitiesResponse = < - PropertyMap extends - TypeIdsAndPropertiesForEntity = TypeIdsAndPropertiesForEntity, + PropertyMap extends TypeIdsAndPropertiesForEntity = + TypeIdsAndPropertiesForEntity, >( response: SerializedQueryEntitiesResponse, ): QueryEntitiesResponse => ({ diff --git a/libs/@local/graph/sdk/typescript/src/subgraph.ts b/libs/@local/graph/sdk/typescript/src/subgraph.ts index cbe32dc6c08..9c2b220bff6 100644 --- a/libs/@local/graph/sdk/typescript/src/subgraph.ts +++ b/libs/@local/graph/sdk/typescript/src/subgraph.ts @@ -94,8 +94,8 @@ export const serializeGraphVertices = (vertices: Vertices) => ) as SerializedVertices; export const deserializeGraphVertices = < - PropertyMap extends - TypeIdsAndPropertiesForEntity = TypeIdsAndPropertiesForEntity, + PropertyMap extends TypeIdsAndPropertiesForEntity = + TypeIdsAndPropertiesForEntity, >( vertices: SerializedVertices, ): Vertices> => diff --git a/libs/@local/graph/store/LICENSE.md b/libs/@local/graph/store/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/libs/@local/graph/store/LICENSE.md +++ b/libs/@local/graph/store/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/libs/@local/graph/store/types/index.snap.d.ts b/libs/@local/graph/store/types/index.snap.d.ts index 1e2e3dbb94a..2bcd5e486a2 100644 --- a/libs/@local/graph/store/types/index.snap.d.ts +++ b/libs/@local/graph/store/types/index.snap.d.ts @@ -1,76 +1,100 @@ // This file was generated from `libs/@local/graph/store/tests/codegen.rs` -import type { ActionName, Effect, PrincipalConstraint } from "@rust/hash-graph-authorization/types"; import type { EntityEditionId } from "@blockprotocol/type-system-rs/types"; +import type { + ActionName, + Effect, + PrincipalConstraint, +} from "@rust/hash-graph-authorization/types"; export interface CreateEntityPolicyParams { - name: string; - effect: Effect; - principal: (PrincipalConstraint | null); - actions: ActionName[]; + name: string; + effect: Effect; + principal: PrincipalConstraint | null; + actions: ActionName[]; } export interface EntityPermissions { - update?: [EntityEditionId, ...EntityEditionId[]]; + update?: [EntityEditionId, ...EntityEditionId[]]; } export type EdgeDirection = "incoming" | "outgoing"; export interface GraphResolveDepths { - inheritsFrom?: number; - constrainsValuesOn?: number; - constrainsPropertiesOn?: number; - constrainsLinksOn?: number; - constrainsLinkDestinationsOn?: number; - isOfType?: boolean; + inheritsFrom?: number; + constrainsValuesOn?: number; + constrainsPropertiesOn?: number; + constrainsLinksOn?: number; + constrainsLinkDestinationsOn?: number; + isOfType?: boolean; } -export type EntityTraversalEdge = { - kind: "has-left-entity"; - direction: EdgeDirection; -} | { - kind: "has-right-entity"; - direction: EdgeDirection; -}; -export type EntityTraversalEdgeKind = { - kind: "has-left-entity"; -} | { - kind: "has-right-entity"; -}; +export type EntityTraversalEdge = + | { + kind: "has-left-entity"; + direction: EdgeDirection; + } + | { + kind: "has-right-entity"; + direction: EdgeDirection; + }; +export type EntityTraversalEdgeKind = + | { + kind: "has-left-entity"; + } + | { + kind: "has-right-entity"; + }; export interface EntityTraversalPath { - edges: EntityTraversalEdge[]; + edges: EntityTraversalEdge[]; } -export type TraversalEdge = { - kind: "inherits-from"; -} | { - kind: "constrains-values-on"; -} | { - kind: "constrains-properties-on"; -} | { - kind: "constrains-links-on"; -} | { - kind: "constrains-link-destinations-on"; -} | { - kind: "is-of-type"; -} | { - kind: "has-left-entity"; - direction: EdgeDirection; -} | { - kind: "has-right-entity"; - direction: EdgeDirection; -}; -export type TraversalEdgeKind = { - kind: "inherits-from"; -} | { - kind: "constrains-values-on"; -} | { - kind: "constrains-properties-on"; -} | { - kind: "constrains-links-on"; -} | { - kind: "constrains-link-destinations-on"; -} | { - kind: "is-of-type"; -} | { - kind: "has-left-entity"; -} | { - kind: "has-right-entity"; -}; +export type TraversalEdge = + | { + kind: "inherits-from"; + } + | { + kind: "constrains-values-on"; + } + | { + kind: "constrains-properties-on"; + } + | { + kind: "constrains-links-on"; + } + | { + kind: "constrains-link-destinations-on"; + } + | { + kind: "is-of-type"; + } + | { + kind: "has-left-entity"; + direction: EdgeDirection; + } + | { + kind: "has-right-entity"; + direction: EdgeDirection; + }; +export type TraversalEdgeKind = + | { + kind: "inherits-from"; + } + | { + kind: "constrains-values-on"; + } + | { + kind: "constrains-properties-on"; + } + | { + kind: "constrains-links-on"; + } + | { + kind: "constrains-link-destinations-on"; + } + | { + kind: "is-of-type"; + } + | { + kind: "has-left-entity"; + } + | { + kind: "has-right-entity"; + }; export interface TraversalPath { - edges: TraversalEdge[]; + edges: TraversalEdge[]; } diff --git a/libs/@local/graph/type-defs/LICENSE.md b/libs/@local/graph/type-defs/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/libs/@local/graph/type-defs/LICENSE.md +++ b/libs/@local/graph/type-defs/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/libs/@local/graph/type-fetcher/LICENSE.md b/libs/@local/graph/type-fetcher/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/libs/@local/graph/type-fetcher/LICENSE.md +++ b/libs/@local/graph/type-fetcher/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/libs/@local/harpc/client/typescript/src/binary/MutableBuffer.ts b/libs/@local/harpc/client/typescript/src/binary/MutableBuffer.ts index d93a180377a..986ea45c2c7 100644 --- a/libs/@local/harpc/client/typescript/src/binary/MutableBuffer.ts +++ b/libs/@local/harpc/client/typescript/src/binary/MutableBuffer.ts @@ -1,7 +1,6 @@ import { Data, Either, Function, pipe, Pipeable } from "effect"; import { createProto } from "../utils.js"; - import * as MutableBytes from "./MutableBytes.js"; const TypeId: unique symbol = Symbol( diff --git a/libs/@local/harpc/client/typescript/src/codec/Decoder.ts b/libs/@local/harpc/client/typescript/src/codec/Decoder.ts index 10018811056..e40d217946e 100644 --- a/libs/@local/harpc/client/typescript/src/codec/Decoder.ts +++ b/libs/@local/harpc/client/typescript/src/codec/Decoder.ts @@ -24,8 +24,7 @@ export class DecodingError extends Data.TaggedError("DecodingError")<{ } export interface Decoder - extends Inspectable.Inspectable, - Pipeable.Pipeable { + extends Inspectable.Inspectable, Pipeable.Pipeable { readonly [TypeId]: TypeId; readonly decode: { diff --git a/libs/@local/harpc/client/typescript/src/codec/Encoder.ts b/libs/@local/harpc/client/typescript/src/codec/Encoder.ts index 9a284c5b3b4..03e631e9232 100644 --- a/libs/@local/harpc/client/typescript/src/codec/Encoder.ts +++ b/libs/@local/harpc/client/typescript/src/codec/Encoder.ts @@ -24,8 +24,7 @@ export class EncodingError extends Data.TaggedError("EncodingError")<{ } export interface Encoder - extends Inspectable.Inspectable, - Pipeable.Pipeable { + extends Inspectable.Inspectable, Pipeable.Pipeable { readonly [TypeId]: TypeId; readonly encode: { diff --git a/libs/@local/harpc/client/typescript/src/codec/JsonDecoder.ts b/libs/@local/harpc/client/typescript/src/codec/JsonDecoder.ts index 81c70c15c0e..376620f7a63 100644 --- a/libs/@local/harpc/client/typescript/src/codec/JsonDecoder.ts +++ b/libs/@local/harpc/client/typescript/src/codec/JsonDecoder.ts @@ -3,7 +3,6 @@ import { TextDecoder } from "node:util"; import { Data, Effect, Layer, Option, pipe, Schema, Stream } from "effect"; import { InvalidUtf8Error } from "../ClientError.js"; - import * as Decoder from "./Decoder.js"; // 1E is the ASCII record separator character, and is invalid in JSON. diff --git a/libs/@local/harpc/client/typescript/src/net/Client.ts b/libs/@local/harpc/client/typescript/src/net/Client.ts index a6d9b6ec070..0ea7e539fc1 100644 --- a/libs/@local/harpc/client/typescript/src/net/Client.ts +++ b/libs/@local/harpc/client/typescript/src/net/Client.ts @@ -2,7 +2,6 @@ import { Effect, Function, Layer, type Scope } from "effect"; import { GenericTag } from "effect/Context"; import { createProto } from "../utils.js"; - import * as Connection from "./Connection.js"; import * as internalTransport from "./internal/transport.js"; import type * as Transport from "./Transport.js"; diff --git a/libs/@local/harpc/client/typescript/src/net/Connection.ts b/libs/@local/harpc/client/typescript/src/net/Connection.ts index 3aa7d762098..26ae8018e76 100644 --- a/libs/@local/harpc/client/typescript/src/net/Connection.ts +++ b/libs/@local/harpc/client/typescript/src/net/Connection.ts @@ -15,19 +15,18 @@ import { import { GenericTag } from "effect/Context"; import { isUint8ArrayList, Uint8ArrayList } from "uint8arraylist"; +import { MutableBuffer } from "../binary/index.js"; import { createProto } from "../utils.js"; import { type RequestId, Request as WireRequest, } from "../wire-protocol/models/request/index.js"; -import { MutableBuffer } from "../binary/index.js"; import { type Response as WireResponse, ResponseFlags, } from "../wire-protocol/models/response/index.js"; import { ResponseFromBytesStream } from "../wire-protocol/stream/index.js"; import type { IncompleteResponseError } from "../wire-protocol/stream/ResponseFromBytesStream.js"; - import * as internalTransport from "./internal/transport.js"; import * as Request from "./Request.js"; import * as Transaction from "./Transaction.js"; diff --git a/libs/@local/harpc/client/typescript/src/net/NetworkLogger.ts b/libs/@local/harpc/client/typescript/src/net/NetworkLogger.ts index 72aee24a03e..28868842958 100644 --- a/libs/@local/harpc/client/typescript/src/net/NetworkLogger.ts +++ b/libs/@local/harpc/client/typescript/src/net/NetworkLogger.ts @@ -2,7 +2,6 @@ import type { ComponentLogger, Logger } from "@libp2p/interface"; import { Effect, LogLevel, Runtime } from "effect"; import { createProto } from "../utils.js"; - import * as internal from "./internal/networkLogger.js"; const TypeId: unique symbol = Symbol("@local/harpc-client/net/Logger"); diff --git a/libs/@local/harpc/client/typescript/src/net/Transaction.ts b/libs/@local/harpc/client/typescript/src/net/Transaction.ts index 2fc912177e2..040ca56700c 100644 --- a/libs/@local/harpc/client/typescript/src/net/Transaction.ts +++ b/libs/@local/harpc/client/typescript/src/net/Transaction.ts @@ -3,7 +3,6 @@ import { type Effect, type Queue, Deferred, Function } from "effect"; import { createProto } from "../utils.js"; import type { RequestId } from "../wire-protocol/models/request/index.js"; import type { Response as WireResponse } from "../wire-protocol/models/response/index.js"; - import * as Response from "./Response.js"; const TypeId: unique symbol = Symbol("@local/harpc-client/net/Transaction"); diff --git a/libs/@local/harpc/client/typescript/src/net/internal/dns.ts b/libs/@local/harpc/client/typescript/src/net/internal/dns.ts index fc4dc8c6020..e229ce1df3a 100644 --- a/libs/@local/harpc/client/typescript/src/net/internal/dns.ts +++ b/libs/@local/harpc/client/typescript/src/net/internal/dns.ts @@ -144,9 +144,7 @@ export const resolve = Effect.fn("resolve")(function* ( return yield* Effect.failCause( // reduce without default is save here, because we guarantee non empty satisfying array - excluded - .map(Cause.fail) - .reduce(Cause.parallel), + excluded.map(Cause.fail).reduce(Cause.parallel), ); } diff --git a/libs/@local/harpc/client/typescript/src/net/internal/peerConnection.ts b/libs/@local/harpc/client/typescript/src/net/internal/peerConnection.ts index 10909ab5d1b..6ca84d9bd2a 100644 --- a/libs/@local/harpc/client/typescript/src/net/internal/peerConnection.ts +++ b/libs/@local/harpc/client/typescript/src/net/internal/peerConnection.ts @@ -17,10 +17,7 @@ type TypeId = typeof TypeId; /** @internal */ export interface PeerConnection - extends Connection, - Inspectable.Inspectable, - Equal.Equal, - Pipeable.Pipeable { + extends Connection, Inspectable.Inspectable, Equal.Equal, Pipeable.Pipeable { readonly [TypeId]: TypeId; readonly [connectionSymbol]: true; readonly inner: Connection; diff --git a/libs/@local/harpc/client/typescript/src/net/internal/transport.ts b/libs/@local/harpc/client/typescript/src/net/internal/transport.ts index a0d36012e9b..5f3ae5d6134 100644 --- a/libs/@local/harpc/client/typescript/src/net/internal/transport.ts +++ b/libs/@local/harpc/client/typescript/src/net/internal/transport.ts @@ -30,7 +30,6 @@ import { type Libp2p, createLibp2p } from "libp2p"; import * as NetworkLogger from "../NetworkLogger.js"; import type { Multiaddr, TransportConfig } from "../Transport.js"; - import * as Dns from "./dns.js"; import * as HashableMultiaddr from "./multiaddr.js"; import * as PeerConnection from "./peerConnection.js"; diff --git a/libs/@local/harpc/client/typescript/src/types/ErrorCode.ts b/libs/@local/harpc/client/typescript/src/types/ErrorCode.ts index 6c042ec9cb7..ae92cb974dc 100644 --- a/libs/@local/harpc/client/typescript/src/types/ErrorCode.ts +++ b/libs/@local/harpc/client/typescript/src/types/ErrorCode.ts @@ -10,9 +10,9 @@ import { Predicate, } from "effect"; +import { MutableBuffer } from "../binary/index.js"; import { U16_MAX } from "../constants.js"; import { createProto, implEncode } from "../utils.js"; -import { MutableBuffer } from "../binary/index.js"; const TypeId = Symbol("@local/harpc-client/wire-protocol/types/ErrorCode"); @@ -37,9 +37,7 @@ export class ErrorCodeTooSmallError extends Data.TaggedError( } export interface ErrorCode - extends Equal.Equal, - Inspectable.Inspectable, - Pipeable.Pipeable { + extends Equal.Equal, Inspectable.Inspectable, Pipeable.Pipeable { readonly [TypeId]: TypeId; readonly value: number; diff --git a/libs/@local/harpc/client/typescript/src/types/ProcedureDescriptor.ts b/libs/@local/harpc/client/typescript/src/types/ProcedureDescriptor.ts index 75dbcf24cdf..d80ec1d68a5 100644 --- a/libs/@local/harpc/client/typescript/src/types/ProcedureDescriptor.ts +++ b/libs/@local/harpc/client/typescript/src/types/ProcedureDescriptor.ts @@ -11,7 +11,6 @@ import { } from "effect"; import { createProto, implDecode, implEncode } from "../utils.js"; - import * as ProcedureId from "./ProcedureId.js"; const TypeId: unique symbol = Symbol( @@ -21,9 +20,7 @@ const TypeId: unique symbol = Symbol( export type TypeId = typeof TypeId; export interface ProcedureDescriptor - extends Equal.Equal, - Inspectable.Inspectable, - Pipeable.Pipeable { + extends Equal.Equal, Inspectable.Inspectable, Pipeable.Pipeable { readonly [TypeId]: TypeId; readonly id: ProcedureId.ProcedureId; diff --git a/libs/@local/harpc/client/typescript/src/types/ProcedureId.ts b/libs/@local/harpc/client/typescript/src/types/ProcedureId.ts index 009cbdc22fb..6477ed70e70 100644 --- a/libs/@local/harpc/client/typescript/src/types/ProcedureId.ts +++ b/libs/@local/harpc/client/typescript/src/types/ProcedureId.ts @@ -11,9 +11,9 @@ import { Predicate, } from "effect"; +import { MutableBuffer } from "../binary/index.js"; import { U16_MAX, U16_MIN } from "../constants.js"; import { createProto, implDecode, implEncode } from "../utils.js"; -import { MutableBuffer } from "../binary/index.js"; const TypeId: unique symbol = Symbol( "@local/harpc-client/wire-protocol/types/ProcedureId", @@ -38,9 +38,7 @@ export class ProcedureIdTooSmallError extends Data.TaggedError( } export interface ProcedureId - extends Equal.Equal, - Inspectable.Inspectable, - Pipeable.Pipeable { + extends Equal.Equal, Inspectable.Inspectable, Pipeable.Pipeable { readonly [TypeId]: TypeId; readonly value: number; diff --git a/libs/@local/harpc/client/typescript/src/types/ResponseKind.ts b/libs/@local/harpc/client/typescript/src/types/ResponseKind.ts index a509e4fe2c8..dfbf9c1df4d 100644 --- a/libs/@local/harpc/client/typescript/src/types/ResponseKind.ts +++ b/libs/@local/harpc/client/typescript/src/types/ResponseKind.ts @@ -13,9 +13,8 @@ import { Predicate, } from "effect"; -import { createProto, implDecode, implEncode } from "../utils.js"; import { MutableBuffer } from "../binary/index.js"; - +import { createProto, implDecode, implEncode } from "../utils.js"; import * as ErrorCode from "./ErrorCode.js"; const TypeId: unique symbol = Symbol( @@ -25,9 +24,7 @@ const TypeId: unique symbol = Symbol( export type TypeId = typeof TypeId; export interface Ok - extends Equal.Equal, - Inspectable.Inspectable, - Pipeable.Pipeable { + extends Equal.Equal, Inspectable.Inspectable, Pipeable.Pipeable { readonly [TypeId]: TypeId; readonly _tag: "Ok"; } @@ -72,9 +69,7 @@ const OkProto: Ok = { export const ok = (): Ok => createProto(OkProto, {}); export interface Err - extends Equal.Equal, - Inspectable.Inspectable, - Pipeable.Pipeable { + extends Equal.Equal, Inspectable.Inspectable, Pipeable.Pipeable { readonly [TypeId]: TypeId; readonly _tag: "Err"; diff --git a/libs/@local/harpc/client/typescript/src/types/SubsystemDescriptor.ts b/libs/@local/harpc/client/typescript/src/types/SubsystemDescriptor.ts index 8fe79af3216..1c7c34bea45 100644 --- a/libs/@local/harpc/client/typescript/src/types/SubsystemDescriptor.ts +++ b/libs/@local/harpc/client/typescript/src/types/SubsystemDescriptor.ts @@ -12,7 +12,6 @@ import { } from "effect"; import { createProto, implDecode, implEncode } from "../utils.js"; - import * as SubsystemId from "./SubsystemId.js"; import * as Version from "./Version.js"; @@ -23,9 +22,7 @@ const TypeId: unique symbol = Symbol( export type TypeId = typeof TypeId; export interface SubsystemDescriptor - extends Equal.Equal, - Inspectable.Inspectable, - Pipeable.Pipeable { + extends Equal.Equal, Inspectable.Inspectable, Pipeable.Pipeable { readonly [TypeId]: TypeId; readonly id: SubsystemId.SubsystemId; diff --git a/libs/@local/harpc/client/typescript/src/types/SubsystemId.ts b/libs/@local/harpc/client/typescript/src/types/SubsystemId.ts index d625698f6f3..9d73d7ea450 100644 --- a/libs/@local/harpc/client/typescript/src/types/SubsystemId.ts +++ b/libs/@local/harpc/client/typescript/src/types/SubsystemId.ts @@ -11,9 +11,9 @@ import { Predicate, } from "effect"; +import { MutableBuffer } from "../binary/index.js"; import { U16_MAX, U16_MIN } from "../constants.js"; import { createProto, implDecode, implEncode } from "../utils.js"; -import { MutableBuffer } from "../binary/index.js"; const TypeId: unique symbol = Symbol( "@local/harpc-client/wire-protocol/types/SubsystemId", @@ -38,9 +38,7 @@ export class SubsystemIdTooSmallError extends Data.TaggedError( } export interface SubsystemId - extends Equal.Equal, - Inspectable.Inspectable, - Pipeable.Pipeable { + extends Equal.Equal, Inspectable.Inspectable, Pipeable.Pipeable { readonly [TypeId]: TypeId; readonly value: number; diff --git a/libs/@local/harpc/client/typescript/src/types/Version.ts b/libs/@local/harpc/client/typescript/src/types/Version.ts index 90e64c6d970..2a95391ac88 100644 --- a/libs/@local/harpc/client/typescript/src/types/Version.ts +++ b/libs/@local/harpc/client/typescript/src/types/Version.ts @@ -11,9 +11,9 @@ import { Predicate, } from "effect"; +import { MutableBuffer } from "../binary/index.js"; import { U8_MAX, U8_MIN } from "../constants.js"; import { createProto, implDecode, implEncode } from "../utils.js"; -import { MutableBuffer } from "../binary/index.js"; const TypeId: unique symbol = Symbol( "@local/harpc-client/wire-protocol/types/Version", @@ -22,9 +22,7 @@ const TypeId: unique symbol = Symbol( export type TypeId = typeof TypeId; export interface Version - extends Equal.Equal, - Inspectable.Inspectable, - Pipeable.Pipeable { + extends Equal.Equal, Inspectable.Inspectable, Pipeable.Pipeable { readonly [TypeId]: TypeId; readonly major: number; diff --git a/libs/@local/harpc/client/typescript/src/wire-protocol/RequestIdProducer.ts b/libs/@local/harpc/client/typescript/src/wire-protocol/RequestIdProducer.ts index 9b0635f7d78..5c7081932f0 100644 --- a/libs/@local/harpc/client/typescript/src/wire-protocol/RequestIdProducer.ts +++ b/libs/@local/harpc/client/typescript/src/wire-protocol/RequestIdProducer.ts @@ -2,7 +2,6 @@ import { Effect, Layer, Ref } from "effect"; import { GenericTag } from "effect/Context"; import { createProto } from "../utils.js"; - import * as RequestId from "./models/request/RequestId.js"; const TypeId: unique symbol = Symbol( diff --git a/libs/@local/harpc/client/typescript/src/wire-protocol/models/Payload.ts b/libs/@local/harpc/client/typescript/src/wire-protocol/models/Payload.ts index 7811ba451da..d5d569a2721 100644 --- a/libs/@local/harpc/client/typescript/src/wire-protocol/models/Payload.ts +++ b/libs/@local/harpc/client/typescript/src/wire-protocol/models/Payload.ts @@ -11,8 +11,8 @@ import { Predicate, } from "effect"; -import { U16_MAX, U16_MIN } from "../../constants.js"; import { MutableBuffer } from "../../binary/index.js"; +import { U16_MAX, U16_MIN } from "../../constants.js"; import { createProto, hashUint8Array, @@ -37,9 +37,7 @@ export class PayloadTooLargeError extends Data.TaggedError( } export interface Payload - extends Equal.Equal, - Inspectable.Inspectable, - Pipeable.Pipeable { + extends Equal.Equal, Inspectable.Inspectable, Pipeable.Pipeable { readonly [TypeId]: TypeId; readonly buffer: Uint8Array; diff --git a/libs/@local/harpc/client/typescript/src/wire-protocol/models/Protocol.ts b/libs/@local/harpc/client/typescript/src/wire-protocol/models/Protocol.ts index 4ab6eea40a0..bb901240f55 100644 --- a/libs/@local/harpc/client/typescript/src/wire-protocol/models/Protocol.ts +++ b/libs/@local/harpc/client/typescript/src/wire-protocol/models/Protocol.ts @@ -11,9 +11,8 @@ import { Predicate, } from "effect"; -import { createProto, implDecode, implEncode } from "../../utils.js"; import { MutableBuffer } from "../../binary/index.js"; - +import { createProto, implDecode, implEncode } from "../../utils.js"; import * as ProtocolVersion from "./ProtocolVersion.js"; const TypeId: unique symbol = Symbol( @@ -33,9 +32,7 @@ export class InvalidMagicError extends Data.TaggedError("InvalidMagicError")<{ } export interface Protocol - extends Equal.Equal, - Inspectable.Inspectable, - Pipeable.Pipeable { + extends Equal.Equal, Inspectable.Inspectable, Pipeable.Pipeable { readonly [TypeId]: TypeId; readonly version: ProtocolVersion.ProtocolVersion; } diff --git a/libs/@local/harpc/client/typescript/src/wire-protocol/models/ProtocolVersion.ts b/libs/@local/harpc/client/typescript/src/wire-protocol/models/ProtocolVersion.ts index b837ded0bd0..269f74dfbb4 100644 --- a/libs/@local/harpc/client/typescript/src/wire-protocol/models/ProtocolVersion.ts +++ b/libs/@local/harpc/client/typescript/src/wire-protocol/models/ProtocolVersion.ts @@ -11,8 +11,8 @@ import { Predicate, } from "effect"; -import { createProto, implDecode, implEncode } from "../../utils.js"; import { MutableBuffer } from "../../binary/index.js"; +import { createProto, implDecode, implEncode } from "../../utils.js"; const TypeId: unique symbol = Symbol( "@local/harpc-client/wire-protocol/models/ProtocolVersion", @@ -31,9 +31,7 @@ export class InvalidProtocolVersionError extends Data.TaggedError( } export interface ProtocolVersion - extends Equal.Equal, - Inspectable.Inspectable, - Pipeable.Pipeable { + extends Equal.Equal, Inspectable.Inspectable, Pipeable.Pipeable { readonly [TypeId]: TypeId; readonly value: number; } diff --git a/libs/@local/harpc/client/typescript/src/wire-protocol/models/request/Request.ts b/libs/@local/harpc/client/typescript/src/wire-protocol/models/request/Request.ts index 7cc7bd7d159..591cef99e6f 100644 --- a/libs/@local/harpc/client/typescript/src/wire-protocol/models/request/Request.ts +++ b/libs/@local/harpc/client/typescript/src/wire-protocol/models/request/Request.ts @@ -12,7 +12,6 @@ import { } from "effect"; import { createProto, implDecode, implEncode } from "../../../utils.js"; - import * as RequestBody from "./RequestBody.js"; import * as RequestFlags from "./RequestFlags.js"; import * as RequestHeader from "./RequestHeader.js"; @@ -24,9 +23,7 @@ const TypeId: unique symbol = Symbol( export type TypeId = typeof TypeId; export interface Request - extends Equal.Equal, - Inspectable.Inspectable, - Pipeable.Pipeable { + extends Equal.Equal, Inspectable.Inspectable, Pipeable.Pipeable { readonly [TypeId]: TypeId; readonly header: RequestHeader.RequestHeader; diff --git a/libs/@local/harpc/client/typescript/src/wire-protocol/models/request/RequestBegin.ts b/libs/@local/harpc/client/typescript/src/wire-protocol/models/request/RequestBegin.ts index 752802ac299..182f484cb74 100644 --- a/libs/@local/harpc/client/typescript/src/wire-protocol/models/request/RequestBegin.ts +++ b/libs/@local/harpc/client/typescript/src/wire-protocol/models/request/RequestBegin.ts @@ -11,9 +11,9 @@ import { Predicate, } from "effect"; +import { MutableBuffer } from "../../../binary/index.js"; import * as ProcedureDescriptor from "../../../types/ProcedureDescriptor.js"; import * as SubsystemDescriptor from "../../../types/SubsystemDescriptor.js"; -import { MutableBuffer } from "../../../binary/index.js"; import { createProto, implDecode, implEncode } from "../../../utils.js"; import * as Payload from "../Payload.js"; @@ -24,9 +24,7 @@ const TypeId: unique symbol = Symbol( export type TypeId = typeof TypeId; export interface RequestBegin - extends Equal.Equal, - Inspectable.Inspectable, - Pipeable.Pipeable { + extends Equal.Equal, Inspectable.Inspectable, Pipeable.Pipeable { readonly [TypeId]: TypeId; readonly subsystem: SubsystemDescriptor.SubsystemDescriptor; diff --git a/libs/@local/harpc/client/typescript/src/wire-protocol/models/request/RequestBody.ts b/libs/@local/harpc/client/typescript/src/wire-protocol/models/request/RequestBody.ts index a60f766a467..84fb47f3e82 100644 --- a/libs/@local/harpc/client/typescript/src/wire-protocol/models/request/RequestBody.ts +++ b/libs/@local/harpc/client/typescript/src/wire-protocol/models/request/RequestBody.ts @@ -13,7 +13,6 @@ import { } from "effect"; import { createProto, implDecode, implEncode } from "../../../utils.js"; - import * as RequestBegin from "./RequestBegin.js"; import * as RequestFrame from "./RequestFrame.js"; @@ -26,9 +25,7 @@ export type TypeId = typeof TypeId; export type RequestBodyVariant = "RequestBegin" | "RequestFrame"; export interface RequestBody - extends Equal.Equal, - Inspectable.Inspectable, - Pipeable.Pipeable { + extends Equal.Equal, Inspectable.Inspectable, Pipeable.Pipeable { readonly [TypeId]: TypeId; readonly body: Either.Either< diff --git a/libs/@local/harpc/client/typescript/src/wire-protocol/models/request/RequestFlags.ts b/libs/@local/harpc/client/typescript/src/wire-protocol/models/request/RequestFlags.ts index 089a8ef9de4..68403a4bc78 100644 --- a/libs/@local/harpc/client/typescript/src/wire-protocol/models/request/RequestFlags.ts +++ b/libs/@local/harpc/client/typescript/src/wire-protocol/models/request/RequestFlags.ts @@ -11,9 +11,8 @@ import { Predicate, } from "effect"; -import { createProto, implDecode, implEncode } from "../../../utils.js"; import { MutableBuffer } from "../../../binary/index.js"; - +import { createProto, implDecode, implEncode } from "../../../utils.js"; import type * as RequestBody from "./RequestBody.js"; const TypeId: unique symbol = Symbol( @@ -29,9 +28,7 @@ export type Flag = | "endOfRequest"; export interface RequestFlags - extends Equal.Equal, - Inspectable.Inspectable, - Pipeable.Pipeable { + extends Equal.Equal, Inspectable.Inspectable, Pipeable.Pipeable { readonly [TypeId]: TypeId; readonly flags: HashSet.HashSet; diff --git a/libs/@local/harpc/client/typescript/src/wire-protocol/models/request/RequestFrame.ts b/libs/@local/harpc/client/typescript/src/wire-protocol/models/request/RequestFrame.ts index 6e2fe1acfbe..fd28d779db9 100644 --- a/libs/@local/harpc/client/typescript/src/wire-protocol/models/request/RequestFrame.ts +++ b/libs/@local/harpc/client/typescript/src/wire-protocol/models/request/RequestFrame.ts @@ -10,8 +10,8 @@ import { Predicate, } from "effect"; -import { createProto, implDecode, implEncode } from "../../../utils.js"; import { MutableBuffer } from "../../../binary/index.js"; +import { createProto, implDecode, implEncode } from "../../../utils.js"; import * as Payload from "../Payload.js"; const TypeId: unique symbol = Symbol( @@ -21,9 +21,7 @@ const TypeId: unique symbol = Symbol( export type TypeId = typeof TypeId; export interface RequestFrame - extends Equal.Equal, - Inspectable.Inspectable, - Pipeable.Pipeable { + extends Equal.Equal, Inspectable.Inspectable, Pipeable.Pipeable { readonly [TypeId]: TypeId; readonly payload: Payload.Payload; diff --git a/libs/@local/harpc/client/typescript/src/wire-protocol/models/request/RequestHeader.ts b/libs/@local/harpc/client/typescript/src/wire-protocol/models/request/RequestHeader.ts index bd1dc97cbb7..2760a82bc31 100644 --- a/libs/@local/harpc/client/typescript/src/wire-protocol/models/request/RequestHeader.ts +++ b/libs/@local/harpc/client/typescript/src/wire-protocol/models/request/RequestHeader.ts @@ -13,7 +13,6 @@ import { import { createProto, implDecode, implEncode } from "../../../utils.js"; import * as Protocol from "../Protocol.js"; - import type * as RequestBody from "./RequestBody.js"; import * as RequestFlags from "./RequestFlags.js"; import * as RequestId from "./RequestId.js"; @@ -25,9 +24,7 @@ const TypeId: unique symbol = Symbol( export type TypeId = typeof TypeId; export interface RequestHeader - extends Equal.Equal, - Inspectable.Inspectable, - Pipeable.Pipeable { + extends Equal.Equal, Inspectable.Inspectable, Pipeable.Pipeable { readonly [TypeId]: TypeId; readonly protocol: Protocol.Protocol; diff --git a/libs/@local/harpc/client/typescript/src/wire-protocol/models/request/RequestId.ts b/libs/@local/harpc/client/typescript/src/wire-protocol/models/request/RequestId.ts index e26a65588e5..a3ea9eed763 100644 --- a/libs/@local/harpc/client/typescript/src/wire-protocol/models/request/RequestId.ts +++ b/libs/@local/harpc/client/typescript/src/wire-protocol/models/request/RequestId.ts @@ -10,9 +10,9 @@ import { Either, } from "effect"; +import { MutableBuffer } from "../../../binary/index.js"; import { U32_MAX, U32_MIN } from "../../../constants.js"; import { createProto, implDecode, implEncode } from "../../../utils.js"; -import { MutableBuffer } from "../../../binary/index.js"; const TypeId: unique symbol = Symbol( "@local/harpc-client/wire-protocol/models/request/RequestId", @@ -24,9 +24,7 @@ export const MIN_VALUE = U32_MIN; export const MAX_VALUE = U32_MAX; export interface RequestId - extends Equal.Equal, - Inspectable.Inspectable, - Pipeable.Pipeable { + extends Equal.Equal, Inspectable.Inspectable, Pipeable.Pipeable { readonly [TypeId]: TypeId; readonly value: number; } diff --git a/libs/@local/harpc/client/typescript/src/wire-protocol/models/response/Response.ts b/libs/@local/harpc/client/typescript/src/wire-protocol/models/response/Response.ts index 4013bde27d4..49bce956f2c 100644 --- a/libs/@local/harpc/client/typescript/src/wire-protocol/models/response/Response.ts +++ b/libs/@local/harpc/client/typescript/src/wire-protocol/models/response/Response.ts @@ -12,7 +12,6 @@ import { } from "effect"; import { createProto, implDecode, implEncode } from "../../../utils.js"; - import * as ResponseBody from "./ResponseBody.js"; import * as ResponseFlags from "./ResponseFlags.js"; import * as ResponseHeader from "./ResponseHeader.js"; @@ -24,9 +23,7 @@ const TypeId: unique symbol = Symbol( export type TypeId = typeof TypeId; export interface Response - extends Equal.Equal, - Inspectable.Inspectable, - Pipeable.Pipeable { + extends Equal.Equal, Inspectable.Inspectable, Pipeable.Pipeable { readonly [TypeId]: TypeId; readonly header: ResponseHeader.ResponseHeader; diff --git a/libs/@local/harpc/client/typescript/src/wire-protocol/models/response/ResponseBegin.ts b/libs/@local/harpc/client/typescript/src/wire-protocol/models/response/ResponseBegin.ts index de572bd4139..42ca9918930 100644 --- a/libs/@local/harpc/client/typescript/src/wire-protocol/models/response/ResponseBegin.ts +++ b/libs/@local/harpc/client/typescript/src/wire-protocol/models/response/ResponseBegin.ts @@ -11,9 +11,9 @@ import { Predicate, } from "effect"; +import { MutableBuffer } from "../../../binary/index.js"; import * as ResponseKind from "../../../types/ResponseKind.js"; import { createProto, implDecode, implEncode } from "../../../utils.js"; -import { MutableBuffer } from "../../../binary/index.js"; import * as Payload from "../Payload.js"; const TypeId: unique symbol = Symbol( @@ -23,9 +23,7 @@ const TypeId: unique symbol = Symbol( export type TypeId = typeof TypeId; export interface ResponseBegin - extends Equal.Equal, - Inspectable.Inspectable, - Pipeable.Pipeable { + extends Equal.Equal, Inspectable.Inspectable, Pipeable.Pipeable { readonly [TypeId]: TypeId; readonly kind: ResponseKind.ResponseKind; diff --git a/libs/@local/harpc/client/typescript/src/wire-protocol/models/response/ResponseBody.ts b/libs/@local/harpc/client/typescript/src/wire-protocol/models/response/ResponseBody.ts index 1887fa512f6..7a946da1a85 100644 --- a/libs/@local/harpc/client/typescript/src/wire-protocol/models/response/ResponseBody.ts +++ b/libs/@local/harpc/client/typescript/src/wire-protocol/models/response/ResponseBody.ts @@ -13,7 +13,6 @@ import { } from "effect"; import { createProto, implDecode, implEncode } from "../../../utils.js"; - import * as ResponseBegin from "./ResponseBegin.js"; import * as ResponseFrame from "./ResponseFrame.js"; @@ -26,9 +25,7 @@ export type TypeId = typeof TypeId; export type ResponseBodyVariant = "ResponseBegin" | "ResponseFrame"; export interface ResponseBody - extends Equal.Equal, - Inspectable.Inspectable, - Pipeable.Pipeable { + extends Equal.Equal, Inspectable.Inspectable, Pipeable.Pipeable { readonly [TypeId]: TypeId; readonly body: Either.Either< diff --git a/libs/@local/harpc/client/typescript/src/wire-protocol/models/response/ResponseFlags.ts b/libs/@local/harpc/client/typescript/src/wire-protocol/models/response/ResponseFlags.ts index c0159dda0f6..3a19a069486 100644 --- a/libs/@local/harpc/client/typescript/src/wire-protocol/models/response/ResponseFlags.ts +++ b/libs/@local/harpc/client/typescript/src/wire-protocol/models/response/ResponseFlags.ts @@ -11,9 +11,8 @@ import { Predicate, } from "effect"; -import { createProto, implDecode, implEncode } from "../../../utils.js"; import { MutableBuffer } from "../../../binary/index.js"; - +import { createProto, implDecode, implEncode } from "../../../utils.js"; import type * as ResponseBody from "./ResponseBody.js"; const TypeId: unique symbol = Symbol( @@ -29,9 +28,7 @@ export type Flag = | "endOfResponse"; export interface ResponseFlags - extends Equal.Equal, - Inspectable.Inspectable, - Pipeable.Pipeable { + extends Equal.Equal, Inspectable.Inspectable, Pipeable.Pipeable { readonly [TypeId]: TypeId; readonly flags: HashSet.HashSet; } diff --git a/libs/@local/harpc/client/typescript/src/wire-protocol/models/response/ResponseFrame.ts b/libs/@local/harpc/client/typescript/src/wire-protocol/models/response/ResponseFrame.ts index c77dedd1b3c..fa943715974 100644 --- a/libs/@local/harpc/client/typescript/src/wire-protocol/models/response/ResponseFrame.ts +++ b/libs/@local/harpc/client/typescript/src/wire-protocol/models/response/ResponseFrame.ts @@ -10,9 +10,9 @@ import { Predicate, } from "effect"; +import { MutableBuffer } from "../../../binary/index.js"; import { createProto, implDecode, implEncode } from "../../../utils.js"; import * as Payload from "../Payload.js"; -import { MutableBuffer } from "../../../binary/index.js"; const TypeId: unique symbol = Symbol( "@local/harpc-client/wire-protocol/models/response/ResponseFrame", @@ -21,9 +21,7 @@ const TypeId: unique symbol = Symbol( export type TypeId = typeof TypeId; export interface ResponseFrame - extends Equal.Equal, - Inspectable.Inspectable, - Pipeable.Pipeable { + extends Equal.Equal, Inspectable.Inspectable, Pipeable.Pipeable { readonly [TypeId]: TypeId; readonly payload: Payload.Payload; diff --git a/libs/@local/harpc/client/typescript/src/wire-protocol/models/response/ResponseHeader.ts b/libs/@local/harpc/client/typescript/src/wire-protocol/models/response/ResponseHeader.ts index 553c2016a68..2ee699c6c99 100644 --- a/libs/@local/harpc/client/typescript/src/wire-protocol/models/response/ResponseHeader.ts +++ b/libs/@local/harpc/client/typescript/src/wire-protocol/models/response/ResponseHeader.ts @@ -14,7 +14,6 @@ import { import { createProto, implDecode, implEncode } from "../../../utils.js"; import * as Protocol from "../Protocol.js"; import { RequestId } from "../request/index.js"; - import type * as ResponseBody from "./ResponseBody.js"; import * as ResponseFlags from "./ResponseFlags.js"; @@ -25,9 +24,7 @@ const TypeId: unique symbol = Symbol( export type TypeId = typeof TypeId; export interface ResponseHeader - extends Equal.Equal, - Inspectable.Inspectable, - Pipeable.Pipeable { + extends Equal.Equal, Inspectable.Inspectable, Pipeable.Pipeable { readonly [TypeId]: TypeId; readonly protocol: Protocol.Protocol; diff --git a/libs/@local/harpc/client/typescript/src/wire-protocol/stream/RequestToBytesStream.ts b/libs/@local/harpc/client/typescript/src/wire-protocol/stream/RequestToBytesStream.ts index 8e6c7ca98fd..e8c891ee854 100644 --- a/libs/@local/harpc/client/typescript/src/wire-protocol/stream/RequestToBytesStream.ts +++ b/libs/@local/harpc/client/typescript/src/wire-protocol/stream/RequestToBytesStream.ts @@ -1,7 +1,7 @@ import { Effect, pipe, Stream } from "effect"; -import { Request } from "../models/request/index.js"; import { MutableBuffer } from "../../binary/index.js"; +import { Request } from "../models/request/index.js"; export const make = ( stream: Stream.Stream, diff --git a/libs/@local/harpc/client/typescript/tests/wire-protocol/decode.test.ts b/libs/@local/harpc/client/typescript/tests/wire-protocol/decode.test.ts index 5121cb34f21..fce71c6e67b 100644 --- a/libs/@local/harpc/client/typescript/tests/wire-protocol/decode.test.ts +++ b/libs/@local/harpc/client/typescript/tests/wire-protocol/decode.test.ts @@ -2,8 +2,8 @@ import { NodeContext } from "@effect/platform-node"; import { describe, it } from "@effect/vitest"; import { Effect, Equal, Schema } from "effect"; -import { ResponseKind } from "../../src/types/index.js"; import { MutableBuffer, MutableBytes } from "../../src/binary/index.js"; +import { ResponseKind } from "../../src/types/index.js"; import { Response, ResponseBegin, @@ -12,7 +12,6 @@ import { ResponseFrame, ResponseHeader, } from "../../src/wire-protocol/models/response/index.js"; - import { callDecode } from "./utils.js"; const ResponseHeaderFromSelf = Schema.declare(ResponseHeader.isResponseHeader, { diff --git a/libs/@local/harpc/client/typescript/tests/wire-protocol/encode.test.ts b/libs/@local/harpc/client/typescript/tests/wire-protocol/encode.test.ts index 5b061b77780..71187048553 100644 --- a/libs/@local/harpc/client/typescript/tests/wire-protocol/encode.test.ts +++ b/libs/@local/harpc/client/typescript/tests/wire-protocol/encode.test.ts @@ -11,7 +11,6 @@ import { RequestFrame, RequestHeader, } from "../../src/wire-protocol/models/request/index.js"; - import { callEncode } from "./utils.js"; const RequestHeaderFromSelf = Schema.declare(RequestHeader.isRequestHeader, { diff --git a/libs/@local/hash-backend-utils/LICENSE.md b/libs/@local/hash-backend-utils/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/libs/@local/hash-backend-utils/LICENSE.md +++ b/libs/@local/hash-backend-utils/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/libs/@local/hash-backend-utils/src/queue/redis.ts b/libs/@local/hash-backend-utils/src/queue/redis.ts index 0dfa6c52a9c..6e525f0a3ef 100644 --- a/libs/@local/hash-backend-utils/src/queue/redis.ts +++ b/libs/@local/hash-backend-utils/src/queue/redis.ts @@ -28,8 +28,7 @@ export class RedisQueueProducer< F extends RedisFunctions = {}, // eslint-disable-next-line @typescript-eslint/no-empty-object-type S extends RedisScripts = {}, -> implements QueueProducer -{ +> implements QueueProducer { readonly #client: RedisClientType; constructor(client: RedisClientType) { @@ -51,8 +50,7 @@ export class RedisQueueExclusiveConsumer< F extends RedisFunctions = {}, // eslint-disable-next-line @typescript-eslint/no-empty-object-type S extends RedisScripts = {}, -> implements QueueExclusiveConsumer -{ +> implements QueueExclusiveConsumer { readonly #client: RedisClientType; // A unique identifier for this consumer. Used to signify ownership of the queue. diff --git a/libs/@local/hash-backend-utils/src/temporal/interceptors/activities/sentry.ts b/libs/@local/hash-backend-utils/src/temporal/interceptors/activities/sentry.ts index 2b676139a1d..eb10305f242 100644 --- a/libs/@local/hash-backend-utils/src/temporal/interceptors/activities/sentry.ts +++ b/libs/@local/hash-backend-utils/src/temporal/interceptors/activities/sentry.ts @@ -6,9 +6,7 @@ import type { } from "@temporalio/worker"; import type { Next } from "@temporalio/workflow"; -export class SentryActivityInboundInterceptor - implements ActivityInboundCallsInterceptor -{ +export class SentryActivityInboundInterceptor implements ActivityInboundCallsInterceptor { constructor(public readonly context: Context) { this.context = context; } diff --git a/libs/@local/hash-backend-utils/src/temporal/interceptors/workflows/sentry.ts b/libs/@local/hash-backend-utils/src/temporal/interceptors/workflows/sentry.ts index 8f68216139f..2f44283fc34 100644 --- a/libs/@local/hash-backend-utils/src/temporal/interceptors/workflows/sentry.ts +++ b/libs/@local/hash-backend-utils/src/temporal/interceptors/workflows/sentry.ts @@ -10,9 +10,7 @@ import type { SentrySinks } from "../../sinks/sentry.js"; const { sentry } = proxySinks(); -class SentryWorkflowInboundInterceptor - implements WorkflowInboundCallsInterceptor -{ +class SentryWorkflowInboundInterceptor implements WorkflowInboundCallsInterceptor { constructor(public readonly workflowType: string) {} execute = async ( diff --git a/libs/@local/hash-backend-utils/src/temporal/worker-bootstrap.ts b/libs/@local/hash-backend-utils/src/temporal/worker-bootstrap.ts index 5a2059b243f..5f343c701c0 100644 --- a/libs/@local/hash-backend-utils/src/temporal/worker-bootstrap.ts +++ b/libs/@local/hash-backend-utils/src/temporal/worker-bootstrap.ts @@ -271,12 +271,8 @@ export async function runWorker(opts: RunWorkerOptions): Promise { }, interceptors: { workflowModules: [ - require.resolve( - "@local/hash-backend-utils/temporal/interceptors/workflows/sentry", - ), - require.resolve( - "@local/hash-backend-utils/temporal/interceptors/workflows/opentelemetry", - ), + require.resolve("@local/hash-backend-utils/temporal/interceptors/workflows/sentry"), + require.resolve("@local/hash-backend-utils/temporal/interceptors/workflows/opentelemetry"), ], activity: activityInterceptors, }, diff --git a/libs/@local/hash-backend-utils/src/vault.ts b/libs/@local/hash-backend-utils/src/vault.ts index f4c848fe905..a30c4d00edc 100644 --- a/libs/@local/hash-backend-utils/src/vault.ts +++ b/libs/@local/hash-backend-utils/src/vault.ts @@ -349,11 +349,7 @@ export class VaultClient { } } -export const createVaultClient = async ({ - logger, -}: { - logger: Logger; -}) => { +export const createVaultClient = async ({ logger }: { logger: Logger }) => { if ( !process.env.HASH_VAULT_HOST || !process.env.HASH_VAULT_PORT || diff --git a/libs/@local/hash-isomorphic-utils/LICENSE.md b/libs/@local/hash-isomorphic-utils/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/libs/@local/hash-isomorphic-utils/LICENSE.md +++ b/libs/@local/hash-isomorphic-utils/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/libs/@local/hash-isomorphic-utils/package.json b/libs/@local/hash-isomorphic-utils/package.json index 8bb68bd3eac..8e1489385c2 100644 --- a/libs/@local/hash-isomorphic-utils/package.json +++ b/libs/@local/hash-isomorphic-utils/package.json @@ -19,7 +19,7 @@ "build": "rimraf dist && tsc --build tsconfig.build.json", "codegen": "rimraf './src/**/*.gen.*'; graphql-codegen --config codegen.config.ts", "fix:eslint": "eslint --fix .", - "generate-system-types": "tsx ./src/generate-system-types.ts; echo 'Fixing import paths'; fix-esm-import-path ./src/system-types/; yarn fix:eslint; biome format --write ./src/system-types/{*.ts,**/*.ts}", + "generate-system-types": "tsx ./src/generate-system-types.ts; echo 'Fixing import paths'; fix-esm-import-path ./src/system-types/; yarn fix:eslint; oxfmt --write ./src/system-types/{*.ts,**/*.ts}", "lint:eslint": "eslint --report-unused-disable-directives .", "lint:tsc": "tsc --noEmit", "test:unit": "vitest --run" diff --git a/libs/@local/hash-isomorphic-utils/src/create-apollo-client.ts b/libs/@local/hash-isomorphic-utils/src/create-apollo-client.ts index fea8be9c19e..014174ce364 100644 --- a/libs/@local/hash-isomorphic-utils/src/create-apollo-client.ts +++ b/libs/@local/hash-isomorphic-utils/src/create-apollo-client.ts @@ -9,9 +9,7 @@ import { onError } from "@apollo/client/link/error"; import * as Sentry from "@sentry/browser"; import { apiGraphQLEndpoint } from "./environment.js"; -import possibleTypes from "./graphql/fragment-types.gen.json" with { - type: "json", -}; +import possibleTypes from "./graphql/fragment-types.gen.json" with { type: "json" }; import { hashClientHeaderKey } from "./http-requests.js"; const errorLink = onError(({ graphQLErrors, operation }) => { diff --git a/libs/@local/hash-isomorphic-utils/src/entity-store-plugin.ts b/libs/@local/hash-isomorphic-utils/src/entity-store-plugin.ts index 30f15cfb9a6..4fef9d3d813 100644 --- a/libs/@local/hash-isomorphic-utils/src/entity-store-plugin.ts +++ b/libs/@local/hash-isomorphic-utils/src/entity-store-plugin.ts @@ -13,8 +13,6 @@ import { Plugin, PluginKey } from "prosemirror-state"; import type { EditorView } from "prosemirror-view"; import { v4 as uuid } from "uuid"; -import type { BlockEntity } from "./entity.js"; -import { getEntityChildEntity, isRichTextProperties } from "./entity.js"; import type { DraftEntity, EntityStore, @@ -27,6 +25,8 @@ import { isDraftBlockEntity, textualContentPropertyTypeBaseUrl, } from "./entity-store.js"; +import type { BlockEntity } from "./entity.js"; +import { getEntityChildEntity, isRichTextProperties } from "./entity.js"; import type { ComponentNode, EntityNode } from "./prosemirror.js"; import { componentNodeToId, @@ -47,19 +47,19 @@ type EntityStorePluginState = { export type EntityStorePluginAction = { received?: boolean } & ( | /** - * This is an action that merges in a new set of blocks from a Page - * entity's contents property, usually post save while attempting to - * remember draft data which has not yet been saved. This is not a - * fool-proof solution, and is only necessary because we don't yet - * convert the changes made during a save into discrete actions. Once - * we do that, we should remove this as its a source of complexity and - * bugs. It also results in needing to send the entire store to the - * other clients, as it is not sync-able. - * - * @deprecated - * @todo remove this once we better handle saves - */ - { + * This is an action that merges in a new set of blocks from a Page + * entity's contents property, usually post save while attempting to + * remember draft data which has not yet been saved. This is not a + * fool-proof solution, and is only necessary because we don't yet + * convert the changes made during a save into discrete actions. Once + * we do that, we should remove this as its a source of complexity and + * bugs. It also results in needing to send the entire store to the + * other clients, as it is not sync-able. + * + * @deprecated + * @todo remove this once we better handle saves + */ + { type: "mergeNewPageContents"; payload: { blocks: BlockEntity[]; @@ -783,11 +783,7 @@ const scheduleNotifyEntityStoreSubscribers = collect< } }); -export const createEntityStorePlugin = ({ - webId, -}: { - webId: WebId; -}) => { +export const createEntityStorePlugin = ({ webId }: { webId: WebId }) => { // eslint-disable-next-line no-restricted-syntax -- prosemirror issue const entityStorePlugin = new Plugin({ key: entityStorePluginKey, diff --git a/libs/@local/hash-isomorphic-utils/src/entity-store.ts b/libs/@local/hash-isomorphic-utils/src/entity-store.ts index 89c4a0aab4f..4ea4688ecdb 100644 --- a/libs/@local/hash-isomorphic-utils/src/entity-store.ts +++ b/libs/@local/hash-isomorphic-utils/src/entity-store.ts @@ -8,8 +8,8 @@ import type { import type { Draft } from "immer"; import { produce } from "immer"; -import type { BlockEntity } from "./entity.js"; import { generateDraftIdForEntity } from "./entity-store-plugin.js"; +import type { BlockEntity } from "./entity.js"; import { blockProtocolPropertyTypes } from "./ontology-type-ids.js"; export type EntityStoreType = BlockEntity | BlockEntity["blockChildEntity"]; diff --git a/libs/@local/hash-isomorphic-utils/src/flows/action-definitions.ts b/libs/@local/hash-isomorphic-utils/src/flows/action-definitions.ts index c73af3b0ffa..a0ef4502984 100644 --- a/libs/@local/hash-isomorphic-utils/src/flows/action-definitions.ts +++ b/libs/@local/hash-isomorphic-utils/src/flows/action-definitions.ts @@ -747,22 +747,25 @@ export type OutputPayloadKindForAiFlowAction< type AiFlowInputPayloadType< T extends AiFlowActionDefinitionId, N extends InputNameForAiFlowAction, -> = Extract< - (typeof aiFlowActionDefinitionsAsConst)[T]["inputs"][number], - { name: N } -> extends { required: true; array: true } - ? PayloadValue, true> - : Extract< - (typeof aiFlowActionDefinitionsAsConst)[T]["inputs"][number], - { name: N } - > extends { required: false; array: true } - ? PayloadValue, true> | undefined +> = + Extract< + (typeof aiFlowActionDefinitionsAsConst)[T]["inputs"][number], + { name: N } + > extends { required: true; array: true } + ? PayloadValue, true> : Extract< (typeof aiFlowActionDefinitionsAsConst)[T]["inputs"][number], { name: N } - > extends { required: true; array: false } - ? PayloadValue, false> - : PayloadValue, false> | undefined; + > extends { required: false; array: true } + ? PayloadValue, true> | undefined + : Extract< + (typeof aiFlowActionDefinitionsAsConst)[T]["inputs"][number], + { name: N } + > extends { required: true; array: false } + ? PayloadValue, false> + : + | PayloadValue, false> + | undefined; type SimplifiedActionInputsObject = { [N in InputNameForAiFlowAction]: AiFlowInputPayloadType; @@ -776,44 +779,45 @@ export const getSimplifiedAiFlowActionInputs = < }): SimplifiedActionInputsObject => { const { inputs } = params; - return inputs.reduce( - (acc, input) => { - const inputName = input.inputName as InputNameForAiFlowAction; + return inputs.reduce((acc, input) => { + const inputName = input.inputName as InputNameForAiFlowAction; - acc[inputName] = input.payload.value as AiFlowInputPayloadType< - T, - typeof inputName - >; + acc[inputName] = input.payload.value as AiFlowInputPayloadType< + T, + typeof inputName + >; - return acc; - }, - {} as SimplifiedActionInputsObject, - ); + return acc; + }, {} as SimplifiedActionInputsObject); }; type IntegrationFlowInputPayloadType< T extends IntegrationFlowActionDefinitionId, N extends InputNameForIntegrationFlowAction, -> = Extract< - (typeof integrationFlowActionDefinitionsAsConst)[T]["inputs"][number], - { name: N } -> extends { required: true; array: true } - ? PayloadValue, true> - : Extract< - (typeof integrationFlowActionDefinitionsAsConst)[T]["inputs"][number], - { name: N } - > extends { required: false; array: true } - ? - | PayloadValue, true> - | undefined +> = + Extract< + (typeof integrationFlowActionDefinitionsAsConst)[T]["inputs"][number], + { name: N } + > extends { required: true; array: true } + ? PayloadValue, true> : Extract< (typeof integrationFlowActionDefinitionsAsConst)[T]["inputs"][number], { name: N } - > extends { required: true; array: false } - ? PayloadValue, false> - : - | PayloadValue, false> - | undefined; + > extends { required: false; array: true } + ? + | PayloadValue, true> + | undefined + : Extract< + (typeof integrationFlowActionDefinitionsAsConst)[T]["inputs"][number], + { name: N } + > extends { required: true; array: false } + ? PayloadValue, false> + : + | PayloadValue< + InputPayloadKindForIntegrationFlowAction, + false + > + | undefined; type SimplifiedIntegrationActionInputsObject< T extends IntegrationFlowActionDefinitionId, @@ -832,19 +836,16 @@ export const getSimplifiedIntegrationFlowActionInputs = < }): SimplifiedIntegrationActionInputsObject => { const { inputs } = params; - return inputs.reduce( - (acc, input) => { - const inputName = input.inputName as InputNameForIntegrationFlowAction; + return inputs.reduce((acc, input) => { + const inputName = input.inputName as InputNameForIntegrationFlowAction; - acc[inputName] = input.payload.value as IntegrationFlowInputPayloadType< - T, - typeof inputName - >; + acc[inputName] = input.payload.value as IntegrationFlowInputPayloadType< + T, + typeof inputName + >; - return acc; - }, - {} as SimplifiedIntegrationActionInputsObject, - ); + return acc; + }, {} as SimplifiedIntegrationActionInputsObject); }; /** diff --git a/libs/@local/hash-isomorphic-utils/src/flows/temporal-types.ts b/libs/@local/hash-isomorphic-utils/src/flows/temporal-types.ts index c55b0c93f71..2860c6e4b91 100644 --- a/libs/@local/hash-isomorphic-utils/src/flows/temporal-types.ts +++ b/libs/@local/hash-isomorphic-utils/src/flows/temporal-types.ts @@ -11,8 +11,8 @@ import type { } from "./types.js"; export type BaseRunFlowWorkflowParams< - ValidActionDefinitionId extends - FlowActionDefinitionId = FlowActionDefinitionId, + ValidActionDefinitionId extends FlowActionDefinitionId = + FlowActionDefinitionId, > = { /** * Optionally provide the UUID to use when persisting the Flow Entity. diff --git a/libs/@local/hash-isomorphic-utils/src/graphql/type-defs/embed.typedef.ts b/libs/@local/hash-isomorphic-utils/src/graphql/type-defs/embed.typedef.ts index 1d42d212a4f..5b5f91cf843 100644 --- a/libs/@local/hash-isomorphic-utils/src/graphql/type-defs/embed.typedef.ts +++ b/libs/@local/hash-isomorphic-utils/src/graphql/type-defs/embed.typedef.ts @@ -17,7 +17,6 @@ export const embedTypeDef = gql` The URL of the embed """ url: String! - """ The providerName of the embed """ diff --git a/libs/@local/hash-isomorphic-utils/src/graphql/type-defs/knowledge/entity.typedef.ts b/libs/@local/hash-isomorphic-utils/src/graphql/type-defs/knowledge/entity.typedef.ts index 76c106b1dd5..4d90ba47c65 100644 --- a/libs/@local/hash-isomorphic-utils/src/graphql/type-defs/knowledge/entity.typedef.ts +++ b/libs/@local/hash-isomorphic-utils/src/graphql/type-defs/knowledge/entity.typedef.ts @@ -111,9 +111,7 @@ export const entityTypedef = gql` extend type Query { countEntities(request: CountEntitiesParams!): Int! - queryEntities( - request: QueryEntitiesRequest! - ): QueryEntitiesResponse! + queryEntities(request: QueryEntitiesRequest!): QueryEntitiesResponse! queryEntitySubgraph( request: QueryEntitySubgraphRequest! diff --git a/libs/@local/hash-isomorphic-utils/src/graphql/type-defs/knowledge/flow.typedef.ts b/libs/@local/hash-isomorphic-utils/src/graphql/type-defs/knowledge/flow.typedef.ts index 7cae8c64581..b55164ba506 100644 --- a/libs/@local/hash-isomorphic-utils/src/graphql/type-defs/knowledge/flow.typedef.ts +++ b/libs/@local/hash-isomorphic-utils/src/graphql/type-defs/knowledge/flow.typedef.ts @@ -274,7 +274,10 @@ export const flowTypedef = gql` """ Update an existing flow schedule """ - updateFlowSchedule(scheduleEntityId: EntityId!, input: UpdateFlowScheduleInput!): Boolean! + updateFlowSchedule( + scheduleEntityId: EntityId! + input: UpdateFlowScheduleInput! + ): Boolean! """ Pause a flow schedule, stopping future executions until resumed diff --git a/libs/@local/hash-isomorphic-utils/src/graphql/type-defs/knowledge/org.typedef.ts b/libs/@local/hash-isomorphic-utils/src/graphql/type-defs/knowledge/org.typedef.ts index 2f43deea1cb..1178ec87795 100644 --- a/libs/@local/hash-isomorphic-utils/src/graphql/type-defs/knowledge/org.typedef.ts +++ b/libs/@local/hash-isomorphic-utils/src/graphql/type-defs/knowledge/org.typedef.ts @@ -40,7 +40,9 @@ export const orgTypedef = gql` org: MinimalGqlOrg! } - union PendingOrgInvitation = PendingOrgInvitationByEmail | PendingOrgInvitationByShortname + union PendingOrgInvitation = + | PendingOrgInvitationByEmail + | PendingOrgInvitationByShortname extend type Mutation { """ diff --git a/libs/@local/hash-isomorphic-utils/src/graphql/type-defs/ontology/data-type.typedef.ts b/libs/@local/hash-isomorphic-utils/src/graphql/type-defs/ontology/data-type.typedef.ts index 2303f9444ae..87d0ec129d0 100644 --- a/libs/@local/hash-isomorphic-utils/src/graphql/type-defs/ontology/data-type.typedef.ts +++ b/libs/@local/hash-isomorphic-utils/src/graphql/type-defs/ontology/data-type.typedef.ts @@ -13,9 +13,7 @@ export const dataTypeTypedef = gql` scalar UserPermissionsOnDataType extend type Query { - queryDataTypes( - request: QueryDataTypesParams! - ): QueryDataTypesResponse! + queryDataTypes(request: QueryDataTypesParams!): QueryDataTypesResponse! queryDataTypeSubgraph( request: QueryDataTypeSubgraphParams! @@ -33,10 +31,17 @@ export const dataTypeTypedef = gql` ): UserPermissionsOnDataType! } - extend type Mutation { - createDataType(webId: WebId!, dataType: ConstructDataTypeParams!, conversions: DataTypeDirectConversionsMap): DataTypeWithMetadata! - updateDataType(dataTypeId: VersionedUrl!, dataType: ConstructDataTypeParams!, conversions: DataTypeDirectConversionsMap): DataTypeWithMetadata! + createDataType( + webId: WebId! + dataType: ConstructDataTypeParams! + conversions: DataTypeDirectConversionsMap + ): DataTypeWithMetadata! + updateDataType( + dataTypeId: VersionedUrl! + dataType: ConstructDataTypeParams! + conversions: DataTypeDirectConversionsMap + ): DataTypeWithMetadata! archiveDataType(dataTypeId: VersionedUrl!): OntologyTemporalMetadata! unarchiveDataType(dataTypeId: VersionedUrl!): OntologyTemporalMetadata! } diff --git a/libs/@local/hash-isomorphic-utils/src/graphql/type-defs/schema.ts b/libs/@local/hash-isomorphic-utils/src/graphql/type-defs/schema.ts index 9bd78d90753..8797d65e70d 100644 --- a/libs/@local/hash-isomorphic-utils/src/graphql/type-defs/schema.ts +++ b/libs/@local/hash-isomorphic-utils/src/graphql/type-defs/schema.ts @@ -4,8 +4,8 @@ import { blockprotocolTypedef } from "./blockprotocol.typedef.js"; import { embedTypeDef } from "./embed.typedef.js"; import { generationTypedef } from "./generation.typedef.js"; import { linearTypedef } from "./integration/linear.typedef.js"; -import { blockTypedef } from "./knowledge/block.typedef.js"; import { blockCollectionTypedef } from "./knowledge/block-collection.typedef.js"; +import { blockTypedef } from "./knowledge/block.typedef.js"; import { commentTypedef } from "./knowledge/comment.typedef.js"; import { entityTypedef } from "./knowledge/entity.typedef.js"; import { fileTypedef } from "./knowledge/file.typedef.js"; diff --git a/libs/@local/hash-isomorphic-utils/src/prosemirror-manager.ts b/libs/@local/hash-isomorphic-utils/src/prosemirror-manager.ts index 5398376067b..a7cc8e0ae4c 100644 --- a/libs/@local/hash-isomorphic-utils/src/prosemirror-manager.ts +++ b/libs/@local/hash-isomorphic-utils/src/prosemirror-manager.ts @@ -4,14 +4,19 @@ import type { Node, Schema } from "prosemirror-model"; import type { EditorState, Transaction } from "prosemirror-state"; import type { EditorProps, EditorView } from "prosemirror-view"; -import type { HashBlock } from "./blocks.js"; -import { fetchBlock, prepareBlockCache } from "./blocks.js"; import { areComponentsCompatible, isBlockWithTextualContentProperty, } from "./blocks-constants.js"; -import type { BlockEntity } from "./entity.js"; -import { getBlockChildEntity, isRichTextProperties } from "./entity.js"; +import type { HashBlock } from "./blocks.js"; +import { fetchBlock, prepareBlockCache } from "./blocks.js"; +import { + addEntityStoreAction, + entityStorePluginState, + entityStorePluginStateFromTransaction, + generateDraftIdForEntity, + mustGetDraftEntityByEntityId, +} from "./entity-store-plugin.js"; import type { DraftEntity, EntityStore, @@ -23,13 +28,8 @@ import { isDraftBlockEntity, textualContentPropertyTypeBaseUrl, } from "./entity-store.js"; -import { - addEntityStoreAction, - entityStorePluginState, - entityStorePluginStateFromTransaction, - generateDraftIdForEntity, - mustGetDraftEntityByEntityId, -} from "./entity-store-plugin.js"; +import type { BlockEntity } from "./entity.js"; +import { getBlockChildEntity, isRichTextProperties } from "./entity.js"; import { componentNodeGroupName, findComponentNode, diff --git a/libs/@local/hash-isomorphic-utils/src/save.ts b/libs/@local/hash-isomorphic-utils/src/save.ts index 9d0ec2e2af6..836165b60c5 100644 --- a/libs/@local/hash-isomorphic-utils/src/save.ts +++ b/libs/@local/hash-isomorphic-utils/src/save.ts @@ -26,12 +26,12 @@ import { sortBlockCollectionLinks, } from "./block-collection.js"; import type { ComponentIdHashBlockMap } from "./blocks.js"; -import type { BlockEntity } from "./entity.js"; import type { DraftEntity, EntityStore } from "./entity-store.js"; import { getDraftEntityByEntityId, isDraftBlockEntity, } from "./entity-store.js"; +import type { BlockEntity } from "./entity.js"; import { currentTimeInstantTemporalAxes } from "./graph-queries.js"; import type { Block as GqlBlock, diff --git a/libs/@local/hash-isomorphic-utils/src/simplify-properties.ts b/libs/@local/hash-isomorphic-utils/src/simplify-properties.ts index af2a6491d8f..b72c28bac8d 100644 --- a/libs/@local/hash-isomorphic-utils/src/simplify-properties.ts +++ b/libs/@local/hash-isomorphic-utils/src/simplify-properties.ts @@ -44,17 +44,14 @@ export const simplifyProperties = ( properties: T, ): SimpleProperties => { // this function is only called with property objects that follow the HASH URL/bp scheme - return typedEntries(properties).reduce( - (acc, [key, value]) => { - // fallback to a non-simplified key if the key is not in the expected format - const id = key.split("/").at(-2); - const simplified = id ? camelCase(id) : key; + return typedEntries(properties).reduce((acc, [key, value]) => { + // fallback to a non-simplified key if the key is not in the expected format + const id = key.split("/").at(-2); + const simplified = id ? camelCase(id) : key; - return { - ...acc, - [simplified]: value, - }; - }, - {} as SimpleProperties, - ); + return { + ...acc, + [simplified]: value, + }; + }, {} as SimpleProperties); }; diff --git a/libs/@local/hash-isomorphic-utils/src/text.ts b/libs/@local/hash-isomorphic-utils/src/text.ts index 9454cab5457..4657cad79f9 100644 --- a/libs/@local/hash-isomorphic-utils/src/text.ts +++ b/libs/@local/hash-isomorphic-utils/src/text.ts @@ -1,7 +1,7 @@ import type { Node, Schema } from "prosemirror-model"; -import type { TextProperties } from "./entity.js"; import { textualContentPropertyTypeBaseUrl } from "./entity-store.js"; +import type { TextProperties } from "./entity.js"; import type { ComponentNode } from "./prosemirror.js"; import type { TextToken } from "./types.js"; diff --git a/libs/@local/hash-isomorphic-utils/src/wrap-entities-plugin.ts b/libs/@local/hash-isomorphic-utils/src/wrap-entities-plugin.ts index 04bf7265848..0282fd7b8a9 100644 --- a/libs/@local/hash-isomorphic-utils/src/wrap-entities-plugin.ts +++ b/libs/@local/hash-isomorphic-utils/src/wrap-entities-plugin.ts @@ -10,8 +10,8 @@ import { } from "prosemirror-state"; import { Mapping } from "prosemirror-transform"; -import { getBlockChildEntity, isRichTextProperties } from "./entity.js"; import { entityStorePluginState } from "./entity-store-plugin.js"; +import { getBlockChildEntity, isRichTextProperties } from "./entity.js"; import { isComponentNode, isEntityNode } from "./prosemirror.js"; type WrapperNodes = [number, Node[]]; diff --git a/libs/@local/hashql/README.md b/libs/@local/hashql/README.md index b8469d7112a..c4d025deb16 100644 --- a/libs/@local/hashql/README.md +++ b/libs/@local/hashql/README.md @@ -4,12 +4,12 @@ HashQL (HASH Query Language) is a **typed, functional traversal language** for q **Key characteristics** -* **Functional traversal core.** Queries are compositions of pure operators over graph effects. -* **Sound, expressive types.** Structural types are enabled by default (with a nominal "opt‑in"), along with bounded generics, unions/intersections, μ-types, and HM-style inference with subtyping. -* **Syntax independence.** Today's frontend is **J‑Expr** ("JSON expressions"); further frontends can be added without disturbing downstream phases. -* **First‑class diagnostics.** Every phase emits structured diagnostics; fatal issues stop at **diagnostic boundaries** while non‑fatal ones accumulate. -* **Heterogeneous execution.** The compiler targets multiple execution backends (e.g., PostgreSQL and an interpreter), enabling cost-aware placement and parallelism. -* **Bi‑temporal graphs.** Queries operate over a bitemporal slice parameterised by **decision time** and **transaction time**. One axis is **pinned** (a single instant), the other **variable** (a half‑open interval). +- **Functional traversal core.** Queries are compositions of pure operators over graph effects. +- **Sound, expressive types.** Structural types are enabled by default (with a nominal "opt‑in"), along with bounded generics, unions/intersections, μ-types, and HM-style inference with subtyping. +- **Syntax independence.** Today's frontend is **J‑Expr** ("JSON expressions"); further frontends can be added without disturbing downstream phases. +- **First‑class diagnostics.** Every phase emits structured diagnostics; fatal issues stop at **diagnostic boundaries** while non‑fatal ones accumulate. +- **Heterogeneous execution.** The compiler targets multiple execution backends (e.g., PostgreSQL and an interpreter), enabling cost-aware placement and parallelism. +- **Bi‑temporal graphs.** Queries operate over a bitemporal slice parameterised by **decision time** and **transaction time**. One axis is **pinned** (a single instant), the other **variable** (a half‑open interval). ## Overview of the compiler @@ -96,22 +96,22 @@ flowchart TB **Phase responsibilities** -* **Frontend (J‑Expr).** Streaming lexer + compact parser that reads JSON‑with‑comments and produces the AST directly — no intermediate JSON DOM is materialized. -* **AST.** Expands special forms, canonicalises and erases surface type syntax, resolves imports/names, and assigns stable IDs via small, testable passes. -* **HIR.** Reified, interned tree for type inference/checking and specialization; retains an explicit tree to model control flow and typing constraints. -* **Evaluation.** Currently lowers to a transient graph IR executed by the runtime; richer **LIRs** and an **interpreter** are planned to remove evaluator‑imposed limits. +- **Frontend (J‑Expr).** Streaming lexer + compact parser that reads JSON‑with‑comments and produces the AST directly — no intermediate JSON DOM is materialized. +- **AST.** Expands special forms, canonicalises and erases surface type syntax, resolves imports/names, and assigns stable IDs via small, testable passes. +- **HIR.** Reified, interned tree for type inference/checking and specialization; retains an explicit tree to model control flow and typing constraints. +- **Evaluation.** Currently lowers to a transient graph IR executed by the runtime; richer **LIRs** and an **interpreter** are planned to remove evaluator‑imposed limits. **Diagnostic boundaries** -* Each phase consumes diagnostics from its predecessor and may emit diagnostics of varying severity. -* Fatal diagnostics stop compilation at diagnostic boundaries, whereas other diagnostics are propagated to the next phase. -* Frontend and AST phases prioritise **recovery** to maximise signal for later passes. +- Each phase consumes diagnostics from its predecessor and may emit diagnostics of varying severity. +- Fatal diagnostics stop compilation at diagnostic boundaries, whereas other diagnostics are propagated to the next phase. +- Frontend and AST phases prioritise **recovery** to maximise signal for later passes. **Planned extensions** -* **MIR** with basic blocks to unlock data‑/control‑flow optimisations and parallel scheduling. -* **Interpreter** to execute arbitrary HashQL programs that cannot be pushed down to the database. -* Reworked **Graph LIR** to eliminate limitations from the current statement/expression split in the query stack. +- **MIR** with basic blocks to unlock data‑/control‑flow optimisations and parallel scheduling. +- **Interpreter** to execute arbitrary HashQL programs that cannot be pushed down to the database. +- Reworked **Graph LIR** to eliminate limitations from the current statement/expression split in the query stack. ## J‑Expr @@ -123,14 +123,14 @@ flowchart TB ### Forms at a glance -* **Underscore**: the JSON string `"_"` denotes a discarded value or an inference **hole**. -* **Path**: strings like `"::core::math::add"` (absolute) or `"Foo"` (relative) with embedded generics/constraints. -* **Call**: arrays, `["callee", arg1, arg2, ...]`. Labels use a leading‑colon key: `["f", {":x": "x"}, {":y": "y"}]` (positional order still matters). -* **Data**: one of the `#`‑prefixed constructors: - * `{"#literal": 123}` (Integer), `{"#literal": 123.0}` (Number), `"foo"`, `true`, `false`, `null`, - * `{"#struct": { "a": 1, "b": 2 }}` (closed), `{"#struct(open)": { ... }}` (open), - * `{"#tuple": [x, y, z]}`, `{"#dict": { "k": v, ... }}` or `{"#dict": [[k, v], ...]}`, - * `{"#list": [v1, v2, ...]}`. +- **Underscore**: the JSON string `"_"` denotes a discarded value or an inference **hole**. +- **Path**: strings like `"::core::math::add"` (absolute) or `"Foo"` (relative) with embedded generics/constraints. +- **Call**: arrays, `["callee", arg1, arg2, ...]`. Labels use a leading‑colon key: `["f", {":x": "x"}, {":y": "y"}]` (positional order still matters). +- **Data**: one of the `#`‑prefixed constructors: + - `{"#literal": 123}` (Integer), `{"#literal": 123.0}` (Number), `"foo"`, `true`, `false`, `null`, + - `{"#struct": { "a": 1, "b": 2 }}` (closed), `{"#struct(open)": { ... }}` (open), + - `{"#tuple": [x, y, z]}`, `{"#dict": { "k": v, ... }}` or `{"#dict": [[k, v], ...]}`, + - `{"#list": [v1, v2, ...]}`. Data may include `"#type"` to **explicitly** refine the type inline; it desugars to a call to the `as` special form. @@ -146,9 +146,9 @@ a[b] ≡ ["[]", "a", "b"] // dict/list index (dynamic, retu #### Name resolution and imports -* Absolute paths start at a package root: `::kernel::special_form::if`. -* Relative paths resolve lexically; `use` supports wildcards, selective imports, and aliasing. -* Locals follow standard shadowing rules; `let` can shadow an imported binding. +- Absolute paths start at a package root: `::kernel::special_form::if`. +- Relative paths resolve lexically; `use` supports wildcards, selective imports, and aliasing. +- Locals follow standard shadowing rules; `let` can shadow an imported binding. #### Examples @@ -266,36 +266,36 @@ HashQL's type system is designed to be both **compatible** with graph schemas an ### Core model -* **Structural by default**, with **nominal opt‑in** via `newtype` (opaque identity). -* **Complete lattice** with `⊤` ("Unknown") and `⊥` ("Never"); supports unions (`T | U`) and intersections (`T & U`). -* **Bounded parametric polymorphism** with generic constraints. -* **Equi‑recursive μ‑types** for cyclic structures. -* **Variance:** types are covariant by default; closure parameters are contravariant; explicit variance on type constructors is supported. -* **Kinds** separate types (`*`) from higher‑order type constructors (`* → *`, etc.). +- **Structural by default**, with **nominal opt‑in** via `newtype` (opaque identity). +- **Complete lattice** with `⊤` ("Unknown") and `⊥` ("Never"); supports unions (`T | U`) and intersections (`T & U`). +- **Bounded parametric polymorphism** with generic constraints. +- **Equi‑recursive μ‑types** for cyclic structures. +- **Variance:** types are covariant by default; closure parameters are contravariant; explicit variance on type constructors is supported. +- **Kinds** separate types (`*`) from higher‑order type constructors (`* → *`, etc.). **Composite types** -* **Structs** — closed (invariant field set) and **open** (width‑subtyping; fields are covariant). -* **Tuples** — fixed‑length, heterogeneous; length is invariant. -* **`Dict`** — homogeneous key/value; keys **invariant**, values **covariant**. -* **`List`** — homogeneous; covariant in element type. +- **Structs** — closed (invariant field set) and **open** (width‑subtyping; fields are covariant). +- **Tuples** — fixed‑length, heterogeneous; length is invariant. +- **`Dict`** — homogeneous key/value; keys **invariant**, values **covariant**. +- **`List`** — homogeneous; covariant in element type. ### Subtyping & algebra -* Unions/intersections are **distributive**. -* Joins (`⊔`, LUB) and meets (`⊓`, GLB) exist for all types, falling back to union (`|`) or intersection (`&`) if no tighter bound exists. -* Explicit **ascription** (`as`) admits only **upcasts** (`T <: U`). +- Unions/intersections are **distributive**. +- Joins (`⊔`, LUB) and meets (`⊓`, GLB) exist for all types, falling back to union (`|`) or intersection (`&`) if no tighter bound exists. +- Explicit **ascription** (`as`) admits only **upcasts** (`T <: U`). ### Generics & kinds -* Generics can be **bounded** (`T: Number | String`, etc.) and appear in both type aliases and closures. -* Higher‑kinded forms are expressible at the type level (e.g., `List<∙>` has kind `* → *`). +- Generics can be **bounded** (`T: Number | String`, etc.) and appear in both type aliases and closures. +- Higher‑kinded forms are expressible at the type level (e.g., `List<∙>` has kind `* → *`). ### Inference & checking -* Constraint‑based inference (HM‑style with subtyping) over the HIR: emit constraints, solve, then apply a substitution bottom‑up. -* Differentiates **inference holes** (`_`, must be constrained) from **inference variables** (`T`, may remain unconstrained if latent in generics). -* Bidirectional checks around annotations (`as`, parameter/return types) improve local precision and error pointing. +- Constraint‑based inference (HM‑style with subtyping) over the HIR: emit constraints, solve, then apply a substitution bottom‑up. +- Differentiates **inference holes** (`_`, must be constrained) from **inference variables** (`T`, may remain unconstrained if latent in generics). +- Bidirectional checks around annotations (`as`, parameter/return types) improve local precision and error pointing. ### Enumerations (via `newtype`) @@ -319,9 +319,9 @@ Constructors (`Some`, `None`, `Ok`, `Err`) are distinct **nominal** types; patte HashQL's runtime separates graph traversal into **head → body → tail**: -* **Head** — query entry points (e.g., pick starting vertices/edges, choose temporal axis/range). -* **Body** — compositional traversal operators (map/filter/expand, temporal joins, hops). -* **Tail** — terminals (materialise, aggregate, paginate, authorise). +- **Head** — query entry points (e.g., pick starting vertices/edges, choose temporal axis/range). +- **Body** — compositional traversal operators (map/filter/expand, temporal joins, hops). +- **Tail** — terminals (materialise, aggregate, paginate, authorise). Compilation may **push down** eligible fragments to the database (e.g., PostgreSQL) while keeping non‑pushable fragments in an interpreter, with **cost‑aware placement** and **parallelism** where safe. The permission layer can be injected either as guards during pushdown or as an overlay during interpretation. @@ -329,10 +329,10 @@ Compilation may **push down** eligible fragments to the database (e.g., PostgreS HashQL ships with four packages: -* **`kernel`** — type primitives and special forms (compiler‑intrinsic). -* **`core`** — foundational types/constructors/intrinsics (arithmetic, comparison, options/results, etc.). -* **`graph`** — graph‑specific effect types and intrinsics, arranged as **head → body → tail** (entry points, combinators, terminals). -* **`main`** — implicit user entry point. +- **`kernel`** — type primitives and special forms (compiler‑intrinsic). +- **`core`** — foundational types/constructors/intrinsics (arithmetic, comparison, options/results, etc.). +- **`graph`** — graph‑specific effect types and intrinsics, arranged as **head → body → tail** (entry points, combinators, terminals). +- **`main`** — implicit user entry point. User‑defined modules are not yet supported, but are planned. @@ -340,27 +340,27 @@ User‑defined modules are not yet supported, but are planned. **Access sugar** -* `a.b` → `[".", "a", "b"]` -* `a.2` → `[".", "a", {"#literal": 2}]` -* `a[k]` → `["[]", "a", "k"]` +- `a.b` → `[".", "a", "b"]` +- `a.2` → `[".", "a", {"#literal": 2}]` +- `a[k]` → `["[]", "a", "k"]` **Calls** -* `["::core::math::add", "x", "y"]` -* `["f", {":lhs":"x"}, {":rhs":"y"}]` +- `["::core::math::add", "x", "y"]` +- `["f", {":lhs":"x"}, {":rhs":"y"}]` **Data** -* `{"#literal": 123}` -* `{"#tuple":[...]}` -* `{"#struct":{...}}` / `{"#struct(open)":{"a":1}}` -* `{"#dict":{...}}` or `{"#dict":[[k,v],...]}` -* `{"#list":[...]}` +- `{"#literal": 123}` +- `{"#tuple":[...]}` +- `{"#struct":{...}}` / `{"#struct(open)":{"a":1}}` +- `{"#dict":{...}}` or `{"#dict":[[k,v],...]}` +- `{"#list":[...]}` **Paths** -* Absolute: `"::core::math::add"` -* Relative: `"math::add"`, `"Foo"` +- Absolute: `"::core::math::add"` +- Relative: `"math::add"`, `"Foo"` ## Appendix B — Identifier Syntax diff --git a/libs/@local/hashql/compiletest/README.md b/libs/@local/hashql/compiletest/README.md index 7606d165d5f..a566da98ec5 100644 --- a/libs/@local/hashql/compiletest/README.md +++ b/libs/@local/hashql/compiletest/README.md @@ -35,13 +35,13 @@ package_name/ ### Test Components -| File | Purpose | Required | -| ---- | ------- | -------- | -| `.jsonc` | J-Expr test code | ✅ Yes | -| `.spec.toml` | Test suite specification | ✅ Yes (in dir or parent) | -| `.stdout` | Expected standard output | Optional | -| `.stderr` | Expected diagnostics | Optional | -| `.aux.` | Auxiliary/secondary output | Suite-dependent | +| File | Purpose | Required | +| ------------ | -------------------------- | ------------------------- | +| `.jsonc` | J-Expr test code | ✅ Yes | +| `.spec.toml` | Test suite specification | ✅ Yes (in dir or parent) | +| `.stdout` | Expected standard output | Optional | +| `.stderr` | Expected diagnostics | Optional | +| `.aux.` | Auxiliary/secondary output | Suite-dependent | The harness searches upward from the test file to find `.spec.toml`, stopping at `tests/ui/`. This allows shared specs at directory roots with overrides for subdirectories. @@ -58,7 +58,6 @@ Directives control test behavior and **must** appear at the start of the file: //@ run: fail // Test should fail with errors (DEFAULT) //@ run: skip // Skip this test //@ run: skip reason=Not implemented yet - //@ name: custom_test_name // Override the default test name //@ description: Tests that... // Describe test purpose (encouraged) //@ suite#key: value // Suite-specific directive (TOML value) @@ -86,25 +85,27 @@ Annotations verify that specific diagnostics appear at expected locations: ### Line References -| Syntax | Meaning | -| ------ | ------- | -| `//~ ERROR msg` | Current line | -| `//~^ ERROR msg` | Previous line (1 up) | -| `//~^^ ERROR msg` | 2 lines above | -| `//~^^^ ERROR msg` | 3 lines above | -| `//~v ERROR msg` | Next line (1 down) | -| `//~vv ERROR msg` | 2 lines below | -| `//~vvv ERROR msg` | 3 lines below | -| `//~\| ERROR msg` | Same line as previous annotation | -| `//~? ERROR msg` | Unknown/any line (use sparingly) | +| Syntax | Meaning | +| ------------------ | -------------------------------- | +| `//~ ERROR msg` | Current line | +| `//~^ ERROR msg` | Previous line (1 up) | +| `//~^^ ERROR msg` | 2 lines above | +| `//~^^^ ERROR msg` | 3 lines above | +| `//~v ERROR msg` | Next line (1 down) | +| `//~vv ERROR msg` | 2 lines below | +| `//~vvv ERROR msg` | 3 lines below | +| `//~\| ERROR msg` | Same line as previous annotation | +| `//~? ERROR msg` | Unknown/any line (use sparingly) | ### Example ```jsonc -["let", "x", //~^ ERROR first error on the let line - ["invalid"] //~ ERROR error on this line -] //~| ERROR another error on same line - //~| NOTE additional context +[ + "let", + "x", //~^ ERROR first error on the let line + ["invalid"], //~ ERROR error on this line +] //~| ERROR another error on same line +//~| NOTE additional context ``` ## Discovering Test Suites @@ -142,12 +143,12 @@ When a test fails, the harness shows: ### Resolution -| Failure Type | Action | -| ------------ | ------ | -| Real bug | Fix the implementation code | -| Intentional change | Run `--bless` to update expected outputs | +| Failure Type | Action | +| ------------------- | -------------------------------------------------------- | +| Real bug | Fix the implementation code | +| Intentional change | Run `--bless` to update expected outputs | | Annotation mismatch | Update `//~` annotations to match new messages/locations | -| Missing annotation | Add `//~` for legitimate new diagnostics | +| Missing annotation | Add `//~` for legitimate new diagnostics | ## Extending Test Suites diff --git a/libs/@local/hashql/hir/tests/ui/lower/inference/dict-key-var.jsonc b/libs/@local/hashql/hir/tests/ui/lower/inference/dict-key-var.jsonc index aefa5108afd..f113d85bf9c 100644 --- a/libs/@local/hashql/hir/tests/ui/lower/inference/dict-key-var.jsonc +++ b/libs/@local/hashql/hir/tests/ui/lower/inference/dict-key-var.jsonc @@ -7,7 +7,12 @@ [ "let", "bar", - { "#dict": [["foo", { "#literal": 42 }], [{ "#literal": true }, "foo"]] }, + { + "#dict": [ + ["foo", { "#literal": 42 }], + [{ "#literal": true }, "foo"] + ] + }, "bar" ] ] diff --git a/libs/@local/hashql/mir/tests/ui/reify/dict-computed-key.jsonc b/libs/@local/hashql/mir/tests/ui/reify/dict-computed-key.jsonc index ecc11940cc2..873179140cd 100644 --- a/libs/@local/hashql/mir/tests/ui/reify/dict-computed-key.jsonc +++ b/libs/@local/hashql/mir/tests/ui/reify/dict-computed-key.jsonc @@ -8,7 +8,12 @@ [ "let", "bar", - { "#dict": [["foo", { "#literal": 42 }], [{ "#literal": true }, "foo"]] }, + { + "#dict": [ + ["foo", { "#literal": 42 }], + [{ "#literal": true }, "foo"] + ] + }, "bar" ] ] diff --git a/libs/@local/hashql/syntax-jexpr/README.md b/libs/@local/hashql/syntax-jexpr/README.md index e014160bd07..30a375d1852 100644 --- a/libs/@local/hashql/syntax-jexpr/README.md +++ b/libs/@local/hashql/syntax-jexpr/README.md @@ -6,11 +6,11 @@ J-Expr (JSON Expression Language) is a JSON-based syntax for writing HashQL quer J-Expr maps JSON types to expression semantics: -| JSON Type | J-Expr Meaning | -| --------- | -------------- | -| String | Path/identifier | -| Array | Function call | -| Object | Data constructor (with `#` keys) | +| JSON Type | J-Expr Meaning | +| --------- | -------------------------------- | +| String | Path/identifier | +| Array | Function call | +| Object | Data constructor (with `#` keys) | ## Paths (Strings) @@ -57,14 +57,14 @@ Use `:` prefix for named arguments: Objects with special `#` keys construct typed data: -| Key | Purpose | Example | -| --- | ------- | ------- | -| `#literal` | Primitive values | `{"#literal": 42}` | -| `#struct` | Named fields | `{"#struct": {"x": ...}}` | -| `#list` | Variable-size ordered | `{"#list": [...]}` | -| `#tuple` | Fixed-size ordered | `{"#tuple": [...]}` | -| `#dict` | Key-value map | `{"#dict": {"k": ...}}` | -| `#type` | Type annotation | Used with other keys | +| Key | Purpose | Example | +| ---------- | --------------------- | ------------------------- | +| `#literal` | Primitive values | `{"#literal": 42}` | +| `#struct` | Named fields | `{"#struct": {"x": ...}}` | +| `#list` | Variable-size ordered | `{"#list": [...]}` | +| `#tuple` | Fixed-size ordered | `{"#tuple": [...]}` | +| `#dict` | Key-value map | `{"#dict": {"k": ...}}` | +| `#type` | Type annotation | Used with other keys | ### Examples @@ -88,18 +88,18 @@ Objects with special `#` keys construct typed data: Special forms are syntactic constructs with special evaluation semantics: -| Form | Arity | Purpose | -| ---- | ----- | ------- | -| `if` | 2, 3 | Conditional branching | -| `let` | 3, 4 | Variable binding | -| `fn` | 4 | Function definition | -| `as` | 2 | Type assertion | -| `type` | 3 | Type alias definition | -| `newtype` | 3 | Nominal type wrapper | -| `use` | 3 | Module imports | -| `input` | 2, 3 | Host input declaration | -| `access` / `.` | 2 | Field access | -| `index` / `[]` | 2 | Index access | +| Form | Arity | Purpose | +| -------------- | ----- | ---------------------- | +| `if` | 2, 3 | Conditional branching | +| `let` | 3, 4 | Variable binding | +| `fn` | 4 | Function definition | +| `as` | 2 | Type assertion | +| `type` | 3 | Type alias definition | +| `newtype` | 3 | Nominal type wrapper | +| `use` | 3 | Module imports | +| `input` | 2, 3 | Host input declaration | +| `access` / `.` | 2 | Field access | +| `index` / `[]` | 2 | Index access | ### Common Patterns diff --git a/libs/@local/internal-api-client/typescript/api.ts b/libs/@local/internal-api-client/typescript/api.ts index 8ddef303b89..33ce463d44b 100644 --- a/libs/@local/internal-api-client/typescript/api.ts +++ b/libs/@local/internal-api-client/typescript/api.ts @@ -12,12 +12,20 @@ * Do not edit the class manually. */ -import { Configuration } from "./configuration.js"; import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig, } from "axios"; + +// @ts-ignore +import { + BASE_PATH, + COLLECTION_FORMATS, + RequestArgs, + BaseAPI, + RequiredError, +} from "./base.js"; // Some imports not used depending on template conditions // @ts-ignore import { @@ -32,14 +40,7 @@ import { toPathString, createRequestFunction, } from "./common.js"; -// @ts-ignore -import { - BASE_PATH, - COLLECTION_FORMATS, - RequestArgs, - BaseAPI, - RequiredError, -} from "./base.js"; +import { Configuration } from "./configuration.js"; /** * diff --git a/libs/@local/internal-api-client/typescript/base.ts b/libs/@local/internal-api-client/typescript/base.ts index aee10b4843e..1f1e1697c99 100644 --- a/libs/@local/internal-api-client/typescript/base.ts +++ b/libs/@local/internal-api-client/typescript/base.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { Configuration } from "./configuration.js"; // Some imports not used depending on template conditions // @ts-ignore import globalAxios, { @@ -21,6 +20,8 @@ import globalAxios, { AxiosRequestConfig, } from "axios"; +import { Configuration } from "./configuration.js"; + export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); /** diff --git a/libs/@local/internal-api-client/typescript/common.ts b/libs/@local/internal-api-client/typescript/common.ts index a5df1b6f78b..885715ae8d0 100644 --- a/libs/@local/internal-api-client/typescript/common.ts +++ b/libs/@local/internal-api-client/typescript/common.ts @@ -12,10 +12,11 @@ * Do not edit the class manually. */ -import { Configuration } from "./configuration.js"; -import { RequiredError, RequestArgs } from "./base.js"; import { AxiosInstance, AxiosResponse } from "axios"; +import { RequiredError, RequestArgs } from "./base.js"; +import { Configuration } from "./configuration.js"; + /** * * @export diff --git a/libs/@local/internal-api-client/typescript/package.json b/libs/@local/internal-api-client/typescript/package.json index 07d5f10a65e..847c97b3f9b 100644 --- a/libs/@local/internal-api-client/typescript/package.json +++ b/libs/@local/internal-api-client/typescript/package.json @@ -8,7 +8,7 @@ "main": "dist/index.js", "scripts": { "build": "rimraf dist && tsc --build tsconfig.build.json", - "generate": "openapi-generator-cli generate && biome format --write", + "generate": "openapi-generator-cli generate && oxfmt --write", "validate": "openapi-generator-cli validate" }, "dependencies": { diff --git a/libs/@local/repo-chores/node/LICENSE.md b/libs/@local/repo-chores/node/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/libs/@local/repo-chores/node/LICENSE.md +++ b/libs/@local/repo-chores/node/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/libs/@local/repo-chores/node/scripts/prepublish.ts b/libs/@local/repo-chores/node/scripts/prepublish.ts index d510119d7d1..acce58863d8 100644 --- a/libs/@local/repo-chores/node/scripts/prepublish.ts +++ b/libs/@local/repo-chores/node/scripts/prepublish.ts @@ -54,7 +54,7 @@ const script = async () => { // We need to override some options to generate a build that is ready for publishing. await execa( "tsc", - // biome-ignore format: manual formatting for readability + // oxfmt-ignore [ "--project", "tsconfig.json", diff --git a/libs/@local/repo-chores/node/scripts/shared/update-json.ts b/libs/@local/repo-chores/node/scripts/shared/update-json.ts index 656ab7b6efe..1f6787c092f 100644 --- a/libs/@local/repo-chores/node/scripts/shared/update-json.ts +++ b/libs/@local/repo-chores/node/scripts/shared/update-json.ts @@ -14,8 +14,8 @@ export const updateJson = async ( transform(json); const { stdout: output } = await execa( - "biome", - ["format", `--stdin-file-path=${jsonFilePath}`], + "oxfmt", + [`--stdin-filepath=${jsonFilePath}`], { input: JSON.stringify(json, null, 2), }, diff --git a/libs/@local/repo-chores/node/scripts/skill-management/generate-skill-rules.ts b/libs/@local/repo-chores/node/scripts/skill-management/generate-skill-rules.ts index 74eefc2dfce..fd6ff7c3cc6 100644 --- a/libs/@local/repo-chores/node/scripts/skill-management/generate-skill-rules.ts +++ b/libs/@local/repo-chores/node/scripts/skill-management/generate-skill-rules.ts @@ -84,7 +84,7 @@ const run = async (skillsDir: string) => { }; await writeFile(outputPath, JSON.stringify(skillRules, replacer)); - await execa("biome", ["format", "--write", `${outputPath}`]); + await execa("oxfmt", ["--write", `${outputPath}`]); console.log(chalk.green(`Generated ${validSkills.length} skill rule(s)`)); console.log(chalk.dim(` Output: ${outputPath}`)); diff --git a/libs/@local/status/typescript/README.md b/libs/@local/status/typescript/README.md index eb52767b484..8342713911b 100644 --- a/libs/@local/status/typescript/README.md +++ b/libs/@local/status/typescript/README.md @@ -32,7 +32,6 @@ Every service that exposes an API should provide a set of 'payload' definitions They can do this by doing the following: - Create a `./type-defs/status-payloads.ts` file that **only** contains `exports` statements for the `type`s of payloads that are used by the service. - - Services can, and should, re-export shared payload definitions that they consume from other places **and then expose through their API**, e.g. ```ts diff --git a/libs/@local/tsconfig/LICENSE.md b/libs/@local/tsconfig/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/libs/@local/tsconfig/LICENSE.md +++ b/libs/@local/tsconfig/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/libs/README.md b/libs/README.md index f1a45ebe0aa..c91ef34374f 100644 --- a/libs/README.md +++ b/libs/README.md @@ -21,12 +21,12 @@ Contains the source code for software development libraries which HASH has publi ## General Libraries -| Directory | Language(s) | Publication URL | Docs URL | Description | -| ------------------------- | ----------- | ------------------------------------------------------------ | ---------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| [antsi] | Rust | [Crates.io](https://crates.io/crates/antsi) | [Docs.rs](https://docs.rs/antsi/latest/antsi/) | Supports coloring Select Graphic Rendition (as defined in ISO 6429) with no external dependencies | -| [error-stack] | Rust | [Crates.io](https://crates.io/crates/error-stack) | [Docs.rs](https://docs.rs/error-stack/latest/error_stack/) | Context-aware error-handling library that supports arbitrary attached user data | -| [@hashintel/type-editor] | TypeScript | [npm](https://www.npmjs.com/package/@hashintel/type-editor) | To be written | UI for editing entity types defined according to the [Block Protocol's Type System](https://blockprotocol.org/docs/working-with-types) | -| [@hashintel/query-editor] | TypeScript | [npm](https://www.npmjs.com/package/@hashintel/query-editor) | To be written | UI for editing queries (a specific entity type used heavily inside of [HASH]) | +| Directory | Language(s) | Publication URL | Docs URL | Description | +| ------------------------- | ----------- | ------------------------------------------------------------ | ---------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| [antsi] | Rust | [Crates.io](https://crates.io/crates/antsi) | [Docs.rs](https://docs.rs/antsi/latest/antsi/) | Supports coloring Select Graphic Rendition (as defined in ISO 6429) with no external dependencies | +| [error-stack] | Rust | [Crates.io](https://crates.io/crates/error-stack) | [Docs.rs](https://docs.rs/error-stack/latest/error_stack/) | Context-aware error-handling library that supports arbitrary attached user data | +| [@hashintel/type-editor] | TypeScript | [npm](https://www.npmjs.com/package/@hashintel/type-editor) | To be written | UI for editing entity types defined according to the [Block Protocol's Type System](https://blockprotocol.org/docs/working-with-types) | +| [@hashintel/query-editor] | TypeScript | [npm](https://www.npmjs.com/package/@hashintel/query-editor) | To be written | UI for editing queries (a specific entity type used heavily inside of [HASH]) | ## Internal Libraries diff --git a/libs/darwin-kperf/README.md b/libs/darwin-kperf/README.md index f473ce924de..3a997daca42 100644 --- a/libs/darwin-kperf/README.md +++ b/libs/darwin-kperf/README.md @@ -6,7 +6,7 @@ **Rust bindings to Apple's `kperf` kernel performance monitoring framework.** -> **⚠️ Experimental.** These crates depend on Apple's *private* `kperf.framework` +> **⚠️ Experimental.** These crates depend on Apple's _private_ `kperf.framework` > and `kperfdata.framework`, which are not part of any public SDK and carry no ABI > stability guarantee. Apple may change struct layouts, function signatures, or > remove symbols entirely in any macOS update. Additionally, meaningful testing @@ -17,12 +17,12 @@ ## Crates -| Crate | Description | -| --- | --- | -| [`darwin-kperf`](.) | Safe Rust API for configuring and sampling performance counters | -| [`darwin-kperf-sys`](sys) | Raw FFI bindings to `kperf.framework` and `kperfdata.framework` | -| [`darwin-kperf-events`](events) | Apple Silicon PMU event definitions (M1-M5), auto-generated from plist databases | -| [`darwin-kperf-criterion`](criterion) | Criterion.rs measurement plugin for hardware-counter benchmarking | +| Crate | Description | +| ------------------------------------- | -------------------------------------------------------------------------------- | +| [`darwin-kperf`](.) | Safe Rust API for configuring and sampling performance counters | +| [`darwin-kperf-sys`](sys) | Raw FFI bindings to `kperf.framework` and `kperfdata.framework` | +| [`darwin-kperf-events`](events) | Apple Silicon PMU event definitions (M1-M5), auto-generated from plist databases | +| [`darwin-kperf-criterion`](criterion) | Criterion.rs measurement plugin for hardware-counter benchmarking | ## Platform support diff --git a/package.json b/package.json index 3a2537b6aca..83701b384f0 100644 --- a/package.json +++ b/package.json @@ -23,8 +23,8 @@ "bench": "npm-run-all --continue-on-error \"bench:*\"", "bench:integration": "CARGO_TERM_PROGRESS_WHEN=never turbo run bench:integration --env-mode=loose --", "bench:unit": "CARGO_TERM_PROGRESS_WHEN=never turbo run bench:unit --env-mode=loose --", - "changeset:resolve-workspace-ranges": "node scripts/resolve-workspace-ranges.mjs", "changeset:publish": "yarn changeset:resolve-workspace-ranges && YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn && yarn changeset publish", + "changeset:resolve-workspace-ranges": "node scripts/resolve-workspace-ranges.mjs", "changeset:version": "yarn changeset version && YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn", "codegen": "CARGO_TERM_PROGRESS_WHEN=never turbo codegen", "create-block": "yarn workspace @local/repo-chores exe scripts/create-block.ts", @@ -39,26 +39,24 @@ "fix": "npm-run-all --continue-on-error \"fix:*\"", "fix:constraints": "yarn constraints --fix", "fix:eslint": "mise run fix:eslint", - "fix:format": "biome format --write", + "fix:format": "oxfmt --write", "fix:markdownlint": "mise exec --env dev markdownlint-cli2 -- markdownlint-cli2 --fix", - "fix:package-json": "mise run fix:package-json", "fix:taplo": "taplo fmt", "fix:yarn-deduplicate": "yarn dedupe --strategy highest", "generate-ontology-type-ids": "yarn workspace @apps/hash-api generate-ontology-type-ids", "generate-system-types": "yarn workspace @local/hash-isomorphic-utils generate-system-types", "graph:reset-database": "yarn workspace @rust/hash-graph-http-tests reset-database", - "postinstall": "CARGO_TERM_PROGRESS_WHEN=never turbo run postinstall", "lint": "npm-run-all --continue-on-error \"lint:*\"", "lint:constraints": "yarn constraints", "lint:eslint": "CARGO_TERM_PROGRESS_WHEN=never turbo --continue=always lint:eslint --", - "lint:format": "biome format", + "lint:format": "oxfmt --check", "lint:license-in-workspaces": "yarn workspace @local/repo-chores exe scripts/check-license-in-workspaces.ts", "lint:markdownlint": "mise exec --env dev markdownlint-cli2 -- markdownlint-cli2", - "lint:package-json": "mise run lint:package-json", "lint:skill": "yarn agents:skill-management validate", "lint:taplo": "taplo fmt --check", "lint:tsc": "mise run lint:tsc", "lint:yarn-deduplicate": "yarn dedupe --strategy highest --check", + "postinstall": "CARGO_TERM_PROGRESS_WHEN=never turbo run postinstall", "prune-node-modules": "find . -type d -name \"node_modules\" -exec rm -rf {} +", "start": "CARGO_TERM_PROGRESS_WHEN=never turbo run start start:healthcheck --filter @apps/hash-graph --filter @apps/hash-api --filter @apps/hash-ai-worker-ts --filter @apps/hash-integration-worker --filter @apps/hash-frontend --env-mode=loose", "start:backend": "CARGO_TERM_PROGRESS_WHEN=never turbo run start start:healthcheck --filter @apps/hash-api --env-mode=loose", diff --git a/tests/graph/benches/LICENSE.md b/tests/graph/benches/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/tests/graph/benches/LICENSE.md +++ b/tests/graph/benches/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/tests/graph/http/LICENSE.md b/tests/graph/http/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/tests/graph/http/LICENSE.md +++ b/tests/graph/http/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/tests/graph/integration/LICENSE.md b/tests/graph/integration/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/tests/graph/integration/LICENSE.md +++ b/tests/graph/integration/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/tests/graph/test-data/rust/LICENSE.md b/tests/graph/test-data/rust/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/tests/graph/test-data/rust/LICENSE.md +++ b/tests/graph/test-data/rust/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/tests/hash-backend-integration/LICENSE.md b/tests/hash-backend-integration/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/tests/hash-backend-integration/LICENSE.md +++ b/tests/hash-backend-integration/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/tests/hash-backend-integration/src/tests/email.test.ts b/tests/hash-backend-integration/src/tests/email.test.ts index 4850241d1bc..2d4070c6af3 100644 --- a/tests/hash-backend-integration/src/tests/email.test.ts +++ b/tests/hash-backend-integration/src/tests/email.test.ts @@ -1,5 +1,4 @@ import "./load-test-env"; - import { AwsSesEmailTransporter } from "@apps/hash-api/src/email/transporters"; import { getAwsRegion } from "@local/hash-backend-utils/aws-config"; import { getRequiredEnv } from "@local/hash-backend-utils/environment"; diff --git a/tests/hash-backend-load/LICENSE.md b/tests/hash-backend-load/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/tests/hash-backend-load/LICENSE.md +++ b/tests/hash-backend-load/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability diff --git a/tests/hash-playwright/LICENSE.md b/tests/hash-playwright/LICENSE.md index c7d627721e2..9a70d795493 100644 --- a/tests/hash-playwright/LICENSE.md +++ b/tests/hash-playwright/LICENSE.md @@ -1,5 +1,4 @@ -GNU Affero General Public License -================================= +# GNU Affero General Public License _Version 3, 19 November 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ @@ -14,13 +13,13 @@ software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new @@ -34,8 +33,8 @@ and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its @@ -43,14 +42,14 @@ source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. @@ -68,12 +67,12 @@ modification follow. works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and +License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a “modified version” of the +exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based @@ -82,12 +81,12 @@ on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” @@ -95,14 +94,14 @@ to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work -for making modifications to it. “Object code” means any non-source +for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official @@ -115,7 +114,7 @@ than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to @@ -124,10 +123,10 @@ produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, @@ -145,25 +144,25 @@ same work. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law @@ -201,23 +200,23 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -* **a)** The work must carry prominent notices stating that you modified -it, and giving a relevant date. -* **b)** The work must carry prominent notices stating that it is -released under this License and any conditions added under section 7. -This requirement modifies the requirement in section 4 to -“keep intact all notices”. -* **c)** You must license the entire work, as a whole, under this -License to anyone who comes into possession of a copy. This -License will therefore apply, along with any applicable section 7 -additional terms, to the whole of the work, and all its parts, -regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not -invalidate such permission if you have separately received it. -* **d)** If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive -interfaces that do not display Appropriate Legal Notices, your -work need not make them do so. +- **a)** The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- **b)** The work must carry prominent notices stating that it is + released under this License and any conditions added under section 7. + This requirement modifies the requirement in section 4 to + “keep intact all notices”. +- **c)** You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- **d)** If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, @@ -225,7 +224,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -236,42 +235,42 @@ of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -* **a)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the -Corresponding Source fixed on a durable physical medium -customarily used for software interchange. -* **b)** Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a -written offer, valid for at least three years and valid for as -long as you offer spare parts or customer support for that product -model, to give anyone who possesses the object code either **(1)** a -copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical -medium customarily used for software interchange, for a price no -more than your reasonable cost of physically performing this -conveying of source, or **(2)** access to copy the -Corresponding Source from a network server at no charge. -* **c)** Convey individual copies of the object code with a copy of the -written offer to provide the Corresponding Source. This -alternative is allowed only occasionally and noncommercially, and -only if you received the object code with such an offer, in accord -with subsection 6b. -* **d)** Convey the object code by offering access from a designated -place (gratis or for a charge), and offer equivalent access to the -Corresponding Source in the same way through the same place at no -further charge. You need not require recipients to copy the -Corresponding Source along with the object code. If the place to -copy the object code is a network server, the Corresponding Source -may be on a different server (operated by you or a third party) -that supports equivalent copying facilities, provided you maintain -clear directions next to the object code saying where to find the -Corresponding Source. Regardless of what server hosts the -Corresponding Source, you remain obligated to ensure that it is -available for as long as needed to satisfy these requirements. -* **e)** Convey the object code using peer-to-peer transmission, provided -you inform other peers where the object code and Corresponding -Source of the work are being offered to the general public at no -charge under subsection 6d. +- **a)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- **b)** Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either **(1)** a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or **(2)** access to copy the + Corresponding Source from a network server at no charge. +- **c)** Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- **d)** Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- **e)** Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be @@ -280,12 +279,12 @@ included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. @@ -293,7 +292,7 @@ the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. @@ -304,7 +303,7 @@ part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). @@ -312,7 +311,7 @@ been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. @@ -329,15 +328,15 @@ unpacking, reading or copying. License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. @@ -345,29 +344,29 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -* **a)** Disclaiming warranty or limiting liability differently from the -terms of sections 15 and 16 of this License; or -* **b)** Requiring preservation of specified reasonable legal notices or -author attributions in that material or in the Appropriate Legal -Notices displayed by works containing it; or -* **c)** Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in -reasonable ways as different from the original version; or -* **d)** Limiting the use for publicity purposes of names of licensors or -authors of the material; or -* **e)** Declining to grant rights under trademark law for use of some -trade names, trademarks, or service marks; or -* **f)** Requiring indemnification of licensors and authors of that -material by anyone who conveys the material (or modified versions of -it) with contractual assumptions of liability to the recipient, for -any liability that these contractual assumptions directly impose on -those licensors and authors. +- **a)** Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- **b)** Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- **c)** Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- **d)** Limiting the use for publicity purposes of names of licensors or + authors of the material; or +- **e)** Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- **f)** Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does @@ -385,7 +384,7 @@ the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). @@ -406,31 +405,31 @@ your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -439,7 +438,7 @@ Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that @@ -449,7 +448,7 @@ sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims @@ -457,7 +456,7 @@ owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -470,7 +469,7 @@ propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To “grant” such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -482,7 +481,7 @@ then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. “Knowingly relying” means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -499,7 +498,7 @@ work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -519,10 +518,10 @@ otherwise be available to you under applicable patent law. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @@ -535,7 +534,7 @@ interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. @@ -543,7 +542,7 @@ following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. @@ -551,16 +550,16 @@ but the work with which it is combined will remain governed by version ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. @@ -570,19 +569,19 @@ public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability From cc9b6cff2824dd74aa6c57e03b870173b76801e5 Mon Sep 17 00:00:00 2001 From: Bilal Mahmoud <7252775+indietyp@users.noreply.github.com> Date: Wed, 13 May 2026 11:07:56 +0200 Subject: [PATCH 07/14] fix: warning --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 83701b384f0..6e26b92fd95 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "tests/**" ] }, + "type": "module", "scripts": { "agents:skill-management": "yarn workspace @local/repo-chores exe scripts/skill-management.ts", "agents:symlink-rules": "yarn workspace @local/repo-chores exe scripts/symlink-agent-rules.ts", From 32fe94678ceb9cfcff99e6059ce1485375a1c8b0 Mon Sep 17 00:00:00 2001 From: Bilal Mahmoud <7252775+indietyp@users.noreply.github.com> Date: Wed, 13 May 2026 11:15:33 +0200 Subject: [PATCH 08/14] chore: remove clashing markdownlint remove --- .markdownlint-cli2.jsonc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.markdownlint-cli2.jsonc b/.markdownlint-cli2.jsonc index 80b13ad117c..7b8c264cd37 100644 --- a/.markdownlint-cli2.jsonc +++ b/.markdownlint-cli2.jsonc @@ -21,7 +21,8 @@ "ol-prefix": { "style": "ordered" }, - "single-title": false + "single-title": false, + "table-column-style": false }, "gitignore": true, "globs": ["*.md", "**/*.md", "**/*.mdc"], From d876880653b3b83b9a6a8cc339ceb4cb81db4306 Mon Sep 17 00:00:00 2001 From: Bilal Mahmoud <7252775+indietyp@users.noreply.github.com> Date: Wed, 13 May 2026 11:21:18 +0200 Subject: [PATCH 09/14] chore: so what if we are not a module? --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 6e26b92fd95..83701b384f0 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,6 @@ "tests/**" ] }, - "type": "module", "scripts": { "agents:skill-management": "yarn workspace @local/repo-chores exe scripts/skill-management.ts", "agents:symlink-rules": "yarn workspace @local/repo-chores exe scripts/symlink-agent-rules.ts", From a0dd1fe3e3e55e27d3d4b7033db255d85dd7c324 Mon Sep 17 00:00:00 2001 From: Bilal Mahmoud <7252775+indietyp@users.noreply.github.com> Date: Wed, 13 May 2026 11:24:11 +0200 Subject: [PATCH 10/14] fix: wrong template --- .claude/skills/skill-creator/assets/SKILL.template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.claude/skills/skill-creator/assets/SKILL.template.md b/.claude/skills/skill-creator/assets/SKILL.template.md index 15b025fa847..c38460d1227 100644 --- a/.claude/skills/skill-creator/assets/SKILL.template.md +++ b/.claude/skills/skill-creator/assets/SKILL.template.md @@ -1,5 +1,5 @@ --- -name: { { skill_name } } +name: "{{skill_name}}" description: "[TODO: Complete and informative explanation of what the skill does and when to use it. Include WHEN to use this skill - specific scenarios, file types, or tasks that trigger it.]" # license: Apache-2.0 # Uncomment and set license if needed metadata: From 91666336ef7da3f957049c810b769d1c2b67c802 Mon Sep 17 00:00:00 2001 From: Bilal Mahmoud <7252775+indietyp@users.noreply.github.com> Date: Wed, 13 May 2026 11:45:54 +0200 Subject: [PATCH 11/14] feat: import sorting --- libs/@local/eslint/src/deprecated/base.ts | 5 +++-- libs/@local/eslint/src/import.ts | 19 +++---------------- oxfmt.config.ts | 12 +++++++++++- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/libs/@local/eslint/src/deprecated/base.ts b/libs/@local/eslint/src/deprecated/base.ts index bc8b381f4e3..3d896073b22 100644 --- a/libs/@local/eslint/src/deprecated/base.ts +++ b/libs/@local/eslint/src/deprecated/base.ts @@ -340,8 +340,9 @@ export const create = (projectDirectory: string) => }, ], - "simple-import-sort/exports": "error", - "simple-import-sort/imports": "error", + // Import sorting is handled by oxfmt + "simple-import-sort/exports": "off", + "simple-import-sort/imports": "off", "unicorn/filename-case": "error", "unicorn/import-style": [ diff --git a/libs/@local/eslint/src/import.ts b/libs/@local/eslint/src/import.ts index 7be43759235..a076015a510 100644 --- a/libs/@local/eslint/src/import.ts +++ b/libs/@local/eslint/src/import.ts @@ -7,21 +7,8 @@ export const importPlugin = ( ...config, { rules: { - "import/order": [ - "error", - { - "newlines-between": "always", - // This is the same as the default, but with `internal` added - groups: [ - "builtin", - "external", - "internal", - "parent", - "sibling", - "index", - ], - }, - ], + // Import ordering is handled by oxfmt + "import/order": "off", // This clashes directly with file name endings as `./index.js` is required "import/no-useless-path-segments": ["error", { noUselessIndex: false }], // We no longer want to use CommonJS or AMD @@ -29,7 +16,7 @@ export const importPlugin = ( "import/no-amd": "error", // We want to avoid circular dependencies "import/no-cycle": "error", - // We have custom import/order rules that clash with `simple-import-sort` + // Import sorting is handled by oxfmt "simple-import-sort/imports": "off", }, }, diff --git a/oxfmt.config.ts b/oxfmt.config.ts index dfd50b43d67..580a9b04083 100644 --- a/oxfmt.config.ts +++ b/oxfmt.config.ts @@ -23,7 +23,17 @@ export default defineConfig({ singleAttributePerLine: false, // Sorting - sortImports: true, + sortImports: { + newlinesBetween: true, + internalPattern: ["@local/", "@hashintel/", "@blockprotocol/", "@apps/"], + groups: [ + "value-builtin", + "value-external", + "value-internal", + ["value-parent", "value-sibling", "value-index"], + "unknown", + ], + }, sortTailwindcss: true, sortPackageJson: { sortScripts: true, From 7d6aed119fd17ef0688818e75515aa79b8cd2249 Mon Sep 17 00:00:00 2001 From: Bilal Mahmoud <7252775+indietyp@users.noreply.github.com> Date: Wed, 13 May 2026 11:47:27 +0200 Subject: [PATCH 12/14] fix: import sorting --- .../scripts/compare-llm-response.ts | 8 +- .../scripts/compare-llm-response/types.ts | 3 +- .../scripts/sanitize-html.ts | 4 +- apps/hash-ai-worker-ts/src/activities.ts | 43 +++++----- .../src/activities/flow-activities.ts | 8 +- .../flow-activities/answer-question-action.ts | 20 ++--- .../generate-flow-run-name-activity.ts | 15 ++-- .../generate-web-queries-action.ts | 8 +- .../get-file-from-url-action.ts | 6 +- .../get-web-page-by-url-action.ts | 5 +- .../get-web-page-summary-action.ai.test.ts | 8 +- .../get-web-page-summary-action.ts | 8 +- .../infer-entities-from-content-action.ts | 29 +++---- .../infer-metadata-from-document-action.ts | 30 +++---- .../generate-proposed-entities-and-claims.ts | 32 ++++---- .../get-llm-analysis-of-doc.ts | 38 ++++----- .../persist-entities-action.ts | 16 ++-- .../flow-activities/persist-entity-action.ts | 32 ++++---- ...cess-automatic-browsing-settings-action.ts | 9 ++- .../research-entities-action.ai.test.ts | 1 + .../research-entities-action.ts | 11 +-- .../research-entities-action/checkpoints.ts | 14 ++-- .../coordinating-agent.ts | 38 ++++----- .../check-delegated-tasks-agent.ts | 7 +- .../coordinating-agent/create-initial-plan.ts | 17 ++-- .../coordinating-agent/generate-messages.ts | 11 +-- .../process-complete-tool-call.ts | 1 + .../request-coordinator-actions.ts | 13 +-- .../summarize-existing-entities.ai.test.ts | 3 +- .../summarize-existing-entities.ts | 7 +- .../update-state-from-inferred-claims.ts | 17 ++-- .../link-follower-agent.ai.test.ts | 3 +- .../link-follower-agent.ts | 20 ++--- ...ant-links-from-content.optimize.ai.test.ts | 7 +- .../choose-relevant-links-from-content.ts | 5 +- .../filter-and-rank-text-chunks-agent.ts | 5 +- .../get-link-follower-next-tool-calls.ts | 14 ++-- .../llama-index/index-pdf-file.ts | 3 +- .../shared/check-if-worker-should-stop.ts | 14 ++-- .../shared/coordinator-tools.ts | 18 +++-- .../get-tool-call-results.ts | 9 ++- .../shared/coordinators.ts | 15 ++-- .../shared/deduplicate-claims.ts | 19 ++--- .../shared/deduplicate-entities.ai.test.ts | 8 +- .../shared/deduplicate-entities.ts | 10 ++- .../shared/handle-web-search-tool-call.ts | 18 +++-- .../shared/simplify-for-llm-consumption.ts | 8 +- .../sub-coordinating-agent.ai.test.ts | 1 + .../sub-coordinating-agent.ts | 14 ++-- .../create-initial-plan.ts | 11 +-- .../generate-messages.ts | 9 ++- .../request-sub-coordinator-actions.ts | 7 +- .../sub-coordinator-tools.ts | 10 +-- .../shared/create-file-entity-from-url.ts | 26 +++--- .../flow-activities/shared/graph-requests.ts | 17 ++-- .../infer-summaries-then-claims-from-text.ts | 10 +-- .../get-entity-summaries-from-text.ai.test.ts | 3 +- ...ty-summaries-from-text.optimize.ai.test.ts | 5 +- .../get-entity-summaries-from-text.ts | 18 +++-- .../infer-entity-claims-from-text-agent.ts | 30 +++---- .../infer-entity-claims-from-text.ai.test.ts | 6 +- ...summaries-then-claims-from-text.ai.test.ts | 6 +- .../shared/propose-entities-from-claims.ts | 18 ++--- .../propose-entities-from-claims.ai.test.ts | 8 +- .../propose-entity-from-claims-agent.ts | 32 ++++---- .../propose-entity-from-claims.ai.test.ts | 18 +++-- .../flow-activities/web-search-action.ts | 10 ++- .../write-google-sheet-action.ts | 36 +++++---- .../convert-csv-to-sheet-requests.ts | 5 +- .../convert-subgraph-to-sheet-requests.ts | 19 ++--- .../get-filter-from-bp-query-entity.ts | 9 ++- .../get-subgraph-from-filter.ts | 5 +- .../shared/create-sheet-data.ts | 3 +- .../get-ai-assistant-account-id-activity.ts | 5 +- .../get-dereferenced-entity-types-activity.ts | 10 ++- .../get-web-page-activity.ai.test.ts | 3 +- .../src/activities/get-web-page-activity.ts | 18 +++-- .../hash-ai-worker-ts/src/activities/graph.ts | 51 ++++++------ .../infer-entities-from-web-page-activity.ts | 16 ++-- .../infer-entity-summaries-from-web-page.ts | 9 ++- .../infer-entities/infer-entity-summaries.ts | 30 +++---- .../generate-summary-tools.ts | 13 +-- .../infer-entities/inference-types.ts | 7 +- .../generate-persist-entities-tools.ts | 3 +- .../infer-entities/propose-entities.ts | 28 ++++--- .../shared/generate-propose-entities-tools.ts | 12 +-- .../strip-ids-from-dereferenced-properties.ts | 3 +- .../src/activities/parse-text-from-file.ts | 20 ++--- .../src/activities/shared/activity-logger.ts | 3 +- .../create-inferred-entity-notification.ts | 3 +- .../shared/dereference-entity-type.test.ts | 8 +- .../shared/dereference-entity-type.ts | 25 +++--- .../src/activities/shared/embeddings.ts | 6 +- .../activities/shared/find-existing-entity.ts | 27 ++++--- .../activities/shared/get-entity-by-filter.ts | 5 +- .../src/activities/shared/get-flow-context.ts | 14 ++-- .../src/activities/shared/get-llm-response.ts | 18 +++-- .../get-llm-response/anthropic-client.ts | 6 +- .../check-web-service-usage-not-exceeded.ts | 7 +- .../get-anthropic-response.ts | 31 +++---- .../get-google-ai-response.ts | 5 +- .../google-cloud-storage.ts | 5 +- .../map-google-messages-to-llm-messages.ts | 6 +- .../map-parts-and-upload-files.ts | 8 +- .../rewrite-schema-for-google.ts | 7 +- .../get-llm-response/get-openai-reponse.ts | 21 ++--- .../google-vertex-ai-client.ts | 3 +- .../get-llm-response/log-llm-request.ts | 1 + .../shared/get-llm-response/types.ts | 10 +-- .../shared/get-llm-response/validation.ts | 3 +- .../inference-model-alias-to-llm-model.ts | 3 +- .../judge-test-data.ts | 3 +- .../judge-ai-output.optimize.ai.test.ts | 6 +- .../src/activities/shared/judge-ai-outputs.ts | 5 +- .../src/activities/shared/log-progress.ts | 8 +- .../map-action-input-entities-to-entities.ts | 7 +- .../match-existing-entity.optimize.ai.test.ts | 24 +++--- .../shared/match-existing-entity.ts | 22 ++--- .../shared/optimize-system-prompt.ts | 3 +- .../improve-system-prompt.ts | 3 +- .../shared/request-external-input.ts | 14 ++-- .../shared/use-file-system-file-from-url.ts | 7 +- apps/hash-ai-worker-ts/src/instrument.ts | 3 +- apps/hash-ai-worker-ts/src/main.ts | 8 +- apps/hash-ai-worker-ts/src/shared/queries.ts | 3 +- apps/hash-ai-worker-ts/src/shared/signals.ts | 6 +- .../get-alice-user-account-id.ts | 3 +- .../mock-get-flow-context.ts | 20 ++--- apps/hash-ai-worker-ts/src/workflows.ts | 36 +++++---- .../src/workflows/run-flow-workflow.ts | 20 ++--- .../set-query-and-signal-handlers.ts | 12 +-- apps/hash-ai-worker-ts/vitest.config.ts | 5 +- apps/hash-api/codegen.config.ts | 3 +- .../src/ai/gpt/generate-hashgpt-schema.ts | 3 +- apps/hash-api/src/ai/gpt/gpt-get-user-webs.ts | 4 +- .../hash-api/src/ai/gpt/gpt-query-entities.ts | 29 +++---- apps/hash-api/src/ai/gpt/gpt-query-types.ts | 13 +-- apps/hash-api/src/ai/gpt/shared/webs.ts | 6 +- .../src/ai/gpt/upsert-gpt-oauth-client.ts | 3 +- .../src/ai/infer-entities-websocket.ts | 25 +++--- .../handle-cancel-infer-entities-request.ts | 6 +- .../handle-infer-entities-request.ts | 19 ++--- .../hash-api/src/auth/create-auth-handlers.ts | 18 +++-- .../create-unverified-email-cleanup-job.ts | 9 ++- apps/hash-api/src/auth/get-actor-id.ts | 1 + .../src/auth/oauth-consent-handlers.ts | 3 +- apps/hash-api/src/auth/ory-kratos.ts | 6 +- ...-protocol-external-service-method-proxy.ts | 4 +- .../src/email/create-email-transporter.ts | 1 + .../transporters/aws-ses-email-transporter.ts | 3 +- .../transporters/dummy-email-transporter.ts | 1 + .../transporters/smtp-email-transporter.ts | 6 +- .../src/ensure-system-graph-is-initialized.ts | 3 +- apps/hash-api/src/express.d.ts | 5 +- .../src/generate-ontology-type-ids.ts | 21 ++--- .../ensure-system-graph-is-initialized.ts | 6 +- .../migrate-ontology-types.ts | 9 ++- ...reate-first-custom-data-types.migration.ts | 3 +- .../001-create-hash-system-types.migration.ts | 3 +- ...03-create-linear-system-types.migration.ts | 3 +- ...-create-machines-update-users.migration.ts | 5 +- ...-system-entities-and-web-bots.migration.ts | 3 +- ...007-create-api-usage-tracking.migration.ts | 7 +- ...-plugin-settings-update-users.migration.ts | 5 +- ...ad-completed-at-property-type.migration.ts | 5 +- .../010-create-office-file-types.migration.ts | 3 +- .../011-deprecate-preferred-name.migration.ts | 5 +- ...te-google-sheets-system-types.migration.ts | 3 +- ...nabled-feature-flags-property.migration.ts | 5 +- ...use-case-form-and-example-org.migration.ts | 3 +- ...lication-preferences-property.migration.ts | 5 +- ...-doc-company-and-person-types.migration.ts | 3 +- ...0-add-integration-parent-type.migration.ts | 5 +- .../021-add-org-invites.migration.ts | 5 +- ...ns-completed-to-hash-instance.migration.ts | 3 +- ...create-more-custom-data-types.migration.ts | 3 +- .../024-add-flow-types.migration.ts | 5 +- ...086-add-study-record-type.dev.migration.ts | 3 +- ...itial-currency-data-types.dev.migration.ts | 3 +- .../090-add-aviation-types.dev.migration.ts | 3 +- .../091-add-petri-nets.dev.migration.ts | 3 +- .../migrate-ontology-types/types.ts | 3 +- .../migrate-ontology-types/util.ts | 67 ++++++++-------- .../util/upgrade-entities.ts | 15 ++-- .../util/upgrade-entity-type-dependencies.ts | 5 +- .../system-webs-and-entities.ts | 17 ++-- .../src/graph/knowledge/primitive/entity.ts | 67 ++++++++-------- .../entity/after-create-entity-hooks.ts | 7 +- .../entity/after-update-entity-hooks.ts | 1 + ...ument-after-update-entity-hook-callback.ts | 8 +- .../text-after-update-entity-hook-callback.ts | 7 +- .../user-after-update-entity-hook.ts | 3 +- .../entity/before-update-entity-hooks.ts | 1 + ...user-before-update-entity-hook-callback.ts | 18 +++-- .../primitive/entity/create-entity-hooks.ts | 3 +- .../entity/shared/mention-notification.ts | 11 +-- .../primitive/entity/update-entity-hooks.ts | 3 +- .../graph/knowledge/primitive/link-entity.ts | 11 +-- .../knowledge/system-types/account.fields.ts | 5 +- .../system-types/block-collection.ts | 21 ++--- .../src/graph/knowledge/system-types/block.ts | 21 ++--- .../graph/knowledge/system-types/comment.ts | 39 ++++----- .../src/graph/knowledge/system-types/file.ts | 34 ++++---- .../knowledge/system-types/flow-schedule.ts | 27 ++++--- .../knowledge/system-types/hash-instance.ts | 9 ++- .../system-types/linear-integration-entity.ts | 29 +++---- .../system-types/linear-user-secret.ts | 21 ++--- .../knowledge/system-types/notification.ts | 35 ++++---- .../knowledge/system-types/org-membership.ts | 29 +++---- .../src/graph/knowledge/system-types/org.ts | 35 ++++---- .../src/graph/knowledge/system-types/page.ts | 32 ++++---- .../src/graph/knowledge/system-types/text.ts | 19 ++--- .../knowledge/system-types/user-secret.ts | 21 ++--- .../src/graph/knowledge/system-types/user.ts | 33 ++++---- .../src/graph/ontology/primitive/data-type.ts | 21 ++--- .../graph/ontology/primitive/entity-type.ts | 33 ++++---- .../graph/ontology/primitive/property-type.ts | 17 ++-- .../src/graph/ontology/primitive/util.ts | 2 +- apps/hash-api/src/graph/system-account.ts | 3 +- apps/hash-api/src/graphql/context.ts | 7 +- .../src/graphql/create-apollo-server.ts | 22 ++--- .../resolvers/blockprotocol/get-block.ts | 3 +- .../src/graphql/resolvers/embed/index.ts | 3 +- .../graphql/resolvers/flows/cancel-flow.ts | 5 +- .../graphql/resolvers/flows/flow-schedule.ts | 10 ++- .../resolvers/flows/get-flow-run-by-id.ts | 9 ++- .../graphql/resolvers/flows/get-flow-runs.ts | 5 +- .../src/graphql/resolvers/flows/reset-flow.ts | 10 ++- .../shared/were-detailed-fields-requested.ts | 6 +- .../src/graphql/resolvers/flows/start-flow.ts | 13 +-- .../flows/submit-external-input-response.ts | 5 +- .../resolvers/generation/generate-inverse.ts | 5 +- .../resolvers/generation/generate-plural.ts | 5 +- .../generation/is-generation-available.ts | 4 +- apps/hash-api/src/graphql/resolvers/index.ts | 15 ++-- .../linear/linear-organization.ts | 3 +- .../sync-linear-integration-with-webs.ts | 13 +-- .../block-collection-contents.ts | 14 ++-- .../update-block-collection-actions.ts | 30 +++---- .../update-block-collection-contents.ts | 16 ++-- .../resolvers/knowledge/block/block.ts | 3 +- .../resolvers/knowledge/block/data-entity.ts | 6 +- .../resolvers/knowledge/comment/author.ts | 6 +- .../resolvers/knowledge/comment/comment.ts | 5 +- .../resolvers/knowledge/comment/delete.ts | 5 +- .../resolvers/knowledge/comment/has-text.ts | 6 +- .../resolvers/knowledge/comment/parent.ts | 6 +- .../resolvers/knowledge/comment/replies.ts | 5 +- .../resolvers/knowledge/comment/resolve.ts | 5 +- .../knowledge/comment/text-updated-at.ts | 3 +- .../knowledge/comment/update-text.ts | 5 +- .../resolvers/knowledge/entity/entity.ts | 11 +-- .../knowledge/entity/get-entity-diffs.ts | 1 + .../knowledge/file/create-file-from-url.ts | 9 ++- .../knowledge/file/request-file-upload.ts | 7 +- .../resolvers/knowledge/file/shared.ts | 5 +- .../knowledge/hash-instance/hash-instance.ts | 3 +- .../knowledge/org/accept-org-invitation.ts | 9 ++- .../resolvers/knowledge/org/create-org.ts | 6 +- .../knowledge/org/decline-org-invitation.ts | 8 +- .../org/get-my-pending-invitations.ts | 6 +- .../get-pending-invitation-by-entity-id.ts | 8 +- .../knowledge/org/invite-user-to-org.ts | 24 +++--- .../knowledge/org/remove-user-from-org.ts | 7 +- .../graphql/resolvers/knowledge/org/shared.ts | 21 ++--- .../resolvers/knowledge/page/page-contents.ts | 11 +-- .../graphql/resolvers/knowledge/page/page.ts | 5 +- .../knowledge/page/set-parent-page.ts | 7 +- .../resolvers/knowledge/page/update-page.ts | 5 +- .../knowledge/shared/check-permissions.ts | 8 +- .../get-user-permissions-on-subgraph.ts | 11 +-- .../knowledge/user/get-usage-records.ts | 7 +- .../knowledge/user/get-waitlist-position.ts | 2 +- .../knowledge/user/has-access-to-hash.ts | 3 +- .../knowledge/user/is-shortname-taken.ts | 3 +- .../graphql/resolvers/knowledge/user/me.ts | 3 +- .../user/submit-early-access-form.ts | 7 +- .../middlewares/logged-in-and-signed-up.ts | 5 +- .../resolvers/middlewares/logged-in.ts | 3 +- .../resolvers/middlewares/signed-up.ts | 3 +- .../graphql/resolvers/ontology/data-type.ts | 23 +++--- .../graphql/resolvers/ontology/entity-type.ts | 25 +++--- .../resolvers/ontology/property-type.ts | 13 +-- apps/hash-api/src/index.ts | 44 +++++----- apps/hash-api/src/instrument.mjs | 11 +-- .../integrations/google/check-access-token.ts | 4 +- .../integrations/google/get-access-token.ts | 4 +- .../src/integrations/google/oauth-callback.ts | 16 ++-- .../shared/get-or-check-access-token.ts | 3 +- apps/hash-api/src/integrations/linear.ts | 6 +- .../hash-api/src/integrations/linear/oauth.ts | 24 +++--- .../src/integrations/linear/sync-back.ts | 9 ++- .../src/integrations/linear/webhook.ts | 9 ++- .../src/integrations/sync-back-watcher.ts | 9 ++- apps/hash-api/src/lib/config.ts | 3 +- apps/hash-api/src/seed-data/index.ts | 11 +-- .../src/seed-data/seed-flow-test-types.ts | 11 +-- apps/hash-api/src/seed-data/seed-pages.ts | 12 +-- apps/hash-api/src/seed-data/seed-users.ts | 11 +-- .../src/shared/user-has-access-to-hash.ts | 6 +- apps/hash-api/src/storage/index.ts | 21 ++--- .../src/storage/local-file-storage.ts | 10 ++- apps/hash-api/src/telemetry/rudderstack.ts | 3 +- apps/hash-api/src/telemetry/snowplow-setup.ts | 3 +- apps/hash-frontend/codegen.config.ts | 3 +- .../src/blocks/on-block-loaded.tsx | 3 +- .../src/blocks/use-fetch-block-subgraph.ts | 27 ++++--- apps/hash-frontend/src/blocks/user-blocks.tsx | 20 ++--- .../components/block-loader/block-loader.tsx | 74 ++++++++--------- .../block-loader/fetch-embed-code.ts | 3 +- .../src/components/confirmation-alert.tsx | 3 +- .../components/dropdowns/version-dropdown.tsx | 1 + .../components/error-block/error-block.tsx | 4 +- .../src/components/forms/select-input.tsx | 3 +- .../src/components/forms/tags-input.tsx | 3 +- .../src/components/forms/text-input.tsx | 3 +- .../src/components/grid/grid.tsx | 48 +++++------ .../src/components/grid/utils.ts | 3 +- .../grid/utils/column-filter-menu.tsx | 8 +- .../components/grid/utils/conversion-menu.tsx | 6 +- .../grid/utils/custom-grid-icons.ts | 3 +- .../grid/utils/draw-chip-with-icon.ts | 9 ++- .../grid/utils/draw-chip-with-text.ts | 4 +- .../src/components/grid/utils/draw-chip.ts | 4 +- .../grid/utils/draw-text-with-icon.ts | 4 +- .../components/grid/utils/draw-url-as-link.ts | 3 +- .../utils/draw-vertical-indentation-line.ts | 4 +- .../grid/utils/interactable-manager.ts | 17 ++-- .../grid/utils/interactable-manager/utils.ts | 11 ++- .../grid/utils/override-custom-renderers.tsx | 3 +- .../src/components/grid/utils/sorting.ts | 3 +- .../components/grid/utils/use-draw-header.ts | 15 ++-- .../grid/utils/use-grid-tooltip.tsx | 8 +- .../draw-interactable-tooltip-icons.ts | 4 +- .../grid/utils/use-grid-tooltip/types.ts | 3 +- .../knowledge/knowledge-shim.ts | 9 +-- .../use-block-protocol-archive-entity.ts | 3 +- .../use-block-protocol-create-entity.ts | 14 ++-- .../use-block-protocol-file-upload.ts | 18 +++-- .../use-block-protocol-get-entity.ts | 3 +- .../use-block-protocol-query-entities.ts | 6 +- .../use-block-protocol-update-entity.ts | 6 +- .../use-block-protocol-create-entity-type.ts | 5 +- ...use-block-protocol-create-property-type.ts | 5 +- .../use-block-protocol-get-data-type.ts | 6 +- .../use-block-protocol-get-entity-type.ts | 6 +- .../use-block-protocol-get-property-type.ts | 6 +- .../use-block-protocol-query-data-types.ts | 6 +- .../use-block-protocol-query-entity-types.ts | 6 +- ...use-block-protocol-query-property-types.ts | 6 +- .../use-block-protocol-update-entity-type.ts | 3 +- ...use-block-protocol-update-property-type.ts | 3 +- .../hooks/shared/get-page-refetch-queries.ts | 6 +- .../src/components/hooks/use-account-pages.ts | 18 +++-- .../src/components/hooks/use-archive-page.ts | 14 ++-- .../components/hooks/use-create-comment.ts | 9 ++- .../src/components/hooks/use-create-page.ts | 16 ++-- .../components/hooks/use-create-sub-page.ts | 16 ++-- .../components/hooks/use-default-state.tsx | 3 +- .../components/hooks/use-delete-comment.ts | 7 +- .../src/components/hooks/use-entity-by-id.ts | 13 +-- .../hooks/use-font-loaded-callback.ts | 3 +- .../hooks/use-get-account-id-for-shortname.ts | 6 +- .../hooks/use-get-block-protocol-blocks.ts | 3 +- .../hooks/use-get-owner-for-entity.ts | 6 +- .../src/components/hooks/use-hash-instance.ts | 10 ++- .../components/hooks/use-orgs-with-links.ts | 12 +-- .../src/components/hooks/use-orgs.ts | 12 +-- .../src/components/hooks/use-page-comments.ts | 16 ++-- .../src/components/hooks/use-reorder-page.ts | 12 +-- .../components/hooks/use-resolve-comment.ts | 7 +- .../components/hooks/use-shortname-input.ts | 3 +- .../src/components/hooks/use-snackbar.ts | 11 +-- .../hooks/use-update-authenticated-user.ts | 18 +++-- .../hooks/use-update-comment-text.ts | 9 ++- .../components/hooks/use-update-page-title.ts | 7 +- ...se-user-or-org-shortname-by-owned-by-id.ts | 6 +- .../components/hooks/use-users-with-links.ts | 12 +-- .../src/components/hooks/use-users.ts | 12 +-- .../src/components/page-icon.tsx | 8 +- .../remote-block/add-linked-query-prompt.tsx | 3 +- .../remote-block/block-renderer.tsx | 6 +- .../block-renderer/custom-element.tsx | 2 +- .../remote-block/block-renderer/html.tsx | 6 +- .../construct-service-module-callbacks.ts | 3 +- .../remote-block/load-remote-block.ts | 4 +- .../components/remote-block/remote-block.tsx | 24 +++--- .../remote-block/use-remote-block.ts | 3 +- .../sandbox/block-framer/block-framer.tsx | 9 ++- .../sandbox/framed-block/framed-block.tsx | 13 +-- .../resizing-iframe/resizing-iframe.tsx | 3 +- .../src/components/sandbox/types.ts | 3 +- .../src/contexts/collab-position-context.tsx | 3 +- .../src/graphql/queries/user.queries.ts | 1 + apps/hash-frontend/src/lib/routes.ts | 4 +- apps/hash-frontend/src/lib/user-and-org.ts | 32 ++++---- .../src/middleware/return-types-as-json.ts | 24 +++--- .../generate-query-args.ts | 11 +-- apps/hash-frontend/src/pages/404.page.tsx | 5 +- .../src/pages/@/[shortname].page.tsx | 42 +++++----- .../edit-pinned-entity-types-modal.tsx | 40 +++++----- .../edit-user-profile-info-modal.tsx | 10 ++- .../service-accounts-input.tsx | 20 ++--- .../user-profile-info-form.tsx | 24 +++--- .../user-profile-info-modal-header.tsx | 16 ++-- .../pinned-entity-type-tab-contents.tsx | 28 ++++--- .../pages/@/[shortname].page/profile-bio.tsx | 18 +++-- .../[shortname].page/profile-page-content.tsx | 17 ++-- .../[shortname].page/profile-page-header.tsx | 10 ++- .../@/[shortname].page/profile-page-info.tsx | 24 +++--- .../@/[shortname].page/profile-page-tabs.tsx | 5 +- .../pages/@/[shortname].page/profile-tab.tsx | 5 +- .../pages/@/[shortname].page/types-tab.tsx | 4 +- .../pages/@/[shortname]/[page-slug].page.tsx | 36 +++++---- .../[page-slug].page/canvas-page.tsx | 12 +-- .../canvas-page/block-creation-dialog.tsx | 28 ++++--- .../canvas-page/block-shape.tsx | 22 ++--- .../canvas-page/locked-canvas.tsx | 3 +- .../[page-slug].page/canvas-page/shared.ts | 3 +- .../entities/[entity-uuid].page.tsx | 18 +++-- .../[entity-uuid].page/create-entity-page.tsx | 22 ++--- .../create-initial-draft-entity-subgraph.ts | 9 ++- .../select-entity-type-page.tsx | 3 +- .../[shortname]/flows/[flow-def-id].page.tsx | 5 +- .../[shortname]/shared/archive-menu-item.tsx | 15 ++-- .../@/[shortname]/shared/flow-visualizer.tsx | 50 ++++++------ .../shared/flow-visualizer/activity-log.tsx | 72 +++++++++-------- .../shared/flow-visualizer/dag-slide.tsx | 14 ++-- .../shared/flow-visualizer/dag.tsx | 11 +-- .../flow-visualizer/flow-run-sidebar.tsx | 20 ++--- .../flow-run-sidebar/group-status.tsx | 12 +-- .../group-status/group-step-status.tsx | 6 +- .../flow-run-sidebar/manager.tsx | 10 ++- .../manager/resolved-questions-modal.tsx | 3 +- .../shared/flow-visualizer/outputs.tsx | 56 ++++++------- .../flow-visualizer/outputs/claims-output.tsx | 16 ++-- .../flow-visualizer/outputs/deliverables.tsx | 3 +- .../outputs/deliverables/markdown.tsx | 4 +- .../outputs/deliverables/spreadsheet.tsx | 4 +- .../outputs/entity-result-graph.tsx | 10 ++- .../outputs/entity-result-table.tsx | 70 ++++++++-------- .../outputs/entity-result-table/cells.tsx | 12 +-- .../outputs/shared/empty-output-box.tsx | 3 +- .../outputs/shared/output-container.tsx | 5 +- .../outputs/shared/table-skeleton.tsx | 3 +- .../shared/flow-visualizer/run-flow-modal.tsx | 36 +++++---- .../run-flow-modal/manual-trigger-input.tsx | 8 +- .../flow-visualizer/shared/question-modal.tsx | 14 ++-- .../shared/flow-visualizer/shared/types.ts | 3 +- .../shared/flow-visualizer/swimlane.tsx | 10 ++- .../flow-visualizer/swimlane/custom-edge.tsx | 5 +- .../flow-visualizer/swimlane/custom-node.tsx | 26 +++--- .../swimlane/custom-node/handles.tsx | 7 +- .../swimlane/custom-node/node-container.tsx | 7 +- .../swimlane/custom-node/node-styles.ts | 3 +- .../shared/flow-visualizer/topbar.tsx | 38 ++++----- .../shared/section-empty-state.tsx | 4 +- .../shared/use-route-namespace.tsx | 3 +- .../shared/use-update-profile-avatar.tsx | 8 +- .../pages/@/[shortname]/shared/white-chip.tsx | 6 +- .../[...slug-maybe-version].page.tsx | 22 ++--- .../[...slug-maybe-version].page.tsx | 22 ++--- .../types/shared/get-type-base-url.ts | 5 +- .../@/[shortname]/workers/[run-id].page.tsx | 5 +- apps/hash-frontend/src/pages/_app.page.tsx | 40 +++++----- .../src/pages/_app.page/error-fallback.tsx | 3 +- .../src/pages/_document.page.tsx | 3 +- apps/hash-frontend/src/pages/_error.page.tsx | 5 +- apps/hash-frontend/src/pages/actions.page.tsx | 40 +++++----- .../draft-entities-bulk-actions-dropdown.tsx | 36 +++++---- .../actions.page/draft-entities-context.tsx | 16 ++-- .../src/pages/actions.page/draft-entities.tsx | 28 ++++--- .../draft-entities-context-bar.tsx | 7 +- .../draft-entities/draft-entities-filters.tsx | 36 +++++---- .../draft-entities-filters/filter-section.tsx | 2 +- .../src/pages/actions.page/draft-entity.tsx | 14 ++-- .../draft-entity-action-buttons.tsx | 12 +-- .../draft-entity/draft-entity-chip.tsx | 3 +- .../draft-entity/draft-entity-provenance.tsx | 8 +- .../draft-entity/draft-entity-type.tsx | 8 +- .../draft-entity/draft-entity-viewers.tsx | 7 +- .../draft-entity/draft-entity-web.tsx | 8 +- .../src/pages/admin/admin-page-layout.tsx | 6 +- .../src/pages/admin/index.page.tsx | 3 +- .../src/pages/admin/users.page.tsx | 38 ++++----- .../admin/users/[user-entity-uuid].page.tsx | 10 ++- .../pages/admin/users/basic-info-section.tsx | 22 ++--- .../src/pages/change-password.page.tsx | 12 +-- .../hash-frontend/src/pages/entities.page.tsx | 40 +++++----- apps/hash-frontend/src/pages/flows.page.tsx | 16 ++-- apps/hash-frontend/src/pages/goals.page.tsx | 6 +- .../src/pages/goals.page/goals-list.tsx | 6 +- .../goals-list/goal-list-section.tsx | 3 +- .../goals-list/goal-list-section/goal-row.tsx | 12 +-- .../src/pages/goals/new.page.tsx | 56 ++++++------- .../goals/new.page/deliverable-settings.tsx | 16 ++-- .../pages/goals/new.page/file-settings.tsx | 16 ++-- .../goals/new.page/internet-settings.tsx | 5 +- apps/hash-frontend/src/pages/index.page.tsx | 5 +- .../src/pages/index.page/logged-in.tsx | 3 +- .../src/pages/index.page/logged-out.tsx | 3 +- .../pages/index.page/shared/homepage-card.tsx | 3 +- .../pages/index.page/shared/homepage-grid.tsx | 1 + .../pages/index.page/shared/typography.tsx | 3 +- .../src/pages/index.page/shared/uses-card.tsx | 3 +- .../src/pages/index.page/waitlisted.tsx | 22 ++--- .../waitlisted/early-access-modal.tsx | 10 ++- apps/hash-frontend/src/pages/invites.page.tsx | 6 +- .../src/pages/invites.page/invites-table.tsx | 17 ++-- .../src/pages/maintenance.page.tsx | 3 +- apps/hash-frontend/src/pages/me.page.tsx | 3 +- .../src/pages/new/entity.page.tsx | 10 ++- .../src/pages/new/types/data-type.page.tsx | 5 +- .../src/pages/new/types/entity-type.page.tsx | 8 +- .../types/shared/new-type-page-container.tsx | 5 +- apps/hash-frontend/src/pages/notes.page.tsx | 30 +++---- .../convert-quick-note-to-page-modal.tsx | 38 ++++----- .../pages/notes.page/create-quick-note.tsx | 12 +-- .../pages/notes.page/editable-quick-note.tsx | 42 +++++----- .../src/pages/notes.page/notes-section.tsx | 5 +- .../src/pages/notes.page/timestamp-column.tsx | 6 +- .../src/pages/notes.page/today-section.tsx | 5 +- .../src/pages/notifications.page.tsx | 6 +- .../notifications-table.tsx | 20 ++--- .../notifications-with-links-context.tsx | 38 ++++----- apps/hash-frontend/src/pages/process.page.tsx | 3 +- .../process.page/process-editor-wrapper.tsx | 8 +- .../process-edit-bar.tsx | 4 +- .../use-process-save-and-load.tsx | 40 +++++----- .../use-persisted-nets.ts | 10 ++- .../hash-frontend/src/pages/recovery.page.tsx | 10 ++- .../src/pages/settings/index.page.tsx | 3 +- .../src/pages/settings/integrations.page.tsx | 8 +- .../integrations/google-sheets.page.tsx | 3 +- .../create-or-edit-sheets-sync.tsx | 22 ++--- .../google-sheets/use-sheet-integrations.ts | 6 +- .../settings/integrations/linear.page.tsx | 22 ++--- .../settings/integrations/linear/new.page.tsx | 22 ++--- .../linear/select-linear-teams-table.tsx | 18 +++-- .../linear/use-linear-integrations.ts | 26 +++--- .../[shortname]/general.page.tsx | 24 +++--- .../[shortname]/integrations.page.tsx | 24 +++--- .../org-integrations-context-menu.tsx | 9 ++- .../[shortname]/members.page.tsx | 5 +- .../members.page/add-member-form.tsx | 16 ++-- .../[shortname]/members.page/member-row.tsx | 14 ++-- .../pending-invitations-table.tsx | 14 ++-- .../settings/organizations/index.page.tsx | 6 +- .../organizations/index.page/org-row.tsx | 11 +-- .../index.page/org-row/org-context-menu.tsx | 3 +- .../settings/organizations/new/index.page.tsx | 3 +- .../new/index.page/create-org-form.tsx | 7 +- .../organizations/shared/org-form.tsx | 12 +-- .../pages/settings/personalization.page.tsx | 3 +- .../src/pages/settings/security.page.tsx | 12 +-- .../pages/settings/shared/context-menu.tsx | 4 +- .../settings/shared/file-upload-dropzone.tsx | 8 +- .../src/pages/settings/shared/image-field.tsx | 5 +- .../shared/settings-page-container.tsx | 3 +- .../settings/shared/settings-table-cell.tsx | 3 +- .../pages/settings/shared/settings-table.tsx | 3 +- .../shared/accept-draft-entity-button.tsx | 24 +++--- .../src/pages/shared/auth-heading.tsx | 3 +- .../src/pages/shared/auth-info-context.tsx | 36 +++++---- .../src/pages/shared/auth-layout.tsx | 5 +- .../pages/shared/block-collection-contents.ts | 12 +-- .../pages/shared/block-collection-context.tsx | 3 +- .../block-collection/block-collection.tsx | 15 ++-- .../block-config-menu/block-config-menu.tsx | 14 ++-- .../block-context-menu-item.tsx | 6 +- .../block-context-menu/block-context-menu.tsx | 16 ++-- .../block-list-menu-content.tsx | 10 ++- .../block-context-menu/block-loader-input.tsx | 6 +- .../block-select-data-modal.tsx | 44 +++++----- .../load-entity-menu-content.tsx | 38 ++++----- .../shared/block-collection/block-context.tsx | 3 +- .../shared/block-collection/block-handle.tsx | 12 +-- .../shared/block-collection/block-portals.tsx | 3 +- .../shared/block-collection/block-view.tsx | 23 +++--- .../collab-position-indicator.tsx | 1 + .../collab-position-indicators.tsx | 5 +- .../collab/editor-connection.ts | 13 +-- .../collab/use-collab-position-reporter.ts | 3 +- .../collab/use-collab-position-tracking.tsx | 1 + .../collab/use-collab-positions.ts | 8 +- .../comments/comment-action-buttons.tsx | 5 +- ...mment-block-delete-confirmation-dialog.tsx | 3 +- .../comments/comment-block-menu-item.tsx | 3 +- .../comments/comment-block-menu.tsx | 3 +- .../comments/comment-block.tsx | 27 ++++--- .../comments/comment-text-field.tsx | 23 +++--- .../comments/comment-thread.tsx | 17 ++-- .../comments/create-block-comment-button.tsx | 9 ++- .../comments/create-block-comment.tsx | 11 +-- .../block-collection/component-view.tsx | 30 +++---- .../block-collection/create-editor-view.ts | 27 ++++--- .../block-collection/create-error-plugin.tsx | 5 +- .../create-format-plugins/index.tsx | 9 ++- .../create-format-plugins/link-modal.tsx | 3 +- .../create-format-plugins/marks-tooltip.tsx | 6 +- .../create-format-plugins/util.ts | 8 +- .../create-placeholder-plugin.tsx | 8 +- .../create-suggester/block-suggester.tsx | 9 ++- .../create-suggester/create-suggester.tsx | 19 ++--- .../create-suggester/suggester.tsx | 5 +- .../create-text-editor-view.ts | 9 ++- .../focus-page-title-plugin.ts | 1 + .../shared/block-collection/insert-block.tsx | 7 +- .../shared/block-collection/loading-view.tsx | 5 +- .../mention-view/mention-display.tsx | 10 ++- .../mention-view/mention-node-view.ts | 6 +- .../mention-view/mention-view.tsx | 6 +- .../shared/block-collection/page-context.tsx | 3 +- .../page-title/page-title.tsx | 13 +-- .../block-collection/page-title/utils.ts | 4 +- .../shared/mention-suggester.tsx | 52 ++++++------ .../mention-suggester-entity.tsx | 34 ++++---- .../mention-suggester-subheading.tsx | 6 +- .../shared/use-filtered-blocks.tsx | 7 +- .../src/pages/shared/breadcrumbs.tsx | 6 +- .../src/pages/shared/chip-cell.tsx | 10 ++- .../src/pages/shared/claims-table.tsx | 32 ++++---- .../src/pages/shared/clickable-cell-chip.tsx | 6 +- .../pages/shared/copyable-ontology-chip.tsx | 8 +- .../pages/shared/create-data-type-form.tsx | 22 ++--- .../pages/shared/create-entity-type-form.tsx | 28 ++++--- .../src/pages/shared/data-type.tsx | 46 ++++++----- .../data-type/data-type-constraints.tsx | 3 +- .../abstract-constraint.tsx | 3 +- .../number-constraints.tsx | 3 +- .../shared/constraint-text.tsx | 3 +- .../shared/enum-editor.tsx | 16 ++-- .../string-constraints.tsx | 5 +- .../data-type/data-type-conversions.tsx | 32 ++++---- .../conversion-editor.tsx | 26 +++--- .../conversion-target-editor.tsx | 16 ++-- .../shared/data-type/data-type-header.tsx | 8 +- .../data-type-description.tsx | 3 +- .../shared/data-type/data-type-labels.tsx | 6 +- .../shared/data-type/data-type-parents.tsx | 20 ++--- .../shared/data-type/shared/item-label.tsx | 3 +- .../shared/use-inherited-constraints.tsx | 8 +- .../src/pages/shared/data-types-context.tsx | 18 +++-- .../shared/discard-draft-entity-button.tsx | 16 ++-- .../src/pages/shared/entities-visualizer.tsx | 64 ++++++++------- .../entities-visualizer/entities-table.tsx | 80 ++++++++++--------- .../entities-table-value-cell.ts | 16 ++-- .../entities-table-value-cell/popup.tsx | 1 + .../entities-table/grid-view.tsx | 7 +- .../grid-view/grid-view-item-skeleton.tsx | 3 +- .../grid-view/grid-view-item-wrapper.tsx | 5 +- .../grid-view/grid-view-item.tsx | 14 ++-- .../entities-table/text-icon-cell.ts | 6 +- .../generate-table-data-from-rows.ts | 8 +- .../pages/shared/entities-visualizer/types.ts | 3 +- .../use-entities-table-data.tsx | 8 +- .../use-entities-visualizer-data.tsx | 22 ++--- .../pages/shared/entity-graph-visualizer.tsx | 28 ++++--- .../src/pages/shared/entity-selector.tsx | 20 ++--- .../convert-type-menu-item.tsx | 3 +- .../entity-type-page/definition-tab.tsx | 14 ++-- .../use-editor-ontology-functions.ts | 24 +++--- .../entity-type-page/edit-bar-type-editor.tsx | 10 ++- .../shared/entity-type-page/entities-tab.tsx | 6 +- .../entity-type-description.tsx | 4 +- .../entity-type-page/entity-type-inverse.tsx | 6 +- .../entity-type-page/entity-type-plural.tsx | 6 +- .../entity-type-page/entity-type-tabs.tsx | 8 +- .../entity-type-page/file-uploads-tab.tsx | 16 ++-- .../file-uploads-tab/action.tsx | 8 +- .../show-upload-form-button.tsx | 3 +- .../shared/alt-title-group.tsx | 1 + .../shared/entity-type-context.tsx | 3 +- .../shared/entity-type-header.tsx | 18 +++-- .../upgrade-dependents-modal.tsx | 14 ++-- .../use-entity-type-dependents.ts | 22 ++--- .../use-entity-type-value.tsx | 50 ++++++------ .../src/pages/shared/entity-type-selector.tsx | 14 ++-- .../src/pages/shared/entity-type.tsx | 28 ++++--- .../hash-frontend/src/pages/shared/entity.tsx | 24 +++--- .../shared/entity/draft-entity-banner.tsx | 14 ++-- .../src/pages/shared/entity/edit-bar.tsx | 6 +- .../shared/entity/entity-editor-container.tsx | 3 +- .../src/pages/shared/entity/entity-editor.tsx | 36 +++++---- .../entity/entity-editor/claims-section.tsx | 20 ++--- .../entity-editor/entity-editor-context.tsx | 9 ++- .../entity-editor/file-preview-section.tsx | 24 +++--- .../entity/entity-editor/history-section.tsx | 20 ++--- .../history-section/get-history-events.ts | 18 ++--- .../history-section/history-table.tsx | 16 ++-- .../history-table/provenance.tsx | 16 ++-- .../provenance/sources-slideover.tsx | 12 +-- .../history-table/shared/event-detail.tsx | 6 +- .../entity/entity-editor/link-section.tsx | 6 +- .../entity/entity-editor/links-section.tsx | 6 +- .../links-section/incoming-links-section.tsx | 6 +- .../incoming-links-table.tsx | 58 +++++++------- .../links-section/outgoing-links-section.tsx | 14 ++-- .../outgoing-links-section/cells/link-cell.ts | 4 +- .../cells/linked-with-cell.ts | 10 ++- .../linked-entity-list-editor.tsx | 22 ++--- .../linked-entity-list-row.tsx | 3 +- .../linked-entity-selector.tsx | 24 +++--- .../linked-with-cell-editor.tsx | 7 +- .../readonly-outgoing-links-table.tsx | 60 +++++++------- .../use-create-get-cell-content.ts | 7 +- .../outgoing-links-section/use-rows.ts | 12 +-- .../shared/properties-tooltip.tsx | 6 +- .../links-section/shared/table-styling.ts | 4 +- .../entity-editor/properties-section.tsx | 6 +- .../get-property-count-summary.ts | 1 + .../properties-section/property-table.tsx | 3 +- .../property-table/cells/change-type-cell.tsx | 20 ++--- .../cells/property-name-cell.tsx | 4 +- .../property-table/cells/value-cell.tsx | 4 +- .../cells/value-cell/array-editor.tsx | 20 ++--- .../array-editor/add-another-button.tsx | 1 + .../value-cell/array-editor/draft-row.tsx | 8 +- .../value-cell/array-editor/row-action.tsx | 6 +- .../value-cell/array-editor/sortable-row.tsx | 14 ++-- .../value-cell/array-editor/value-chip.tsx | 6 +- .../cells/value-cell/editor-specs.ts | 6 +- .../cells/value-cell/editor-type-picker.tsx | 8 +- .../cells/value-cell/inputs/boolean-input.tsx | 3 +- .../cells/value-cell/inputs/json-input.tsx | 6 +- .../inputs/json-input/json-editor.tsx | 3 +- .../cells/value-cell/readonly-popup.tsx | 1 + .../cells/value-cell/single-value-editor.tsx | 26 +++--- .../property-table/cells/value-cell/types.ts | 5 +- .../property-table/types.ts | 5 +- .../use-create-get-cell-content.ts | 20 ++--- .../use-create-on-cell-edited.ts | 8 +- .../property-table/use-rows.ts | 12 +-- .../generate-property-row-recursively.ts | 22 ++--- .../get-expected-types-of-property-type.ts | 4 +- .../use-rows/use-property-rows-from-entity.ts | 18 +++-- .../shared/summary-chip-cell.tsx | 4 +- .../entity/entity-editor/types-section.tsx | 30 +++---- .../entity-type-change-modal.tsx | 14 ++-- .../use-get-type-change-details.ts | 6 +- .../src/pages/shared/entity/entity-header.tsx | 14 ++-- .../get-entity-multi-type-dependencies.ts | 3 +- .../src/pages/shared/entity/query-editor.tsx | 14 ++-- .../shared/create-draft-entity-subgraph.ts | 5 +- .../entity/shared/entity-editor-tabs.tsx | 3 +- .../use-apply-draft-link-entity-changes.ts | 4 +- .../entity/shared/use-draft-link-state.ts | 4 +- .../entity/shared/use-handle-type-changes.ts | 20 ++--- .../shared/use-mark-link-entity-to-archive.ts | 4 +- .../pages/shared/flow-definitions-context.tsx | 6 +- .../src/pages/shared/flow-runs-context.tsx | 10 ++- .../src/pages/shared/flow-tables.tsx | 8 +- .../src/pages/shared/format-value.ts | 13 +-- .../src/pages/shared/get-file-properties.ts | 3 +- .../graph-visualizer/graph-container.tsx | 13 +-- .../graph-container/graph-data-loader.tsx | 6 +- .../graph-container/path-finder-control.tsx | 22 ++--- .../path-finder-control/types.ts | 3 +- .../path-finder-control/worker.ts | 5 +- .../graph-container/search-control.tsx | 1 + .../graph-container/shared/config-control.tsx | 6 +- .../shared/control-components.tsx | 6 +- .../graph-container/shared/filter-control.tsx | 3 +- .../filter-control/node-type-filters.tsx | 5 +- .../shared/full-screen-context.tsx | 3 +- .../graph-container/shared/graph-context.tsx | 7 +- .../shared/graph-viz-tooltip.tsx | 3 +- .../shared/simple-autocomplete.tsx | 6 +- .../graph-container/shared/styles.ts | 3 +- .../shared/use-event-handlers.ts | 5 +- .../shared/use-set-draw-settings.ts | 3 +- .../graph-container/zoom-control.tsx | 3 +- .../pages/shared/gray-to-blue-icon-button.tsx | 3 +- .../src/pages/shared/hidden-types.ts | 3 +- .../src/pages/shared/inline-select.tsx | 6 +- .../google/google-account-select.tsx | 3 +- .../google/google-auth-context.tsx | 10 ++- .../use-google-accounts.ts | 10 ++- .../google/select-or-name-google-sheet.tsx | 6 +- .../src/pages/shared/invite-header.tsx | 3 +- ...link-label-with-source-and-destination.tsx | 52 ++++++------ .../src/pages/shared/markdown.tsx | 5 +- .../src/pages/shared/markdown/elements.tsx | 5 +- .../shared/markdown/elements/snippet.tsx | 5 +- .../src/pages/shared/not-found.tsx | 6 +- .../src/pages/shared/number-or-text-input.tsx | 6 +- .../src/pages/shared/ory-kratos.ts | 6 +- .../src/pages/shared/pdf-preview.tsx | 24 +++--- .../pdf-preview/pdf-preview-skeleton.tsx | 6 +- .../pages/shared/pdf-preview/pdf-search.tsx | 22 ++--- .../src/pages/shared/readonly-grid-popup.tsx | 5 +- .../src/pages/shared/section-wrapper.tsx | 3 +- .../src/pages/shared/settings-layout.tsx | 7 +- .../settings-layout/settings-sidebar.tsx | 8 +- .../pages/shared/shared/edit-bar-contents.tsx | 3 +- .../pages/shared/shared/use-new-type-owner.ts | 3 +- .../src/pages/shared/slide-stack.tsx | 13 +-- .../shared/slide-stack/data-type-slide.tsx | 4 +- .../pages/shared/slide-stack/entity-slide.tsx | 8 +- .../shared/slide-stack/entity-type-slide.tsx | 3 +- .../slide-back-forward-close-bar.tsx | 3 +- .../src/pages/shared/slide-stack/types.ts | 3 +- .../src/pages/shared/sources-popover.tsx | 5 +- .../src/pages/shared/sso-provider-buttons.tsx | 9 ++- .../src/pages/shared/table-header-toggle.tsx | 1 + .../src/pages/shared/tooltip-chip.tsx | 1 + .../src/pages/shared/top-context-bar.tsx | 24 +++--- .../top-context-bar/archived-item-banner.tsx | 26 +++--- .../context-bar-actions-dropdown.tsx | 8 +- .../top-context-bar/share-dropdown-menu.tsx | 22 ++--- .../edit-authorization-status-menu.tsx | 19 ++--- .../editable-authorization-relationship.tsx | 40 +++++----- .../invite-account-form.tsx | 18 +++-- .../share-entity-section.tsx | 30 +++---- .../pages/shared/type-graph-visualizer.tsx | 18 +++-- .../src/pages/shared/types-table.tsx | 34 ++++---- .../src/pages/shared/url-cell.tsx | 3 +- .../src/pages/shared/url-input.tsx | 3 +- .../shared/use-create-block-collection.ts | 10 ++- .../pages/shared/use-element-dimensions.ts | 3 +- .../shared/use-enabled-feature-flags.tsx | 6 +- .../src/pages/shared/use-entity-href.tsx | 6 +- .../src/pages/shared/use-flow-runs-usage.ts | 18 +++-- .../src/pages/shared/use-flow-schedules.ts | 14 ++-- .../shared/use-generate-type-urls-for-user.ts | 6 +- .../use-get-closed-multi-entity-type.ts | 22 ++--- .../shared/use-kratos-flow-error-handler.ts | 13 +-- .../src/pages/shared/use-validate-entity.ts | 20 ++--- .../src/pages/shared/value-chip.tsx | 3 +- .../src/pages/shared/verify-email-step.tsx | 10 ++- .../src/pages/shared/virtualized-table.tsx | 11 +-- .../pages/shared/virtualized-table/header.tsx | 5 +- .../virtualized-table/header/filter.tsx | 8 +- .../virtualized-table/use-filter-state.tsx | 3 +- .../src/pages/shared/visualizer-views.tsx | 5 +- .../src/pages/shared/web-selector.tsx | 16 ++-- .../src/pages/shared/workspace-context.tsx | 7 +- apps/hash-frontend/src/pages/signin.page.tsx | 18 +++-- apps/hash-frontend/src/pages/signup.page.tsx | 26 +++--- .../signup.page/accept-org-invitation.tsx | 3 +- .../pages/signup.page/account-setup-form.tsx | 12 +-- .../src/pages/signup.page/account-usage.tsx | 3 +- .../signup.page/signup-registration-form.tsx | 12 +-- .../signup-registration-right-info.tsx | 6 +- .../src/pages/signup.page/signup-steps.tsx | 6 +- .../src/pages/types/[[...type-kind]].page.tsx | 12 +-- .../[[...type-kind]].page/types-page-tabs.tsx | 4 +- ...[...base64-baseurl-maybe-version].page.tsx | 8 +- ...[...base64-baseurl-maybe-version].page.tsx | 8 +- .../src/pages/verification.page.tsx | 9 ++- apps/hash-frontend/src/pages/workers.page.tsx | 8 +- .../src/pages/workers.page/flow-run-table.tsx | 38 ++++----- .../workers.page/flow-schedules-table.tsx | 54 +++++++------ .../workers.page/shared/table-placeholder.tsx | 1 + .../src/shared/account-pages-variables.ts | 5 +- apps/hash-frontend/src/shared/command-bar.tsx | 40 +++++----- .../src/shared/command-bar/cheat-sheet.tsx | 3 +- .../shared/draft-entities-count-context.tsx | 12 +-- .../src/shared/edit-bar-scroller.tsx | 3 +- .../src/shared/edit-emoji-icon-button.tsx | 16 ++-- .../emoji-picker/emoji-picker.tsx | 5 +- .../src/shared/entity-types-context/hooks.ts | 14 ++-- .../shared/entity-types-context/provider.tsx | 4 +- .../use-entity-types-context-value.ts | 20 ++--- .../shared/is-special-entity-type.ts | 11 +-- .../src/shared/file-upload-context.tsx | 60 +++++++------- apps/hash-frontend/src/shared/filters.tsx | 3 +- apps/hash-frontend/src/shared/frozen.tsx | 3 +- .../src/shared/generate-link-parameters.ts | 3 +- .../src/shared/icons/achive-regular-icon.tsx | 3 +- .../src/shared/icons/apple-icon.tsx | 3 +- .../icons/arrow-down-a-z-regular-icon.tsx | 3 +- .../arrow-down-arrow-up-regular-icon.tsx | 3 +- .../arrow-right-to-bracket-regular-icon.tsx | 3 +- .../shared/icons/arrow-right-to-line-icon.tsx | 3 +- .../arrow-turn-down-left-regular-icon.tsx | 3 +- .../icons/arrow-up-a-z-regular-icon.tsx | 3 +- .../icons/arrow-up-right-regular-icon.tsx | 3 +- .../icons/arrows-from-line-regular-icon.tsx | 3 +- .../icons/arrows-to-line-regular-icon.tsx | 3 +- .../src/shared/icons/asterisk-light-icon.tsx | 3 +- .../shared/icons/bars-sort-regular-icon.tsx | 3 +- .../src/shared/icons/bold-icon.tsx | 3 +- .../src/shared/icons/bolt-light-icon.tsx | 3 +- .../src/shared/icons/box-archive-icon.tsx | 3 +- .../shared/icons/calendar-day-light-icon.tsx | 3 +- .../icons/calendar-day-regular-icon.tsx | 3 +- .../shared/icons/calendar-days-light-icon.tsx | 3 +- .../src/shared/icons/calendar-icon.tsx | 3 +- .../src/shared/icons/calendar-light-icon.tsx | 3 +- .../shared/icons/calendar-week-light-icon.tsx | 3 +- .../src/shared/icons/calendars-light-icon.tsx | 3 +- .../src/shared/icons/canvas-icon.tsx | 3 +- .../src/shared/icons/canvas-new-icon.tsx | 3 +- .../icons/chart-network-regular-icon.tsx | 3 +- .../src/shared/icons/check-regular-icon.tsx | 3 +- .../icons/chevron-down-regular-icon.tsx | 3 +- .../icons/chevron-left-regular-icon.tsx | 3 +- .../icons/chevron-right-regular-icon.tsx | 3 +- .../shared/icons/chevron-up-regular-icon.tsx | 3 +- .../shared/icons/circle-1-regular-icon.tsx | 3 +- .../shared/icons/circle-2-regular-icon.tsx | 3 +- .../shared/icons/circle-3-regular-icon.tsx | 3 +- .../shared/icons/circle-4-regular-icon.tsx | 3 +- .../icons/circle-arrow-right-regular-icon.tsx | 3 +- .../src/shared/icons/circle-info-icon.tsx | 3 +- .../shared/icons/circle-info-regular-icon.tsx | 3 +- .../src/shared/icons/clock-regular-icon.tsx | 3 +- .../src/shared/icons/cog-light-icon.tsx | 3 +- .../src/shared/icons/cog-regular-icon.tsx | 3 +- .../src/shared/icons/custom-link-icon.tsx | 3 +- .../shared/icons/earth-americas-regular.tsx | 3 +- .../shared/icons/ellipsis-regular-icon.tsx | 3 +- .../shared/icons/envelope-regular-icon.tsx | 3 +- .../src/shared/icons/feather-light-icon.tsx | 3 +- .../shared/icons/file-audio-light-icon.tsx | 3 +- .../icons/file-circle-plus-regular-icon.tsx | 3 +- .../shared/icons/file-excel-light-icon.tsx | 3 +- .../shared/icons/file-export-regular-icon.tsx | 3 +- .../src/shared/icons/file-image-light.tsx | 3 +- .../src/shared/icons/file-light-icon.tsx | 3 +- .../shared/icons/file-lines-regular-icon.tsx | 3 +- .../src/shared/icons/file-pdf-light-icon.tsx | 3 +- .../icons/file-powerpoint-light-icon.tsx | 3 +- .../src/shared/icons/file-regular-icon.tsx | 3 +- .../shared/icons/file-video-light-icon.tsx | 3 +- .../src/shared/icons/file-word-light-icon.tsx | 3 +- .../src/shared/icons/files-light-icon.tsx | 3 +- .../src/shared/icons/files-regular-icon.tsx | 3 +- .../src/shared/icons/filter-light-icon.tsx | 3 +- .../src/shared/icons/filter-list-icon.tsx | 3 +- .../shared/icons/font-case-regular-icon.tsx | 3 +- .../src/shared/icons/github-icon.tsx | 3 +- .../src/shared/icons/gitlab-icon.tsx | 3 +- .../src/shared/icons/globe-light-icon.tsx | 3 +- .../src/shared/icons/globe-regular-icon.tsx | 3 +- .../src/shared/icons/google-icon.tsx | 3 +- .../src/shared/icons/google-sheets-icon.tsx | 3 +- .../src/shared/icons/grid-solid-icon.tsx | 3 +- .../icons/grip-dots-vertical-regular-icon.tsx | 3 +- .../src/shared/icons/hash-icon.tsx | 3 +- .../src/shared/icons/hash-lockup.tsx | 3 +- .../src/shared/icons/hash-solid-icon.tsx | 3 +- .../src/shared/icons/hashtag-regular-icon.tsx | 3 +- .../src/shared/icons/hightlighter-icon.tsx | 3 +- .../src/shared/icons/home-icon.tsx | 3 +- .../src/shared/icons/house-regular-icon.tsx | 3 +- .../src/shared/icons/house-solid-icon.tsx | 3 +- .../src/shared/icons/inbox-icon.tsx | 3 +- .../src/shared/icons/infinity-solid-icon.tsx | 3 +- .../src/shared/icons/italic-icon.tsx | 3 +- .../shared/icons/layer-group-light-icon.tsx | 3 +- .../src/shared/icons/linear-logo-gray.tsx | 3 +- .../src/shared/icons/linear-logo.tsx | 3 +- .../src/shared/icons/link-regular-icon.tsx | 3 +- .../src/shared/icons/lock-regular-icon.tsx | 3 +- .../src/shared/icons/lock-solid-icon.tsx | 3 +- .../shared/icons/magnifying-glass-light.tsx | 3 +- .../icons/magnifying-glass-regular-icon.tsx | 3 +- .../src/shared/icons/microsoft-icon.tsx | 3 +- .../src/shared/icons/note-icon.tsx | 3 +- .../shared/icons/note-sticky-regular-icon.tsx | 3 +- .../src/shared/icons/page-light-icon.tsx | 3 +- .../src/shared/icons/pencil-slash-icon.tsx | 3 +- .../src/shared/icons/people-group-icon.tsx | 3 +- .../icons/person-booth-regular-icon.tsx | 3 +- .../src/shared/icons/pizza-solid-icon.tsx | 3 +- .../src/shared/icons/plug-solid-icon.tsx | 3 +- .../shared/icons/plus-box-outline-icon.tsx | 3 +- .../src/shared/icons/plus-regular.tsx | 3 +- .../src/shared/icons/search-icon.tsx | 3 +- .../src/shared/icons/strikethrough-icon.tsx | 3 +- .../src/shared/icons/trash-regular-icon.tsx | 3 +- .../triangle-exclamation-regular-icon.tsx | 3 +- .../src/shared/icons/underline-icon.tsx | 3 +- .../src/shared/icons/undo-regular-icon.tsx | 3 +- .../src/shared/icons/upload-icon.tsx | 3 +- .../src/shared/icons/upload-regular-icon.tsx | 3 +- .../src/shared/icons/user-icon.tsx | 3 +- .../src/shared/icons/users-regular-icon.tsx | 3 +- .../src/shared/icons/warn-icon.tsx | 3 +- .../src/shared/invites-context.tsx | 9 ++- apps/hash-frontend/src/shared/is-archived.ts | 7 +- apps/hash-frontend/src/shared/is-of-type.ts | 3 +- .../src/shared/keyboard-shortcuts-context.tsx | 3 +- .../use-property-types-context-value.ts | 6 +- apps/hash-frontend/src/shared/layout.tsx | 8 +- .../src/shared/layout/get-plain-layout.tsx | 4 +- .../src/shared/layout/layout-with-header.tsx | 4 +- .../layout-with-header/account-dropdown.tsx | 6 +- .../layout-with-header/actions-dropdown.tsx | 24 +++--- .../notifications-dropdown.tsx | 6 +- .../layout/layout-with-header/page-header.tsx | 3 +- .../layout/layout-with-header/search-bar.tsx | 32 ++++---- .../search-bar/search-input.tsx | 6 +- .../shared/header-icon-button-with-count.tsx | 3 +- .../shared/header-icon-button.tsx | 3 +- .../src/shared/layout/layout-with-sidebar.tsx | 6 +- .../layout-with-sidebar/sidebar-context.tsx | 3 +- .../layout/layout-with-sidebar/sidebar.tsx | 13 +-- .../sidebar/account-entities-list.tsx | 24 +++--- .../sidebar/account-entity-type-list.tsx | 10 ++- .../account-entity-type-list/search-input.tsx | 6 +- .../sidebar/account-page-list.tsx | 32 ++++---- .../account-page-list-item.tsx | 7 +- .../sidebar/account-page-list/page-menu.tsx | 12 +-- .../account-page-list/page-tree-item.tsx | 12 +-- .../sidebar/account-page-list/utils.ts | 4 +- .../sidebar/favorites-list.tsx | 8 +- .../shared/entity-or-type-sidebar-item.tsx | 14 ++-- .../entity-menu.tsx | 10 ++- .../entity-type-menu.tsx | 12 +-- .../shared/favorite-menu-item.tsx | 8 +- .../shared/sidebar-menu-item.tsx | 10 ++- .../sidebar/shared/nav-link.tsx | 4 +- .../sidebar/shared/sort-actions-dropdown.tsx | 8 +- .../sidebar/shared/view-all-link.tsx | 8 +- .../sidebar/top-nav-link.tsx | 5 +- .../sidebar/workspace-switcher.tsx | 6 +- .../src/shared/layout/plain-layout.tsx | 5 +- .../src/shared/notification-count-context.tsx | 32 ++++---- .../src/shared/page-icon-button.tsx | 14 ++-- .../src/shared/property-types-context.tsx | 12 +-- .../src/shared/readonly-mode.tsx | 5 +- .../src/shared/routing/route-page-info.tsx | 5 +- .../hash-frontend/src/shared/table-header.tsx | 62 +++++++------- .../table-header/bulk-actions-dropdown.tsx | 48 +++++------ .../table-header/export-to-csv-button.tsx | 3 +- .../table-header/table-header-button.tsx | 3 +- apps/hash-frontend/src/shared/ui/button.tsx | 13 +-- apps/hash-frontend/src/shared/ui/link.tsx | 7 +- .../hash-frontend/src/shared/ui/menu-item.tsx | 8 +- apps/hash-frontend/src/shared/ui/modal.tsx | 6 +- apps/hash-frontend/src/shared/ui/tab-link.tsx | 10 ++- apps/hash-frontend/src/shared/ui/tabs.tsx | 5 +- apps/hash-frontend/src/shared/use-actors.ts | 8 +- .../src/shared/use-entity-icon.tsx | 20 ++--- .../src/shared/use-entity-type-entities.tsx | 22 ++--- .../src/shared/use-update-page-icon.ts | 5 +- .../src/shared/use-user-or-org.ts | 24 +++--- .../use-user-permissions-on-data-type.ts | 5 +- .../use-user-permissions-on-entity-type.ts | 5 +- .../shared/use-user-permissions-on-entity.ts | 6 +- .../src/shared/use-user-preferences.ts | 4 +- .../src/shared/workers-header.tsx | 10 ++- .../src/activities/flow-activities.ts | 6 +- .../flow-activities/aviation-activities.ts | 4 +- .../get-historical-flight-arrivals-action.ts | 5 +- .../get-live-flight-positions-action.ts | 17 ++-- .../get-scheduled-flights-action.ts | 7 +- .../flow-activities/integration-activities.ts | 4 +- .../persist-integration-entities-action.ts | 20 ++--- .../shared/get-integration-flow-context.ts | 6 +- .../shared/split-properties-and-metadata.ts | 3 +- .../src/activities/linear-activities.ts | 38 ++++----- .../activities/linear-activities/mappings.ts | 17 ++-- .../hash-integration-worker/src/instrument.ts | 3 +- apps/hash-integration-worker/src/main.ts | 8 +- .../src/shared/graph-requests.ts | 15 ++-- apps/hash-integration-worker/src/workflows.ts | 9 ++- .../src/workflows/run-flow-workflow.ts | 16 ++-- apps/mcp/linear/src/main.ts | 3 +- apps/mcp/notion/src/main/notion-services.ts | 3 +- apps/petrinaut-website/src/main/app.tsx | 16 ++-- .../src/main/app/sentry-feedback-button.tsx | 3 +- .../src/main/app/use-local-storage-sdcpns.ts | 3 +- .../sentry/sentry-error-tracker-provider.tsx | 3 +- apps/plugin-browser/codegen.config.ts | 3 +- .../src/graphql/queries/user.queries.ts | 3 +- .../src/pages/options/options-contents.tsx | 5 +- .../src/pages/popup/popup-contents.tsx | 6 +- .../popup/popup-contents/action-center.tsx | 20 ++--- .../action-center/automated.tsx | 6 +- .../action-center/automated/select-scope.tsx | 10 ++- .../select-scope/circle-exclamation-icon.tsx | 3 +- .../select-scope/globe-pointer-icon.tsx | 3 +- .../select-scope/rows-by-location.tsx | 8 +- .../automated/select-scope/rows-by-type.tsx | 8 +- .../automated/select-scope/select-domains.tsx | 3 +- .../select-scope/select-grouping.tsx | 10 ++- .../select-scope/shared/common-rows-props.ts | 3 +- .../popup-contents/action-center/history.tsx | 6 +- .../history/automatically-triggered.tsx | 6 +- .../history/manually-triggered.tsx | 6 +- .../history/shared/event-table.tsx | 3 +- .../history/shared/history-row.tsx | 24 +++--- .../history-row/cell-with-hover-button.tsx | 3 +- .../history/shared/history-row/chip.tsx | 3 +- .../flow-metadata-cell-contents.tsx | 20 ++--- .../shared/history-row/flow-status-cell.tsx | 10 ++- .../history/shared/table-label.tsx | 3 +- .../popup-contents/action-center/one-off.tsx | 5 +- .../one-off/infer-entities-action.tsx | 16 ++-- .../arrow-up-to-line-icon.tsx | 3 +- .../create-entity-icon.tsx | 3 +- .../one-off/quick-note-action.tsx | 18 +++-- .../quick-note-action/quick-note-icon.tsx | 3 +- .../action-center/shared/autocomplete-sx.ts | 3 +- .../shared/entity-type-selector.tsx | 20 ++--- .../action-center/shared/model-selector.tsx | 6 +- .../shared/model-selector/openai-icon.tsx | 3 +- .../action-center/shared/section.tsx | 8 +- .../shared/select-web-target.tsx | 7 +- .../shared/select-web-target/web-selector.tsx | 10 ++- .../action-center/shared/use-flow-runs.ts | 28 ++++--- .../action-center/switch-with-dark-mode.tsx | 3 +- .../text-field-with-dark-mode.tsx | 6 +- .../popup/popup-contents/not-enabled.tsx | 3 +- .../popup/popup-contents/shared/avatar.tsx | 3 +- .../popup-contents/shared/user-context.tsx | 5 +- .../pages/popup/popup-contents/sign-in.tsx | 3 +- .../sign-in/hash-rainbow-lockup.tsx | 3 +- .../src/pages/shared/use-entity-types.ts | 12 +-- .../src/pages/shared/use-storage-sync.ts | 5 +- .../src/pages/working/working-contents.tsx | 3 +- apps/plugin-browser/src/scripts/background.ts | 9 ++- .../src/scripts/background/infer-entities.ts | 32 ++++---- .../infer-entities/get-website-content.ts | 2 +- apps/plugin-browser/src/scripts/content.ts | 3 +- .../src/shared/create-default-settings.ts | 4 +- .../src/shared/create-entity.ts | 13 +-- apps/plugin-browser/src/shared/get-user.ts | 25 +++--- apps/plugin-browser/src/shared/storage.ts | 16 ++-- .../src/shared/storage/update-entity.ts | 13 +-- libs/@blockprotocol/graph/src/codegen.ts | 3 +- .../graph/src/codegen/compile.ts | 1 + .../compile/compile-schemas-to-typescript.ts | 18 +++-- .../compile/remove-placeholder-types.ts | 3 +- .../compile/replace-interface-with-type.ts | 1 + .../graph/src/codegen/context/compile.ts | 9 +-- .../graph/src/codegen/context/initialize.ts | 16 ++-- .../graph/src/codegen/context/postprocess.ts | 13 ++- .../graph/src/codegen/context/preprocess.ts | 9 +-- .../graph/src/codegen/context/shared.ts | 4 +- .../graph/src/codegen/initialize.ts | 3 +- .../metadata/generate-metadata-schema.ts | 19 ++--- .../traverse-and-collate-schemas.ts | 5 +- .../graph/src/codegen/parameters.ts | 3 +- .../graph/src/codegen/postprocess.ts | 3 +- .../add-metadata-dependencies-to-files.ts | 3 +- .../postprocess/allocate-types-to-files.ts | 6 +- ...identifier-definitions-to-file-contents.ts | 1 + .../generate-block-entity-type-aliases.ts | 3 +- .../generate-block-link-target-aliases.ts | 3 +- .../generate-entity-definitions.ts | 6 +- .../generate-link-and-target-definitions.ts | 6 +- .../postprocess/prepare-file-contents.ts | 1 + .../postprocess/prepend-banner-comments.ts | 1 + .../prepend-imports-and-exports.ts | 1 + .../graph/src/codegen/preprocess.ts | 3 +- .../preprocess/identify-link-entity-types.ts | 6 +- .../preprocess/remove-empty-all-ofs.ts | 1 + .../remove-redundant-data-type-inheritance.ts | 1 + .../preprocess/transform-type-titles.ts | 18 +++-- .../graph/src/custom-element.ts | 5 +- .../graph/src/graph-block-handler.ts | 2 +- .../src/internal/mutate-subgraph/edge.ts | 26 +++--- .../src/internal/mutate-subgraph/element.ts | 13 ++- libs/@blockprotocol/graph/src/main.ts | 3 +- libs/@blockprotocol/graph/src/react.ts | 12 +-- .../graph/src/stdlib/interval.ts | 4 +- .../graph/src/stdlib/subgraph/builder.ts | 22 ++--- .../src/stdlib/subgraph/edge/entity-type.ts | 21 ++--- .../src/stdlib/subgraph/edge/link-entity.ts | 30 +++---- .../src/stdlib/subgraph/edge/property-type.ts | 12 +-- .../graph/src/stdlib/subgraph/edge/shared.ts | 10 +-- .../src/stdlib/subgraph/element/data-type.ts | 15 ++-- .../stdlib/subgraph/element/entity-type.ts | 15 ++-- .../src/stdlib/subgraph/element/entity.ts | 30 +++---- .../stdlib/subgraph/element/property-type.ts | 27 ++++--- .../graph/src/stdlib/subgraph/roots.ts | 19 ++--- .../src/stdlib/subgraph/temporal-axes.ts | 6 +- .../stdlib/subgraph/vertex-id-for-element.ts | 8 +- .../graph/src/types/block-graph.ts | 13 ++- libs/@blockprotocol/graph/src/types/entity.ts | 13 ++- .../graph/src/types/ontology.ts | 3 +- .../graph/src/types/ontology/data-type.ts | 3 +- .../graph/src/types/ontology/entity-type.ts | 3 +- .../graph/src/types/ontology/property-type.ts | 3 +- .../graph/src/types/subgraph.ts | 13 ++- .../graph/src/types/subgraph/edges.ts | 5 +- .../src/types/subgraph/edges/outward-edge.ts | 16 ++-- .../src/types/subgraph/element-mappings.ts | 21 +++-- .../graph/src/types/subgraph/vertices.ts | 9 ++- .../typescript/src/native/entity.ts | 3 +- .../type-system/typescript/src/native/url.ts | 3 +- .../type-system/typescript/test/url.test.ts | 11 +-- .../src/ai-assistant-message.tsx | 5 +- .../src/ai-assistant-message/code-block.tsx | 8 +- .../src/block-error-message.tsx | 3 +- .../src/block-prompt-input.tsx | 5 +- .../src/block-settings-button.tsx | 5 +- .../src/dropdown-selector.tsx | 8 +- .../src/editable-field.tsx | 3 +- .../src/entities-graph-chart.tsx | 12 +-- .../block-design-system/src/get-help-link.tsx | 5 +- .../src/icons/chevron-right.tsx | 3 +- .../src/icons/circle-question.tsx | 3 +- .../src/icons/code-pen.tsx | 3 +- .../block-design-system/src/icons/copy.tsx | 3 +- .../block-design-system/src/icons/gear.tsx | 3 +- .../src/icons/pen-to-square.tsx | 3 +- .../block-design-system/src/icons/pen.tsx | 3 +- .../design-system/src/alert-modal.tsx | 5 +- .../src/autocomplete-dropdown.tsx | 3 +- .../design-system/src/autocomplete.tsx | 15 ++-- libs/@hashintel/design-system/src/avatar.tsx | 5 +- libs/@hashintel/design-system/src/button.tsx | 9 ++- libs/@hashintel/design-system/src/callout.tsx | 5 +- .../design-system/src/chip-group.tsx | 5 +- libs/@hashintel/design-system/src/chip.tsx | 3 +- .../design-system/src/data-type-selector.tsx | 20 ++--- .../src/data-type-selector/icons.ts | 6 +- libs/@hashintel/design-system/src/e-chart.tsx | 15 ++-- .../design-system/src/entity-or-type-icon.tsx | 7 +- .../design-system/src/fontawesome-icon.tsx | 5 +- .../design-system/src/form-inline.tsx | 1 + .../src/icon-angle-right-regular.tsx | 3 +- ...down-left-and-arrow-up-right-to-center.tsx | 3 +- .../src/icon-arrow-down-regular.tsx | 3 +- .../design-system/src/icon-arrow-left.tsx | 3 +- .../src/icon-arrow-right-regular.tsx | 3 +- .../src/icon-arrow-rotate-left.tsx | 3 +- .../src/icon-arrow-up-regular.tsx | 3 +- ...-right-and-arrow-down-left-from-center.tsx | 3 +- ...con-arrow-up-right-from-square-regular.tsx | 3 +- .../src/icon-arrow-up-right-regular.tsx | 3 +- .../design-system/src/icon-arrow-up-right.tsx | 3 +- .../src/icon-arrow-up-wide-short-light.tsx | 3 +- .../src/icon-arrows-rotate-regular.tsx | 3 +- .../src/icon-asterisk-regular.tsx | 3 +- .../design-system/src/icon-at-regular.tsx | 3 +- .../design-system/src/icon-barcode.tsx | 3 +- .../design-system/src/icon-bell-light.tsx | 3 +- .../@hashintel/design-system/src/icon-bug.tsx | 3 +- .../design-system/src/icon-bullseye-light.tsx | 3 +- .../design-system/src/icon-button.tsx | 3 +- .../src/icon-caret-down-solid.tsx | 3 +- .../design-system/src/icon-check-regular.tsx | 3 +- .../design-system/src/icon-check.tsx | 3 +- .../design-system/src/icon-chrome.tsx | 3 +- .../src/icon-circle-check-regular.tsx | 3 +- .../src/icon-circle-ellipsis-regular.tsx | 3 +- .../src/icon-circle-nodes-light.tsx | 3 +- .../src/icon-circle-one-regular.tsx | 3 +- .../design-system/src/icon-clock-regular.tsx | 3 +- .../design-system/src/icon-close.tsx | 3 +- .../design-system/src/icon-code.tsx | 3 +- .../design-system/src/icon-copy-regular.tsx | 3 +- .../design-system/src/icon-dash.tsx | 3 +- .../src/icon-diagram-nested-light.tsx | 3 +- .../src/icon-diagram-regular.tsx | 3 +- .../design-system/src/icon-discord.tsx | 3 +- .../src/icon-download-regular.tsx | 3 +- .../design-system/src/icon-eye-regular.tsx | 3 +- .../src/icon-eye-slash-regular.tsx | 3 +- .../design-system/src/icon-eye-solid.tsx | 3 +- .../src/icon-feather-regular.tsx | 3 +- .../design-system/src/icon-file-regular.tsx | 3 +- .../src/icon-file-spreadsheet-regular.tsx | 3 +- .../src/icon-file-spreadsheet-solid.tsx | 3 +- .../src/icon-forward-step-solid.tsx | 3 +- .../design-system/src/icon-graph.tsx | 3 +- .../design-system/src/icon-image-regular.tsx | 3 +- .../design-system/src/icon-image-solid.tsx | 3 +- .../design-system/src/icon-infinity-light.tsx | 3 +- .../src/icon-input-pipe-regular.tsx | 3 +- .../design-system/src/icon-input-pipe.tsx | 3 +- .../src/icon-lightbulb-on-rainbow.tsx | 3 +- .../src/icon-lightbulb-on-regular.tsx | 3 +- .../design-system/src/icon-link.tsx | 3 +- .../design-system/src/icon-list-regular.tsx | 3 +- .../src/icon-magnifying-glass-minus-light.tsx | 3 +- .../src/icon-magnifying-glass-plus-light.tsx | 3 +- .../src/icon-magnifying-glass-regular.tsx | 3 +- .../src/icon-memo-circle-check-regular.tsx | 3 +- .../src/icon-microscope-regular.tsx | 3 +- .../src/icon-pen-to-square-solid.tsx | 3 +- .../src/icon-person-running-regular.tsx | 3 +- .../design-system/src/icon-play-solid.tsx | 3 +- .../design-system/src/icon-plug-regular.tsx | 3 +- .../design-system/src/icon-plus.tsx | 3 +- .../design-system/src/icon-rotate-regular.tsx | 3 +- .../design-system/src/icon-ruler-regular.tsx | 3 +- .../design-system/src/icon-shapes-regular.tsx | 3 +- .../src/icon-sidebar-regular.tsx | 3 +- .../design-system/src/icon-sparkles-light.tsx | 3 +- .../design-system/src/icon-star-regular.tsx | 3 +- .../design-system/src/icon-star-solid.tsx | 3 +- .../design-system/src/icon-stop-solid.tsx | 3 +- .../design-system/src/icon-table-light.tsx | 3 +- .../design-system/src/icon-terminal-light.tsx | 3 +- .../src/icon-thought-bubble-light.tsx | 3 +- .../src/icon-user-plus-regular.tsx | 3 +- .../src/icon-wand-magic-sparkles.tsx | 3 +- .../design-system/src/icon-x-mark-regular.tsx | 3 +- .../design-system/src/icon-x-twitter.tsx | 3 +- .../src/image-with-checked-background.tsx | 3 +- .../design-system/src/input-props.tsx | 9 ++- .../design-system/src/loading-spinner.tsx | 1 + .../design-system/src/menu-checkbox-item.tsx | 5 +- .../design-system/src/menu-item.tsx | 5 +- libs/@hashintel/design-system/src/modal.tsx | 11 +-- .../design-system/src/ontology-chip.tsx | 5 +- .../design-system/src/ontology-icons.tsx | 6 +- .../src/parse-url-for-ontology-chip.tsx | 3 +- .../design-system/src/pen-regular-icon.tsx | 3 +- libs/@hashintel/design-system/src/select.tsx | 5 +- .../src/selector-autocomplete.tsx | 9 ++- .../selector-autocomplete-option.tsx | 13 +-- .../@hashintel/design-system/src/skeleton.tsx | 3 +- .../src/submit-button-wrapper.tsx | 3 +- .../design-system/src/text-field.tsx | 5 +- libs/@hashintel/design-system/src/theme.ts | 3 +- .../design-system/src/theme/components.ts | 4 +- .../data-display/mui-chip-theme-options.tsx | 3 +- .../mui-typography-theme-options.ts | 4 +- .../inputs/mui-button-theme-options.ts | 3 +- .../inputs/mui-checkbox-theme-options.tsx | 3 +- .../checkbox-blank-icon.tsx | 3 +- .../checkbox-checked-icon.tsx | 3 +- .../checkbox-indeterminate-icon.tsx | 3 +- .../mui-form-helper-text-theme-options.ts | 3 +- .../mui-outlined-input-theme-options.ts | 3 +- .../inputs/mui-radio-theme-options.tsx | 4 +- .../radio-checked-icon.tsx | 3 +- .../radio-unchecked-icon.tsx | 3 +- .../inputs/mui-select-theme-options.tsx | 3 +- .../inputs/mui-switch-theme-options.ts | 3 +- .../navigation/mui-menu-item-theme-options.ts | 3 +- .../navigation/mui-menu-theme-options.ts | 3 +- .../navigation/mui-tab-theme-options.ts | 3 +- .../utils/mui-css-baseline-theme-options.ts | 4 +- .../design-system/src/type-card.tsx | 5 +- .../design-system/src/white-card.tsx | 13 +-- .../.ladle/components/preview-frame.tsx | 3 +- .../.ladle/components/variant-grid.tsx | 3 +- .../@hashintel/ds-components/eslint.config.js | 3 +- .../ds-components/playwright.config.ts | 3 +- .../src/beta/absolute-center.tsx | 4 +- .../src/beta/accordion.recipe.ts | 1 + .../ds-components/src/beta/accordion.tsx | 6 +- .../ds-components/src/beta/alert.tsx | 3 +- .../beta/angle-slider/angle-slider.recipe.ts | 1 + .../ds-components/src/beta/avatar.recipe.ts | 1 + .../ds-components/src/beta/avatar.tsx | 3 +- .../ds-components/src/beta/badge.tsx | 4 +- .../src/beta/badge/icon.story.tsx | 3 +- .../src/beta/badge/sizes.story.tsx | 3 +- .../ds-components/src/beta/breadcrumb.tsx | 6 +- .../ds-components/src/beta/button.tsx | 3 +- .../src/beta/button/icon.story.tsx | 3 +- .../src/beta/button/sizes.story.tsx | 3 +- .../ds-components/src/beta/card.tsx | 4 +- .../src/beta/card/avatar.story.tsx | 3 +- .../src/beta/card/form.story.tsx | 3 +- .../ds-components/src/beta/carousel.recipe.ts | 1 + .../ds-components/src/beta/carousel.tsx | 3 +- .../src/beta/carousel/auto-play.story.tsx | 3 +- .../src/beta/carousel/basic.story.tsx | 3 +- .../src/beta/carousel/multiple.story.tsx | 3 +- .../src/beta/carousel/scroll-to.story.tsx | 3 +- .../src/beta/carousel/vertical.story.tsx | 3 +- .../ds-components/src/beta/checkbox.recipe.ts | 1 + .../ds-components/src/beta/checkbox.tsx | 6 +- .../src/beta/checkbox/closed.story.tsx | 3 +- .../src/beta/checkbox/indeterminate.story.tsx | 3 +- .../src/beta/clipboard.recipe.ts | 1 + .../ds-components/src/beta/clipboard.tsx | 3 +- .../ds-components/src/beta/code.tsx | 4 +- .../src/beta/collapsible.recipe.ts | 1 + .../ds-components/src/beta/collapsible.tsx | 4 +- .../src/beta/color-picker.recipe.ts | 1 + .../ds-components/src/beta/color-picker.tsx | 4 +- .../ds-components/src/beta/combobox.recipe.ts | 1 + .../ds-components/src/beta/combobox.tsx | 5 +- .../src/beta/combobox/sizes.story.tsx | 1 + .../src/beta/combobox/variants.story.tsx | 1 + .../src/beta/date-picker.recipe.ts | 1 + .../ds-components/src/beta/date-picker.tsx | 4 +- .../ds-components/src/beta/dialog.recipe.ts | 1 + .../ds-components/src/beta/dialog.tsx | 3 +- .../src/beta/dialog/motion-presets.story.tsx | 1 + .../src/beta/dialog/placements.story.tsx | 1 + .../src/beta/dialog/sizes.story.tsx | 1 + .../ds-components/src/beta/drawer.recipe.ts | 1 + .../ds-components/src/beta/drawer.tsx | 4 +- .../src/beta/drawer/placements.story.tsx | 1 + .../src/beta/drawer/sizes.story.tsx | 1 + .../ds-components/src/beta/editable.recipe.ts | 1 + .../ds-components/src/beta/editable.tsx | 4 +- .../ds-components/src/beta/field.recipe.ts | 1 + .../ds-components/src/beta/field.tsx | 4 +- .../ds-components/src/beta/fieldset.recipe.ts | 1 + .../ds-components/src/beta/fieldset.tsx | 4 +- .../src/beta/file-upload.recipe.ts | 1 + .../ds-components/src/beta/file-upload.tsx | 5 +- .../src/beta/file-upload/dropzone.story.tsx | 3 +- .../floating-panel/floating-panel.recipe.ts | 1 + .../ds-components/src/beta/group.tsx | 4 +- .../ds-components/src/beta/heading.tsx | 3 +- .../src/beta/hover-card.recipe.ts | 1 + .../ds-components/src/beta/hover-card.tsx | 4 +- .../src/beta/hover-card/basic.story.tsx | 3 +- .../src/beta/hover-card/controlled.story.tsx | 3 +- .../src/beta/hover-card/delays.story.tsx | 3 +- .../src/beta/hover-card/dialog.story.tsx | 3 +- .../src/beta/hover-card/disabled.story.tsx | 3 +- .../src/beta/hover-card/placement.story.tsx | 3 +- .../src/beta/icon-button/colors.story.tsx | 3 +- .../src/beta/icon-button/sizes.story.tsx | 3 +- .../src/beta/icon-button/variants.story.tsx | 3 +- .../ds-components/src/beta/icon.tsx | 4 +- .../src/beta/icon/sizes.story.tsx | 3 +- .../ds-components/src/beta/image.tsx | 4 +- .../ds-components/src/beta/input-addon.tsx | 4 +- .../src/beta/input-addon/sizes.story.tsx | 3 +- .../src/beta/input-addon/variants.story.tsx | 3 +- .../ds-components/src/beta/input-group.tsx | 3 +- .../src/beta/input-group/sizes.story.tsx | 3 +- .../src/beta/input-group/variants.story.tsx | 3 +- .../ds-components/src/beta/input.tsx | 4 +- .../src/beta/input/addon.story.tsx | 3 +- .../src/beta/input/element.story.tsx | 3 +- .../@hashintel/ds-components/src/beta/kbd.tsx | 4 +- .../ds-components/src/beta/link.tsx | 4 +- .../src/beta/listbox/listbox.recipe.ts | 1 + .../ds-components/src/beta/loader.tsx | 3 +- .../ds-components/src/beta/menu.recipe.ts | 1 + .../ds-components/src/beta/menu.tsx | 5 +- .../src/beta/menu/context.story.tsx | 1 + .../src/beta/number-input.recipe.ts | 1 + .../ds-components/src/beta/number-input.tsx | 6 +- .../src/beta/pagination.recipe.ts | 1 + .../ds-components/src/beta/pagination.tsx | 6 +- .../password-input/password-input.recipe.ts | 1 + .../src/beta/pin-input.recipe.ts | 1 + .../ds-components/src/beta/pin-input.tsx | 4 +- .../ds-components/src/beta/popover.recipe.ts | 1 + .../ds-components/src/beta/popover.tsx | 4 +- .../ds-components/src/beta/progress.recipe.ts | 1 + .../ds-components/src/beta/progress.tsx | 4 +- .../src/beta/qr-code/qr-code.recipe.ts | 1 + .../src/beta/radio-card-group.recipe.ts | 1 + .../src/beta/radio-card-group.tsx | 4 +- .../src/beta/radio-group.recipe.ts | 1 + .../ds-components/src/beta/radio-group.tsx | 4 +- .../src/beta/rating-group.recipe.ts | 1 + .../ds-components/src/beta/rating-group.tsx | 9 ++- .../ds-components/src/beta/scroll-area.tsx | 4 +- .../scroll-area/infinite-scroll.story.tsx | 3 +- .../src/beta/scroll-area/sizes.story.tsx | 3 +- .../src/beta/scroll-area/variants.story.tsx | 3 +- .../beta/scroll-area/virtualization.story.tsx | 3 +- .../src/beta/segment-group.recipe.ts | 1 + .../ds-components/src/beta/segment-group.tsx | 3 +- .../src/beta/segment-group/icon.story.tsx | 3 +- .../ds-components/src/beta/select.recipe.ts | 1 + .../ds-components/src/beta/select.tsx | 8 +- .../src/beta/select/sizes.story.tsx | 1 + .../signature-pad/signature-pad.recipe.ts | 1 + .../ds-components/src/beta/skeleton.tsx | 3 +- .../src/beta/skeleton/loading.story.tsx | 3 +- .../ds-components/src/beta/slider.recipe.ts | 1 + .../ds-components/src/beta/slider.tsx | 3 +- .../ds-components/src/beta/span.tsx | 1 + .../ds-components/src/beta/spinner.tsx | 4 +- .../ds-components/src/beta/splitter.recipe.ts | 1 + .../ds-components/src/beta/splitter.tsx | 4 +- .../src/beta/splitter/store.story.tsx | 1 + .../src/beta/steps/steps.recipe.ts | 1 + .../ds-components/src/beta/switch.recipe.ts | 1 + .../ds-components/src/beta/switch.tsx | 3 +- .../ds-components/src/beta/table.tsx | 4 +- .../ds-components/src/beta/tabs.recipe.ts | 1 + .../ds-components/src/beta/tabs.tsx | 4 +- .../src/beta/tags-input.recipe.ts | 1 + .../ds-components/src/beta/tags-input.tsx | 6 +- .../ds-components/src/beta/text.tsx | 3 +- .../ds-components/src/beta/textarea.tsx | 4 +- .../src/beta/timer/timer.recipe.ts | 1 + .../ds-components/src/beta/toast.recipe.ts | 1 + .../ds-components/src/beta/toast.tsx | 3 +- .../src/beta/toggle-group.recipe.ts | 1 + .../ds-components/src/beta/toggle-group.tsx | 4 +- .../src/beta/toggle/toggle.recipe.ts | 1 + .../ds-components/src/beta/tooltip.recipe.ts | 1 + .../ds-components/src/beta/tooltip.tsx | 3 +- .../src/beta/tour/tour.recipe.ts | 1 + .../src/beta/tree-view/tree-view.recipe.ts | 1 + .../src/components/Avatar/avatar.stories.tsx | 4 +- .../src/components/Avatar/avatar.tsx | 2 + .../src/components/Badge/badge.stories.tsx | 3 +- .../src/components/Badge/badge.tsx | 1 + .../src/components/Button/button.stories.tsx | 6 +- .../src/components/Button/button.tsx | 5 +- .../components/Checkbox/checkbox.stories.tsx | 3 +- .../src/components/Checkbox/checkbox.tsx | 1 + .../src/components/Icon/icon.stories.tsx | 3 +- .../src/components/Icon/icon.tsx | 79 +++++++++--------- .../Loading/loading-spinner.stories.tsx | 5 +- .../components/Loading/loading-spinner.tsx | 6 +- .../RadioGroup/radio-group.stories.tsx | 3 +- .../src/components/RadioGroup/radio-group.tsx | 2 + .../segmented-control.stories.tsx | 3 +- .../SegmentedControl/segmented-control.tsx | 1 + .../src/components/Slider/slider.stories.tsx | 4 +- .../src/components/Slider/slider.tsx | 1 + .../src/components/Switch/switch.stories.tsx | 4 +- .../src/components/Switch/switch.tsx | 1 + .../src/components/TextInput/base-input.tsx | 10 ++- .../TextInput/text-input.stories.tsx | 8 +- .../components/Tooltip/tooltip.stories.tsx | 3 +- .../src/components/Tooltip/tooltip.tsx | 3 +- .../stories/tokens.color-layering.story.tsx | 5 +- .../stories/tokens.color-migration.story.tsx | 10 ++- .../stories/tokens.color-palettes.story.tsx | 6 +- .../stories/tokens.color-variants.story.tsx | 4 +- .../src/preset/stories/tokens.radii.story.tsx | 4 +- .../preset/stories/tokens.shadows.story.tsx | 4 +- .../preset/stories/tokens.spacing.story.tsx | 4 +- .../stories/tokens.typography.story.tsx | 4 +- .../petrinaut/.storybook/preview.tsx | 3 +- .../petrinaut/panda.config.shared.ts | 3 +- .../src/core/clipboard/paste.test.ts | 3 +- .../petrinaut/src/core/clipboard/paste.ts | 3 +- .../src/core/clipboard/serialize.test.ts | 5 +- .../petrinaut/src/core/clipboard/serialize.ts | 5 +- .../src/core/file-format/parse-sdcpn-file.ts | 3 +- .../src/core/file-format/serialize-sdcpn.ts | 3 +- .../petrinaut/src/core/handle.test.ts | 1 + .../petrinaut/src/core/lib/deep-equal.test.ts | 3 +- .../petrinaut/src/core/lib/get-connections.ts | 1 + .../petrinaut/src/core/lsp/language-client.ts | 22 ++--- .../src/core/lsp/lib/checker.test.ts | 3 +- .../petrinaut/src/core/lsp/lib/checker.ts | 4 +- .../lsp/lib/create-sdcpn-language-service.ts | 3 +- .../src/core/lsp/lib/document-uris.ts | 3 +- .../core/lsp/lib/generate-virtual-files.ts | 3 +- .../core/lsp/worker/language-server.worker.ts | 7 +- .../petrinaut/src/core/lsp/worker/protocol.ts | 3 +- .../core/simulation/compile-metric.test.ts | 3 +- .../src/core/simulation/compile-metric.ts | 3 +- .../core/simulation/compile-scenario.test.ts | 3 +- .../src/core/simulation/compile-scenario.ts | 3 +- .../src/core/simulation/simulation.test.ts | 3 +- .../src/core/simulation/simulation.ts | 7 +- .../simulator/build-simulation.test.ts | 1 + .../simulation/simulator/build-simulation.ts | 1 + .../check-transition-enablement.test.ts | 1 + .../simulator/compute-next-frame.test.ts | 3 +- .../simulator/compute-next-frame.ts | 1 + .../compute-place-next-state.test.ts | 3 +- .../compute-possible-transition.test.ts | 1 + .../simulator/compute-possible-transition.ts | 3 +- .../simulator/execute-transitions.test.ts | 1 + .../simulator/execute-transitions.ts | 3 +- ...emove-tokens-from-simulation-frame.test.ts | 1 + .../simulation/worker/simulation.worker.ts | 1 + .../petrinaut/src/examples/broken-machines.ts | 3 +- .../src/examples/deployment-pipeline.ts | 3 +- .../src/examples/satellites-launcher.ts | 3 +- .../petrinaut/src/examples/satellites.ts | 3 +- .../petrinaut/src/examples/sir-model.ts | 3 +- .../src/examples/supply-chain-stochastic.ts | 3 +- .../petrinaut/src/react/hooks/use-document.ts | 7 +- .../petrinaut/src/react/hooks/use-lsp.ts | 3 +- .../petrinaut/src/react/hooks/use-playback.ts | 9 ++- .../src/react/hooks/use-simulation.ts | 9 ++- .../petrinaut/src/react/lsp/context.ts | 10 +-- .../petrinaut/src/react/lsp/provider.tsx | 5 +- .../src/react/mutation-provider.test.tsx | 5 +- .../petrinaut/src/react/mutation-provider.tsx | 3 +- .../src/react/petrinaut-provider.tsx | 7 +- .../petrinaut/src/react/playback/context.ts | 1 + .../petrinaut/src/react/playback/provider.tsx | 3 +- .../src/react/simulation/provider.tsx | 3 +- .../src/react/state/editor-context.ts | 3 +- .../src/react/state/editor-provider.tsx | 3 +- .../src/react/state/use-selection-cleanup.ts | 3 +- .../src/react/state/use-selection.ts | 3 +- .../state/use-sync-editor-to-settings.ts | 3 +- .../src/react/state/user-settings-context.ts | 11 +-- .../react/state/user-settings-provider.tsx | 9 ++- .../react/use-handle-history-as-undo-redo.ts | 3 +- .../src/react/use-petrinaut-instance.ts | 3 +- .../petrinaut/src/ui/clipboard/clipboard.ts | 1 + .../src/ui/components/arc-item.stories.tsx | 3 +- .../petrinaut/src/ui/components/arc-item.tsx | 6 +- .../src/ui/components/dialog.stories.tsx | 6 +- .../petrinaut/src/ui/components/dialog.tsx | 6 +- .../petrinaut/src/ui/components/drawer.tsx | 3 +- .../src/ui/components/glass-panel.tsx | 3 +- .../src/ui/components/hoc/with-tooltip.tsx | 4 +- .../petrinaut/src/ui/components/menu.tsx | 4 +- .../src/ui/components/panel-primitives.tsx | 4 +- .../src/ui/components/popover.stories.tsx | 3 +- .../petrinaut/src/ui/components/popover.tsx | 6 +- .../src/ui/components/section.stories.tsx | 4 +- .../petrinaut/src/ui/components/section.tsx | 3 +- .../ui/components/segment-group.stories.tsx | 7 +- .../src/ui/components/segment-group.tsx | 4 +- .../petrinaut/src/ui/components/select.tsx | 6 +- .../src/ui/components/spreadsheet.stories.tsx | 5 +- .../src/ui/components/spreadsheet.tsx | 3 +- .../petrinaut/src/ui/components/stack.tsx | 1 + .../horizontal/horizontal-tabs-container.tsx | 1 + .../vertical/vertical-sub-views-container.tsx | 4 +- .../petrinaut/src/ui/components/tooltip.tsx | 6 +- .../petrinaut/src/ui/constants/ui-subviews.ts | 3 +- .../petrinaut/src/ui/file-io/export-sdcpn.ts | 3 +- .../petrinaut/src/ui/file-io/export-tikz.ts | 3 +- .../src/ui/lib/calculate-graph-layout.ts | 2 +- .../petrinaut/src/ui/lib/viewport.test.ts | 3 +- .../src/ui/monaco/code-editor.stories.tsx | 10 ++- .../petrinaut/src/ui/monaco/code-editor.tsx | 8 +- .../src/ui/monaco/completion-sync.tsx | 5 +- .../petrinaut/src/ui/monaco/context.ts | 3 +- .../src/ui/monaco/diagnostics-sync.tsx | 5 +- .../petrinaut/src/ui/monaco/hover-sync.tsx | 5 +- .../petrinaut/src/ui/monaco/provider.tsx | 3 +- .../src/ui/monaco/signature-help-sync.tsx | 3 +- .../src/ui/petrinaut-story-provider.tsx | 3 +- .../petrinaut/src/ui/petrinaut.stories.tsx | 5 +- .../@hashintel/petrinaut/src/ui/petrinaut.tsx | 9 ++- .../components/BottomBar/bottom-bar.tsx | 5 +- .../BottomBar/diagnostics-indicator.tsx | 3 +- .../playback-settings-menu.stories.tsx | 3 +- .../BottomBar/playback-settings-menu.tsx | 3 +- .../BottomBar/simulation-controls.tsx | 3 +- .../components/BottomBar/toolbar-button.tsx | 3 +- .../components/BottomBar/toolbar-modes.tsx | 12 +-- .../BottomBar/use-keyboard-shortcuts.ts | 11 +-- .../components/TopBar/mode-selector.tsx | 3 +- .../Editor/components/TopBar/top-bar.tsx | 3 +- .../src/ui/views/Editor/editor-view.tsx | 6 +- .../views/Editor/panels/BottomPanel/panel.tsx | 3 +- .../BottomPanel/subviews/diagnostics.tsx | 10 ++- .../subviews/simulation-settings.tsx | 6 +- .../subviews/simulation-timeline.tsx | 6 +- .../views/Editor/panels/LeftSideBar/panel.tsx | 3 +- .../subviews/differential-equations-list.tsx | 3 +- .../LeftSideBar/subviews/entities-tree.tsx | 10 ++- .../subviews/filterable-list-sub-view.tsx | 12 +-- .../LeftSideBar/subviews/nodes-list.tsx | 3 +- .../LeftSideBar/subviews/parameters-list.tsx | 6 +- .../LeftSideBar/subviews/search-panel.tsx | 10 ++- .../LeftSideBar/subviews/types-list.tsx | 3 +- .../PropertiesPanel/arc-properties/main.tsx | 8 +- .../differential-equation-properties/main.tsx | 7 +- .../subviews/main.tsx | 6 +- .../PropertiesPanel/multi-selection-panel.tsx | 14 ++-- .../Editor/panels/PropertiesPanel/panel.tsx | 3 +- .../parameter-properties/main.tsx | 5 +- .../parameter-properties/subviews/main.tsx | 6 +- .../PropertiesPanel/place-properties/main.tsx | 5 +- .../place-properties/subviews/main.tsx | 8 +- .../initial-state-editor.tsx | 5 +- .../subviews/place-initial-state/subview.tsx | 6 +- .../subviews/place-visualizer/subview.tsx | 6 +- .../visualizer-error-boundary.tsx | 3 +- .../properties-panel.stories.tsx | 17 ++-- .../transition-properties/main.tsx | 13 +-- .../transition-properties/subviews/main.tsx | 6 +- .../transition-firing-time/subview.tsx | 6 +- .../subviews/transition-results/subview.tsx | 6 +- .../PropertiesPanel/type-properties/main.tsx | 5 +- .../type-properties/subviews/main.tsx | 6 +- .../SimulateView/create-experiment-drawer.tsx | 12 +-- .../SimulateView/create-metric-drawer.tsx | 3 +- .../create-scenario-drawer.stories.tsx | 4 +- .../SimulateView/create-scenario-drawer.tsx | 6 +- .../panels/SimulateView/metric-form.tsx | 3 +- .../panels/SimulateView/scenario-form.tsx | 18 +++-- .../panels/SimulateView/simulate-view.tsx | 8 +- .../SimulateView/view-metric-drawer.tsx | 6 +- .../SimulateView/view-scenario-drawer.tsx | 6 +- .../src/ui/views/Editor/run-auto-layout.ts | 3 +- .../src/ui/views/SDCPN/components/arc.tsx | 4 +- .../SDCPN/components/classic-place-node.tsx | 6 +- .../components/classic-transition-node.tsx | 6 +- .../ui/views/SDCPN/components/mini-map.tsx | 6 +- .../ui/views/SDCPN/components/node-card.tsx | 6 +- .../ui/views/SDCPN/components/place-node.tsx | 8 +- .../SDCPN/components/transition-node.tsx | 8 +- .../SDCPN/components/viewport-controls.tsx | 6 +- .../components/viewport-settings-dialog.tsx | 6 +- .../SDCPN/hooks/use-apply-node-changes.ts | 5 +- .../SDCPN/hooks/use-recenter-on-panel-open.ts | 1 + .../SDCPN/hooks/use-sdcpn-to-react-flow.ts | 3 +- .../src/ui/views/SDCPN/reactflow-types.ts | 3 +- .../src/ui/views/SDCPN/sdcpn-view.tsx | 8 +- libs/@hashintel/query-editor/eslint.config.js | 3 +- .../query-editor/src/entity-query-editor.tsx | 18 +++-- .../src/entity-query-editor/query-form.tsx | 6 +- .../query-form/filter-row.tsx | 8 +- .../filter-row/chain-operator-selector.tsx | 6 +- .../filter-row/entity-type-selector.tsx | 8 +- .../filter-row/operator-selector.tsx | 6 +- .../filter-row/property-type-selector.tsx | 12 +-- .../query-form/filter-row/rhf-select.tsx | 6 +- .../filter-row/selector-group-wrapper.tsx | 1 + .../query-form/filter-row/type-selector.tsx | 6 +- .../query-form/filter-row/utils.ts | 2 +- .../query-form/filter-row/value-input.tsx | 4 +- .../src/entity-query-editor/query-preview.tsx | 7 +- .../src/entity-query-editor/utils.ts | 5 +- .../refractive/src/hoc/refractive.tsx | 5 +- .../src/maps/calculate-rounded-square-map.ts | 1 + .../refractive/stories/playground.stories.tsx | 4 +- libs/@hashintel/type-editor/eslint.config.js | 3 +- .../type-editor/src/entity-type-editor.tsx | 18 +++-- .../entity-type-editor/inheritance-row.tsx | 14 ++-- .../inheritance-row/inherited-type-card.tsx | 8 +- .../inheritance-row/use-validate-parents.ts | 16 ++-- .../src/entity-type-editor/link-list-card.tsx | 22 ++--- .../destination-entity-type-selector.tsx | 20 ++--- .../destination-entity-type.tsx | 3 +- .../destination-type-container.tsx | 3 +- .../link-list-card/inherited-link-row.tsx | 6 +- .../link-list-card/type-chip-label.tsx | 14 ++-- .../entity-type-editor/property-list-card.tsx | 24 +++--- .../disabled-checkbox-cell.tsx | 6 +- .../get-property-type-schema.ts | 18 ++--- .../inherited-property-row.tsx | 3 +- .../property-expected-values.tsx | 8 +- .../property-list-card/property-row.tsx | 15 ++-- .../property-title-cell.tsx | 18 +++-- .../property-title-cell/tag-icon.tsx | 3 +- .../property-list-card/property-type-form.tsx | 6 +- .../expected-value-selector.tsx | 36 +++++---- .../custom-expected-value-builder.tsx | 22 ++--- .../array-expected-value-builder.tsx | 20 ++--- .../array-min-max-items.tsx | 4 +- .../expected-value-chip.tsx | 8 +- .../shared/custom-expected-value-selector.tsx | 8 +- .../shared/delete-expected-value-modal.tsx | 8 +- .../shared/expected-value-badge.tsx | 10 ++- .../shared/expected-value-selector-context.ts | 3 +- .../expected-value-selector-form-values.ts | 3 +- .../shared/object-expected-value-builder.tsx | 12 +-- ...perty-type-to-form-data-expected-values.ts | 16 ++-- .../shared/arrow-turn-down-right-icon.tsx | 3 +- .../shared/empty-list-card.tsx | 4 +- .../shared/entity-type-table.tsx | 10 ++- .../insert-property-field/type-selector.tsx | 6 +- .../shared/insert-type-field.tsx | 7 +- .../src/entity-type-editor/shared/link.tsx | 4 +- .../shared/multiple-values-cell.tsx | 24 +++--- .../shared/question-icon.tsx | 4 +- .../entity-type-editor/shared/type-form.tsx | 46 ++++++----- .../shared/type-menu-cell.tsx | 32 ++++---- .../shared/use-filter-type-options.ts | 14 ++-- .../shared/use-inherited-values.ts | 12 +-- .../shared/use-state-callback.ts | 3 +- .../shared/use-type-versions.ts | 8 +- .../shared/version-upgrade-indicator.tsx | 6 +- .../src/get-entity-type-from-form-data.ts | 6 +- .../src/get-form-data-from-entity-type.ts | 3 +- .../src/shared/data-types-options-context.tsx | 20 ++--- .../src/shared/entity-type-context.tsx | 3 +- .../shared/entity-types-options-context.tsx | 7 +- .../src/shared/ontology-functions-context.tsx | 3 +- .../shared/property-types-options-context.tsx | 3 +- .../effect-dns/hickory/tests/dummy.test.ts | 3 +- libs/@local/eslint/src/builtIn.ts | 5 +- libs/@local/eslint/src/deprecated/block.ts | 3 +- libs/@local/eslint/src/deprecated/index.ts | 4 +- libs/@local/eslint/src/index.ts | 5 +- libs/@local/eslint/src/react.ts | 4 +- libs/@local/eslint/src/typescript.ts | 3 +- libs/@local/eslint/src/vitest.ts | 2 +- .../graph/sdk/typescript/src/data-type.ts | 18 ++--- .../graph/sdk/typescript/src/embeddings.ts | 3 +- .../graph/sdk/typescript/src/entity-type.ts | 24 +++--- .../@local/graph/sdk/typescript/src/entity.ts | 80 ++++++++++--------- libs/@local/graph/sdk/typescript/src/harpc.ts | 19 ++--- .../typescript/src/org-entity-restrictions.ts | 4 +- .../@local/graph/sdk/typescript/src/policy.ts | 3 +- .../typescript/src/principal/actor-group.ts | 3 +- .../sdk/typescript/src/principal/actor.ts | 3 +- .../src/principal/hash-instance-admins.ts | 8 +- .../sdk/typescript/src/principal/team.ts | 3 +- .../graph/sdk/typescript/src/principal/web.ts | 3 +- .../graph/sdk/typescript/src/property-type.ts | 16 ++-- .../graph/sdk/typescript/src/subgraph.ts | 13 +-- .../src/user-entity-restrictions.ts | 4 +- .../graph/sdk/typescript/tests/entity.test.ts | 7 +- .../harpc/client/typescript/src/net/Client.ts | 1 + .../client/typescript/src/net/Connection.ts | 3 +- .../typescript/src/net/NetworkLogger.ts | 3 +- .../client/typescript/src/net/Request.ts | 9 ++- .../client/typescript/src/net/Transaction.ts | 3 +- .../client/typescript/src/net/Transport.ts | 3 +- .../client/typescript/src/net/internal/dns.ts | 1 + .../typescript/src/net/internal/transport.ts | 5 +- .../models/request/RequestFlags.ts | 1 + .../models/request/RequestHeader.ts | 3 +- .../models/response/ResponseFlags.ts | 1 + .../models/response/ResponseHeader.ts | 3 +- .../tests/codec/JsonDecoder.test.ts | 9 ++- .../tests/codec/JsonEncoder.test.ts | 3 +- .../typescript/tests/net/Request.test.ts | 3 +- .../typescript/tests/wire-protocol/utils.ts | 1 + .../hash-backend-utils/src/aws-config.ts | 1 + .../src/create-graph-client.ts | 11 +-- .../hash-backend-utils/src/file-storage.ts | 5 +- .../file-storage/aws-s3-storage-provider.ts | 12 +-- libs/@local/hash-backend-utils/src/flows.ts | 27 ++++--- .../src/flows/get-flow-context.ts | 16 ++-- .../src/flows/get-flow-run-details.ts | 28 ++++--- .../src/flows/payload-storage.ts | 8 +- .../src/flows/process-flow-workflow.ts | 48 +++++------ .../common-activities.ts | 4 +- .../persist-flow-activity.ts | 21 ++--- ...-permission-to-run-flow-in-web-activity.ts | 3 +- .../get-step-definition-from-flow.ts | 3 +- .../process-flow-workflow/initialize-flow.ts | 5 +- .../pass-outputs-to-unprocessed-steps.ts | 11 +-- .../flows/shared/get-flow-run-entity-by-id.ts | 5 +- libs/@local/hash-backend-utils/src/google.ts | 12 +-- .../hash-backend-utils/src/hash-instance.ts | 12 +-- .../integrations/aviation/aero-api/client.ts | 4 +- .../aviation/aero-api/client/build-graph.ts | 14 ++-- .../aero-api/client/build-graph/aircraft.ts | 6 +- .../aero-api/client/build-graph/airline.ts | 6 +- .../aero-api/client/build-graph/airport.ts | 6 +- .../aero-api/client/build-graph/arrives-at.ts | 5 +- .../client/build-graph/departs-from.ts | 5 +- .../aero-api/client/build-graph/flight.ts | 6 +- .../aviation/flightradar24/client.ts | 5 +- .../aviation/flightradar24/client/flight.ts | 3 +- .../aviation/shared/primary-keys.ts | 5 +- .../src/internal-api-client.ts | 4 +- .../src/linear-type-mappings.ts | 15 ++-- libs/@local/hash-backend-utils/src/logger.ts | 5 +- .../hash-backend-utils/src/machine-actors.ts | 27 ++++--- .../hash-backend-utils/src/notifications.ts | 15 ++-- .../src/opentelemetry.test.ts | 4 +- .../hash-backend-utils/src/opentelemetry.ts | 7 +- .../@local/hash-backend-utils/src/postgres.ts | 2 +- .../src/public-user-account-id.ts | 3 +- .../hash-backend-utils/src/queue/redis.ts | 6 +- .../hash-backend-utils/src/service-usage.ts | 32 ++++---- .../src/simplified-graph.ts | 13 +-- .../interceptors/activities/sentry.ts | 1 + .../interceptors/workflows/opentelemetry.ts | 1 + .../temporal/interceptors/workflows/sentry.ts | 6 +- .../src/temporal/sinks/sentry.ts | 1 + .../src/temporal/worker-bootstrap.ts | 15 ++-- .../temporal/workflow-span-adapter.test.ts | 3 +- .../src/temporal/workflow-span-adapter.ts | 6 +- .../hash-backend-utils/src/user-secret.ts | 5 +- libs/@local/hash-backend-utils/src/vault.ts | 5 +- .../hash-isomorphic-utils/codegen.config.ts | 4 +- .../src/ai-inference-types.ts | 11 ++- .../src/block-collection.ts | 6 +- .../src/create-apollo-client.ts | 3 +- .../src/create-prose-mirror-state.ts | 7 +- .../hash-isomorphic-utils/src/data-types.ts | 16 ++-- .../src/entity-store-plugin.ts | 32 ++++---- .../hash-isomorphic-utils/src/entity-store.ts | 11 +-- .../hash-isomorphic-utils/src/entity.ts | 13 +-- .../flows/browser-plugin-flow-definitions.ts | 4 +- .../src/flows/browser-plugin-flow-types.ts | 5 +- .../src/flows/example-flow-definitions.ts | 3 +- .../src/flows/file-flow-definitions.ts | 3 +- .../src/flows/goal-flow-definitions.ts | 14 ++-- .../goal-flow-definitions/google-sheets.ts | 3 +- .../goal-flow-definitions/markdown-report.ts | 3 +- .../src/flows/integration-flow-definitions.ts | 3 +- .../src/flows/mappings.ts | 3 +- .../src/flows/schedule-types.ts | 3 +- .../src/flows/temporal-types.ts | 5 +- .../hash-isomorphic-utils/src/flows/types.ts | 19 +++-- .../hash-isomorphic-utils/src/flows/util.ts | 1 + .../src/frontend-paths.ts | 3 +- .../src/generate-entity-label.ts | 17 ++-- .../src/generate-system-types.ts | 5 +- .../src/graph-queries.ts | 25 +++--- .../src/graphql/base-codegen-config.ts | 4 +- .../hash-isomorphic-utils/src/json-utils.ts | 3 +- .../src/ontology-types.ts | 13 +-- .../hash-isomorphic-utils/src/organization.ts | 4 +- .../src/page-entity-type-ids.ts | 4 +- .../src/parse-text-from-file-types.ts | 3 +- .../src/prosemirror-manager.ts | 28 +++---- .../hash-isomorphic-utils/src/prosemirror.ts | 3 +- .../hash-isomorphic-utils/src/provenance.ts | 4 +- .../src/query-graphql-api.ts | 4 +- libs/@local/hash-isomorphic-utils/src/save.ts | 36 +++++---- .../src/service-usage.ts | 15 ++-- .../src/simplify-properties.ts | 6 +- .../src/system-types/academicpaper.ts | 3 +- .../src/system-types/book.ts | 11 ++- .../src/system-types/canvas.ts | 3 +- .../src/system-types/claim.ts | 3 +- .../src/system-types/commentnotification.ts | 3 +- .../src/system-types/document.ts | 3 +- .../src/system-types/docxdocument.ts | 3 +- .../src/system-types/facebookaccount.ts | 3 +- .../src/system-types/flight.ts | 13 ++- .../src/system-types/githubaccount.ts | 3 +- .../system-types/google/googlesheetsfile.ts | 11 ++- .../system-types/graphchangenotification.ts | 3 +- .../src/system-types/hashinstance.ts | 3 +- .../src/system-types/instagramaccount.ts | 3 +- .../src/system-types/linear/attachment.ts | 11 ++- .../src/system-types/linearintegration.ts | 3 +- .../src/system-types/linkedinaccount.ts | 3 +- .../src/system-types/machine.ts | 3 +- .../src/system-types/mentionnotification.ts | 3 +- .../src/system-types/note.ts | 3 +- .../src/system-types/pdfdocument.ts | 3 +- .../src/system-types/petrinet.ts | 3 +- .../src/system-types/pptxpresentation.ts | 3 +- .../src/system-types/prospectiveuser.ts | 3 +- .../src/system-types/spreadsheetfile.ts | 3 +- .../src/system-types/studyrecord.ts | 13 ++- .../src/system-types/tiktokaccount.ts | 3 +- .../src/system-types/twitteraccount.ts | 3 +- .../src/system-types/usagerecord.ts | 3 +- libs/@local/hash-isomorphic-utils/src/text.ts | 4 +- .../src/wrap-entities-plugin.ts | 5 +- .../repo-chores/node/scripts/ai-pr-review.ts | 3 +- .../ai-pr-review/fix-json-formatting.ts | 3 +- .../ai-pr-review/generate-comment-replies.ts | 5 +- .../ai-pr-review/generate-pr-review.ts | 5 +- .../node/scripts/ai-pr-review/get-pr-info.ts | 8 +- .../repo-chores/node/scripts/create-block.ts | 3 +- libs/@local/status/typescript/src/main.ts | 3 +- .../codegen.config.ts | 3 +- .../src/tests/admin-server.ts | 4 +- .../src/tests/email.test.ts | 3 +- .../tests/graph/authorization/policy.test.ts | 12 +-- .../graph/knowledge/primitive/entity.test.ts | 32 ++++---- .../knowledge/primitive/link-entity.test.ts | 12 +-- .../graph/knowledge/system-types/ai.test.ts | 3 +- .../knowledge/system-types/block.test.ts | 12 +-- .../system-types/comment-notification.test.ts | 10 ++- .../knowledge/system-types/comment.test.ts | 14 ++-- .../graph/knowledge/system-types/file.test.ts | 12 +-- .../system-types/hash-instance.test.ts | 12 +-- .../system-types/mention-notification.test.ts | 22 ++--- .../system-types/org-membership.test.ts | 12 +-- .../graph/knowledge/system-types/org.test.ts | 6 +- .../graph/knowledge/system-types/page.test.ts | 20 ++--- .../graph/knowledge/system-types/user.test.ts | 8 +- .../ontology/primitive/data-type.test.ts | 12 +-- .../ontology/primitive/entity-type.test.ts | 30 +++---- .../ontology/primitive/property-type.test.ts | 12 +-- .../src/tests/setup.ts | 3 +- .../src/tests/subgraph/circular.test.ts | 30 +++---- .../src/tests/subgraph/friendship.test.ts | 40 +++++----- .../src/tests/util.ts | 8 +- tests/hash-backend-load/rollup.config.ts | 1 + .../src/authentication/kratos.ts | 6 +- .../src/authentication/reauthenticate.ts | 6 +- .../src/authentication/registration.ts | 10 ++- .../src/authentication/session.ts | 5 +- tests/hash-backend-load/src/graph/api.ts | 8 +- tests/hash-backend-load/src/graph/user.ts | 9 ++- tests/hash-backend-load/src/main.ts | 3 +- tests/hash-backend-load/src/tracing/sdk.ts | 4 +- tests/hash-playwright/codegen.config.ts | 3 +- tests/hash-playwright/playwright.config.ts | 3 +- .../tests/extension/browser-plugin.spec.ts | 6 +- .../tests/features/entity-editing.spec.ts | 3 +- .../tests/features/inbox-page.spec.ts | 9 ++- .../tests/features/page-navigation.spec.ts | 3 +- .../tests/features/profile-page.spec.ts | 3 +- .../tests/shared/api-queries.ts | 25 +++--- tests/hash-playwright/tests/shared/runtime.ts | 3 +- .../tests/shared/signin-utils.ts | 3 +- .../tests/shared/signup-utils.ts | 3 +- 1975 files changed, 9653 insertions(+), 7393 deletions(-) diff --git a/apps/hash-ai-worker-ts/scripts/compare-llm-response.ts b/apps/hash-ai-worker-ts/scripts/compare-llm-response.ts index fd9245af312..1d60e7e67bc 100644 --- a/apps/hash-ai-worker-ts/scripts/compare-llm-response.ts +++ b/apps/hash-ai-worker-ts/scripts/compare-llm-response.ts @@ -2,16 +2,16 @@ import { mkdirSync, writeFileSync } from "node:fs"; import path from "node:path"; import { fileURLToPath } from "node:url"; -import type { WebId } from "@blockprotocol/type-system"; - import { getLlmResponse } from "../src/activities/shared/get-llm-response.js"; +import { graphApiClient } from "../src/activities/shared/graph-api-client.js"; +import { getAliceUserAccountId } from "../src/shared/testing-utilities/get-alice-user-account-id.js"; + import type { LlmParams, LlmResponse, } from "../src/activities/shared/get-llm-response/types.js"; -import { graphApiClient } from "../src/activities/shared/graph-api-client.js"; -import { getAliceUserAccountId } from "../src/shared/testing-utilities/get-alice-user-account-id.js"; import type { CompareLlmResponseConfig } from "./compare-llm-response/types.js"; +import type { WebId } from "@blockprotocol/type-system"; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); diff --git a/apps/hash-ai-worker-ts/scripts/compare-llm-response/types.ts b/apps/hash-ai-worker-ts/scripts/compare-llm-response/types.ts index e05033b2e4b..ea9ac523de8 100644 --- a/apps/hash-ai-worker-ts/scripts/compare-llm-response/types.ts +++ b/apps/hash-ai-worker-ts/scripts/compare-llm-response/types.ts @@ -1,11 +1,10 @@ -import type { ActorEntityUuid } from "@blockprotocol/type-system"; - import type { AnthropicLlmParams, GoogleAiParams, LlmParams, OpenAiLlmParams, } from "../../src/activities/shared/get-llm-response/types.js"; +import type { ActorEntityUuid } from "@blockprotocol/type-system"; export type CompareLlmResponseConfig = { models: LlmParams["model"][]; diff --git a/apps/hash-ai-worker-ts/scripts/sanitize-html.ts b/apps/hash-ai-worker-ts/scripts/sanitize-html.ts index e9019abc997..3f3b92b9436 100644 --- a/apps/hash-ai-worker-ts/scripts/sanitize-html.ts +++ b/apps/hash-ai-worker-ts/scripts/sanitize-html.ts @@ -2,10 +2,10 @@ import { mkdirSync, writeFileSync } from "node:fs"; import path from "node:path"; import { fileURLToPath } from "node:url"; -import type { Url } from "@blockprotocol/type-system"; - import { getWebPageActivity } from "../src/activities/get-web-page-activity.js"; +import type { Url } from "@blockprotocol/type-system"; + /** * @file a script which fetches a web page and sanitizes its HTML content for LLM consumption, * in the same way as is done when passing HTML to LLMs in flows, saving the sanitized HTML to a file. diff --git a/apps/hash-ai-worker-ts/src/activities.ts b/apps/hash-ai-worker-ts/src/activities.ts index 5839c309808..65091c692e2 100644 --- a/apps/hash-ai-worker-ts/src/activities.ts +++ b/apps/hash-ai-worker-ts/src/activities.ts @@ -1,24 +1,5 @@ import { getPropertyTypes } from "@blockprotocol/graph/stdlib"; -import type { - ActorEntityUuid, - BaseUrl, - DataTypeWithMetadata, - EntityId, - EntityTypeWithMetadata, - PropertyObject, - PropertyTypeWithMetadata, - VersionedUrl, -} from "@blockprotocol/type-system"; import { extractBaseUrl } from "@blockprotocol/type-system"; -import type { - Embedding, - EntityEmbedding, - GraphApi, -} from "@local/hash-graph-client"; -import type { - CreateEmbeddingsParams, - CreateEmbeddingsReturn, -} from "@local/hash-graph-sdk/embeddings"; import { queryEntities } from "@local/hash-graph-sdk/entity"; import { queryEntityTypeSubgraph } from "@local/hash-graph-sdk/entity-type"; import { @@ -26,8 +7,6 @@ import { generateEntityIdFilter, } from "@local/hash-isomorphic-utils/graph-queries"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { ParseTextFromFileParams } from "@local/hash-isomorphic-utils/parse-text-from-file-types"; -import type { OpenAI } from "openai"; import { getAiAssistantAccountIdActivity } from "./activities/get-ai-assistant-account-id-activity.js"; import { getDereferencedEntityTypesActivity } from "./activities/get-dereferenced-entity-types-activity.js"; @@ -43,6 +22,28 @@ import { createPropertyTypeEmbeddings, } from "./activities/shared/embeddings.js"; +import type { + ActorEntityUuid, + BaseUrl, + DataTypeWithMetadata, + EntityId, + EntityTypeWithMetadata, + PropertyObject, + PropertyTypeWithMetadata, + VersionedUrl, +} from "@blockprotocol/type-system"; +import type { + Embedding, + EntityEmbedding, + GraphApi, +} from "@local/hash-graph-client"; +import type { + CreateEmbeddingsParams, + CreateEmbeddingsReturn, +} from "@local/hash-graph-sdk/embeddings"; +import type { ParseTextFromFileParams } from "@local/hash-isomorphic-utils/parse-text-from-file-types"; +import type { OpenAI } from "openai"; + export { createGraphActivities } from "./activities/graph.js"; export const createAiActivities = ({ diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities.ts index 1c7fc4b63da..1f0b2f6c381 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities.ts @@ -1,7 +1,3 @@ -import type { CreateFlowActivities } from "@local/hash-backend-utils/flows"; -import type { VaultClient } from "@local/hash-backend-utils/vault"; -import type { AiFlowActionDefinitionId } from "@local/hash-isomorphic-utils/flows/action-definitions"; - import { answerQuestionAction } from "./flow-activities/answer-question-action.js"; import { generateFlowRunName } from "./flow-activities/generate-flow-run-name-activity.js"; import { generateWebQueriesAction } from "./flow-activities/generate-web-queries-action.js"; @@ -17,6 +13,10 @@ import { researchEntitiesAction } from "./flow-activities/research-entities-acti import { webSearchAction } from "./flow-activities/web-search-action.js"; import { writeGoogleSheetAction } from "./flow-activities/write-google-sheet-action.js"; +import type { CreateFlowActivities } from "@local/hash-backend-utils/flows"; +import type { VaultClient } from "@local/hash-backend-utils/vault"; +import type { AiFlowActionDefinitionId } from "@local/hash-isomorphic-utils/flows/action-definitions"; + export const createFlowActionActivities: CreateFlowActivities< AiFlowActionDefinitionId > = ({ vaultClient }: { vaultClient: VaultClient }) => ({ diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/answer-question-action.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/answer-question-action.ts index df6cc1fdd95..ce691f2d251 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/answer-question-action.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/answer-question-action.ts @@ -1,25 +1,21 @@ +import { Context } from "@temporalio/activity"; +import dedent from "dedent"; +import { CodeInterpreter, Sandbox } from "e2b"; + import { extractEntityUuidFromEntityId } from "@blockprotocol/type-system"; -import type { AiFlowActionActivity } from "@local/hash-backend-utils/flows"; import { getStorageProvider, resolvePayloadValue, } from "@local/hash-backend-utils/flows/payload-storage"; import { getSimpleGraph } from "@local/hash-backend-utils/simplified-graph"; import { queryEntitySubgraph } from "@local/hash-graph-sdk/entity"; -import type { AiActionStepOutput } from "@local/hash-isomorphic-utils/flows/action-definitions"; import { getSimplifiedAiFlowActionInputs } from "@local/hash-isomorphic-utils/flows/action-definitions"; -import type { FormattedText } from "@local/hash-isomorphic-utils/flows/types"; import { textFormats } from "@local/hash-isomorphic-utils/flows/types"; import { almostFullOntologyResolveDepths, currentTimeInstantTemporalAxes, } from "@local/hash-isomorphic-utils/graph-queries"; -import type { Status } from "@local/status"; import { StatusCode } from "@local/status"; -import { Context } from "@temporalio/activity"; -import dedent from "dedent"; -import { CodeInterpreter, Sandbox } from "e2b"; -import type { OpenAI } from "openai"; import { logger } from "../shared/activity-logger.js"; import { getFlowContext } from "../shared/get-flow-context.js"; @@ -29,11 +25,17 @@ import { mapLlmMessageToOpenAiMessages, mapOpenAiMessagesToLlmMessages, } from "../shared/get-llm-response/llm-message.js"; -import type { LlmToolDefinition } from "../shared/get-llm-response/types.js"; import { graphApiClient } from "../shared/graph-api-client.js"; import { mapActionInputEntitiesToEntities } from "../shared/map-action-input-entities-to-entities.js"; import { openAiSeed } from "../shared/open-ai-seed.js"; + +import type { LlmToolDefinition } from "../shared/get-llm-response/types.js"; import type { PermittedOpenAiModel } from "../shared/openai-client.js"; +import type { AiFlowActionActivity } from "@local/hash-backend-utils/flows"; +import type { AiActionStepOutput } from "@local/hash-isomorphic-utils/flows/action-definitions"; +import type { FormattedText } from "@local/hash-isomorphic-utils/flows/types"; +import type { Status } from "@local/status"; +import type { OpenAI } from "openai"; const answerTools: LlmToolDefinition[] = [ { diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/generate-flow-run-name-activity.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/generate-flow-run-name-activity.ts index 95ddad44736..8b146f1b2ce 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/generate-flow-run-name-activity.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/generate-flow-run-name-activity.ts @@ -2,12 +2,19 @@ import { automaticBrowserInferenceFlowDefinition, manualBrowserInferenceFlowDefinition, } from "@local/hash-isomorphic-utils/flows/browser-plugin-flow-definitions"; +import { goalFlowDefinitionIds } from "@local/hash-isomorphic-utils/flows/goal-flow-definitions"; + +import { getFlowContext } from "../shared/get-flow-context.js"; +import { getLlmResponse } from "../shared/get-llm-response.js"; +import { getTextContentFromLlmMessage } from "../shared/get-llm-response/llm-message.js"; +import { graphApiClient } from "../shared/graph-api-client.js"; + +import type { UsageTrackingParams } from "../shared/get-llm-response.js"; import type { AutomaticInferenceTriggerInputName, ManualInferenceTriggerInputName, } from "@local/hash-isomorphic-utils/flows/browser-plugin-flow-types"; import type { GoalFlowTriggerInput } from "@local/hash-isomorphic-utils/flows/goal-flow-definitions"; -import { goalFlowDefinitionIds } from "@local/hash-isomorphic-utils/flows/goal-flow-definitions"; import type { FlowActionDefinitionId, FlowDefinition, @@ -16,12 +23,6 @@ import type { PayloadKindValues, } from "@local/hash-isomorphic-utils/flows/types"; -import { getFlowContext } from "../shared/get-flow-context.js"; -import type { UsageTrackingParams } from "../shared/get-llm-response.js"; -import { getLlmResponse } from "../shared/get-llm-response.js"; -import { getTextContentFromLlmMessage } from "../shared/get-llm-response/llm-message.js"; -import { graphApiClient } from "../shared/graph-api-client.js"; - type GenerateFlowRunNameActivityParams = { flowDefinition: FlowDefinition; flowTrigger: FlowTrigger; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/generate-web-queries-action.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/generate-web-queries-action.ts index 2ebc05917c9..40f80e9c5ac 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/generate-web-queries-action.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/generate-web-queries-action.ts @@ -1,16 +1,18 @@ -import type { AiFlowActionActivity } from "@local/hash-backend-utils/flows"; +import dedent from "dedent"; + import { isInferenceModelName } from "@local/hash-isomorphic-utils/ai-inference-types"; import { getSimplifiedAiFlowActionInputs } from "@local/hash-isomorphic-utils/flows/action-definitions"; import { StatusCode } from "@local/status"; -import dedent from "dedent"; import { getFlowContext } from "../shared/get-flow-context.js"; import { getLlmResponse } from "../shared/get-llm-response.js"; import { getToolCallsFromLlmAssistantMessage } from "../shared/get-llm-response/llm-message.js"; -import type { LlmToolDefinition } from "../shared/get-llm-response/types.js"; import { graphApiClient } from "../shared/graph-api-client.js"; import { inferenceModelAliasToSpecificModel } from "../shared/inference-model-alias-to-llm-model.js"; +import type { LlmToolDefinition } from "../shared/get-llm-response/types.js"; +import type { AiFlowActionActivity } from "@local/hash-backend-utils/flows"; + const webQueriesSystemPrompt = dedent(` You are a Web Search Assistant. The user provides you with a text prompt, from which you create one or more queries diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/get-file-from-url-action.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/get-file-from-url-action.ts index 1be382b6b01..7214a93544c 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/get-file-from-url-action.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/get-file-from-url-action.ts @@ -1,11 +1,13 @@ -import type { AiFlowActionActivity } from "@local/hash-backend-utils/flows"; +import { Context } from "@temporalio/activity"; + import { getSimplifiedAiFlowActionInputs } from "@local/hash-isomorphic-utils/flows/action-definitions"; import { StatusCode } from "@local/status"; -import { Context } from "@temporalio/activity"; import { logProgress } from "../shared/log-progress.js"; import { createFileEntityFromUrl } from "./shared/create-file-entity-from-url.js"; +import type { AiFlowActionActivity } from "@local/hash-backend-utils/flows"; + export const getFileFromUrlAction: AiFlowActionActivity< "getFileFromUrl" > = async ({ inputs }) => { diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/get-web-page-by-url-action.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/get-web-page-by-url-action.ts index 835d04cb3df..8825ef3943b 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/get-web-page-by-url-action.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/get-web-page-by-url-action.ts @@ -1,10 +1,11 @@ -import type { Url } from "@blockprotocol/type-system"; -import type { AiFlowActionActivity } from "@local/hash-backend-utils/flows"; import { getSimplifiedAiFlowActionInputs } from "@local/hash-isomorphic-utils/flows/action-definitions"; import { StatusCode } from "@local/status"; import { getWebPageActivity } from "../get-web-page-activity.js"; +import type { Url } from "@blockprotocol/type-system"; +import type { AiFlowActionActivity } from "@local/hash-backend-utils/flows"; + export const getWebPageByUrlAction: AiFlowActionActivity< "getWebPageByUrl" > = async ({ inputs }) => { diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/get-web-page-summary-action.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/get-web-page-summary-action.ai.test.ts index cf7aae2b4af..23cc441661d 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/get-web-page-summary-action.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/get-web-page-summary-action.ai.test.ts @@ -1,11 +1,13 @@ import "../../shared/testing-utilities/mock-get-flow-context.js"; -import type { InputNameForAiFlowAction } from "@local/hash-isomorphic-utils/flows/action-definitions"; -import { actionDefinitions } from "@local/hash-isomorphic-utils/flows/action-definitions"; -import type { StepInput } from "@local/hash-isomorphic-utils/flows/types"; import { expect, test } from "vitest"; +import { actionDefinitions } from "@local/hash-isomorphic-utils/flows/action-definitions"; + import { getWebPageSummaryAction } from "./get-web-page-summary-action.js"; +import type { InputNameForAiFlowAction } from "@local/hash-isomorphic-utils/flows/action-definitions"; +import type { StepInput } from "@local/hash-isomorphic-utils/flows/types"; + test( "Test getWebPageSummaryAction", async () => { diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/get-web-page-summary-action.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/get-web-page-summary-action.ts index 17064aa2985..0f0b5cfa2e4 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/get-web-page-summary-action.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/get-web-page-summary-action.ts @@ -1,9 +1,8 @@ -import type { Url } from "@blockprotocol/type-system"; -import type { AiFlowActionActivity } from "@local/hash-backend-utils/flows"; +import dedent from "dedent"; + import { isInferenceModelName } from "@local/hash-isomorphic-utils/ai-inference-types"; import { getSimplifiedAiFlowActionInputs } from "@local/hash-isomorphic-utils/flows/action-definitions"; import { StatusCode } from "@local/status"; -import dedent from "dedent"; import { getWebPageActivity } from "../get-web-page-activity.js"; import { getFlowContext } from "../shared/get-flow-context.js"; @@ -12,6 +11,9 @@ import { getTextContentFromLlmMessage } from "../shared/get-llm-response/llm-mes import { graphApiClient } from "../shared/graph-api-client.js"; import { inferenceModelAliasToSpecificModel } from "../shared/inference-model-alias-to-llm-model.js"; +import type { Url } from "@blockprotocol/type-system"; +import type { AiFlowActionActivity } from "@local/hash-backend-utils/flows"; + const generateSummarizeWebPageSystemPrompt = (params: { numberOfSentences: number; }): string => diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/infer-entities-from-content-action.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/infer-entities-from-content-action.ts index 659b2b9fdb4..85b36e0bda2 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/infer-entities-from-content-action.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/infer-entities-from-content-action.ts @@ -1,39 +1,40 @@ -import type { - EntityId, - EntityUuid, - OriginProvenance, - PropertyObjectMetadata, - SourceProvenance, - VersionedUrl, -} from "@blockprotocol/type-system"; import { currentTimestamp, entityIdFromComponents, } from "@blockprotocol/type-system"; import { typedKeys } from "@local/advanced-types/typed-entries"; -import type { AiFlowActionActivity } from "@local/hash-backend-utils/flows"; import { getStorageProvider, storePayload, } from "@local/hash-backend-utils/flows/payload-storage"; import { isInferenceModelName } from "@local/hash-isomorphic-utils/ai-inference-types"; import { getSimplifiedAiFlowActionInputs } from "@local/hash-isomorphic-utils/flows/action-definitions"; -import type { ProposedEntity } from "@local/hash-isomorphic-utils/flows/types"; import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; import { StatusCode } from "@local/status"; import { getAiAssistantAccountIdActivity } from "../get-ai-assistant-account-id-activity.js"; import { getDereferencedEntityTypesActivity } from "../get-dereferenced-entity-types-activity.js"; import { inferEntitiesFromWebPageActivity } from "../infer-entities-from-web-page-activity.js"; -import type { - DereferencedEntityTypesByTypeId, - InferenceState, -} from "../infer-entities/inference-types.js"; import { getFlowContext } from "../shared/get-flow-context.js"; import { graphApiClient } from "../shared/graph-api-client.js"; import { inferenceModelAliasToSpecificModel } from "../shared/inference-model-alias-to-llm-model.js"; import { isPermittedOpenAiModel } from "../shared/openai-client.js"; +import type { + DereferencedEntityTypesByTypeId, + InferenceState, +} from "../infer-entities/inference-types.js"; +import type { + EntityId, + EntityUuid, + OriginProvenance, + PropertyObjectMetadata, + SourceProvenance, + VersionedUrl, +} from "@blockprotocol/type-system"; +import type { AiFlowActionActivity } from "@local/hash-backend-utils/flows"; +import type { ProposedEntity } from "@local/hash-isomorphic-utils/flows/types"; + export const inferEntitiesFromContentAction: AiFlowActionActivity< "inferEntitiesFromContent" > = async ({ inputs }) => { diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/infer-metadata-from-document-action.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/infer-metadata-from-document-action.ts index 511480e7f9c..e173e011076 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/infer-metadata-from-document-action.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/infer-metadata-from-document-action.ts @@ -1,28 +1,17 @@ -import type { - OriginProvenance, - PropertyProvenance, - ProvidedEntityEditionProvenance, - SourceProvenance, - Url, -} from "@blockprotocol/type-system"; +import { Context } from "@temporalio/activity"; +import PDFParser from "pdf2json"; + import { extractEntityUuidFromEntityId } from "@blockprotocol/type-system"; -import type { AiFlowActionActivity } from "@local/hash-backend-utils/flows"; import { getStorageProvider, storePayload, } from "@local/hash-backend-utils/flows/payload-storage"; -import type { HashEntity } from "@local/hash-graph-sdk/entity"; import { getSimplifiedAiFlowActionInputs } from "@local/hash-isomorphic-utils/flows/action-definitions"; -import type { PersistedEntityMetadata } from "@local/hash-isomorphic-utils/flows/types"; import { blockProtocolPropertyTypes, systemPropertyTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { File } from "@local/hash-isomorphic-utils/system-types/shared"; import { StatusCode } from "@local/status"; -import { Context } from "@temporalio/activity"; -import type { Output } from "pdf2json"; -import PDFParser from "pdf2json"; import { getAiAssistantAccountIdActivity } from "../get-ai-assistant-account-id-activity.js"; import { createInferredEntityNotification } from "../shared/create-inferred-entity-notification.js"; @@ -35,6 +24,19 @@ import { generateDocumentPropertyPatches } from "./infer-metadata-from-document- import { generateDocumentProposedEntitiesAndCreateClaims } from "./infer-metadata-from-document-action/generate-proposed-entities-and-claims.js"; import { getLlmAnalysisOfDoc } from "./infer-metadata-from-document-action/get-llm-analysis-of-doc.js"; +import type { + OriginProvenance, + PropertyProvenance, + ProvidedEntityEditionProvenance, + SourceProvenance, + Url, +} from "@blockprotocol/type-system"; +import type { AiFlowActionActivity } from "@local/hash-backend-utils/flows"; +import type { HashEntity } from "@local/hash-graph-sdk/entity"; +import type { PersistedEntityMetadata } from "@local/hash-isomorphic-utils/flows/types"; +import type { File } from "@local/hash-isomorphic-utils/system-types/shared"; +import type { Output } from "pdf2json"; + const isFileEntity = (entity: HashEntity): entity is HashEntity => systemPropertyTypes.fileStorageKey.propertyTypeBaseUrl in entity.properties && blockProtocolPropertyTypes.fileUrl.propertyTypeBaseUrl in entity.properties; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/infer-metadata-from-document-action/generate-proposed-entities-and-claims.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/infer-metadata-from-document-action/generate-proposed-entities-and-claims.ts index c6159f2eeb7..adc1638e314 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/infer-metadata-from-document-action/generate-proposed-entities-and-claims.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/infer-metadata-from-document-action/generate-proposed-entities-and-claims.ts @@ -1,3 +1,20 @@ +import { Context } from "@temporalio/activity"; + +import { entityIdFromComponents } from "@blockprotocol/type-system"; +import { HashEntity, HashLinkEntity } from "@local/hash-graph-sdk/entity"; +import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; +import { + blockProtocolPropertyTypes, + systemDataTypes, + systemEntityTypes, + systemLinkEntityTypes, +} from "@local/hash-isomorphic-utils/ontology-type-ids"; + +import { getFlowContext } from "../../shared/get-flow-context.js"; +import { graphApiClient } from "../../shared/graph-api-client.js"; +import { logProgress } from "../../shared/log-progress.js"; + +import type { DocumentData } from "./get-llm-analysis-of-doc.js"; import type { ActorEntityUuid, EntityId, @@ -7,16 +24,7 @@ import type { ProvidedEntityEditionProvenance, WebId, } from "@blockprotocol/type-system"; -import { entityIdFromComponents } from "@blockprotocol/type-system"; -import { HashEntity, HashLinkEntity } from "@local/hash-graph-sdk/entity"; import type { ProposedEntity } from "@local/hash-isomorphic-utils/flows/types"; -import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; -import { - blockProtocolPropertyTypes, - systemDataTypes, - systemEntityTypes, - systemLinkEntityTypes, -} from "@local/hash-isomorphic-utils/ontology-type-ids"; import type { Claim as ClaimEntity, HasObject, @@ -27,12 +35,6 @@ import type { PersonProperties, TextDataTypeMetadata, } from "@local/hash-isomorphic-utils/system-types/shared"; -import { Context } from "@temporalio/activity"; - -import { getFlowContext } from "../../shared/get-flow-context.js"; -import { graphApiClient } from "../../shared/graph-api-client.js"; -import { logProgress } from "../../shared/log-progress.js"; -import type { DocumentData } from "./get-llm-analysis-of-doc.js"; const createClaim = async ({ claimText, diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/infer-metadata-from-document-action/get-llm-analysis-of-doc.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/infer-metadata-from-document-action/get-llm-analysis-of-doc.ts index cbe9a332427..7a522130761 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/infer-metadata-from-document-action/get-llm-analysis-of-doc.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/infer-metadata-from-document-action/get-llm-analysis-of-doc.ts @@ -1,16 +1,11 @@ -import { getEntityTypes } from "@blockprotocol/graph/stdlib"; -import type { - EntityId, - PropertyObjectWithMetadata, - PropertyProvenance, - PropertyValue, - PropertyWithMetadata, - Url, - VersionedUrl, -} from "@blockprotocol/type-system"; import { SchemaType } from "@google-cloud/vertexai"; +import dedent from "dedent"; +import get from "lodash/get.js"; +import set from "lodash/set.js"; +import unset from "lodash/unset.js"; + +import { getEntityTypes } from "@blockprotocol/graph/stdlib"; import { sleep } from "@local/hash-backend-utils/utils"; -import type { HashEntity } from "@local/hash-graph-sdk/entity"; import { queryEntityTypeSubgraph } from "@local/hash-graph-sdk/entity-type"; import { almostFullOntologyResolveDepths, @@ -18,11 +13,6 @@ import { } from "@local/hash-isomorphic-utils/graph-queries"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { stringifyPropertyValue } from "@local/hash-isomorphic-utils/stringify-property-value"; -import type { File } from "@local/hash-isomorphic-utils/system-types/shared"; -import dedent from "dedent"; -import get from "lodash/get.js"; -import set from "lodash/set.js"; -import unset from "lodash/unset.js"; import { logger } from "../../shared/activity-logger.js"; import { @@ -39,12 +29,24 @@ import { type LlmMessageTextContent, type LlmUserMessage, } from "../../shared/get-llm-response/llm-message.js"; +import { graphApiClient } from "../../shared/graph-api-client.js"; +import { judgeAiOutputs } from "../../shared/judge-ai-outputs.js"; + import type { LlmParams, LlmToolDefinition, } from "../../shared/get-llm-response/types.js"; -import { graphApiClient } from "../../shared/graph-api-client.js"; -import { judgeAiOutputs } from "../../shared/judge-ai-outputs.js"; +import type { + EntityId, + PropertyObjectWithMetadata, + PropertyProvenance, + PropertyValue, + PropertyWithMetadata, + Url, + VersionedUrl, +} from "@blockprotocol/type-system"; +import type { HashEntity } from "@local/hash-graph-sdk/entity"; +import type { File } from "@local/hash-isomorphic-utils/system-types/shared"; const generateOutputSchema = ( dereferencedDocEntityTypes: DereferencedEntityType[], diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/persist-entities-action.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/persist-entities-action.ts index 2db60d0a22d..03b70558a48 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/persist-entities-action.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/persist-entities-action.ts @@ -1,5 +1,5 @@ -import type { EntityId } from "@blockprotocol/type-system"; -import type { AiFlowActionActivity } from "@local/hash-backend-utils/flows"; +import { Context } from "@temporalio/activity"; + import { getStorageProvider, resolvePayloadValue, @@ -7,16 +7,18 @@ import { } from "@local/hash-backend-utils/flows/payload-storage"; import { flattenPropertyMetadata } from "@local/hash-graph-sdk/entity"; import { getSimplifiedAiFlowActionInputs } from "@local/hash-isomorphic-utils/flows/action-definitions"; +import { StatusCode } from "@local/status"; + +import { getFlowContext } from "../shared/get-flow-context.js"; +import { fileEntityTypeIds, persistEntity } from "./persist-entity-action.js"; + +import type { EntityId } from "@blockprotocol/type-system"; +import type { AiFlowActionActivity } from "@local/hash-backend-utils/flows"; import type { FailedEntityProposal, PersistedEntityMetadata, ProposedEntityWithResolvedLinks, } from "@local/hash-isomorphic-utils/flows/types"; -import { StatusCode } from "@local/status"; -import { Context } from "@temporalio/activity"; - -import { getFlowContext } from "../shared/get-flow-context.js"; -import { fileEntityTypeIds, persistEntity } from "./persist-entity-action.js"; export const persistEntitiesAction: AiFlowActionActivity< "persistEntities" diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/persist-entity-action.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/persist-entity-action.ts index e77ad737921..81f2d583a5e 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/persist-entity-action.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/persist-entity-action.ts @@ -1,31 +1,20 @@ -import type { EntityId, VersionedUrl } from "@blockprotocol/type-system"; +import { Context } from "@temporalio/activity"; +import { backOff } from "exponential-backoff"; + import { extractEntityUuidFromEntityId } from "@blockprotocol/type-system"; -import type { AiFlowActionActivity } from "@local/hash-backend-utils/flows"; import { getStorageProvider, resolvePayloadValue, } from "@local/hash-backend-utils/flows/payload-storage"; import { getWebMachineId } from "@local/hash-backend-utils/machine-actors"; -import type { CreateEntityParameters } from "@local/hash-graph-sdk/entity"; import { HashEntity, HashLinkEntity, mergePropertyObjectAndMetadata, } from "@local/hash-graph-sdk/entity"; import { getSimplifiedAiFlowActionInputs } from "@local/hash-isomorphic-utils/flows/action-definitions"; -import type { - PersistedEntityMetadata, - ProposedEntityWithResolvedLinks, -} from "@local/hash-isomorphic-utils/flows/types"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { - HasObject, - HasSubject, -} from "@local/hash-isomorphic-utils/system-types/claim"; -import type { FileProperties } from "@local/hash-isomorphic-utils/system-types/shared"; import { StatusCode } from "@local/status"; -import { Context } from "@temporalio/activity"; -import { backOff } from "exponential-backoff"; import { getAiAssistantAccountIdActivity } from "../get-ai-assistant-account-id-activity.js"; import { extractErrorMessage } from "../infer-entities/shared/extract-validation-failure-details.js"; @@ -37,13 +26,26 @@ import { import { getFlowContext } from "../shared/get-flow-context.js"; import { graphApiClient } from "../shared/graph-api-client.js"; import { logProgress } from "../shared/log-progress.js"; -import type { MatchedEntityUpdate } from "../shared/match-existing-entity.js"; import { createFileEntityFromUrl } from "./shared/create-file-entity-from-url.js"; import { getEntityUpdate, getLatestEntityById, } from "./shared/graph-requests.js"; +import type { MatchedEntityUpdate } from "../shared/match-existing-entity.js"; +import type { EntityId, VersionedUrl } from "@blockprotocol/type-system"; +import type { AiFlowActionActivity } from "@local/hash-backend-utils/flows"; +import type { CreateEntityParameters } from "@local/hash-graph-sdk/entity"; +import type { + PersistedEntityMetadata, + ProposedEntityWithResolvedLinks, +} from "@local/hash-isomorphic-utils/flows/types"; +import type { + HasObject, + HasSubject, +} from "@local/hash-isomorphic-utils/system-types/claim"; +import type { FileProperties } from "@local/hash-isomorphic-utils/system-types/shared"; + export const fileEntityTypeIds: VersionedUrl[] = [ systemEntityTypes.file.entityTypeId, systemEntityTypes.imageFile.entityTypeId, diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/process-automatic-browsing-settings-action.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/process-automatic-browsing-settings-action.ts index 1824f728de8..8f06fce761a 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/process-automatic-browsing-settings-action.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/process-automatic-browsing-settings-action.ts @@ -1,16 +1,17 @@ -import type { AiFlowActionActivity } from "@local/hash-backend-utils/flows"; -import type { HashEntity } from "@local/hash-graph-sdk/entity"; import { getSimplifiedAiFlowActionInputs } from "@local/hash-isomorphic-utils/flows/action-definitions"; -import type { AutomaticInferenceSettings } from "@local/hash-isomorphic-utils/flows/browser-plugin-flow-types"; import { generateVersionedUrlMatchingFilter } from "@local/hash-isomorphic-utils/graph-queries"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { BrowserPluginSettings } from "@local/hash-isomorphic-utils/system-types/shared"; import { StatusCode } from "@local/status"; import { getEntityByFilter } from "../shared/get-entity-by-filter.js"; import { getFlowContext } from "../shared/get-flow-context.js"; import { graphApiClient } from "../shared/graph-api-client.js"; +import type { AiFlowActionActivity } from "@local/hash-backend-utils/flows"; +import type { HashEntity } from "@local/hash-graph-sdk/entity"; +import type { AutomaticInferenceSettings } from "@local/hash-isomorphic-utils/flows/browser-plugin-flow-types"; +import type { BrowserPluginSettings } from "@local/hash-isomorphic-utils/system-types/shared"; + export const processAutomaticBrowsingSettingsAction: AiFlowActionActivity< "processAutomaticBrowsingSettings" > = async ({ inputs }) => { diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action.ai.test.ts index 2b616fe718c..63988df8e2a 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action.ai.test.ts @@ -12,6 +12,7 @@ import { fileURLToPath } from "node:url"; import { expect, test } from "vitest"; import { researchEntitiesAction } from "./research-entities-action.js"; + import type { CoordinatingAgentState } from "./research-entities-action/shared/coordinators.js"; const __filename = fileURLToPath(import.meta.url); diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action.ts index 13cf2d0c442..d8f45c57f9a 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action.ts @@ -1,8 +1,3 @@ -import type { - OriginProvenance, - ProvidedEntityEditionProvenance, -} from "@blockprotocol/type-system"; -import type { AiFlowActionActivity } from "@local/hash-backend-utils/flows"; import { queryEntities } from "@local/hash-graph-sdk/entity"; import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; import { @@ -18,7 +13,13 @@ import { heartbeatAndWaitCancellation, } from "./research-entities-action/checkpoints.js"; import { runCoordinatingAgent } from "./research-entities-action/coordinating-agent.js"; + import type { CoordinatingAgentState } from "./research-entities-action/shared/coordinators.js"; +import type { + OriginProvenance, + ProvidedEntityEditionProvenance, +} from "@blockprotocol/type-system"; +import type { AiFlowActionActivity } from "@local/hash-backend-utils/flows"; /** * An action to research entities of requested types according to the user's research goal. diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/checkpoints.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/checkpoints.ts index 483c57751a0..1d2d40b67c4 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/checkpoints.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/checkpoints.ts @@ -1,17 +1,19 @@ -import { parseHistoryItemPayload } from "@local/hash-backend-utils/temporal/parse-history-item-payload"; -import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; import { Context } from "@temporalio/activity"; import proto from "@temporalio/proto"; +import { parseHistoryItemPayload } from "@local/hash-backend-utils/temporal/parse-history-item-payload"; +import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; + import { heartbeatTimeoutSeconds } from "../../../shared/heartbeats.js"; -import type { - FlowSignal, - ResearchActionCheckpointState, -} from "../../../shared/signals.js"; import { researchActionCheckpointSignal } from "../../../shared/signals.js"; import { logger } from "../../shared/activity-logger.js"; import { getTemporalClient } from "../../shared/get-flow-context.js"; import { flushLogs, logProgress } from "../../shared/log-progress.js"; + +import type { + FlowSignal, + ResearchActionCheckpointState, +} from "../../../shared/signals.js"; import type { CoordinatingAgentState } from "./shared/coordinators.js"; /** diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent.ts index 305a13ebd81..c136ffb4354 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent.ts @@ -1,10 +1,6 @@ -import type { - EntityUuid, - OriginProvenance, - Url, -} from "@blockprotocol/type-system"; +import { Context } from "@temporalio/activity"; + import { entityIdFromComponents } from "@blockprotocol/type-system"; -import type { AiFlowActionActivity } from "@local/hash-backend-utils/flows"; import { getStorageProvider, resolvePayloadValue, @@ -12,16 +8,10 @@ import { } from "@local/hash-backend-utils/flows/payload-storage"; import { flattenPropertyMetadata } from "@local/hash-graph-sdk/entity"; import { getSimplifiedAiFlowActionInputs } from "@local/hash-isomorphic-utils/flows/action-definitions"; -import type { - ProposedEntity, - StepInput, -} from "@local/hash-isomorphic-utils/flows/types"; import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-properties"; -import type { FileProperties } from "@local/hash-isomorphic-utils/system-types/shared"; import { StatusCode } from "@local/status"; -import { Context } from "@temporalio/activity"; import { getDereferencedEntityTypesActivity } from "../../get-dereferenced-entity-types-activity.js"; import { logger } from "../../shared/activity-logger.js"; @@ -37,24 +27,36 @@ import { createCheckpoint } from "./checkpoints.js"; import { createInitialPlan } from "./coordinating-agent/create-initial-plan.js"; import { processCompleteToolCall } from "./coordinating-agent/process-complete-tool-call.js"; import { requestCoordinatorActions } from "./coordinating-agent/request-coordinator-actions.js"; -import type { ExistingEntitySummary } from "./coordinating-agent/summarize-existing-entities.js"; import { summarizeExistingEntities } from "./coordinating-agent/summarize-existing-entities.js"; import { updateStateFromInferredClaims } from "./coordinating-agent/update-state-from-inferred-claims.js"; -import type { - ParsedCoordinatorToolCall, - ParsedCoordinatorToolCallMap, -} from "./shared/coordinator-tools.js"; import { getSomeToolCallResults, handleStopTasksRequests, nullReturns, triggerToolCallsRequests, } from "./shared/coordinator-tools.js"; +import { processCommonStateMutationsFromToolResults } from "./shared/coordinators.js"; + +import type { ExistingEntitySummary } from "./coordinating-agent/summarize-existing-entities.js"; +import type { + ParsedCoordinatorToolCall, + ParsedCoordinatorToolCallMap, +} from "./shared/coordinator-tools.js"; import type { CoordinatingAgentInput, CoordinatingAgentState, } from "./shared/coordinators.js"; -import { processCommonStateMutationsFromToolResults } from "./shared/coordinators.js"; +import type { + EntityUuid, + OriginProvenance, + Url, +} from "@blockprotocol/type-system"; +import type { AiFlowActionActivity } from "@local/hash-backend-utils/flows"; +import type { + ProposedEntity, + StepInput, +} from "@local/hash-isomorphic-utils/flows/types"; +import type { FileProperties } from "@local/hash-isomorphic-utils/system-types/shared"; /** * Takes the inputs to the coordinating agent, parses them, and: diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/check-delegated-tasks-agent.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/check-delegated-tasks-agent.ts index 359bfc74579..f2f577ecc44 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/check-delegated-tasks-agent.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/check-delegated-tasks-agent.ts @@ -1,16 +1,17 @@ import dedent from "dedent"; -import type { JSONSchemaDefinition } from "openai/lib/jsonschema"; import { getFlowContext } from "../../../shared/get-flow-context.js"; import { getLlmResponse } from "../../../shared/get-llm-response.js"; import { getToolCallsFromLlmAssistantMessage } from "../../../shared/get-llm-response/llm-message.js"; -import type { LlmToolDefinition } from "../../../shared/get-llm-response/types.js"; import { graphApiClient } from "../../../shared/graph-api-client.js"; +import { simplifyEntityTypeForLlmConsumption } from "../shared/simplify-for-llm-consumption.js"; + +import type { LlmToolDefinition } from "../../../shared/get-llm-response/types.js"; import type { CoordinatingAgentInput, CoordinatingAgentState, } from "../shared/coordinators.js"; -import { simplifyEntityTypeForLlmConsumption } from "../shared/simplify-for-llm-consumption.js"; +import type { JSONSchemaDefinition } from "openai/lib/jsonschema"; type SubmitVerdictToolCallInput = { [delegatedTaskId: string]: { diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/create-initial-plan.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/create-initial-plan.ts index 80fddeee3d9..2c96ef4288a 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/create-initial-plan.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/create-initial-plan.ts @@ -3,10 +3,6 @@ import dedent from "dedent"; import { logger } from "../../../shared/activity-logger.js"; import { getFlowContext } from "../../../shared/get-flow-context.js"; import { getLlmResponse } from "../../../shared/get-llm-response.js"; -import type { - LlmMessage, - LlmUserMessage, -} from "../../../shared/get-llm-response/llm-message.js"; import { getToolCallsFromLlmAssistantMessage } from "../../../shared/get-llm-response/llm-message.js"; import { graphApiClient } from "../../../shared/graph-api-client.js"; import { stringify } from "../../../shared/stringify.js"; @@ -15,16 +11,21 @@ import { type CoordinatorToolCallArguments, generateToolDefinitions, } from "../shared/coordinator-tools.js"; -import type { - CoordinatingAgentInput, - CoordinatingAgentState, -} from "../shared/coordinators.js"; import { coordinatingAgentModel } from "../shared/coordinators.js"; import { generateInitialUserMessage, generateSystemPromptPrefix, } from "./generate-messages.js"; +import type { + LlmMessage, + LlmUserMessage, +} from "../../../shared/get-llm-response/llm-message.js"; +import type { + CoordinatingAgentInput, + CoordinatingAgentState, +} from "../shared/coordinators.js"; + const maximumRetries = 3; export const createInitialPlan = async (params: { diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/generate-messages.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/generate-messages.ts index 032b494d759..26511754a8f 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/generate-messages.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/generate-messages.ts @@ -1,16 +1,17 @@ import dedent from "dedent"; -import type { LlmMessageTextContent } from "../../../shared/get-llm-response/llm-message.js"; import { generateOutstandingTasksDescription } from "../shared/coordinator-tools.js"; -import type { - CoordinatingAgentInput, - CoordinatingAgentState, -} from "../shared/coordinators.js"; import { simplifyEntityTypeForLlmConsumption, simplifyProposedEntityForLlmConsumption, } from "../shared/simplify-for-llm-consumption.js"; +import type { LlmMessageTextContent } from "../../../shared/get-llm-response/llm-message.js"; +import type { + CoordinatingAgentInput, + CoordinatingAgentState, +} from "../shared/coordinators.js"; + export const generateProgressReport = (params: { input: CoordinatingAgentInput; state: CoordinatingAgentState; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/process-complete-tool-call.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/process-complete-tool-call.ts index e8068dc98ca..2c39b8cdcf7 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/process-complete-tool-call.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/process-complete-tool-call.ts @@ -1,6 +1,7 @@ import dedent from "dedent"; import { logger } from "../../../shared/activity-logger.js"; + import type { ParsedLlmToolCall } from "../../../shared/get-llm-response/types.js"; import type { ParsedCoordinatorToolCallMap } from "../shared/coordinator-tools.js"; import type { diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/request-coordinator-actions.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/request-coordinator-actions.ts index 89ab76621b4..ebfa1dfe814 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/request-coordinator-actions.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/request-coordinator-actions.ts @@ -2,15 +2,9 @@ import dedent from "dedent"; import { getFlowContext } from "../../../shared/get-flow-context.js"; import { getLlmResponse } from "../../../shared/get-llm-response.js"; -import type { LlmMessage } from "../../../shared/get-llm-response/llm-message.js"; import { getToolCallsFromLlmAssistantMessage } from "../../../shared/get-llm-response/llm-message.js"; import { graphApiClient } from "../../../shared/graph-api-client.js"; -import type { ParsedCoordinatorToolCall } from "../shared/coordinator-tools.js"; import { generateToolDefinitions } from "../shared/coordinator-tools.js"; -import type { - CoordinatingAgentInput, - CoordinatingAgentState, -} from "../shared/coordinators.js"; import { coordinatingAgentModel } from "../shared/coordinators.js"; import { mapPreviousCoordinatorCallsToLlmMessages } from "../shared/map-previous-coordinator-calls-to-llm-messages.js"; import { @@ -19,6 +13,13 @@ import { generateSystemPromptPrefix, } from "./generate-messages.js"; +import type { LlmMessage } from "../../../shared/get-llm-response/llm-message.js"; +import type { ParsedCoordinatorToolCall } from "../shared/coordinator-tools.js"; +import type { + CoordinatingAgentInput, + CoordinatingAgentState, +} from "../shared/coordinators.js"; + /** * Given the current state of the coordinating agent, request the next actions to be taken. */ diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/summarize-existing-entities.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/summarize-existing-entities.ai.test.ts index 1c377ce99e5..1437772fc0f 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/summarize-existing-entities.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/summarize-existing-entities.ai.test.ts @@ -1,4 +1,6 @@ import "../../../../shared/testing-utilities/mock-get-flow-context.js"; +import { expect, test } from "vitest"; + import { publicUserAccountId } from "@local/hash-backend-utils/public-user-account-id"; import { queryEntities } from "@local/hash-graph-sdk/entity"; import { @@ -6,7 +8,6 @@ import { generateVersionedUrlMatchingFilter, } from "@local/hash-isomorphic-utils/graph-queries"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import { expect, test } from "vitest"; import { graphApiClient } from "../../../shared/graph-api-client.js"; import { summarizeExistingEntities } from "./summarize-existing-entities.js"; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/summarize-existing-entities.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/summarize-existing-entities.ts index e778a250e2f..1f290a9dcc0 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/summarize-existing-entities.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/summarize-existing-entities.ts @@ -1,14 +1,15 @@ -import type { EntityId, VersionedUrl } from "@blockprotocol/type-system"; -import type { HashEntity } from "@local/hash-graph-sdk/entity"; import dedent from "dedent"; import { getFlowContext } from "../../../shared/get-flow-context.js"; import { getLlmResponse } from "../../../shared/get-llm-response.js"; import { getToolCallsFromLlmAssistantMessage } from "../../../shared/get-llm-response/llm-message.js"; -import type { LlmToolDefinition } from "../../../shared/get-llm-response/types.js"; import { graphApiClient } from "../../../shared/graph-api-client.js"; import { simplifyEntity } from "../../../shared/simplify-entity.js"; +import type { LlmToolDefinition } from "../../../shared/get-llm-response/types.js"; +import type { EntityId, VersionedUrl } from "@blockprotocol/type-system"; +import type { HashEntity } from "@local/hash-graph-sdk/entity"; + export type ExistingEntitySummary = { entityId: EntityId; entityTypeIds: [VersionedUrl, ...VersionedUrl[]]; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/update-state-from-inferred-claims.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/update-state-from-inferred-claims.ts index 65f511ef508..48c8484ea7d 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/update-state-from-inferred-claims.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/coordinating-agent/update-state-from-inferred-claims.ts @@ -1,20 +1,21 @@ -import type { EntityId } from "@blockprotocol/type-system"; -import type { WorkerIdentifiers } from "@local/hash-isomorphic-utils/flows/types"; import { isNotNullish } from "@local/hash-isomorphic-utils/types"; -import type { Claim } from "../../shared/claims.js"; -import type { LocalEntitySummary } from "../../shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.js"; import { proposeEntitiesFromClaims } from "../../shared/propose-entities-from-claims.js"; -import type { - CoordinatingAgentInput, - CoordinatingAgentState, -} from "../shared/coordinators.js"; import { deduplicateClaims } from "../shared/deduplicate-claims.js"; import { deduplicateEntities, type DuplicateReport, } from "../shared/deduplicate-entities.js"; +import type { Claim } from "../../shared/claims.js"; +import type { LocalEntitySummary } from "../../shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.js"; +import type { + CoordinatingAgentInput, + CoordinatingAgentState, +} from "../shared/coordinators.js"; +import type { EntityId } from "@blockprotocol/type-system"; +import type { WorkerIdentifiers } from "@local/hash-isomorphic-utils/flows/types"; + const adjustDuplicates = (params: { duplicates: DuplicateReport[]; entityIdsWhichCannotBeDeduplicated: EntityId[]; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent.ai.test.ts index 889e35fd96e..774f14cc619 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent.ai.test.ts @@ -1,5 +1,4 @@ import "../../../shared/testing-utilities/mock-get-flow-context.js"; -import type { Url } from "@blockprotocol/type-system"; import { expect, test } from "vitest"; import { getDereferencedEntityTypesActivity } from "../../get-dereferenced-entity-types-activity.js"; @@ -7,6 +6,8 @@ import { getFlowContext } from "../../shared/get-flow-context.js"; import { graphApiClient } from "../../shared/graph-api-client.js"; import { linkFollowerAgent } from "./link-follower-agent.js"; +import type { Url } from "@blockprotocol/type-system"; + test.skip( "Test linkFollowerAgent for Church Lab members", async () => { diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent.ts index 719447bc5cc..48bb5a423a3 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent.ts @@ -1,25 +1,19 @@ -import type { SourceProvenance, Url } from "@blockprotocol/type-system"; -import { currentTimestamp } from "@blockprotocol/type-system"; -import { getStorageProvider } from "@local/hash-backend-utils/flows/payload-storage"; -import type { WorkerIdentifiers } from "@local/hash-isomorphic-utils/flows/types"; import { Context } from "@temporalio/activity"; import dedent from "dedent"; import { MetadataMode } from "llamaindex"; +import { currentTimestamp } from "@blockprotocol/type-system"; +import { getStorageProvider } from "@local/hash-backend-utils/flows/payload-storage"; + import { getWebPageActivity } from "../../get-web-page-activity.js"; -import type { DereferencedEntityTypesByTypeId } from "../../infer-entities/inference-types.js"; import { logger } from "../../shared/activity-logger.js"; -import type { DereferencedEntityType } from "../../shared/dereference-entity-type.js"; import { getFlowContext, getProvidedFileByUrl, } from "../../shared/get-flow-context.js"; import { logProgress } from "../../shared/log-progress.js"; import { stringify } from "../../shared/stringify.js"; -import type { Claim } from "../shared/claims.js"; import { inferSummariesThenClaimsFromText } from "../shared/infer-summaries-then-claims-from-text.js"; -import type { LocalEntitySummary } from "../shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.js"; -import type { Link } from "./link-follower-agent/choose-relevant-links-from-content.js"; import { chooseRelevantLinksFromContent } from "./link-follower-agent/choose-relevant-links-from-content.js"; import { filterAndRankTextChunksAgent } from "./link-follower-agent/filter-and-rank-text-chunks-agent.js"; import { getLinkFollowerNextToolCalls } from "./link-follower-agent/get-link-follower-next-tool-calls.js"; @@ -28,6 +22,14 @@ import { areUrlsEqual } from "./shared/are-urls-equal.js"; import { checkIfWorkerShouldStop } from "./shared/check-if-worker-should-stop.js"; import { deduplicateEntities } from "./shared/deduplicate-entities.js"; +import type { DereferencedEntityTypesByTypeId } from "../../infer-entities/inference-types.js"; +import type { DereferencedEntityType } from "../../shared/dereference-entity-type.js"; +import type { Claim } from "../shared/claims.js"; +import type { LocalEntitySummary } from "../shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.js"; +import type { Link } from "./link-follower-agent/choose-relevant-links-from-content.js"; +import type { SourceProvenance, Url } from "@blockprotocol/type-system"; +import type { WorkerIdentifiers } from "@local/hash-isomorphic-utils/flows/types"; + type ResourceToExplore = { url: Url; descriptionOfExpectedContent: string; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent/choose-relevant-links-from-content.optimize.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent/choose-relevant-links-from-content.optimize.ai.test.ts index b736b2fbdbb..eeb561b2dc8 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent/choose-relevant-links-from-content.optimize.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent/choose-relevant-links-from-content.optimize.ai.test.ts @@ -2,19 +2,20 @@ import "../../../../shared/testing-utilities/mock-get-flow-context.js"; import path from "node:path"; import { fileURLToPath } from "node:url"; -import type { Url } from "@blockprotocol/type-system"; import dedent from "dedent"; import { test } from "vitest"; import { getWebPageActivity } from "../../../get-web-page-activity.js"; -import type { LlmParams } from "../../../shared/get-llm-response/types.js"; import { optimizeSystemPrompt } from "../../../shared/optimize-system-prompt.js"; -import type { MetricDefinition } from "../../../shared/optimize-system-prompt/types.js"; import { chooseRelevantLinksFromContent, chooseRelevantLinksFromContentSystemPrompt, } from "./choose-relevant-links-from-content.js"; +import type { LlmParams } from "../../../shared/get-llm-response/types.js"; +import type { MetricDefinition } from "../../../shared/optimize-system-prompt/types.js"; +import type { Url } from "@blockprotocol/type-system"; + const ftse350MetricPrompt = "Find all the FTSE350 stock market constituents."; const ftse350WebPage = await getWebPageActivity({ diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent/choose-relevant-links-from-content.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent/choose-relevant-links-from-content.ts index cd510dbbce5..bede4432b38 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent/choose-relevant-links-from-content.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent/choose-relevant-links-from-content.ts @@ -4,12 +4,13 @@ import { JSDOM } from "jsdom"; import { getFlowContext } from "../../../shared/get-flow-context.js"; import { getLlmResponse } from "../../../shared/get-llm-response.js"; import { getToolCallsFromLlmAssistantMessage } from "../../../shared/get-llm-response/llm-message.js"; +import { graphApiClient } from "../../../shared/graph-api-client.js"; +import { stripHashFromUrl } from "../shared/are-urls-equal.js"; + import type { LlmParams, LlmToolDefinition, } from "../../../shared/get-llm-response/types.js"; -import { graphApiClient } from "../../../shared/graph-api-client.js"; -import { stripHashFromUrl } from "../shared/are-urls-equal.js"; export type Link = { url: string; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent/filter-and-rank-text-chunks-agent.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent/filter-and-rank-text-chunks-agent.ts index 1813d3eee22..ae2b2b73d62 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent/filter-and-rank-text-chunks-agent.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent/filter-and-rank-text-chunks-agent.ts @@ -2,16 +2,17 @@ import dedent from "dedent"; import { getFlowContext } from "../../../shared/get-flow-context.js"; import { getLlmResponse } from "../../../shared/get-llm-response.js"; +import { getToolCallsFromLlmAssistantMessage } from "../../../shared/get-llm-response/llm-message.js"; +import { graphApiClient } from "../../../shared/graph-api-client.js"; + import type { LlmMessage, LlmUserMessage, } from "../../../shared/get-llm-response/llm-message.js"; -import { getToolCallsFromLlmAssistantMessage } from "../../../shared/get-llm-response/llm-message.js"; import type { LlmErrorResponse, LlmToolDefinition, } from "../../../shared/get-llm-response/types.js"; -import { graphApiClient } from "../../../shared/graph-api-client.js"; const systemPrompt = dedent(` You are an assistant tasked with determining which sections of a PDF file diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent/get-link-follower-next-tool-calls.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent/get-link-follower-next-tool-calls.ts index 01d0616b9d5..4e7c3e9171a 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent/get-link-follower-next-tool-calls.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent/get-link-follower-next-tool-calls.ts @@ -1,22 +1,24 @@ -import type { Url } from "@blockprotocol/type-system"; -import type { Subtype } from "@local/advanced-types/subtype"; -import { sleep } from "@local/hash-backend-utils/utils"; import dedent from "dedent"; +import { sleep } from "@local/hash-backend-utils/utils"; + import { logger } from "../../../../shared/logger.js"; import { getFlowContext } from "../../../shared/get-flow-context.js"; import { getLlmResponse } from "../../../shared/get-llm-response.js"; -import type { LlmUserMessage } from "../../../shared/get-llm-response/llm-message.js"; import { getToolCallsFromLlmAssistantMessage } from "../../../shared/get-llm-response/llm-message.js"; +import { graphApiClient } from "../../../shared/graph-api-client.js"; +import { simplifyClaimForLlmConsumption } from "../shared/simplify-for-llm-consumption.js"; + +import type { LlmUserMessage } from "../../../shared/get-llm-response/llm-message.js"; import type { LlmParams, LlmToolDefinition, } from "../../../shared/get-llm-response/types.js"; -import { graphApiClient } from "../../../shared/graph-api-client.js"; import type { Claim } from "../../shared/claims.js"; import type { LocalEntitySummary } from "../../shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.js"; -import { simplifyClaimForLlmConsumption } from "../shared/simplify-for-llm-consumption.js"; import type { Link } from "./choose-relevant-links-from-content.js"; +import type { Url } from "@blockprotocol/type-system"; +import type { Subtype } from "@local/advanced-types/subtype"; const defaultModel: LlmParams["model"] = "gpt-4o-2024-08-06"; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent/llama-index/index-pdf-file.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent/llama-index/index-pdf-file.ts index b637ec97171..4dc64897559 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent/llama-index/index-pdf-file.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/link-follower-agent/llama-index/index-pdf-file.ts @@ -2,7 +2,6 @@ import { createWriteStream } from "node:fs"; import fs from "node:fs/promises"; import { Readable } from "node:stream"; import stream from "node:stream/promises"; -import type { ReadableStream } from "node:stream/web"; import { PDFReader } from "@llamaindex/readers/pdf"; import { VectorStoreIndex } from "llamaindex"; @@ -14,6 +13,8 @@ import { persistStorageContext, } from "./simple-storage-context.js"; +import type { ReadableStream } from "node:stream/web"; + const fileExists = async (path: string) => { try { await fs.access(path, fs.constants.F_OK); diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/check-if-worker-should-stop.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/check-if-worker-should-stop.ts index 6c42676474e..c1164c1fce9 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/check-if-worker-should-stop.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/check-if-worker-should-stop.ts @@ -1,16 +1,18 @@ -import { parseHistoryItemPayload } from "@local/hash-backend-utils/temporal/parse-history-item-payload"; -import type { - FlowSignalType, - WorkerIdentifiers, -} from "@local/hash-isomorphic-utils/flows/types"; import { Context } from "@temporalio/activity"; -import type { FlowSignal } from "../../../../shared/signals.js"; +import { parseHistoryItemPayload } from "@local/hash-backend-utils/temporal/parse-history-item-payload"; + import { getTemporalClient, isActivityCancelled, } from "../../../shared/get-flow-context.js"; +import type { FlowSignal } from "../../../../shared/signals.js"; +import type { + FlowSignalType, + WorkerIdentifiers, +} from "@local/hash-isomorphic-utils/flows/types"; + /** * Check if a HASH worker should stop what it is doing and return early. * diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/coordinator-tools.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/coordinator-tools.ts index 8d83c094fe3..c135076488b 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/coordinator-tools.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/coordinator-tools.ts @@ -1,13 +1,12 @@ -import type { Subtype } from "@local/advanced-types/subtype"; -import type { - FlowDataSources, - WorkerIdentifiers, -} from "@local/hash-isomorphic-utils/flows/types"; +import dedent from "dedent"; + import { sleep } from "@local/hash-isomorphic-utils/sleep"; import { stringifyError } from "@local/hash-isomorphic-utils/stringify-error"; -import dedent from "dedent"; import { logger } from "../../../shared/activity-logger.js"; +import { getToolCallResults } from "./coordinator-tools/get-tool-call-results.js"; +import { stopWorkers } from "./coordinators.js"; + import type { LlmToolDefinition, ParsedLlmToolCall, @@ -20,14 +19,17 @@ import type { GetCoordinatorToolCallResultsParams, GetSubCoordinatorToolCallResultsParams, } from "./coordinator-tools/get-tool-call-results.js"; -import { getToolCallResults } from "./coordinator-tools/get-tool-call-results.js"; import type { CoordinatingAgentInput, CoordinatingAgentState, OutstandingCoordinatorTask, } from "./coordinators.js"; -import { stopWorkers } from "./coordinators.js"; import type { WebResourceSummary } from "./handle-web-search-tool-call.js"; +import type { Subtype } from "@local/advanced-types/subtype"; +import type { + FlowDataSources, + WorkerIdentifiers, +} from "@local/hash-isomorphic-utils/flows/types"; export const coordinatorToolNames = [ "complete", diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/coordinator-tools/get-tool-call-results.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/coordinator-tools/get-tool-call-results.ts index 61c83db0ec2..2bd60e5f1d6 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/coordinator-tools/get-tool-call-results.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/coordinator-tools/get-tool-call-results.ts @@ -1,5 +1,3 @@ -import type { Url } from "@blockprotocol/type-system"; -import type { WorkerIdentifiers } from "@local/hash-isomorphic-utils/flows/types"; import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; import { logger } from "../../../../shared/activity-logger.js"; @@ -9,6 +7,9 @@ import { stringify } from "../../../../shared/stringify.js"; import { getAnswersFromHuman } from "../../get-answers-from-human.js"; import { linkFollowerAgent } from "../../link-follower-agent.js"; import { runSubCoordinatingAgent } from "../../sub-coordinating-agent.js"; +import { nullReturns } from "../coordinator-tools.js"; +import { handleWebSearchToolCall } from "../handle-web-search-tool-call.js"; + import type { SubCoordinatingAgentInput } from "../../sub-coordinating-agent/input.js"; import type { SubCoordinatingAgentState } from "../../sub-coordinating-agent/state.js"; import type { @@ -20,12 +21,12 @@ import type { ParsedSubCoordinatorToolCallMap, SubCoordinatingAgentToolName, } from "../coordinator-tools.js"; -import { nullReturns } from "../coordinator-tools.js"; import type { CoordinatingAgentInput, CoordinatingAgentState, } from "../coordinators.js"; -import { handleWebSearchToolCall } from "../handle-web-search-tool-call.js"; +import type { Url } from "@blockprotocol/type-system"; +import type { WorkerIdentifiers } from "@local/hash-isomorphic-utils/flows/types"; export type GetCoordinatorToolCallResultsParams = { agentType: "coordinator"; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/coordinators.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/coordinators.ts index f7695318b73..8a33c2c78f4 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/coordinators.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/coordinators.ts @@ -1,20 +1,16 @@ -import type { HashEntity } from "@local/hash-graph-sdk/entity"; -import type { - ProposedEntity, - WorkerIdentifiers, -} from "@local/hash-isomorphic-utils/flows/types"; import { Context } from "@temporalio/activity"; import { stopWorkerSignal } from "../../../../shared/signals.js"; +import { getTemporalClient } from "../../../shared/get-flow-context.js"; +import { areUrlsEqual } from "./are-urls-equal.js"; + import type { DereferencedEntityTypesByTypeId } from "../../../infer-entities/inference-types.js"; import type { DereferencedEntityType } from "../../../shared/dereference-entity-type.js"; -import { getTemporalClient } from "../../../shared/get-flow-context.js"; import type { LlmParams } from "../../../shared/get-llm-response/types.js"; import type { Claim } from "../../shared/claims.js"; import type { LocalEntitySummary } from "../../shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.js"; import type { ExistingEntitySummary } from "../coordinating-agent/summarize-existing-entities.js"; import type { SubCoordinatingAgentState } from "../sub-coordinating-agent/state.js"; -import { areUrlsEqual } from "./are-urls-equal.js"; import type { CompletedCoordinatorToolCall, CoordinatorToolName, @@ -22,6 +18,11 @@ import type { ParsedSubCoordinatorToolCall, } from "./coordinator-tools.js"; import type { WebResourceSummary } from "./handle-web-search-tool-call.js"; +import type { HashEntity } from "@local/hash-graph-sdk/entity"; +import type { + ProposedEntity, + WorkerIdentifiers, +} from "@local/hash-isomorphic-utils/flows/types"; export const coordinatingAgentModel: LlmParams["model"] = "gpt-4o-2024-08-06"; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/deduplicate-claims.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/deduplicate-claims.ts index 9345218ae11..1e6e1f6c94d 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/deduplicate-claims.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/deduplicate-claims.ts @@ -1,21 +1,22 @@ -import type { - BaseUrl, - EntityId, - PropertyPatchOperation, - ProvidedEntityEditionProvenance, -} from "@blockprotocol/type-system"; import { typedEntries } from "@local/advanced-types/typed-entries"; -import type { ProposedEntity } from "@local/hash-isomorphic-utils/flows/types"; import { blockProtocolDataTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { ClaimProperties } from "@local/hash-isomorphic-utils/system-types/claim"; import { getAiAssistantAccountIdActivity } from "../../../get-ai-assistant-account-id-activity.js"; import { logger } from "../../../shared/activity-logger.js"; import { getFlowContext } from "../../../shared/get-flow-context.js"; import { graphApiClient } from "../../../shared/graph-api-client.js"; -import type { Claim } from "../../shared/claims.js"; import { claimTextualContentFromClaim } from "../../shared/claims.js"; +import type { Claim } from "../../shared/claims.js"; +import type { + BaseUrl, + EntityId, + PropertyPatchOperation, + ProvidedEntityEditionProvenance, +} from "@blockprotocol/type-system"; +import type { ProposedEntity } from "@local/hash-isomorphic-utils/flows/types"; +import type { ClaimProperties } from "@local/hash-isomorphic-utils/system-types/claim"; + const noObjectEntityIdKey = "no-object-entity-id"; /** diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/deduplicate-entities.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/deduplicate-entities.ai.test.ts index 57b96d65c91..dbdd5d80692 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/deduplicate-entities.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/deduplicate-entities.ai.test.ts @@ -1,12 +1,14 @@ import "../../../../shared/testing-utilities/mock-get-flow-context.js"; -import type { EntityUuid, WebId } from "@blockprotocol/type-system"; +import { expect, test } from "vitest"; + import { entityIdFromComponents } from "@blockprotocol/type-system"; import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; -import { expect, test } from "vitest"; -import type { LocalEntitySummary } from "../../shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.js"; import { deduplicateEntities } from "./deduplicate-entities.js"; +import type { LocalEntitySummary } from "../../shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.js"; +import type { EntityUuid, WebId } from "@blockprotocol/type-system"; + const webId = generateUuid(); const generateEntityId = (entityUuid: string) => diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/deduplicate-entities.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/deduplicate-entities.ts index 3fc69f56410..063bc8af8b4 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/deduplicate-entities.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/deduplicate-entities.ts @@ -1,21 +1,23 @@ -import type { EntityId } from "@blockprotocol/type-system"; -import { sleep } from "@local/hash-isomorphic-utils/sleep"; import dedent from "dedent"; +import { sleep } from "@local/hash-isomorphic-utils/sleep"; + import { logger } from "../../../shared/activity-logger.js"; import { getFlowContext } from "../../../shared/get-flow-context.js"; import { getLlmResponse } from "../../../shared/get-llm-response.js"; -import type { PermittedAnthropicModel } from "../../../shared/get-llm-response/anthropic-client.js"; import { getToolCallsFromLlmAssistantMessage } from "../../../shared/get-llm-response/llm-message.js"; +import { graphApiClient } from "../../../shared/graph-api-client.js"; + +import type { PermittedAnthropicModel } from "../../../shared/get-llm-response/anthropic-client.js"; import type { LlmParams, LlmToolDefinition, LlmUsage, } from "../../../shared/get-llm-response/types.js"; -import { graphApiClient } from "../../../shared/graph-api-client.js"; import type { PermittedOpenAiModel } from "../../../shared/openai-client.js"; import type { LocalEntitySummary } from "../../shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.js"; import type { ExistingEntitySummary } from "../coordinating-agent/summarize-existing-entities.js"; +import type { EntityId } from "@blockprotocol/type-system"; /** * @todo diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/handle-web-search-tool-call.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/handle-web-search-tool-call.ts index 906a32987e8..a05a82d128a 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/handle-web-search-tool-call.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/handle-web-search-tool-call.ts @@ -1,20 +1,22 @@ +import { Context } from "@temporalio/activity"; + +import { actionDefinitions } from "@local/hash-isomorphic-utils/flows/action-definitions"; +import { StatusCode } from "@local/status"; + +import { logProgress } from "../../../shared/log-progress.js"; +import { getWebPageSummaryAction } from "../../get-web-page-summary-action.js"; +import { webSearchAction } from "../../web-search-action.js"; + +import type { CoordinatorToolCallArguments } from "./coordinator-tools.js"; import type { Url } from "@blockprotocol/type-system"; import type { InputNameForAiFlowAction, OutputNameForAiFlowAction, } from "@local/hash-isomorphic-utils/flows/action-definitions"; -import { actionDefinitions } from "@local/hash-isomorphic-utils/flows/action-definitions"; import type { StepInput, WorkerIdentifiers, } from "@local/hash-isomorphic-utils/flows/types"; -import { StatusCode } from "@local/status"; -import { Context } from "@temporalio/activity"; - -import { logProgress } from "../../../shared/log-progress.js"; -import { getWebPageSummaryAction } from "../../get-web-page-summary-action.js"; -import { webSearchAction } from "../../web-search-action.js"; -import type { CoordinatorToolCallArguments } from "./coordinator-tools.js"; export type WebResourceSummary = { url: Url; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/simplify-for-llm-consumption.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/simplify-for-llm-consumption.ts index f26476c53d3..edc029f3568 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/simplify-for-llm-consumption.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/shared/simplify-for-llm-consumption.ts @@ -1,7 +1,3 @@ -import type { - LocalOrExistingEntityId, - ProposedEntity, -} from "@local/hash-isomorphic-utils/flows/types"; import { stringifyPropertyValue } from "@local/hash-isomorphic-utils/stringify-property-value"; import type { @@ -11,6 +7,10 @@ import type { MinimalPropertyTypeValue, } from "../../../shared/dereference-entity-type.js"; import type { Claim } from "../../shared/claims.js"; +import type { + LocalOrExistingEntityId, + ProposedEntity, +} from "@local/hash-isomorphic-utils/flows/types"; const simplifyMinimalPropertyTypeValueForLlmConsumption = (params: { propertyTypeValue: MinimalPropertyTypeValue; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/sub-coordinating-agent.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/sub-coordinating-agent.ai.test.ts index 2fd15df2612..aa28d73711c 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/sub-coordinating-agent.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/sub-coordinating-agent.ai.test.ts @@ -15,6 +15,7 @@ import { getDereferencedEntityTypesActivity } from "../../get-dereferenced-entit import { getFlowContext } from "../../shared/get-flow-context.js"; import { graphApiClient } from "../../shared/graph-api-client.js"; import { runSubCoordinatingAgent } from "./sub-coordinating-agent.js"; + import type { SubCoordinatingAgentState } from "./sub-coordinating-agent/state.js"; const __filename = fileURLToPath(import.meta.url); diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/sub-coordinating-agent.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/sub-coordinating-agent.ts index 60ac741423d..ecf61efe157 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/sub-coordinating-agent.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/sub-coordinating-agent.ts @@ -1,10 +1,8 @@ -import type { WorkerIdentifiers } from "@local/hash-isomorphic-utils/flows/types"; -import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; import { Context } from "@temporalio/activity"; +import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; + import { logProgress } from "../../shared/log-progress.js"; -import type { Claim } from "../shared/claims.js"; -import type { LocalEntitySummary } from "../shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.js"; import { checkIfWorkerShouldStop } from "./shared/check-if-worker-should-stop.js"; import { getSomeToolCallResults, @@ -18,12 +16,16 @@ import { stopWorkers, } from "./shared/coordinators.js"; import { deduplicateClaims } from "./shared/deduplicate-claims.js"; -import type { DuplicateReport } from "./shared/deduplicate-entities.js"; import { deduplicateEntities } from "./shared/deduplicate-entities.js"; import { createInitialPlan } from "./sub-coordinating-agent/create-initial-plan.js"; -import type { SubCoordinatingAgentInput } from "./sub-coordinating-agent/input.js"; import { requestSubCoordinatorActions } from "./sub-coordinating-agent/request-sub-coordinator-actions.js"; + +import type { Claim } from "../shared/claims.js"; +import type { LocalEntitySummary } from "../shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.js"; +import type { DuplicateReport } from "./shared/deduplicate-entities.js"; +import type { SubCoordinatingAgentInput } from "./sub-coordinating-agent/input.js"; import type { SubCoordinatingAgentState } from "./sub-coordinating-agent/state.js"; +import type { WorkerIdentifiers } from "@local/hash-isomorphic-utils/flows/types"; const handleStopReturn = async ( shouldStopStatus: { diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/sub-coordinating-agent/create-initial-plan.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/sub-coordinating-agent/create-initial-plan.ts index fb34e3f389d..f637fda1e5c 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/sub-coordinating-agent/create-initial-plan.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/sub-coordinating-agent/create-initial-plan.ts @@ -4,18 +4,19 @@ import { getFlowContext } from "../../../shared/get-flow-context.js"; import { getLlmResponse } from "../../../shared/get-llm-response.js"; import { getToolCallsFromLlmAssistantMessage } from "../../../shared/get-llm-response/llm-message.js"; import { graphApiClient } from "../../../shared/graph-api-client.js"; -import type { - SubCoordinatingAgentToolCallArguments, - SubCoordinatingAgentToolName, -} from "../shared/coordinator-tools.js"; import { coordinatingAgentModel } from "../shared/coordinators.js"; import { generateInitialUserMessage, generateSystemPromptPrefix, } from "./generate-messages.js"; +import { generateToolDefinitions } from "./sub-coordinator-tools.js"; + +import type { + SubCoordinatingAgentToolCallArguments, + SubCoordinatingAgentToolName, +} from "../shared/coordinator-tools.js"; import type { SubCoordinatingAgentInput } from "./input.js"; import type { SubCoordinatingAgentState } from "./state.js"; -import { generateToolDefinitions } from "./sub-coordinator-tools.js"; export const createInitialPlan = async (params: { input: SubCoordinatingAgentInput; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/sub-coordinating-agent/generate-messages.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/sub-coordinating-agent/generate-messages.ts index e52c37809dd..dbbed5c9641 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/sub-coordinating-agent/generate-messages.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/sub-coordinating-agent/generate-messages.ts @@ -1,14 +1,15 @@ import dedent from "dedent"; -import type { - LlmMessageTextContent, - LlmUserMessage, -} from "../../../shared/get-llm-response/llm-message.js"; import { generateOutstandingTasksDescription } from "../shared/coordinator-tools.js"; import { simplifyClaimForLlmConsumption, simplifyEntityTypeForLlmConsumption, } from "../shared/simplify-for-llm-consumption.js"; + +import type { + LlmMessageTextContent, + LlmUserMessage, +} from "../../../shared/get-llm-response/llm-message.js"; import type { SubCoordinatingAgentInput } from "./input.js"; import type { SubCoordinatingAgentState } from "./state.js"; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/sub-coordinating-agent/request-sub-coordinator-actions.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/sub-coordinating-agent/request-sub-coordinator-actions.ts index b670dffcd28..2ddf94fc061 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/sub-coordinating-agent/request-sub-coordinator-actions.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/sub-coordinating-agent/request-sub-coordinator-actions.ts @@ -3,10 +3,8 @@ import dedent from "dedent"; import { logger } from "../../../../shared/logger.js"; import { getFlowContext } from "../../../shared/get-flow-context.js"; import { getLlmResponse } from "../../../shared/get-llm-response.js"; -import type { LlmMessage } from "../../../shared/get-llm-response/llm-message.js"; import { getToolCallsFromLlmAssistantMessage } from "../../../shared/get-llm-response/llm-message.js"; import { graphApiClient } from "../../../shared/graph-api-client.js"; -import type { ParsedSubCoordinatorToolCall } from "../shared/coordinator-tools.js"; import { coordinatingAgentModel } from "../shared/coordinators.js"; import { mapPreviousCoordinatorCallsToLlmMessages } from "../shared/map-previous-coordinator-calls-to-llm-messages.js"; import { @@ -14,9 +12,12 @@ import { generateProgressReport, generateSystemPromptPrefix, } from "./generate-messages.js"; +import { generateToolDefinitions } from "./sub-coordinator-tools.js"; + +import type { LlmMessage } from "../../../shared/get-llm-response/llm-message.js"; +import type { ParsedSubCoordinatorToolCall } from "../shared/coordinator-tools.js"; import type { SubCoordinatingAgentInput } from "./input.js"; import type { SubCoordinatingAgentState } from "./state.js"; -import { generateToolDefinitions } from "./sub-coordinator-tools.js"; /** * Given the input to and state of the sub-task agent, request the next actions to be taken. diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/sub-coordinating-agent/sub-coordinator-tools.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/sub-coordinating-agent/sub-coordinator-tools.ts index d79ef588bae..5f5597110ff 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/sub-coordinating-agent/sub-coordinator-tools.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/research-entities-action/sub-coordinating-agent/sub-coordinator-tools.ts @@ -1,15 +1,15 @@ -import type { FlowDataSources } from "@local/hash-isomorphic-utils/flows/types"; +import { + generateToolDefinitions as generateCoordinatorToolDefinitions, + subCoordinatorOmittedCoordinatorToolNames, +} from "../shared/coordinator-tools.js"; import type { LlmToolDefinition } from "../../../shared/get-llm-response/types.js"; import type { SubCoordinatingAgentCustomToolName, SubCoordinatingAgentToolName, } from "../shared/coordinator-tools.js"; -import { - generateToolDefinitions as generateCoordinatorToolDefinitions, - subCoordinatorOmittedCoordinatorToolNames, -} from "../shared/coordinator-tools.js"; import type { SubCoordinatingAgentState } from "./state.js"; +import type { FlowDataSources } from "@local/hash-isomorphic-utils/flows/types"; /** * Generate tool definitions for the sub-coordinating agent, to be passed to the LLM. diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/create-file-entity-from-url.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/create-file-entity-from-url.ts index f40cd0847bf..58fd294c2fe 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/create-file-entity-from-url.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/create-file-entity-from-url.ts @@ -11,14 +11,9 @@ import { tmpdir } from "node:os"; import path from "node:path"; import { Readable } from "node:stream"; import { finished } from "node:stream/promises"; -import type { ReadableStream } from "node:stream/web"; -import type { - EntityUuid, - PropertyObjectMetadata, - ProvidedEntityEditionProvenance, - VersionedUrl, -} from "@blockprotocol/type-system"; +import mime from "mime-types"; + import { formatFileUrl, getEntityTypeIdForMimeType, @@ -34,17 +29,24 @@ import { import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; import { normalizeWhitespace } from "@local/hash-isomorphic-utils/normalize"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { - File, - FileProperties, -} from "@local/hash-isomorphic-utils/system-types/shared"; -import mime from "mime-types"; import { getAiAssistantAccountIdActivity } from "../../get-ai-assistant-account-id-activity.js"; import { logger } from "../../shared/activity-logger.js"; import { getFlowContext } from "../../shared/get-flow-context.js"; import { graphApiClient } from "../../shared/graph-api-client.js"; +import type { + EntityUuid, + PropertyObjectMetadata, + ProvidedEntityEditionProvenance, + VersionedUrl, +} from "@blockprotocol/type-system"; +import type { + File, + FileProperties, +} from "@local/hash-isomorphic-utils/system-types/shared"; +import type { ReadableStream } from "node:stream/web"; + const baseFilePath = path.join(tmpdir(), "hash-tmp-files"); const downloadFileToFileSystem = async (fileUrl: string) => { diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/graph-requests.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/graph-requests.ts index 61a9a8bfaf3..c3cf62c2552 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/graph-requests.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/graph-requests.ts @@ -1,21 +1,22 @@ -import type { - ActorEntityUuid, - EntityId, - PropertyObjectWithMetadata, - PropertyPatchOperation, -} from "@blockprotocol/type-system"; +import isEqual from "lodash/isEqual.js"; + import { extractDraftIdFromEntityId, splitEntityId, } from "@blockprotocol/type-system"; import { typedEntries } from "@local/advanced-types/typed-entries"; -import type { GraphApi } from "@local/hash-graph-client"; import { queryEntities } from "@local/hash-graph-sdk/entity"; import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; import { deduplicateSources } from "@local/hash-isomorphic-utils/provenance"; -import isEqual from "lodash/isEqual.js"; import type { ExistingEntityForMatching } from "../../shared/match-existing-entity.js"; +import type { + ActorEntityUuid, + EntityId, + PropertyObjectWithMetadata, + PropertyPatchOperation, +} from "@blockprotocol/type-system"; +import type { GraphApi } from "@local/hash-graph-client"; /** * @todo: move the primitive node helper methods from the Node API into a shared diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text.ts index 5b443459b96..be14daac842 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text.ts @@ -1,13 +1,13 @@ -import type { Url, VersionedUrl } from "@blockprotocol/type-system"; -import type { WorkerIdentifiers } from "@local/hash-isomorphic-utils/flows/types"; +import { logger } from "../../shared/activity-logger.js"; +import { getEntitySummariesFromText } from "./infer-summaries-then-claims-from-text/get-entity-summaries-from-text.js"; +import { inferEntityClaimsFromTextAgent } from "./infer-summaries-then-claims-from-text/infer-entity-claims-from-text-agent.js"; import type { DereferencedEntityTypesByTypeId } from "../../infer-entities/inference-types.js"; -import { logger } from "../../shared/activity-logger.js"; import type { LlmParams } from "../../shared/get-llm-response/types.js"; import type { Claim } from "./claims.js"; import type { LocalEntitySummary } from "./infer-summaries-then-claims-from-text/get-entity-summaries-from-text.js"; -import { getEntitySummariesFromText } from "./infer-summaries-then-claims-from-text/get-entity-summaries-from-text.js"; -import { inferEntityClaimsFromTextAgent } from "./infer-summaries-then-claims-from-text/infer-entity-claims-from-text-agent.js"; +import type { Url, VersionedUrl } from "@blockprotocol/type-system"; +import type { WorkerIdentifiers } from "@local/hash-isomorphic-utils/flows/types"; /** * A two-step process for extracting claims about entities from text: diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.ai.test.ts index ade2b779aba..34a1073311b 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.ai.test.ts @@ -1,5 +1,4 @@ import "../../../../shared/testing-utilities/mock-get-flow-context.js"; -import type { Url } from "@blockprotocol/type-system"; import { expect, test } from "vitest"; import { getDereferencedEntityTypesActivity } from "../../../get-dereferenced-entity-types-activity.js"; @@ -8,6 +7,8 @@ import { getFlowContext } from "../../../shared/get-flow-context.js"; import { graphApiClient } from "../../../shared/graph-api-client.js"; import { getEntitySummariesFromText } from "./get-entity-summaries-from-text.js"; +import type { Url } from "@blockprotocol/type-system"; + /** * @file These are not 'tests' but rather ways of running specific agents, * the results of which can be inspected in the logs saved to the file system under get-llm-response/logs/ diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.optimize.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.optimize.ai.test.ts index 6c92c9b6e9b..33784fe80dd 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.optimize.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.optimize.ai.test.ts @@ -13,15 +13,16 @@ import { fileURLToPath } from "node:url"; import { test } from "vitest"; -import type { LlmParams } from "../../../shared/get-llm-response/types.js"; import { optimizeSystemPrompt } from "../../../shared/optimize-system-prompt.js"; -import type { MetricDefinition } from "../../../shared/optimize-system-prompt/types.js"; import { entitySummariesFromTextSystemPrompt, getEntitySummariesFromText, } from "./get-entity-summaries-from-text.js"; import { testData } from "./get-entity-summaries-from-text.optimize/test-data.js"; +import type { LlmParams } from "../../../shared/get-llm-response/types.js"; +import type { MetricDefinition } from "../../../shared/optimize-system-prompt/types.js"; + const metrics: MetricDefinition[] = testData.map((testItem) => { return { name: testItem.name, diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.ts index 2a68b528a7c..7830a64cec1 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/get-entity-summaries-from-text.ts @@ -1,21 +1,23 @@ -import type { - EntityId, - EntityUuid, - VersionedUrl, -} from "@blockprotocol/type-system"; +import dedent from "dedent"; + import { entityIdFromComponents } from "@blockprotocol/type-system"; import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; -import dedent from "dedent"; -import type { DereferencedEntityType } from "../../../shared/dereference-entity-type.js"; import { getFlowContext } from "../../../shared/get-flow-context.js"; import { getLlmResponse } from "../../../shared/get-llm-response.js"; import { getToolCallsFromLlmAssistantMessage } from "../../../shared/get-llm-response/llm-message.js"; +import { graphApiClient } from "../../../shared/graph-api-client.js"; + +import type { DereferencedEntityType } from "../../../shared/dereference-entity-type.js"; import type { LlmParams, LlmToolDefinition, } from "../../../shared/get-llm-response/types.js"; -import { graphApiClient } from "../../../shared/graph-api-client.js"; +import type { + EntityId, + EntityUuid, + VersionedUrl, +} from "@blockprotocol/type-system"; export type LocalEntitySummary = { localId: EntityId; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/infer-entity-claims-from-text-agent.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/infer-entity-claims-from-text-agent.ts index 43f55e4c435..9952e7e929a 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/infer-entity-claims-from-text-agent.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/infer-entity-claims-from-text-agent.ts @@ -1,36 +1,38 @@ -import type { - EntityId, - EntityUuid, - ProvidedEntityEditionProvenance, - Url, -} from "@blockprotocol/type-system"; +import dedent from "dedent"; + import { entityIdFromComponents } from "@blockprotocol/type-system"; import { HashEntity } from "@local/hash-graph-sdk/entity"; -import type { WorkerIdentifiers } from "@local/hash-isomorphic-utils/flows/types"; import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; -import type { Claim as ClaimEntity } from "@local/hash-isomorphic-utils/system-types/claim"; -import dedent from "dedent"; import { getAiAssistantAccountIdActivity } from "../../../get-ai-assistant-account-id-activity.js"; import { logger } from "../../../shared/activity-logger.js"; -import type { DereferencedEntityType } from "../../../shared/dereference-entity-type.js"; import { getFlowContext } from "../../../shared/get-flow-context.js"; import { getLlmResponse } from "../../../shared/get-llm-response.js"; +import { getToolCallsFromLlmAssistantMessage } from "../../../shared/get-llm-response/llm-message.js"; +import { graphApiClient } from "../../../shared/graph-api-client.js"; +import { stringify } from "../../../shared/stringify.js"; +import { checkIfWorkerShouldStop } from "../../research-entities-action/shared/check-if-worker-should-stop.js"; + +import type { DereferencedEntityType } from "../../../shared/dereference-entity-type.js"; import type { LlmMessage, LlmMessageToolResultContent, LlmUserMessage, } from "../../../shared/get-llm-response/llm-message.js"; -import { getToolCallsFromLlmAssistantMessage } from "../../../shared/get-llm-response/llm-message.js"; import type { LlmParams, LlmToolDefinition, } from "../../../shared/get-llm-response/types.js"; -import { graphApiClient } from "../../../shared/graph-api-client.js"; -import { stringify } from "../../../shared/stringify.js"; -import { checkIfWorkerShouldStop } from "../../research-entities-action/shared/check-if-worker-should-stop.js"; import type { Claim } from "../claims.js"; import type { LocalEntitySummary } from "./get-entity-summaries-from-text.js"; +import type { + EntityId, + EntityUuid, + ProvidedEntityEditionProvenance, + Url, +} from "@blockprotocol/type-system"; +import type { WorkerIdentifiers } from "@local/hash-isomorphic-utils/flows/types"; +import type { Claim as ClaimEntity } from "@local/hash-isomorphic-utils/system-types/claim"; const toolNames = ["submitClaims"] as const; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/infer-entity-claims-from-text.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/infer-entity-claims-from-text.ai.test.ts index 6082bd53945..5d2a94fdbcb 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/infer-entity-claims-from-text.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/infer-entity-claims-from-text.ai.test.ts @@ -1,8 +1,8 @@ import "../../../../shared/testing-utilities/mock-get-flow-context.js"; -import type { EntityUuid, Url, WebId } from "@blockprotocol/type-system"; +import { expect, test } from "vitest"; + import { entityIdFromComponents } from "@blockprotocol/type-system"; import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; -import { expect, test } from "vitest"; import { getDereferencedEntityTypesActivity } from "../../../get-dereferenced-entity-types-activity.js"; import { getWebPageActivity } from "../../../get-web-page-activity.js"; @@ -10,6 +10,8 @@ import { getFlowContext } from "../../../shared/get-flow-context.js"; import { graphApiClient } from "../../../shared/graph-api-client.js"; import { inferEntityClaimsFromTextAgent } from "./infer-entity-claims-from-text-agent.js"; +import type { EntityUuid, Url, WebId } from "@blockprotocol/type-system"; + /** * @file These are not 'tests' but rather ways of running specific agents, * the results of which can be inspected in the logs saved to the file system under get-llm-response/logs/ diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/infer-summaries-then-claims-from-text.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/infer-summaries-then-claims-from-text.ai.test.ts index 05981b44d31..3e3ad2eb361 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/infer-summaries-then-claims-from-text.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/infer-summaries-then-claims-from-text/infer-summaries-then-claims-from-text.ai.test.ts @@ -3,10 +3,10 @@ import { readFileSync } from "node:fs"; import path from "node:path"; import { fileURLToPath } from "node:url"; -import type { EntityUuid, Url, WebId } from "@blockprotocol/type-system"; +import { expect, test } from "vitest"; + import { entityIdFromComponents } from "@blockprotocol/type-system"; import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; -import { expect, test } from "vitest"; import { getDereferencedEntityTypesActivity } from "../../../get-dereferenced-entity-types-activity.js"; import { @@ -16,7 +16,9 @@ import { import { getFlowContext } from "../../../shared/get-flow-context.js"; import { graphApiClient } from "../../../shared/graph-api-client.js"; import { inferSummariesThenClaimsFromText } from "../infer-summaries-then-claims-from-text.js"; + import type { LocalEntitySummary } from "./get-entity-summaries-from-text.js"; +import type { EntityUuid, Url, WebId } from "@blockprotocol/type-system"; /** * @file These are not 'tests' but rather ways of running specific agents, diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/propose-entities-from-claims.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/propose-entities-from-claims.ts index d57d5b53927..abb3ebd7ef3 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/propose-entities-from-claims.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/propose-entities-from-claims.ts @@ -1,19 +1,19 @@ -import type { BaseUrl } from "@blockprotocol/type-system"; -import type { - ProposedEntity, - WorkerIdentifiers, -} from "@local/hash-isomorphic-utils/flows/types"; - -import type { DereferencedEntityTypesByTypeId } from "../../infer-entities/inference-types.js"; import { logger } from "../../shared/activity-logger.js"; -import type { DereferencedEntityType } from "../../shared/dereference-entity-type.js"; import { getFlowContext } from "../../shared/get-flow-context.js"; import { logProgress } from "../../shared/log-progress.js"; import { stringify } from "../../shared/stringify.js"; +import { proposeEntityFromClaimsAgent } from "./propose-entities-from-claims/propose-entity-from-claims-agent.js"; + +import type { DereferencedEntityTypesByTypeId } from "../../infer-entities/inference-types.js"; +import type { DereferencedEntityType } from "../../shared/dereference-entity-type.js"; import type { ExistingEntitySummary } from "../research-entities-action/coordinating-agent/summarize-existing-entities.js"; import type { Claim } from "./claims.js"; import type { LocalEntitySummary } from "./infer-summaries-then-claims-from-text/get-entity-summaries-from-text.js"; -import { proposeEntityFromClaimsAgent } from "./propose-entities-from-claims/propose-entity-from-claims-agent.js"; +import type { BaseUrl } from "@blockprotocol/type-system"; +import type { + ProposedEntity, + WorkerIdentifiers, +} from "@local/hash-isomorphic-utils/flows/types"; export const proposeEntitiesFromClaims = async (params: { entitySummaries: LocalEntitySummary[]; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/propose-entities-from-claims/propose-entities-from-claims.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/propose-entities-from-claims/propose-entities-from-claims.ai.test.ts index 49d9e58a640..16c0742ad1e 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/propose-entities-from-claims/propose-entities-from-claims.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/propose-entities-from-claims/propose-entities-from-claims.ai.test.ts @@ -1,18 +1,20 @@ import "../../../../shared/testing-utilities/mock-get-flow-context.js"; -import type { EntityUuid, Url, WebId } from "@blockprotocol/type-system"; +import { expect, test } from "vitest"; + import { currentTimestamp, entityIdFromComponents, } from "@blockprotocol/type-system"; import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; -import { expect, test } from "vitest"; import { getDereferencedEntityTypesActivity } from "../../../get-dereferenced-entity-types-activity.js"; import { getFlowContext } from "../../../shared/get-flow-context.js"; import { graphApiClient } from "../../../shared/graph-api-client.js"; +import { proposeEntitiesFromClaims } from "../propose-entities-from-claims.js"; + import type { Claim } from "../claims.js"; import type { LocalEntitySummary } from "../infer-summaries-then-claims-from-text/get-entity-summaries-from-text.js"; -import { proposeEntitiesFromClaims } from "../propose-entities-from-claims.js"; +import type { EntityUuid, Url, WebId } from "@blockprotocol/type-system"; /** * @file These are not 'tests' but rather ways of running specific agents, diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/propose-entities-from-claims/propose-entity-from-claims-agent.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/propose-entities-from-claims/propose-entity-from-claims-agent.ts index 0f92a435c7a..f6a9906eb5b 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/propose-entities-from-claims/propose-entity-from-claims-agent.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/propose-entities-from-claims/propose-entity-from-claims-agent.ts @@ -1,10 +1,5 @@ -import type { - BaseUrl, - EntityUuid, - OriginProvenance, - ProvidedEntityEditionProvenance, - VersionedUrl, -} from "@blockprotocol/type-system"; +import dedent from "dedent"; + import { entityIdFromComponents, mustHaveAtLeastOne, @@ -13,29 +8,36 @@ import { HashEntity, mergePropertyObjectAndMetadata, } from "@local/hash-graph-sdk/entity"; -import type { ProposedEntity } from "@local/hash-isomorphic-utils/flows/types"; import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; -import dedent from "dedent"; -import type { JSONSchemaDefinition } from "openai/lib/jsonschema"; import { extractErrorMessage } from "../../../infer-entities/shared/extract-validation-failure-details.js"; -import type { PropertyValueWithSimplifiedProperties } from "../../../infer-entities/shared/map-simplified-properties-to-properties.js"; import { mapSimplifiedPropertiesToProperties } from "../../../infer-entities/shared/map-simplified-properties-to-properties.js"; import { stripIdsFromDereferencedProperties } from "../../../infer-entities/shared/strip-ids-from-dereferenced-properties.js"; -import type { DereferencedEntityType } from "../../../shared/dereference-entity-type.js"; import { getFlowContext } from "../../../shared/get-flow-context.js"; import { getLlmResponse } from "../../../shared/get-llm-response.js"; +import { getToolCallsFromLlmAssistantMessage } from "../../../shared/get-llm-response/llm-message.js"; +import { graphApiClient } from "../../../shared/graph-api-client.js"; +import { stringify } from "../../../shared/stringify.js"; + +import type { PropertyValueWithSimplifiedProperties } from "../../../infer-entities/shared/map-simplified-properties-to-properties.js"; +import type { DereferencedEntityType } from "../../../shared/dereference-entity-type.js"; import type { LlmMessage, LlmUserMessage, } from "../../../shared/get-llm-response/llm-message.js"; -import { getToolCallsFromLlmAssistantMessage } from "../../../shared/get-llm-response/llm-message.js"; import type { LlmToolDefinition } from "../../../shared/get-llm-response/types.js"; -import { graphApiClient } from "../../../shared/graph-api-client.js"; -import { stringify } from "../../../shared/stringify.js"; import type { ExistingEntitySummary } from "../../research-entities-action/coordinating-agent/summarize-existing-entities.js"; import type { Claim } from "../claims.js"; import type { LocalEntitySummary } from "../infer-summaries-then-claims-from-text/get-entity-summaries-from-text.js"; +import type { + BaseUrl, + EntityUuid, + OriginProvenance, + ProvidedEntityEditionProvenance, + VersionedUrl, +} from "@blockprotocol/type-system"; +import type { ProposedEntity } from "@local/hash-isomorphic-utils/flows/types"; +import type { JSONSchemaDefinition } from "openai/lib/jsonschema"; const mapPropertiesSchemaToInputPropertiesSchema = (params: { properties: DereferencedEntityType["properties"]; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/propose-entities-from-claims/propose-entity-from-claims.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/propose-entities-from-claims/propose-entity-from-claims.ai.test.ts index d13ecfd5ad7..069ae625b49 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/propose-entities-from-claims/propose-entity-from-claims.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/propose-entities-from-claims/propose-entity-from-claims.ai.test.ts @@ -1,23 +1,25 @@ import "../../../../shared/testing-utilities/mock-get-flow-context.js"; -import type { - EntityUuid, - Timestamp, - Url, - WebId, -} from "@blockprotocol/type-system"; +import { expect, test } from "vitest"; + import { currentTimestamp, entityIdFromComponents, } from "@blockprotocol/type-system"; import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; -import { expect, test } from "vitest"; import { getDereferencedEntityTypesActivity } from "../../../get-dereferenced-entity-types-activity.js"; import { getFlowContext } from "../../../shared/get-flow-context.js"; import { graphApiClient } from "../../../shared/graph-api-client.js"; +import { proposeEntityFromClaimsAgent } from "./propose-entity-from-claims-agent.js"; + import type { Claim } from "../claims.js"; import type { LocalEntitySummary } from "../infer-summaries-then-claims-from-text/get-entity-summaries-from-text.js"; -import { proposeEntityFromClaimsAgent } from "./propose-entity-from-claims-agent.js"; +import type { + EntityUuid, + Timestamp, + Url, + WebId, +} from "@blockprotocol/type-system"; /** * @file These are not 'tests' but rather ways of running specific agents, diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/web-search-action.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/web-search-action.ts index 319d779290a..2fcb5649dcf 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/web-search-action.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/web-search-action.ts @@ -1,13 +1,15 @@ -import type { Url } from "@blockprotocol/type-system"; -import type { AiFlowActionActivity } from "@local/hash-backend-utils/flows"; +import { backOff } from "exponential-backoff"; + import { internalApiClient } from "@local/hash-backend-utils/internal-api-client"; import { getSimplifiedAiFlowActionInputs } from "@local/hash-isomorphic-utils/flows/action-definitions"; -import type { GetWebSearchResults200ResponseWebSearchResultsInner } from "@local/internal-api-client"; import { StatusCode } from "@local/status"; -import { backOff } from "exponential-backoff"; import { logger } from "../shared/activity-logger.js"; +import type { Url } from "@blockprotocol/type-system"; +import type { AiFlowActionActivity } from "@local/hash-backend-utils/flows"; +import type { GetWebSearchResults200ResponseWebSearchResultsInner } from "@local/internal-api-client"; + export type GetWebSearchResultsResponse = Omit< GetWebSearchResults200ResponseWebSearchResultsInner, "url" diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/write-google-sheet-action.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/write-google-sheet-action.ts index b2d4bfab37a..cc1186273e1 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/write-google-sheet-action.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/write-google-sheet-action.ts @@ -1,8 +1,6 @@ -import type { - OriginProvenance, - ProvidedEntityEditionProvenance, -} from "@blockprotocol/type-system"; -import type { AiFlowActionActivity } from "@local/hash-backend-utils/flows"; +import { Context } from "@temporalio/activity"; +import { google } from "googleapis"; + import { getStorageProvider, resolvePayloadValue, @@ -13,13 +11,8 @@ import { getTokensForGoogleAccount, } from "@local/hash-backend-utils/google"; import { getWebMachineId } from "@local/hash-backend-utils/machine-actors"; -import type { VaultClient } from "@local/hash-backend-utils/vault"; import { HashEntity } from "@local/hash-graph-sdk/entity"; import { getSimplifiedAiFlowActionInputs } from "@local/hash-isomorphic-utils/flows/action-definitions"; -import type { - PersistedEntitiesMetadata, - StoredPayloadRef, -} from "@local/hash-isomorphic-utils/flows/types"; import { isStoredPayloadRef } from "@local/hash-isomorphic-utils/flows/types"; import { generateEntityIdFilter } from "@local/hash-isomorphic-utils/graph-queries"; import { @@ -27,14 +20,7 @@ import { systemLinkEntityTypes, systemPropertyTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { - AssociatedWithAccount, - GoogleSheetsFile, -} from "@local/hash-isomorphic-utils/system-types/google/googlesheetsfile"; import { StatusCode } from "@local/status"; -import { Context } from "@temporalio/activity"; -import type { sheets_v4 } from "googleapis"; -import { google } from "googleapis"; import { getEntityByFilter } from "../shared/get-entity-by-filter.js"; import { getFlowContext } from "../shared/get-flow-context.js"; @@ -45,6 +31,22 @@ import { convertSubgraphToSheetRequests } from "./write-google-sheet-action/conv import { getFilterFromBlockProtocolQueryEntity } from "./write-google-sheet-action/get-filter-from-bp-query-entity.js"; import { getSubgraphFromFilter } from "./write-google-sheet-action/get-subgraph-from-filter.js"; +import type { + OriginProvenance, + ProvidedEntityEditionProvenance, +} from "@blockprotocol/type-system"; +import type { AiFlowActionActivity } from "@local/hash-backend-utils/flows"; +import type { VaultClient } from "@local/hash-backend-utils/vault"; +import type { + PersistedEntitiesMetadata, + StoredPayloadRef, +} from "@local/hash-isomorphic-utils/flows/types"; +import type { + AssociatedWithAccount, + GoogleSheetsFile, +} from "@local/hash-isomorphic-utils/system-types/google/googlesheetsfile"; +import type { sheets_v4 } from "googleapis"; + const createSpreadsheet = async ({ filename, sheetsClient, diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/write-google-sheet-action/convert-csv-to-sheet-requests.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/write-google-sheet-action/convert-csv-to-sheet-requests.ts index 50fd3e7c25d..456a62b4cd0 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/write-google-sheet-action/convert-csv-to-sheet-requests.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/write-google-sheet-action/convert-csv-to-sheet-requests.ts @@ -1,9 +1,10 @@ -import type { sheets_v4 } from "googleapis"; -import type { ParseResult } from "papaparse"; import Papa from "papaparse"; import { createCellFromValue } from "./shared/create-sheet-data.js"; +import type { sheets_v4 } from "googleapis"; +import type { ParseResult } from "papaparse"; + type SheetOutputFormat = { audience: "user" | "machine"; }; diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/write-google-sheet-action/convert-subgraph-to-sheet-requests.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/write-google-sheet-action/convert-subgraph-to-sheet-requests.ts index c74eaa317b2..2645510d12c 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/write-google-sheet-action/convert-subgraph-to-sheet-requests.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/write-google-sheet-action/convert-subgraph-to-sheet-requests.ts @@ -10,13 +10,6 @@ import { getEntityTypeById, getPropertyTypeForEntity, } from "@blockprotocol/graph/stdlib"; -import type { - BaseUrl, - EntityId, - EntityType, - OntologyTypeVersion, - VersionedUrl, -} from "@blockprotocol/type-system"; import { typedEntries, typedKeys, @@ -25,15 +18,23 @@ import { import { isDraftEntity } from "@local/hash-isomorphic-utils/entity-store"; import { generateEntityLabel } from "@local/hash-isomorphic-utils/generate-entity-label"; import { blockProtocolEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { sheets_v4 } from "googleapis"; -import type { SheetOutputFormat } from "./shared/config.js"; import { createCellFromValue, createHyperlinkCell, } from "./shared/create-sheet-data.js"; import { cellHeaderFormat } from "./shared/format.js"; +import type { SheetOutputFormat } from "./shared/config.js"; +import type { + BaseUrl, + EntityId, + EntityType, + OntologyTypeVersion, + VersionedUrl, +} from "@blockprotocol/type-system"; +import type { sheets_v4 } from "googleapis"; + type ColumnsForEntity = { columns: Record< string, diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/write-google-sheet-action/get-filter-from-bp-query-entity.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/write-google-sheet-action/get-filter-from-bp-query-entity.ts index 912ace46f58..d148e3e559e 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/write-google-sheet-action/get-filter-from-bp-query-entity.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/write-google-sheet-action/get-filter-from-bp-query-entity.ts @@ -1,13 +1,14 @@ +import { convertBpFilterToGraphFilter } from "@local/hash-graph-sdk/filter"; +import { blockProtocolPropertyTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; + +import { getLatestEntityById } from "../shared/graph-requests.js"; + import type { MultiFilter } from "@blockprotocol/graph"; import type { ActorEntityUuid, EntityId } from "@blockprotocol/type-system"; import type { GraphApi } from "@local/hash-graph-client"; import type { HashEntity } from "@local/hash-graph-sdk/entity"; -import { convertBpFilterToGraphFilter } from "@local/hash-graph-sdk/filter"; -import { blockProtocolPropertyTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; import type { Query } from "@local/hash-isomorphic-utils/system-types/blockprotocol/query"; -import { getLatestEntityById } from "../shared/graph-requests.js"; - export const getFilterFromBlockProtocolQueryEntity = async ({ authentication, graphApiClient, diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/write-google-sheet-action/get-subgraph-from-filter.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/write-google-sheet-action/get-subgraph-from-filter.ts index f927dc6a35c..bf2735ef109 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/write-google-sheet-action/get-subgraph-from-filter.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/write-google-sheet-action/get-subgraph-from-filter.ts @@ -1,11 +1,12 @@ +import { queryEntitySubgraph } from "@local/hash-graph-sdk/entity"; +import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; + import type { ActorEntityUuid } from "@blockprotocol/type-system"; import type { EntityTraversalPath, Filter, GraphApi, } from "@local/hash-graph-client"; -import { queryEntitySubgraph } from "@local/hash-graph-sdk/entity"; -import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; export const getSubgraphFromFilter = async ({ authentication, diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/write-google-sheet-action/shared/create-sheet-data.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/write-google-sheet-action/shared/create-sheet-data.ts index e2a4ef8beb6..6fa88e2b057 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/write-google-sheet-action/shared/create-sheet-data.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/write-google-sheet-action/shared/create-sheet-data.ts @@ -1,8 +1,9 @@ import { stringifyPropertyValue } from "@local/hash-isomorphic-utils/stringify-property-value"; -import type { sheets_v4 } from "googleapis"; import { cellHeaderFormat, cellPadding } from "./format.js"; +import type { sheets_v4 } from "googleapis"; + export const createCellFromValue = ({ value, applyDefaultHeaderFormat, diff --git a/apps/hash-ai-worker-ts/src/activities/get-ai-assistant-account-id-activity.ts b/apps/hash-ai-worker-ts/src/activities/get-ai-assistant-account-id-activity.ts index 9f68de2bc3e..4506e34f484 100644 --- a/apps/hash-ai-worker-ts/src/activities/get-ai-assistant-account-id-activity.ts +++ b/apps/hash-ai-worker-ts/src/activities/get-ai-assistant-account-id-activity.ts @@ -1,11 +1,12 @@ -import type { ActorEntityUuid, AiId, WebId } from "@blockprotocol/type-system"; import { getAiIdByIdentifier } from "@local/hash-backend-utils/machine-actors"; -import type { GraphApi } from "@local/hash-graph-client"; import { addActorGroupMember, getActorGroupRole, } from "@local/hash-graph-sdk/principal/actor-group"; +import type { ActorEntityUuid, AiId, WebId } from "@blockprotocol/type-system"; +import type { GraphApi } from "@local/hash-graph-client"; + export const getAiAssistantAccountIdActivity = async (params: { authentication: { actorId: ActorEntityUuid }; grantCreatePermissionForWeb?: WebId; diff --git a/apps/hash-ai-worker-ts/src/activities/get-dereferenced-entity-types-activity.ts b/apps/hash-ai-worker-ts/src/activities/get-dereferenced-entity-types-activity.ts index 718da7cf0e6..1c28e99a5a8 100644 --- a/apps/hash-ai-worker-ts/src/activities/get-dereferenced-entity-types-activity.ts +++ b/apps/hash-ai-worker-ts/src/activities/get-dereferenced-entity-types-activity.ts @@ -1,13 +1,15 @@ -import type { ActorEntityUuid, VersionedUrl } from "@blockprotocol/type-system"; +import { backOff } from "exponential-backoff"; + import { typedEntries } from "@local/advanced-types/typed-entries"; -import type { GraphApi } from "@local/hash-graph-client"; import { queryEntityTypeSubgraph } from "@local/hash-graph-sdk/entity-type"; import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; -import { backOff } from "exponential-backoff"; -import type { DereferencedEntityTypesByTypeId } from "./infer-entities/inference-types.js"; import { dereferenceEntityType } from "./shared/dereference-entity-type.js"; +import type { DereferencedEntityTypesByTypeId } from "./infer-entities/inference-types.js"; +import type { ActorEntityUuid, VersionedUrl } from "@blockprotocol/type-system"; +import type { GraphApi } from "@local/hash-graph-client"; + /** * @see {@link dereferenceEntityType} * diff --git a/apps/hash-ai-worker-ts/src/activities/get-web-page-activity.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/get-web-page-activity.ai.test.ts index b21d1b6e31e..c9df13254b8 100644 --- a/apps/hash-ai-worker-ts/src/activities/get-web-page-activity.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/get-web-page-activity.ai.test.ts @@ -1,5 +1,4 @@ import "../shared/testing-utilities/mock-get-flow-context.js"; -import type { Url } from "@blockprotocol/type-system"; import { expect, test } from "vitest"; import { @@ -7,6 +6,8 @@ import { sanitizeHtmlForLlmConsumption, } from "./get-web-page-activity.js"; +import type { Url } from "@blockprotocol/type-system"; + test.skip( "Test getWebPageActivity with a Wikipedia page", async () => { diff --git a/apps/hash-ai-worker-ts/src/activities/get-web-page-activity.ts b/apps/hash-ai-worker-ts/src/activities/get-web-page-activity.ts index 9d0cc2de574..e04d8e85dab 100644 --- a/apps/hash-ai-worker-ts/src/activities/get-web-page-activity.ts +++ b/apps/hash-ai-worker-ts/src/activities/get-web-page-activity.ts @@ -1,20 +1,22 @@ -import type { Url } from "@blockprotocol/type-system"; -import { validateExternalUrlWithDnsCheck } from "@local/hash-backend-utils/url-validation"; -import type { - FlowInternetAccessSettings, - WebPage, -} from "@local/hash-isomorphic-utils/flows/types"; -import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; -import { stringifyError } from "@local/hash-isomorphic-utils/stringify-error"; import { Context } from "@temporalio/activity"; import { JSDOM } from "jsdom"; import puppeteer from "puppeteer-core"; import sanitizeHtml from "sanitize-html"; +import { validateExternalUrlWithDnsCheck } from "@local/hash-backend-utils/url-validation"; +import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; +import { stringifyError } from "@local/hash-isomorphic-utils/stringify-error"; + import { logger } from "./shared/activity-logger.js"; import { getFlowContext } from "./shared/get-flow-context.js"; import { requestExternalInput } from "./shared/request-external-input.js"; +import type { Url } from "@blockprotocol/type-system"; +import type { + FlowInternetAccessSettings, + WebPage, +} from "@local/hash-isomorphic-utils/flows/types"; + const sliceContentForLlmConsumption = (params: { content: string; maximumNumberOfTokens?: number; diff --git a/apps/hash-ai-worker-ts/src/activities/graph.ts b/apps/hash-ai-worker-ts/src/activities/graph.ts index bf48d817874..9d7229b4d9b 100644 --- a/apps/hash-ai-worker-ts/src/activities/graph.ts +++ b/apps/hash-ai-worker-ts/src/activities/graph.ts @@ -4,22 +4,7 @@ import { getEntityTypes, getPropertyTypes, } from "@blockprotocol/graph/stdlib"; -import type { - ActorEntityUuid, - DataTypeWithMetadata, - EntityId, - EntityTypeWithMetadata, - PropertyTypeWithMetadata, -} from "@blockprotocol/type-system"; import { publicUserAccountId } from "@local/hash-backend-utils/public-user-account-id"; -import type { - EntityQueryCursor, - GraphApi, - UpdateDataTypeEmbeddingParams, - UpdateEntityTypeEmbeddingParams, - UpdatePropertyTypeEmbeddingParams, -} from "@local/hash-graph-client"; -import type { AuthenticationContext } from "@local/hash-graph-sdk/authentication-context"; import { queryDataTypes, type QueryDataTypesParams, @@ -29,16 +14,6 @@ import { type SerializedQueryDataTypeSubgraphResponse, serializeQueryDataTypeSubgraphResponse, } from "@local/hash-graph-sdk/data-type"; -import type { - CreateEntityParameters, - QueryEntitiesRequest, - QueryEntitySubgraphRequest, - SerializedEntity, - SerializedEntityRootType, - SerializedQueryEntitiesResponse, - SerializedQueryEntitySubgraphResponse, - SerializedSubgraph, -} from "@local/hash-graph-sdk/entity"; import { HashEntity, queryEntities, @@ -73,6 +48,32 @@ import { systemPropertyTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; +import type { + ActorEntityUuid, + DataTypeWithMetadata, + EntityId, + EntityTypeWithMetadata, + PropertyTypeWithMetadata, +} from "@blockprotocol/type-system"; +import type { + EntityQueryCursor, + GraphApi, + UpdateDataTypeEmbeddingParams, + UpdateEntityTypeEmbeddingParams, + UpdatePropertyTypeEmbeddingParams, +} from "@local/hash-graph-client"; +import type { AuthenticationContext } from "@local/hash-graph-sdk/authentication-context"; +import type { + CreateEntityParameters, + QueryEntitiesRequest, + QueryEntitySubgraphRequest, + SerializedEntity, + SerializedEntityRootType, + SerializedQueryEntitiesResponse, + SerializedQueryEntitySubgraphResponse, + SerializedSubgraph, +} from "@local/hash-graph-sdk/entity"; + export type EntityQueryResponse = { subgraph: SerializedSubgraph; cursor?: EntityQueryCursor | null; diff --git a/apps/hash-ai-worker-ts/src/activities/infer-entities-from-web-page-activity.ts b/apps/hash-ai-worker-ts/src/activities/infer-entities-from-web-page-activity.ts index a30a6e7d214..caadf26330e 100644 --- a/apps/hash-ai-worker-ts/src/activities/infer-entities-from-web-page-activity.ts +++ b/apps/hash-ai-worker-ts/src/activities/infer-entities-from-web-page-activity.ts @@ -1,19 +1,21 @@ -import type { WebPage } from "@local/hash-isomorphic-utils/flows/types"; -import { StatusCode } from "@local/status"; import dedent from "dedent"; +import { StatusCode } from "@local/status"; + import { inferEntitySummariesFromWebPage } from "./infer-entities/infer-entity-summaries-from-web-page.js"; -import type { - DereferencedEntityTypesByTypeId, - InferenceState, -} from "./infer-entities/inference-types.js"; import { proposeEntities } from "./infer-entities/propose-entities.js"; import { logger } from "./shared/activity-logger.js"; import { getFlowContext } from "./shared/get-flow-context.js"; import { graphApiClient } from "./shared/graph-api-client.js"; -import type { PermittedOpenAiModel } from "./shared/openai-client.js"; import { stringify } from "./shared/stringify.js"; +import type { + DereferencedEntityTypesByTypeId, + InferenceState, +} from "./infer-entities/inference-types.js"; +import type { PermittedOpenAiModel } from "./shared/openai-client.js"; +import type { WebPage } from "@local/hash-isomorphic-utils/flows/types"; + export const inferEntitiesFromWebPageActivity = async (params: { webPage: WebPage | string; relevantEntitiesPrompt?: string; diff --git a/apps/hash-ai-worker-ts/src/activities/infer-entities/infer-entity-summaries-from-web-page.ts b/apps/hash-ai-worker-ts/src/activities/infer-entities/infer-entity-summaries-from-web-page.ts index e86b968ad93..c346eb491f7 100644 --- a/apps/hash-ai-worker-ts/src/activities/infer-entities/infer-entity-summaries-from-web-page.ts +++ b/apps/hash-ai-worker-ts/src/activities/infer-entities/infer-entity-summaries-from-web-page.ts @@ -1,14 +1,15 @@ -import type { EntityId, UserId, WebId } from "@blockprotocol/type-system"; -import type { GraphApi } from "@local/hash-graph-client"; -import type { WebPage } from "@local/hash-isomorphic-utils/flows/types"; import dedent from "dedent"; -import type { PermittedOpenAiModel } from "../shared/openai-client.js"; import { inferEntitySummaries } from "./infer-entity-summaries.js"; + +import type { PermittedOpenAiModel } from "../shared/openai-client.js"; import type { DereferencedEntityTypesByTypeId, InferenceState, } from "./inference-types.js"; +import type { EntityId, UserId, WebId } from "@blockprotocol/type-system"; +import type { GraphApi } from "@local/hash-graph-client"; +import type { WebPage } from "@local/hash-isomorphic-utils/flows/types"; export const inferEntitySummariesFromWebPage = async (params: { webPage: WebPage | string; diff --git a/apps/hash-ai-worker-ts/src/activities/infer-entities/infer-entity-summaries.ts b/apps/hash-ai-worker-ts/src/activities/infer-entities/infer-entity-summaries.ts index 8b17d99b9e2..26c0e5875ba 100644 --- a/apps/hash-ai-worker-ts/src/activities/infer-entities/infer-entity-summaries.ts +++ b/apps/hash-ai-worker-ts/src/activities/infer-entities/infer-entity-summaries.ts @@ -1,14 +1,6 @@ -import type { - EntityId, - UserId, - VersionedUrl, - WebId, -} from "@blockprotocol/type-system"; -import type { GraphApi } from "@local/hash-graph-client"; -import type { Status } from "@local/status"; -import { StatusCode } from "@local/status"; import dedent from "dedent"; -import type OpenAI from "openai"; + +import { StatusCode } from "@local/status"; import { logger } from "../shared/activity-logger.js"; import { getFlowContext } from "../shared/get-flow-context.js"; @@ -21,20 +13,30 @@ import { } from "../shared/get-llm-response/llm-message.js"; import { stringify } from "../shared/stringify.js"; import { inferEntitiesSystemPrompt } from "./infer-entities-system-prompt.js"; -import type { - CouldNotInferEntitiesReturn, - ProposedEntitySummariesByType, -} from "./infer-entity-summaries/generate-summary-tools.js"; import { generateSummaryTools, validateEntitySummariesByType, } from "./infer-entity-summaries/generate-summary-tools.js"; + +import type { + CouldNotInferEntitiesReturn, + ProposedEntitySummariesByType, +} from "./infer-entity-summaries/generate-summary-tools.js"; import type { CompletionPayload, DereferencedEntityTypesByTypeId, InferenceState, ProposedEntitySummary, } from "./inference-types.js"; +import type { + EntityId, + UserId, + VersionedUrl, + WebId, +} from "@blockprotocol/type-system"; +import type { GraphApi } from "@local/hash-graph-client"; +import type { Status } from "@local/status"; +import type OpenAI from "openai"; export const inferEntitySummaries = async (params: { completionPayload: CompletionPayload; diff --git a/apps/hash-ai-worker-ts/src/activities/infer-entities/infer-entity-summaries/generate-summary-tools.ts b/apps/hash-ai-worker-ts/src/activities/infer-entities/infer-entity-summaries/generate-summary-tools.ts index a96f4bdbfeb..8a6148ba89b 100644 --- a/apps/hash-ai-worker-ts/src/activities/infer-entities/infer-entity-summaries/generate-summary-tools.ts +++ b/apps/hash-ai-worker-ts/src/activities/infer-entities/infer-entity-summaries/generate-summary-tools.ts @@ -1,18 +1,19 @@ -import type { JsonObject } from "@blockprotocol/core"; -import type { VersionedUrl } from "@blockprotocol/type-system"; import { validateVersionedUrl } from "@blockprotocol/type-system"; -import type { Subtype } from "@local/advanced-types/subtype"; import { typedEntries } from "@local/advanced-types/typed-entries"; -import type { JSONSchema } from "openai/lib/jsonschema"; + +import { stringify } from "../../shared/stringify.js"; +import { generateToolLinkFields } from "../shared/generate-propose-entities-tools.js"; import type { DereferencedEntityType } from "../../shared/dereference-entity-type.js"; import type { LlmToolDefinition } from "../../shared/get-llm-response/types.js"; -import { stringify } from "../../shared/stringify.js"; import type { DereferencedEntityTypesByTypeId, ProposedEntitySummary, } from "../inference-types.js"; -import { generateToolLinkFields } from "../shared/generate-propose-entities-tools.js"; +import type { JsonObject } from "@blockprotocol/core"; +import type { VersionedUrl } from "@blockprotocol/type-system"; +import type { Subtype } from "@local/advanced-types/subtype"; +import type { JSONSchema } from "openai/lib/jsonschema"; type FunctionName = "could_not_infer_entities" | "register_entity_summaries"; diff --git a/apps/hash-ai-worker-ts/src/activities/infer-entities/inference-types.ts b/apps/hash-ai-worker-ts/src/activities/infer-entities/inference-types.ts index 9e02e99f9bb..0627109a847 100644 --- a/apps/hash-ai-worker-ts/src/activities/infer-entities/inference-types.ts +++ b/apps/hash-ai-worker-ts/src/activities/infer-entities/inference-types.ts @@ -1,3 +1,6 @@ +import type { DereferencedEntityTypeWithSimplifiedKeys } from "../shared/dereference-entity-type.js"; +import type { LlmUsage } from "../shared/get-llm-response/types.js"; +import type { PermittedOpenAiModel } from "../shared/openai-client.js"; import type { VersionedUrl } from "@blockprotocol/type-system"; import type { SerializedEntity } from "@local/hash-graph-sdk/entity"; import type { @@ -6,10 +9,6 @@ import type { } from "@local/hash-isomorphic-utils/ai-inference-types"; import type OpenAI from "openai"; -import type { DereferencedEntityTypeWithSimplifiedKeys } from "../shared/dereference-entity-type.js"; -import type { LlmUsage } from "../shared/get-llm-response/types.js"; -import type { PermittedOpenAiModel } from "../shared/openai-client.js"; - export type CompletionPayload = Omit< OpenAI.ChatCompletionCreateParams, "stream" | "tools" | "model" diff --git a/apps/hash-ai-worker-ts/src/activities/infer-entities/persist-entities/generate-persist-entities-tools.ts b/apps/hash-ai-worker-ts/src/activities/infer-entities/persist-entities/generate-persist-entities-tools.ts index dd80666b04c..0288ac0759b 100644 --- a/apps/hash-ai-worker-ts/src/activities/infer-entities/persist-entities/generate-persist-entities-tools.ts +++ b/apps/hash-ai-worker-ts/src/activities/infer-entities/persist-entities/generate-persist-entities-tools.ts @@ -1,7 +1,6 @@ -import type { JsonObject } from "@blockprotocol/core"; - import type { ProposedEntityToolCreationsByType } from "../shared/generate-propose-entities-tools.js"; import type { PropertyValueWithSimplifiedProperties } from "../shared/map-simplified-properties-to-properties.js"; +import type { JsonObject } from "@blockprotocol/core"; export type ProposedEntityToolUpdatesByType = Record< string, diff --git a/apps/hash-ai-worker-ts/src/activities/infer-entities/propose-entities.ts b/apps/hash-ai-worker-ts/src/activities/infer-entities/propose-entities.ts index 833c0b9da7f..94bfd16b081 100644 --- a/apps/hash-ai-worker-ts/src/activities/infer-entities/propose-entities.ts +++ b/apps/hash-ai-worker-ts/src/activities/infer-entities/propose-entities.ts @@ -1,34 +1,36 @@ -import type { EntityUuid, VersionedUrl } from "@blockprotocol/type-system"; +import { Context } from "@temporalio/activity"; +import dedent from "dedent"; + import { entityIdFromComponents } from "@blockprotocol/type-system"; import { typedEntries } from "@local/advanced-types/typed-entries"; import { mergePropertyObjectAndMetadata } from "@local/hash-graph-sdk/entity"; -import type { DeprecatedProposedEntity } from "@local/hash-isomorphic-utils/ai-inference-types"; -import type { Status } from "@local/status"; import { StatusCode } from "@local/status"; -import { Context } from "@temporalio/activity"; -import dedent from "dedent"; import { logger } from "../shared/activity-logger.js"; import { getFlowContext } from "../shared/get-flow-context.js"; import { getLlmResponse } from "../shared/get-llm-response.js"; -import type { - LlmMessage, - LlmUserMessage, -} from "../shared/get-llm-response/llm-message.js"; import { getToolCallsFromLlmAssistantMessage } from "../shared/get-llm-response/llm-message.js"; import { graphApiClient } from "../shared/graph-api-client.js"; import { logProgress } from "../shared/log-progress.js"; import { stringify } from "../shared/stringify.js"; import { inferEntitiesSystemPrompt } from "./infer-entities-system-prompt.js"; +import { validateProposedEntitiesByType } from "./persist-entities/generate-persist-entities-tools.js"; +import { extractErrorMessage } from "./shared/extract-validation-failure-details.js"; +import { generateProposeEntitiesTools } from "./shared/generate-propose-entities-tools.js"; +import { mapSimplifiedPropertiesToProperties } from "./shared/map-simplified-properties-to-properties.js"; + +import type { + LlmMessage, + LlmUserMessage, +} from "../shared/get-llm-response/llm-message.js"; import type { DereferencedEntityTypesByTypeId, InferenceState, } from "./inference-types.js"; -import { validateProposedEntitiesByType } from "./persist-entities/generate-persist-entities-tools.js"; -import { extractErrorMessage } from "./shared/extract-validation-failure-details.js"; import type { ProposedEntityToolCreationsByType } from "./shared/generate-propose-entities-tools.js"; -import { generateProposeEntitiesTools } from "./shared/generate-propose-entities-tools.js"; -import { mapSimplifiedPropertiesToProperties } from "./shared/map-simplified-properties-to-properties.js"; +import type { EntityUuid, VersionedUrl } from "@blockprotocol/type-system"; +import type { DeprecatedProposedEntity } from "@local/hash-isomorphic-utils/ai-inference-types"; +import type { Status } from "@local/status"; /** * This method is used by the 'infer-entities-from-web-page-activity', which is used by the browser plugin inference flow. diff --git a/apps/hash-ai-worker-ts/src/activities/infer-entities/shared/generate-propose-entities-tools.ts b/apps/hash-ai-worker-ts/src/activities/infer-entities/shared/generate-propose-entities-tools.ts index ac220fdd735..42aada01e94 100644 --- a/apps/hash-ai-worker-ts/src/activities/infer-entities/shared/generate-propose-entities-tools.ts +++ b/apps/hash-ai-worker-ts/src/activities/infer-entities/shared/generate-propose-entities-tools.ts @@ -1,3 +1,9 @@ +import { generateSimplifiedTypeId } from "./generate-simplified-type-id.js"; +import { stripIdsFromDereferencedProperties } from "./strip-ids-from-dereferenced-properties.js"; + +import type { DereferencedEntityType } from "../../shared/dereference-entity-type.js"; +import type { LlmToolDefinition } from "../../shared/get-llm-response/types.js"; +import type { PropertyValueWithSimplifiedProperties } from "./map-simplified-properties-to-properties.js"; import type { VersionedUrl } from "@blockprotocol/type-system"; import type { DistributiveOmit } from "@local/advanced-types/distribute"; import type { @@ -6,12 +12,6 @@ import type { } from "@local/hash-isomorphic-utils/ai-inference-types"; import type { JSONSchema } from "openai/lib/jsonschema"; -import type { DereferencedEntityType } from "../../shared/dereference-entity-type.js"; -import type { LlmToolDefinition } from "../../shared/get-llm-response/types.js"; -import { generateSimplifiedTypeId } from "./generate-simplified-type-id.js"; -import type { PropertyValueWithSimplifiedProperties } from "./map-simplified-properties-to-properties.js"; -import { stripIdsFromDereferencedProperties } from "./strip-ids-from-dereferenced-properties.js"; - export type ProposeEntitiesToolName = "abandon_entities" | "create_entities"; type ProposedEntityWithSimplifiedProperties = DistributiveOmit< diff --git a/apps/hash-ai-worker-ts/src/activities/infer-entities/shared/strip-ids-from-dereferenced-properties.ts b/apps/hash-ai-worker-ts/src/activities/infer-entities/shared/strip-ids-from-dereferenced-properties.ts index 09460d1b1d2..585fbf2468d 100644 --- a/apps/hash-ai-worker-ts/src/activities/infer-entities/shared/strip-ids-from-dereferenced-properties.ts +++ b/apps/hash-ai-worker-ts/src/activities/infer-entities/shared/strip-ids-from-dereferenced-properties.ts @@ -1,8 +1,7 @@ +import type { DereferencedPropertyType } from "../../shared/dereference-entity-type.js"; import type { PropertyValueArray } from "@blockprotocol/type-system"; import type { JSONSchemaDefinition } from "openai/lib/jsonschema"; -import type { DereferencedPropertyType } from "../../shared/dereference-entity-type.js"; - /** * Strip the `$id` field from the dereferenced property type definitions, * as it confuses Anthropic's model (it opts for using the $id as the diff --git a/apps/hash-ai-worker-ts/src/activities/parse-text-from-file.ts b/apps/hash-ai-worker-ts/src/activities/parse-text-from-file.ts index 152f51ded34..961239b4bc2 100644 --- a/apps/hash-ai-worker-ts/src/activities/parse-text-from-file.ts +++ b/apps/hash-ai-worker-ts/src/activities/parse-text-from-file.ts @@ -1,21 +1,23 @@ -import type { - OriginProvenance, - ProvidedEntityEditionProvenance, - VersionedUrl, -} from "@blockprotocol/type-system"; -import type { GraphApi } from "@local/hash-graph-client"; +import officeParser from "officeparser"; + import { HashEntity } from "@local/hash-graph-sdk/entity"; import { blockProtocolPropertyTypes, systemEntityTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { ParseTextFromFileParams } from "@local/hash-isomorphic-utils/parse-text-from-file-types"; -import type { TextualContentPropertyValueWithMetadata } from "@local/hash-isomorphic-utils/system-types/shared"; -import officeParser from "officeparser"; import { fetchFileFromUrl } from "./shared/fetch-file-from-url.js"; import { getFlowContext } from "./shared/get-flow-context.js"; +import type { + OriginProvenance, + ProvidedEntityEditionProvenance, + VersionedUrl, +} from "@blockprotocol/type-system"; +import type { GraphApi } from "@local/hash-graph-client"; +import type { ParseTextFromFileParams } from "@local/hash-isomorphic-utils/parse-text-from-file-types"; +import type { TextualContentPropertyValueWithMetadata } from "@local/hash-isomorphic-utils/system-types/shared"; + type TextParsingFunction = (fileBuffer: Buffer) => Promise; const officeParserTextParsingFunction: TextParsingFunction = async ( diff --git a/apps/hash-ai-worker-ts/src/activities/shared/activity-logger.ts b/apps/hash-ai-worker-ts/src/activities/shared/activity-logger.ts index e37d598c1f5..355944ac57e 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/activity-logger.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/activity-logger.ts @@ -2,9 +2,10 @@ import fs from "node:fs"; import path from "node:path"; import { fileURLToPath } from "node:url"; -import { safeStringify } from "@local/hash-backend-utils/logger"; import { Context } from "@temporalio/activity"; +import { safeStringify } from "@local/hash-backend-utils/logger"; + import { logger as baseLogger } from "../../shared/logger.js"; const __filename = fileURLToPath(import.meta.url); diff --git a/apps/hash-ai-worker-ts/src/activities/shared/create-inferred-entity-notification.ts b/apps/hash-ai-worker-ts/src/activities/shared/create-inferred-entity-notification.ts index 54e01c3b37b..988251e5cfb 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/create-inferred-entity-notification.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/create-inferred-entity-notification.ts @@ -1,6 +1,7 @@ -import type { UserId } from "@blockprotocol/type-system"; import { extractDraftIdFromEntityId } from "@blockprotocol/type-system"; import { createGraphChangeNotification } from "@local/hash-backend-utils/notifications"; + +import type { UserId } from "@blockprotocol/type-system"; import type { GraphApi } from "@local/hash-graph-client"; import type { HashEntity } from "@local/hash-graph-sdk/entity"; diff --git a/apps/hash-ai-worker-ts/src/activities/shared/dereference-entity-type.test.ts b/apps/hash-ai-worker-ts/src/activities/shared/dereference-entity-type.test.ts index 3146a6b2510..b70012f26c7 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/dereference-entity-type.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/dereference-entity-type.test.ts @@ -1,10 +1,12 @@ -import type { Subgraph } from "@blockprotocol/graph"; -import type { Subgraph as ApiClientSubgraph } from "@local/hash-graph-client"; -import { mapGraphApiVerticesToVertices } from "@local/hash-graph-sdk/subgraph"; import { describe, expect, it } from "vitest"; +import { mapGraphApiVerticesToVertices } from "@local/hash-graph-sdk/subgraph"; + import { dereferenceEntityType } from "./dereference-entity-type.js"; +import type { Subgraph } from "@blockprotocol/graph"; +import type { Subgraph as ApiClientSubgraph } from "@local/hash-graph-client"; + const testSubgraph: Pick = { edges: { "https://hash.ai/@test/types/property-type/mixed-array/": { diff --git a/apps/hash-ai-worker-ts/src/activities/shared/dereference-entity-type.ts b/apps/hash-ai-worker-ts/src/activities/shared/dereference-entity-type.ts index 7eb1a724990..4d5d861d382 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/dereference-entity-type.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/dereference-entity-type.ts @@ -1,9 +1,21 @@ -import type { Subgraph } from "@blockprotocol/graph"; import { getDataTypeById, getEntityTypeAndParentsById, getPropertyTypeById, } from "@blockprotocol/graph/stdlib"; +import { + atLeastOne, + compareOntologyTypeVersions, + componentsFromVersionedUrl, + extractBaseUrl, + extractVersion, +} from "@blockprotocol/type-system"; +import { typedEntries } from "@local/advanced-types/typed-entries"; +import { blockProtocolEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; + +import { generateSimplifiedTypeId } from "../infer-entities/shared/generate-simplified-type-id.js"; + +import type { Subgraph } from "@blockprotocol/graph"; import type { BaseUrl, DataType, @@ -16,18 +28,7 @@ import type { ValueOrArray, VersionedUrl, } from "@blockprotocol/type-system"; -import { - atLeastOne, - compareOntologyTypeVersions, - componentsFromVersionedUrl, - extractBaseUrl, - extractVersion, -} from "@blockprotocol/type-system"; import type { DistributiveOmit } from "@local/advanced-types/distribute"; -import { typedEntries } from "@local/advanced-types/typed-entries"; -import { blockProtocolEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; - -import { generateSimplifiedTypeId } from "../infer-entities/shared/generate-simplified-type-id.js"; type MinimalDataType = DistributiveOmit; diff --git a/apps/hash-ai-worker-ts/src/activities/shared/embeddings.ts b/apps/hash-ai-worker-ts/src/activities/shared/embeddings.ts index 321315c6591..82d44e7e0e4 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/embeddings.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/embeddings.ts @@ -1,3 +1,7 @@ +import OpenAI from "openai"; + +import { extractBaseUrl } from "@blockprotocol/type-system"; + import type { BaseUrl, DataTypeWithMetadata, @@ -8,9 +12,7 @@ import type { PropertyTypeWithMetadata, VersionedUrl, } from "@blockprotocol/type-system"; -import { extractBaseUrl } from "@blockprotocol/type-system"; import type { Embedding } from "@local/hash-graph-client"; -import OpenAI from "openai"; type Usage = OpenAI.CreateEmbeddingResponse.Usage; diff --git a/apps/hash-ai-worker-ts/src/activities/shared/find-existing-entity.ts b/apps/hash-ai-worker-ts/src/activities/shared/find-existing-entity.ts index cbdefd34ca4..662cbcbb422 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/find-existing-entity.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/find-existing-entity.ts @@ -1,23 +1,11 @@ import { getRoots } from "@blockprotocol/graph/stdlib"; -import type { - ActorEntityUuid, - BaseUrl, - LinkData, - WebId, -} from "@blockprotocol/type-system"; import { extractEntityUuidFromEntityId, extractWebIdFromEntityId, } from "@blockprotocol/type-system"; import { typedEntries } from "@local/advanced-types/typed-entries"; -import type { - AllFilter, - CosineDistanceFilter, - GraphApi, -} from "@local/hash-graph-client"; import { HashEntity, queryEntities } from "@local/hash-graph-sdk/entity"; import { queryEntityTypeSubgraph } from "@local/hash-graph-sdk/entity-type"; -import type { ProposedEntity } from "@local/hash-isomorphic-utils/flows/types"; import { almostFullOntologyResolveDepths, currentTimeInstantTemporalAxes, @@ -26,7 +14,6 @@ import { import { deduplicateSources } from "@local/hash-isomorphic-utils/provenance"; import { logger } from "./activity-logger.js"; -import type { DereferencedEntityType } from "./dereference-entity-type.js"; import { dereferenceEntityType } from "./dereference-entity-type.js"; import { createEntityEmbeddings } from "./embeddings.js"; import { @@ -34,6 +21,20 @@ import { matchExistingEntity, } from "./match-existing-entity.js"; +import type { DereferencedEntityType } from "./dereference-entity-type.js"; +import type { + ActorEntityUuid, + BaseUrl, + LinkData, + WebId, +} from "@blockprotocol/type-system"; +import type { + AllFilter, + CosineDistanceFilter, + GraphApi, +} from "@local/hash-graph-client"; +import type { ProposedEntity } from "@local/hash-isomorphic-utils/flows/types"; + export const findExistingEntity = async ({ actorId, dereferencedEntityTypes, diff --git a/apps/hash-ai-worker-ts/src/activities/shared/get-entity-by-filter.ts b/apps/hash-ai-worker-ts/src/activities/shared/get-entity-by-filter.ts index 89bf43857c8..1f46256a582 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/get-entity-by-filter.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/get-entity-by-filter.ts @@ -1,8 +1,9 @@ -import type { ActorEntityUuid } from "@blockprotocol/type-system"; -import type { Filter, GraphApi } from "@local/hash-graph-client"; import { type HashEntity, queryEntities } from "@local/hash-graph-sdk/entity"; import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; +import type { ActorEntityUuid } from "@blockprotocol/type-system"; +import type { Filter, GraphApi } from "@local/hash-graph-client"; + export const getEntityByFilter = async ({ actorId, graphApiClient, diff --git a/apps/hash-ai-worker-ts/src/activities/shared/get-flow-context.ts b/apps/hash-ai-worker-ts/src/activities/shared/get-flow-context.ts index 91e7ce4709d..51012404cba 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/get-flow-context.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/get-flow-context.ts @@ -1,4 +1,5 @@ -import type { EntityId, UserId, WebId } from "@blockprotocol/type-system"; +import { Context } from "@temporalio/activity"; + import { extractEntityUuidFromEntityId, extractWebIdFromEntityId, @@ -10,18 +11,19 @@ import { import { createTemporalClient } from "@local/hash-backend-utils/temporal"; import { parseHistoryItemPayload } from "@local/hash-backend-utils/temporal/parse-history-item-payload"; import { type HashEntity, queryEntities } from "@local/hash-graph-sdk/entity"; +import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; +import { normalizeWhitespace } from "@local/hash-isomorphic-utils/normalize"; + +import { graphApiClient } from "./graph-api-client.js"; + +import type { EntityId, UserId, WebId } from "@blockprotocol/type-system"; import type { ManualInferenceTriggerInputName } from "@local/hash-isomorphic-utils/flows/browser-plugin-flow-types"; import type { GoalFlowTriggerInput } from "@local/hash-isomorphic-utils/flows/goal-flow-definitions"; import type { RunAiFlowWorkflowParams } from "@local/hash-isomorphic-utils/flows/temporal-types"; import type { FlowDataSources } from "@local/hash-isomorphic-utils/flows/types"; -import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; -import { normalizeWhitespace } from "@local/hash-isomorphic-utils/normalize"; import type { File } from "@local/hash-isomorphic-utils/system-types/shared"; -import { Context } from "@temporalio/activity"; import type { Client as TemporalClient } from "@temporalio/client"; -import { graphApiClient } from "./graph-api-client.js"; - let _temporalClient: TemporalClient | undefined; /** diff --git a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response.ts b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response.ts index 2bea1671218..425471821c3 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response.ts @@ -1,10 +1,8 @@ -import type { EntityId, UserId, WebId } from "@blockprotocol/type-system"; -import type { GraphApi } from "@local/hash-graph-client"; -import type { FlowUsageRecordCustomMetadata } from "@local/hash-isomorphic-utils/flows/types"; -import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; // import { StatusCode } from "@local/status"; import { backOff } from "exponential-backoff"; +import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; + import { getAiAssistantAccountIdActivity } from "../get-ai-assistant-account-id-activity.js"; import { logger } from "./activity-logger.js"; import { getFlowContext } from "./get-flow-context.js"; @@ -13,15 +11,19 @@ import { getAnthropicResponse } from "./get-llm-response/get-anthropic-response. import { getGoogleAiResponse } from "./get-llm-response/get-google-ai-response.js"; import { getOpenAiResponse } from "./get-llm-response/get-openai-reponse.js"; import { logLlmRequest } from "./get-llm-response/log-llm-request.js"; +import { + isLlmParamsAnthropicLlmParams, + isLlmParamsGoogleAiParams, +} from "./get-llm-response/types.js"; + import type { LlmParams, LlmRequestMetadata, LlmResponse, } from "./get-llm-response/types.js"; -import { - isLlmParamsAnthropicLlmParams, - isLlmParamsGoogleAiParams, -} from "./get-llm-response/types.js"; +import type { EntityId, UserId, WebId } from "@blockprotocol/type-system"; +import type { GraphApi } from "@local/hash-graph-client"; +import type { FlowUsageRecordCustomMetadata } from "@local/hash-isomorphic-utils/flows/types"; export type UsageTrackingParams = { /** diff --git a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/anthropic-client.ts b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/anthropic-client.ts index 1e3c63b42ed..7a5b6fc13e8 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/anthropic-client.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/anthropic-client.ts @@ -1,13 +1,15 @@ import { AnthropicBedrock } from "@anthropic-ai/bedrock-sdk"; import Anthropic from "@anthropic-ai/sdk"; +import { Context } from "@temporalio/activity"; + +import { getRequiredEnv } from "@local/hash-backend-utils/environment"; + import type { Message, MessageCreateParamsBase, MessageCreateParamsNonStreaming, ToolUseBlock, } from "@anthropic-ai/sdk/resources/messages"; -import { getRequiredEnv } from "@local/hash-backend-utils/environment"; -import { Context } from "@temporalio/activity"; const anthropicApiKey = getRequiredEnv("ANTHROPIC_API_KEY"); diff --git a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/check-web-service-usage-not-exceeded.ts b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/check-web-service-usage-not-exceeded.ts index 6da2a2e78ba..3f3c74625f4 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/check-web-service-usage-not-exceeded.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/check-web-service-usage-not-exceeded.ts @@ -1,11 +1,12 @@ -import type { ActorEntityUuid, WebId } from "@blockprotocol/type-system"; import { generateTimestamp } from "@blockprotocol/type-system"; import { getWebServiceUsage } from "@local/hash-backend-utils/service-usage"; -import type { GraphApi } from "@local/hash-graph-client"; import { isUserHashInstanceAdmin } from "@local/hash-graph-sdk/principal/hash-instance-admins"; -import type { Status } from "@local/status"; import { StatusCode } from "@local/status"; +import type { ActorEntityUuid, WebId } from "@blockprotocol/type-system"; +import type { GraphApi } from "@local/hash-graph-client"; +import type { Status } from "@local/status"; + const usageCostLimit = { admin: { day: 30, diff --git a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-anthropic-response.ts b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-anthropic-response.ts index 08e81bea607..68981853c0f 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-anthropic-response.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-anthropic-response.ts @@ -1,16 +1,9 @@ -import type { APIError, RateLimitError } from "@anthropic-ai/sdk/error"; -import type { Tool } from "@anthropic-ai/sdk/resources/messages"; import dedent from "dedent"; import { backOff } from "exponential-backoff"; import { logger } from "../activity-logger.js"; import { isActivityCancelled } from "../get-flow-context.js"; import { stringify } from "../stringify.js"; -import type { - AnthropicApiProvider, - AnthropicMessagesCreateParams, - AnthropicMessagesCreateResponse, -} from "./anthropic-client.js"; import { anthropicMessageModelToMaxOutput, createAnthropicMessagesWithTools, @@ -23,15 +16,25 @@ import { maxRetryCount, serverErrorRetryStartingDelay, } from "./constants.js"; -import type { - LlmMessageToolUseContent, - LlmUserMessage, -} from "./llm-message.js"; import { mapAnthropicMessageToLlmMessage, mapLlmMessageToAnthropicMessage, } from "./llm-message.js"; import { logLlmRequest, logLlmServerError } from "./log-llm-request.js"; +import { + getInputValidationErrors, + sanitizeInputBeforeValidation, +} from "./validation.js"; + +import type { + AnthropicApiProvider, + AnthropicMessagesCreateParams, + AnthropicMessagesCreateResponse, +} from "./anthropic-client.js"; +import type { + LlmMessageToolUseContent, + LlmUserMessage, +} from "./llm-message.js"; import type { AnthropicLlmParams, AnthropicResponse, @@ -42,10 +45,8 @@ import type { LlmUsage, ParsedLlmToolCall, } from "./types.js"; -import { - getInputValidationErrors, - sanitizeInputBeforeValidation, -} from "./validation.js"; +import type { APIError, RateLimitError } from "@anthropic-ai/sdk/error"; +import type { Tool } from "@anthropic-ai/sdk/resources/messages"; const mapLlmToolDefinitionToAnthropicToolDefinition = ( tool: LlmToolDefinition, diff --git a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-google-ai-response.ts b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-google-ai-response.ts index 1ab8bc38c4c..b89cf673335 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-google-ai-response.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-google-ai-response.ts @@ -6,8 +6,6 @@ import { type GenerateContentResponse, type Part, } from "@google-cloud/vertexai"; -import type { HashEntity } from "@local/hash-graph-sdk/entity"; -import type { File } from "@local/hash-isomorphic-utils/system-types/shared"; import { logger } from "../activity-logger.js"; import { isActivityCancelled } from "../get-flow-context.js"; @@ -16,6 +14,7 @@ import { mapLlmContentToGooglePartAndUploadFiles } from "./get-google-ai-respons import { rewriteSchemaForGoogle } from "./get-google-ai-response/rewrite-schema-for-google.js"; import { getVertexAiClient } from "./google-vertex-ai-client.js"; import { type LlmMessage } from "./llm-message.js"; + import type { GoogleAiParams, LlmRequestMetadata, @@ -23,6 +22,8 @@ import type { LlmToolDefinition, LlmUsage, } from "./types.js"; +import type { HashEntity } from "@local/hash-graph-sdk/entity"; +import type { File } from "@local/hash-isomorphic-utils/system-types/shared"; const mapLlmToolDefinitionToGoogleAiToolDefinition = ( tool: LlmToolDefinition, diff --git a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-google-ai-response/google-cloud-storage.ts b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-google-ai-response/google-cloud-storage.ts index c5c18a99be7..a75e4ad5c1a 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-google-ai-response/google-cloud-storage.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-google-ai-response/google-cloud-storage.ts @@ -1,9 +1,10 @@ import { Storage } from "@google-cloud/storage"; -import type { HashEntity } from "@local/hash-graph-sdk/entity"; -import type { File } from "@local/hash-isomorphic-utils/system-types/shared"; import { logger } from "../../activity-logger.js"; +import type { HashEntity } from "@local/hash-graph-sdk/entity"; +import type { File } from "@local/hash-isomorphic-utils/system-types/shared"; + let _googleCloudStorage: Storage | undefined; const storageBucket = process.env.GOOGLE_CLOUD_STORAGE_BUCKET; diff --git a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-google-ai-response/map-google-messages-to-llm-messages.ts b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-google-ai-response/map-google-messages-to-llm-messages.ts index 6ae2e02295e..a0da9b41a6c 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-google-ai-response/map-google-messages-to-llm-messages.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-google-ai-response/map-google-messages-to-llm-messages.ts @@ -1,10 +1,10 @@ +import { getFileEntityFromGcpStorageUri } from "./google-cloud-storage.js"; + +import type { LlmMessage } from "../llm-message.js"; import type { Content } from "@google-cloud/vertexai"; import type { HashEntity } from "@local/hash-graph-sdk/entity"; import type { File } from "@local/hash-isomorphic-utils/system-types/shared"; -import type { LlmMessage } from "../llm-message.js"; -import { getFileEntityFromGcpStorageUri } from "./google-cloud-storage.js"; - export const mapGoogleMessagesToLlmMessages = (params: { messages: Content[]; fileEntities: Pick, "entityId" | "properties">[]; diff --git a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-google-ai-response/map-parts-and-upload-files.ts b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-google-ai-response/map-parts-and-upload-files.ts index 4f869c24f04..81c0b89df71 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-google-ai-response/map-parts-and-upload-files.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-google-ai-response/map-parts-and-upload-files.ts @@ -1,3 +1,7 @@ +import { useFileSystemPathFromEntity } from "../../use-file-system-file-from-url.js"; +import { uploadFileToGcpStorage } from "./google-cloud-storage.js"; + +import type { LlmMessage } from "../llm-message.js"; import type { PropertyValue } from "@blockprotocol/type-system"; import type { FileDataPart, @@ -7,10 +11,6 @@ import type { TextPart, } from "@google-cloud/vertexai"; -import { useFileSystemPathFromEntity } from "../../use-file-system-file-from-url.js"; -import type { LlmMessage } from "../llm-message.js"; -import { uploadFileToGcpStorage } from "./google-cloud-storage.js"; - export const mapLlmContentToGooglePartAndUploadFiles = async ( content: LlmMessage["content"][number], ): Promise => { diff --git a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-google-ai-response/rewrite-schema-for-google.ts b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-google-ai-response/rewrite-schema-for-google.ts index 88ed15ef52e..58bceff0073 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-google-ai-response/rewrite-schema-for-google.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-google-ai-response/rewrite-schema-for-google.ts @@ -1,9 +1,10 @@ -import { mustHaveAtLeastOne } from "@blockprotocol/type-system"; -import type { FunctionDeclarationSchema, Schema } from "@google-cloud/vertexai"; import { SchemaType } from "@google-cloud/vertexai"; -import type { JSONSchema } from "openai/lib/jsonschema.mjs"; + +import { mustHaveAtLeastOne } from "@blockprotocol/type-system"; import type { LlmToolDefinition } from "../types.js"; +import type { FunctionDeclarationSchema, Schema } from "@google-cloud/vertexai"; +import type { JSONSchema } from "openai/lib/jsonschema.mjs"; /** * @file diff --git a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-openai-reponse.ts b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-openai-reponse.ts index f9c44622741..0ed07a37879 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-openai-reponse.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/get-openai-reponse.ts @@ -1,7 +1,6 @@ import { Context } from "@temporalio/activity"; import dedent from "dedent"; import { backOff } from "exponential-backoff"; -import type { OpenAI } from "openai"; import { promptTokensEstimate } from "openai-chat-tokens"; import { APIError, RateLimitError } from "openai/error"; @@ -16,16 +15,21 @@ import { maxRetryCount, serverErrorRetryStartingDelay, } from "./constants.js"; -import type { - LlmAssistantMessage, - LlmMessageToolUseContent, - LlmUserMessage, -} from "./llm-message.js"; import { mapLlmMessageToOpenAiMessages, mapOpenAiMessagesToLlmMessages, } from "./llm-message.js"; import { logLlmRequest, logLlmServerError } from "./log-llm-request.js"; +import { + getInputValidationErrors, + sanitizeInputBeforeValidation, +} from "./validation.js"; + +import type { + LlmAssistantMessage, + LlmMessageToolUseContent, + LlmUserMessage, +} from "./llm-message.js"; import type { LlmRequestMetadata, LlmResponse, @@ -35,10 +39,7 @@ import type { OpenAiLlmParams, ParsedLlmToolCall, } from "./types.js"; -import { - getInputValidationErrors, - sanitizeInputBeforeValidation, -} from "./validation.js"; +import type { OpenAI } from "openai"; const mapLlmToolDefinitionToOpenAiToolDefinition = ( tool: LlmToolDefinition, diff --git a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/google-vertex-ai-client.ts b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/google-vertex-ai-client.ts index 1f7340b2518..1aebeab08e9 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/google-vertex-ai-client.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/google-vertex-ai-client.ts @@ -1,6 +1,7 @@ -import type { MessageCreateParamsBase } from "@anthropic-ai/sdk/resources/messages.mjs"; import { VertexAI } from "@google-cloud/vertexai"; +import type { MessageCreateParamsBase } from "@anthropic-ai/sdk/resources/messages.mjs"; + const permittedGoogleAiModels = [ "gemini-1.5-pro-002", ] satisfies MessageCreateParamsBase["model"][]; diff --git a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/log-llm-request.ts b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/log-llm-request.ts index 3d5427ec480..246c30e1f99 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/log-llm-request.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/log-llm-request.ts @@ -5,6 +5,7 @@ import { fileURLToPath } from "node:url"; import { Context } from "@temporalio/activity"; import { logger } from "../activity-logger.js"; + import type { LlmLog, LlmServerErrorLog } from "./types.js"; const __filename = fileURLToPath(import.meta.url); diff --git a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/types.ts b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/types.ts index af185cb32fd..bd157334a3a 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/types.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/types.ts @@ -1,8 +1,3 @@ -import type { GenerateContentResponse } from "@google-cloud/vertexai"; -import type { OpenAI } from "openai"; -import type { JSONSchema } from "openai/lib/jsonschema"; - -import type { PermittedOpenAiModel } from "../openai-client.js"; import { type AnthropicApiProvider, type AnthropicMessagesCreateParams, @@ -14,7 +9,12 @@ import { isPermittedGoogleAiModel, type PermittedGoogleAiModel, } from "./google-vertex-ai-client.js"; + +import type { PermittedOpenAiModel } from "../openai-client.js"; import type { LlmAssistantMessage, LlmMessage } from "./llm-message.js"; +import type { GenerateContentResponse } from "@google-cloud/vertexai"; +import type { OpenAI } from "openai"; +import type { JSONSchema } from "openai/lib/jsonschema"; export type LlmToolDefinition = { name: ToolName; diff --git a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/validation.ts b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/validation.ts index 1d8dbf7f1a6..a06fac84058 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/validation.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/get-llm-response/validation.ts @@ -1,10 +1,11 @@ import _Ajv from "ajv"; import _addFormats from "ajv-formats"; -import type { JSONSchema } from "openai/lib/jsonschema"; import { logger } from "../activity-logger.js"; import { stringify } from "../stringify.js"; + import type { LlmToolDefinition } from "./types.js"; +import type { JSONSchema } from "openai/lib/jsonschema"; const Ajv = _Ajv as unknown as typeof _Ajv.default; const addFormats = _addFormats as unknown as typeof _addFormats.default; diff --git a/apps/hash-ai-worker-ts/src/activities/shared/inference-model-alias-to-llm-model.ts b/apps/hash-ai-worker-ts/src/activities/shared/inference-model-alias-to-llm-model.ts index 713ca1d406f..619ab6bf8fe 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/inference-model-alias-to-llm-model.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/inference-model-alias-to-llm-model.ts @@ -1,6 +1,5 @@ -import type { InferenceModelName } from "@local/hash-isomorphic-utils/ai-inference-types"; - import type { LlmParams } from "./get-llm-response/types.js"; +import type { InferenceModelName } from "@local/hash-isomorphic-utils/ai-inference-types"; /** * A map of the API consumer-facing model names to the specific model names used to call the LLM APIs. diff --git a/apps/hash-ai-worker-ts/src/activities/shared/judge-ai-output-optimize/judge-test-data.ts b/apps/hash-ai-worker-ts/src/activities/shared/judge-ai-output-optimize/judge-test-data.ts index 0eec95abba8..f211ec0dddc 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/judge-ai-output-optimize/judge-test-data.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/judge-ai-output-optimize/judge-test-data.ts @@ -1,6 +1,5 @@ -import type { EntityId, PropertyValue } from "@blockprotocol/type-system"; - import type { LlmParams } from "../get-llm-response/types.js"; +import type { EntityId, PropertyValue } from "@blockprotocol/type-system"; type CorrectedValue = | { diff --git a/apps/hash-ai-worker-ts/src/activities/shared/judge-ai-output.optimize.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/shared/judge-ai-output.optimize.ai.test.ts index 1b3baec1a3a..bb720ad0ffc 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/judge-ai-output.optimize.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/judge-ai-output.optimize.ai.test.ts @@ -2,11 +2,11 @@ import "../../shared/testing-utilities/mock-get-flow-context.js"; import path from "node:path"; import { fileURLToPath } from "node:url"; -import { stringifyPropertyValue } from "@local/hash-isomorphic-utils/stringify-property-value"; import isEqual from "lodash/isEqual.js"; import { test } from "vitest"; -import type { LlmParams } from "./get-llm-response/types.js"; +import { stringifyPropertyValue } from "@local/hash-isomorphic-utils/stringify-property-value"; + import { judgeTestData } from "./judge-ai-output-optimize/judge-test-data.js"; import { judgeAiOutputs, @@ -14,6 +14,8 @@ import { judgeSystemPrompt, } from "./judge-ai-outputs.js"; import { optimizeSystemPrompt } from "./optimize-system-prompt.js"; + +import type { LlmParams } from "./get-llm-response/types.js"; import type { MetricDefinition } from "./optimize-system-prompt/types.js"; const metrics: MetricDefinition[] = judgeTestData.map( diff --git a/apps/hash-ai-worker-ts/src/activities/shared/judge-ai-outputs.ts b/apps/hash-ai-worker-ts/src/activities/shared/judge-ai-outputs.ts index 1921405965b..b9da4de9fcf 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/judge-ai-outputs.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/judge-ai-outputs.ts @@ -1,4 +1,3 @@ -import type { PropertyValue } from "@blockprotocol/type-system"; import get from "lodash/get.js"; import { logger } from "./activity-logger.js"; @@ -9,9 +8,11 @@ import { getToolCallsFromLlmAssistantMessage, type LlmUserMessage, } from "./get-llm-response/llm-message.js"; -import type { LlmParams, LlmToolDefinition } from "./get-llm-response/types.js"; import { graphApiClient } from "./graph-api-client.js"; +import type { LlmParams, LlmToolDefinition } from "./get-llm-response/types.js"; +import type { PropertyValue } from "@blockprotocol/type-system"; + type ExchangeToReview = Required> & Pick; diff --git a/apps/hash-ai-worker-ts/src/activities/shared/log-progress.ts b/apps/hash-ai-worker-ts/src/activities/shared/log-progress.ts index 7ebff8472d0..3c1a443b237 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/log-progress.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/log-progress.ts @@ -1,12 +1,14 @@ -import { createTemporalClient } from "@local/hash-backend-utils/temporal"; -import type { StepProgressLog } from "@local/hash-isomorphic-utils/flows/types"; import { Context } from "@temporalio/activity"; -import type { Client as TemporalClient } from "@temporalio/client"; import debounce from "lodash/debounce.js"; +import { createTemporalClient } from "@local/hash-backend-utils/temporal"; + import { logProgressSignal } from "../../shared/signals.js"; import { logger } from "./activity-logger.js"; +import type { StepProgressLog } from "@local/hash-isomorphic-utils/flows/types"; +import type { Client as TemporalClient } from "@temporalio/client"; + let temporalClient: TemporalClient | undefined; const logQueueByRunId: Map = new Map(); diff --git a/apps/hash-ai-worker-ts/src/activities/shared/map-action-input-entities-to-entities.ts b/apps/hash-ai-worker-ts/src/activities/shared/map-action-input-entities-to-entities.ts index 5ba67f23936..161b5a67b78 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/map-action-input-entities-to-entities.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/map-action-input-entities-to-entities.ts @@ -1,13 +1,14 @@ -import type { ActorEntityUuid, EntityId } from "@blockprotocol/type-system"; import { extractEntityUuidFromEntityId } from "@blockprotocol/type-system"; +import { HashEntity, queryEntities } from "@local/hash-graph-sdk/entity"; +import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; + +import type { ActorEntityUuid, EntityId } from "@blockprotocol/type-system"; import type { GraphApi } from "@local/hash-graph-client"; import type { SerializedEntity } from "@local/hash-graph-sdk/entity"; -import { HashEntity, queryEntities } from "@local/hash-graph-sdk/entity"; import type { PersistedEntitiesMetadata, PersistedEntityMetadata, } from "@local/hash-isomorphic-utils/flows/types"; -import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; export const mapActionInputEntitiesToEntities = async (params: { actorId: ActorEntityUuid; diff --git a/apps/hash-ai-worker-ts/src/activities/shared/match-existing-entity.optimize.ai.test.ts b/apps/hash-ai-worker-ts/src/activities/shared/match-existing-entity.optimize.ai.test.ts index eaa79fd0ad2..25efd62d15c 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/match-existing-entity.optimize.ai.test.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/match-existing-entity.optimize.ai.test.ts @@ -2,13 +2,8 @@ import "../../shared/testing-utilities/mock-get-flow-context.js"; import path from "node:path"; import { fileURLToPath } from "node:url"; -import type { - EntityId, - EntityUuid, - PropertyObjectMetadata, - ValueMetadata, - WebId, -} from "@blockprotocol/type-system"; +import { test } from "vitest"; + import { entityIdFromComponents } from "@blockprotocol/type-system"; import { typedEntries } from "@local/advanced-types/typed-entries"; import { brandPropertyObject } from "@local/hash-graph-sdk/entity"; @@ -20,17 +15,24 @@ import { systemPropertyTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { stringifyPropertyValue } from "@local/hash-isomorphic-utils/stringify-property-value"; -import type { PersonProperties } from "@local/hash-isomorphic-utils/system-types/shared"; -import { test } from "vitest"; -import type { LlmParams } from "./get-llm-response/types.js"; -import type { MatchExistingEntityParams } from "./match-existing-entity.js"; import { matchExistingEntity, matchExistingEntitySystemPrompt, } from "./match-existing-entity.js"; import { optimizeSystemPrompt } from "./optimize-system-prompt.js"; + +import type { LlmParams } from "./get-llm-response/types.js"; +import type { MatchExistingEntityParams } from "./match-existing-entity.js"; import type { MetricDefinition } from "./optimize-system-prompt/types.js"; +import type { + EntityId, + EntityUuid, + PropertyObjectMetadata, + ValueMetadata, + WebId, +} from "@blockprotocol/type-system"; +import type { PersonProperties } from "@local/hash-isomorphic-utils/system-types/shared"; const emptyMetadataObject: PropertyObjectMetadata = { value: {}, diff --git a/apps/hash-ai-worker-ts/src/activities/shared/match-existing-entity.ts b/apps/hash-ai-worker-ts/src/activities/shared/match-existing-entity.ts index 6ef47c93ba0..de3e882c424 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/match-existing-entity.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/match-existing-entity.ts @@ -1,25 +1,27 @@ -import type { - EntityId, - PropertyObject, - PropertyObjectMetadata, - SourceProvenance, - VersionedUrl, -} from "@blockprotocol/type-system"; +import dedent from "dedent"; + import { isValueMetadata } from "@blockprotocol/type-system"; import { typedEntries } from "@local/advanced-types/typed-entries"; -import type { HashEntity } from "@local/hash-graph-sdk/entity"; import { deduplicateSources } from "@local/hash-isomorphic-utils/provenance"; import { sleep } from "@local/hash-isomorphic-utils/sleep"; import { stringifyPropertyValue } from "@local/hash-isomorphic-utils/stringify-property-value"; -import dedent from "dedent"; import { logger } from "./activity-logger.js"; import { getFlowContext } from "./get-flow-context.js"; import { getLlmResponse } from "./get-llm-response.js"; import { getToolCallsFromLlmAssistantMessage } from "./get-llm-response/llm-message.js"; -import type { LlmParams, LlmToolDefinition } from "./get-llm-response/types.js"; import { graphApiClient } from "./graph-api-client.js"; +import type { LlmParams, LlmToolDefinition } from "./get-llm-response/types.js"; +import type { + EntityId, + PropertyObject, + PropertyObjectMetadata, + SourceProvenance, + VersionedUrl, +} from "@blockprotocol/type-system"; +import type { HashEntity } from "@local/hash-graph-sdk/entity"; + export const matchExistingEntitySystemPrompt = ` You are managing a database of entities, which may be any type of thing. diff --git a/apps/hash-ai-worker-ts/src/activities/shared/optimize-system-prompt.ts b/apps/hash-ai-worker-ts/src/activities/shared/optimize-system-prompt.ts index d9e4cd49d0f..663d7673e07 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/optimize-system-prompt.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/optimize-system-prompt.ts @@ -2,8 +2,9 @@ import "../../shared/testing-utilities/mock-get-flow-context.js"; import { existsSync, mkdirSync, writeFileSync } from "node:fs"; import path from "node:path"; -import type { LlmParams } from "./get-llm-response/types.js"; import { improveSystemPrompt } from "./optimize-system-prompt/improve-system-prompt.js"; + +import type { LlmParams } from "./get-llm-response/types.js"; import type { MetricDefinition, MetricResultsForModel, diff --git a/apps/hash-ai-worker-ts/src/activities/shared/optimize-system-prompt/improve-system-prompt.ts b/apps/hash-ai-worker-ts/src/activities/shared/optimize-system-prompt/improve-system-prompt.ts index 71ff31fafab..6ef67b5d80f 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/optimize-system-prompt/improve-system-prompt.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/optimize-system-prompt/improve-system-prompt.ts @@ -7,8 +7,9 @@ import { getToolCallsFromLlmAssistantMessage, type LlmUserMessage, } from "../get-llm-response/llm-message.js"; -import type { LlmToolDefinition } from "../get-llm-response/types.js"; import { graphApiClient } from "../graph-api-client.js"; + +import type { LlmToolDefinition } from "../get-llm-response/types.js"; import type { MetricResultsForSystemPrompt } from "./types.js"; const improveSystemPromptSystemPrompt = dedent(` diff --git a/apps/hash-ai-worker-ts/src/activities/shared/request-external-input.ts b/apps/hash-ai-worker-ts/src/activities/shared/request-external-input.ts index 05de7f3b83b..b242a4a68e0 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/request-external-input.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/request-external-input.ts @@ -1,16 +1,18 @@ +import { Context } from "@temporalio/activity"; + import { createTemporalClient } from "@local/hash-backend-utils/temporal"; -import type { - ExternalInputRequestSignal, - ExternalInputResponseSignal, -} from "@local/hash-isomorphic-utils/flows/types"; import { sleep } from "@local/hash-isomorphic-utils/sleep"; -import { Context } from "@temporalio/activity"; -import type { Client as TemporalClient } from "@temporalio/client"; import { getExternalInputResponseQuery } from "../../shared/queries.js"; import { externalInputRequestSignal } from "../../shared/signals.js"; import { logger } from "./activity-logger.js"; +import type { + ExternalInputRequestSignal, + ExternalInputResponseSignal, +} from "@local/hash-isomorphic-utils/flows/types"; +import type { Client as TemporalClient } from "@temporalio/client"; + let temporalClient: TemporalClient | undefined; export const requestExternalInput = async < diff --git a/apps/hash-ai-worker-ts/src/activities/shared/use-file-system-file-from-url.ts b/apps/hash-ai-worker-ts/src/activities/shared/use-file-system-file-from-url.ts index 63c7a709276..506b8757396 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/use-file-system-file-from-url.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/use-file-system-file-from-url.ts @@ -4,15 +4,16 @@ import { tmpdir } from "node:os"; import path from "node:path"; import { Readable } from "node:stream"; import { finished } from "node:stream/promises"; -import type { ReadableStream } from "node:stream/web"; import { getStorageProvider } from "@local/hash-backend-utils/flows/payload-storage"; -import type { HashEntity } from "@local/hash-graph-sdk/entity"; import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; -import type { File } from "@local/hash-isomorphic-utils/system-types/shared"; import { fetchFileFromUrl } from "./fetch-file-from-url.js"; +import type { HashEntity } from "@local/hash-graph-sdk/entity"; +import type { File } from "@local/hash-isomorphic-utils/system-types/shared"; +import type { ReadableStream } from "node:stream/web"; + const baseFilePath = path.join(tmpdir(), "hash-tmp-files"); export const useFileSystemPathFromEntity = async ( diff --git a/apps/hash-ai-worker-ts/src/instrument.ts b/apps/hash-ai-worker-ts/src/instrument.ts index 05650f8aae1..562834ab7ff 100644 --- a/apps/hash-ai-worker-ts/src/instrument.ts +++ b/apps/hash-ai-worker-ts/src/instrument.ts @@ -1,3 +1,5 @@ +import { GrpcInstrumentation } from "@opentelemetry/instrumentation-grpc"; + /** * OpenTelemetry bootstrap for the AI worker. Imported as the very first * statement of `main.ts` so the auto-instrumentations can patch http @@ -8,7 +10,6 @@ import { createUndiciInstrumentation, registerOpenTelemetry, } from "@local/hash-backend-utils/opentelemetry"; -import { GrpcInstrumentation } from "@opentelemetry/instrumentation-grpc"; /** * Setup handles. `undefined` when no `HASH_OTLP_ENDPOINT` is configured diff --git a/apps/hash-ai-worker-ts/src/main.ts b/apps/hash-ai-worker-ts/src/main.ts index 0dae51b79bf..db399dd106e 100644 --- a/apps/hash-ai-worker-ts/src/main.ts +++ b/apps/hash-ai-worker-ts/src/main.ts @@ -30,19 +30,21 @@ import { createRequire } from "node:module"; import path from "node:path"; import { fileURLToPath } from "node:url"; +import { config } from "dotenv-flow"; +import { TsconfigPathsPlugin } from "tsconfig-paths-webpack-plugin"; + import { createGraphClient } from "@local/hash-backend-utils/create-graph-client"; import { getRequiredEnv } from "@local/hash-backend-utils/environment"; import { createCommonFlowActivities } from "@local/hash-backend-utils/flows"; -import type { WorkflowSource } from "@local/hash-backend-utils/temporal/worker-bootstrap"; import { runWorker } from "@local/hash-backend-utils/temporal/worker-bootstrap"; import { createVaultClient } from "@local/hash-backend-utils/vault"; -import { config } from "dotenv-flow"; -import { TsconfigPathsPlugin } from "tsconfig-paths-webpack-plugin"; import { createAiActivities, createGraphActivities } from "./activities.js"; import { createFlowActivities } from "./activities/flow-activities.js"; import { logger } from "./shared/logger.js"; +import type { WorkflowSource } from "@local/hash-backend-utils/temporal/worker-bootstrap"; + const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); diff --git a/apps/hash-ai-worker-ts/src/shared/queries.ts b/apps/hash-ai-worker-ts/src/shared/queries.ts index 63d8e6e5bb2..4fa84e19586 100644 --- a/apps/hash-ai-worker-ts/src/shared/queries.ts +++ b/apps/hash-ai-worker-ts/src/shared/queries.ts @@ -3,9 +3,10 @@ * Queries that need to be sent from outside are in @local/hash-isomorphic-utils/src/flows/queries.ts */ +import { defineQuery } from "@temporalio/workflow"; + import type { ExternalInputResponseSignal } from "@local/hash-isomorphic-utils/flows/types"; import type { QueryDefinition } from "@temporalio/workflow"; -import { defineQuery } from "@temporalio/workflow"; export type ExternalInputQueryRequest = { requestId: string; diff --git a/apps/hash-ai-worker-ts/src/shared/signals.ts b/apps/hash-ai-worker-ts/src/shared/signals.ts index a017793fed1..9b8ce1e71c0 100644 --- a/apps/hash-ai-worker-ts/src/shared/signals.ts +++ b/apps/hash-ai-worker-ts/src/shared/signals.ts @@ -4,15 +4,15 @@ * Code that needs to be accessible from outside the worker is in @local/hash-isomorphic-utils/src/flows/signals.ts */ +import { defineSignal } from "@temporalio/workflow"; + +import type { CoordinatingAgentState } from "../activities/flow-activities/research-entities-action/shared/coordinators.js"; import type { ExternalInputRequestSignal, FlowSignalType, ProgressLogBase, ProgressLogSignal, } from "@local/hash-isomorphic-utils/flows/types"; -import { defineSignal } from "@temporalio/workflow"; - -import type { CoordinatingAgentState } from "../activities/flow-activities/research-entities-action/shared/coordinators.js"; /** Record progress logs from an activity to allow for inspection of work before the activity completes */ export const logProgressSignal = defineSignal<[ProgressLogSignal]>( diff --git a/apps/hash-ai-worker-ts/src/shared/testing-utilities/get-alice-user-account-id.ts b/apps/hash-ai-worker-ts/src/shared/testing-utilities/get-alice-user-account-id.ts index 038e174b0c2..dede3a4b7b6 100644 --- a/apps/hash-ai-worker-ts/src/shared/testing-utilities/get-alice-user-account-id.ts +++ b/apps/hash-ai-worker-ts/src/shared/testing-utilities/get-alice-user-account-id.ts @@ -1,4 +1,3 @@ -import type { UserId } from "@blockprotocol/type-system"; import { extractBaseUrl, extractWebIdFromEntityId, @@ -16,6 +15,8 @@ import { import { graphApiClient } from "../../activities/shared/graph-api-client.js"; +import type { UserId } from "@blockprotocol/type-system"; + export const getAliceUserAccountId = async () => { const { entities: [aliceUserEntity], diff --git a/apps/hash-ai-worker-ts/src/shared/testing-utilities/mock-get-flow-context.ts b/apps/hash-ai-worker-ts/src/shared/testing-utilities/mock-get-flow-context.ts index 8a7ecd53a37..28491f8ea52 100644 --- a/apps/hash-ai-worker-ts/src/shared/testing-utilities/mock-get-flow-context.ts +++ b/apps/hash-ai-worker-ts/src/shared/testing-utilities/mock-get-flow-context.ts @@ -1,22 +1,24 @@ +// eslint-disable-next-line import/no-extraneous-dependencies +import { vi } from "vitest"; + +import { HashEntity } from "@local/hash-graph-sdk/entity"; +import { mapFlowRunToEntityProperties } from "@local/hash-isomorphic-utils/flows/mappings"; +import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; +import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; + +import { graphApiClient } from "../../activities/shared/graph-api-client.js"; +import { getAliceUserAccountId } from "./get-alice-user-account-id.js"; + import type { ActorEntityUuid, EntityUuid, WebId, } from "@blockprotocol/type-system"; -import { HashEntity } from "@local/hash-graph-sdk/entity"; import type { AiFlowActionDefinitionId } from "@local/hash-isomorphic-utils/flows/action-definitions"; -import { mapFlowRunToEntityProperties } from "@local/hash-isomorphic-utils/flows/mappings"; import type { RunAiFlowWorkflowParams } from "@local/hash-isomorphic-utils/flows/temporal-types"; import type { FlowDefinition } from "@local/hash-isomorphic-utils/flows/types"; -import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; -import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; import type { FlowRun } from "@local/hash-isomorphic-utils/system-types/shared"; import type { Context } from "@temporalio/activity"; -// eslint-disable-next-line import/no-extraneous-dependencies -import { vi } from "vitest"; - -import { graphApiClient } from "../../activities/shared/graph-api-client.js"; -import { getAliceUserAccountId } from "./get-alice-user-account-id.js"; type DeepPartial = { [P in keyof T]?: T[P] extends Array diff --git a/apps/hash-ai-worker-ts/src/workflows.ts b/apps/hash-ai-worker-ts/src/workflows.ts index c5ac8ee4186..3db30bddf92 100644 --- a/apps/hash-ai-worker-ts/src/workflows.ts +++ b/apps/hash-ai-worker-ts/src/workflows.ts @@ -1,3 +1,22 @@ +import { + ActivityCancellationType, + continueAsNew, + executeChild, + proxyActivities, + workflowInfo, +} from "@temporalio/workflow"; + +import { splitEntityId } from "@blockprotocol/type-system"; +import { publicUserAccountId } from "@local/hash-backend-utils/public-user-account-id"; +import { deserializeQueryEntitiesResponse } from "@local/hash-graph-sdk/entity"; +import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; + +import { runFlowWorkflow } from "./workflows/run-flow-workflow.js"; + +import type { + createAiActivities, + createGraphActivities, +} from "./activities.js"; import type { ActorEntityUuid, BaseUrl, @@ -7,31 +26,14 @@ import type { MachineId, PropertyTypeWithMetadata, } from "@blockprotocol/type-system"; -import { splitEntityId } from "@blockprotocol/type-system"; -import { publicUserAccountId } from "@local/hash-backend-utils/public-user-account-id"; import type { EntityQueryCursor, Filter } from "@local/hash-graph-client"; import type { CreateEmbeddingsParams, CreateEmbeddingsReturn, } from "@local/hash-graph-sdk/embeddings"; -import { deserializeQueryEntitiesResponse } from "@local/hash-graph-sdk/entity"; -import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; import type { ParseTextFromFileParams } from "@local/hash-isomorphic-utils/parse-text-from-file-types"; -import { - ActivityCancellationType, - continueAsNew, - executeChild, - proxyActivities, - workflowInfo, -} from "@temporalio/workflow"; import type { OpenAI } from "openai"; -import type { - createAiActivities, - createGraphActivities, -} from "./activities.js"; -import { runFlowWorkflow } from "./workflows/run-flow-workflow.js"; - const aiActivities = proxyActivities>({ cancellationType: ActivityCancellationType.WAIT_CANCELLATION_COMPLETED, startToCloseTimeout: "3600 second", // 1 hour diff --git a/apps/hash-ai-worker-ts/src/workflows/run-flow-workflow.ts b/apps/hash-ai-worker-ts/src/workflows/run-flow-workflow.ts index d77e3fe316d..59de60509c5 100644 --- a/apps/hash-ai-worker-ts/src/workflows/run-flow-workflow.ts +++ b/apps/hash-ai-worker-ts/src/workflows/run-flow-workflow.ts @@ -1,6 +1,16 @@ -import type { ProxyFlowActivity } from "@local/hash-backend-utils/flows"; +import { + ActivityCancellationType, + proxyActivities, +} from "@temporalio/workflow"; + import { processFlowWorkflow } from "@local/hash-backend-utils/flows/process-flow-workflow"; import { type AiFlowActionDefinitionId } from "@local/hash-isomorphic-utils/flows/action-definitions"; + +import { heartbeatTimeoutSeconds } from "../shared/heartbeats.js"; +import { setQueryAndSignalHandlers } from "./run-flow-workflow/set-query-and-signal-handlers.js"; + +import type { createFlowActivities } from "../activities/flow-activities.js"; +import type { ProxyFlowActivity } from "@local/hash-backend-utils/flows"; import type { RunAiFlowWorkflowParams, RunFlowWorkflowResponse, @@ -9,14 +19,6 @@ import type { FlowDefinition, FlowTrigger, } from "@local/hash-isomorphic-utils/flows/types"; -import { - ActivityCancellationType, - proxyActivities, -} from "@temporalio/workflow"; - -import type { createFlowActivities } from "../activities/flow-activities.js"; -import { heartbeatTimeoutSeconds } from "../shared/heartbeats.js"; -import { setQueryAndSignalHandlers } from "./run-flow-workflow/set-query-and-signal-handlers.js"; type FlowActivityId = keyof ReturnType; diff --git a/apps/hash-ai-worker-ts/src/workflows/run-flow-workflow/set-query-and-signal-handlers.ts b/apps/hash-ai-worker-ts/src/workflows/run-flow-workflow/set-query-and-signal-handlers.ts index 84a8f260983..f6c959ed57f 100644 --- a/apps/hash-ai-worker-ts/src/workflows/run-flow-workflow/set-query-and-signal-handlers.ts +++ b/apps/hash-ai-worker-ts/src/workflows/run-flow-workflow/set-query-and-signal-handlers.ts @@ -1,13 +1,15 @@ -import type { SentrySinks } from "@local/hash-backend-utils/temporal/sinks/sentry"; +import { proxySinks, setHandler } from "@temporalio/workflow"; + import { externalInputResponseSignal } from "@local/hash-isomorphic-utils/flows/signals"; + +import { getExternalInputResponseQuery } from "../../shared/queries.js"; +import { externalInputRequestSignal } from "../../shared/signals.js"; + +import type { SentrySinks } from "@local/hash-backend-utils/temporal/sinks/sentry"; import type { ExternalInputRequestSignal, ExternalInputResponseSignal, } from "@local/hash-isomorphic-utils/flows/types"; -import { proxySinks, setHandler } from "@temporalio/workflow"; - -import { getExternalInputResponseQuery } from "../../shared/queries.js"; -import { externalInputRequestSignal } from "../../shared/signals.js"; const sinks = proxySinks(); diff --git a/apps/hash-ai-worker-ts/vitest.config.ts b/apps/hash-ai-worker-ts/vitest.config.ts index e99aee0dbe2..130ca964948 100644 --- a/apps/hash-ai-worker-ts/vitest.config.ts +++ b/apps/hash-ai-worker-ts/vitest.config.ts @@ -1,9 +1,10 @@ -/// -import { monorepoRootDir } from "@local/hash-backend-utils/environment"; // eslint-disable-next-line import/no-extraneous-dependencies import { loadEnv } from "vite"; import { defineConfig } from "vitest/config"; +/// +import { monorepoRootDir } from "@local/hash-backend-utils/environment"; + export default defineConfig(({ mode }) => { return { test: { diff --git a/apps/hash-api/codegen.config.ts b/apps/hash-api/codegen.config.ts index 2fc8e5fd7c3..c7f68426d95 100644 --- a/apps/hash-api/codegen.config.ts +++ b/apps/hash-api/codegen.config.ts @@ -1,6 +1,7 @@ -import type { CodegenConfig } from "@graphql-codegen/cli"; import { baseGraphQlCodegenConfig } from "@local/hash-isomorphic-utils/graphql/base-codegen-config"; +import type { CodegenConfig } from "@graphql-codegen/cli"; + const config: CodegenConfig = { overwrite: true, schema: diff --git a/apps/hash-api/src/ai/gpt/generate-hashgpt-schema.ts b/apps/hash-api/src/ai/gpt/generate-hashgpt-schema.ts index 622c0a0576b..65be5968f79 100644 --- a/apps/hash-api/src/ai/gpt/generate-hashgpt-schema.ts +++ b/apps/hash-api/src/ai/gpt/generate-hashgpt-schema.ts @@ -2,9 +2,10 @@ import { writeFileSync } from "node:fs"; import path from "node:path"; import { fileURLToPath } from "node:url"; -import { apiOrigin } from "@local/hash-isomorphic-utils/environment"; import * as generator from "ts-json-schema-generator"; +import { apiOrigin } from "@local/hash-isomorphic-utils/environment"; + const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); diff --git a/apps/hash-api/src/ai/gpt/gpt-get-user-webs.ts b/apps/hash-api/src/ai/gpt/gpt-get-user-webs.ts index 98c82b6518e..257b5b8e2a1 100644 --- a/apps/hash-api/src/ai/gpt/gpt-get-user-webs.ts +++ b/apps/hash-api/src/ai/gpt/gpt-get-user-webs.ts @@ -1,7 +1,7 @@ -import type { RequestHandler } from "express"; +import { getUserSimpleWebs } from "./shared/webs"; import type { SimpleWeb } from "./shared/webs"; -import { getUserSimpleWebs } from "./shared/webs"; +import type { RequestHandler } from "express"; export type GptGetUserWebsResponseBody = | { error: string } diff --git a/apps/hash-api/src/ai/gpt/gpt-query-entities.ts b/apps/hash-api/src/ai/gpt/gpt-query-entities.ts index 955e3e40670..372dee62147 100644 --- a/apps/hash-api/src/ai/gpt/gpt-query-entities.ts +++ b/apps/hash-api/src/ai/gpt/gpt-query-entities.ts @@ -1,18 +1,9 @@ -import type { EntityId, EntityUuid } from "@blockprotocol/type-system"; import { entityIdFromComponents, extractEntityUuidFromEntityId, extractWebIdFromEntityId, } from "@blockprotocol/type-system"; -import type { - SimpleEntityWithoutHref, - SimpleLinkWithoutHref, -} from "@local/hash-backend-utils/simplified-graph"; import { getSimpleGraph } from "@local/hash-backend-utils/simplified-graph"; -import type { - CreateEmbeddingsParams, - CreateEmbeddingsReturn, -} from "@local/hash-graph-sdk/embeddings"; import { queryEntitySubgraph } from "@local/hash-graph-sdk/entity"; import { frontendUrl } from "@local/hash-isomorphic-utils/environment"; import { generateEntityPath } from "@local/hash-isomorphic-utils/frontend-paths"; @@ -21,17 +12,27 @@ import { almostFullOntologyResolveDepths, currentTimeInstantTemporalAxes, } from "@local/hash-isomorphic-utils/graph-queries"; + +import { getLatestEntityById } from "../../graph/knowledge/primitive/entity"; +import { stringifyResults } from "./shared/stringify-results"; +import { getUserSimpleWebs } from "./shared/webs"; + +import type { SimpleWeb } from "./shared/webs"; +import type { EntityId, EntityUuid } from "@blockprotocol/type-system"; +import type { + SimpleEntityWithoutHref, + SimpleLinkWithoutHref, +} from "@local/hash-backend-utils/simplified-graph"; +import type { + CreateEmbeddingsParams, + CreateEmbeddingsReturn, +} from "@local/hash-graph-sdk/embeddings"; import type { OrganizationProperties, UserProperties, } from "@local/hash-isomorphic-utils/system-types/shared"; import type { RequestHandler } from "express"; -import { getLatestEntityById } from "../../graph/knowledge/primitive/entity"; -import { stringifyResults } from "./shared/stringify-results"; -import type { SimpleWeb } from "./shared/webs"; -import { getUserSimpleWebs } from "./shared/webs"; - export type GptQueryEntitiesRequestBody = { /** * The titles of specific types of entities to retrieve. Types are typically capitalized, e.g. User, Organization. diff --git a/apps/hash-api/src/ai/gpt/gpt-query-types.ts b/apps/hash-api/src/ai/gpt/gpt-query-types.ts index 103cac0890d..ef9b8e5e6c7 100644 --- a/apps/hash-api/src/ai/gpt/gpt-query-types.ts +++ b/apps/hash-api/src/ai/gpt/gpt-query-types.ts @@ -1,20 +1,21 @@ import { typedValues } from "@local/advanced-types/typed-entries"; -import type { SimpleEntityType } from "@local/hash-backend-utils/simplified-graph"; import { getSimpleEntityType } from "@local/hash-backend-utils/simplified-graph"; -import type { - CreateEmbeddingsParams, - CreateEmbeddingsReturn, -} from "@local/hash-graph-sdk/embeddings"; import { queryEntityTypeSubgraph } from "@local/hash-graph-sdk/entity-type"; import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; import { almostFullOntologyResolveDepths, currentTimeInstantTemporalAxes, } from "@local/hash-isomorphic-utils/graph-queries"; -import type { RequestHandler } from "express"; import { stringifyResults } from "./shared/stringify-results"; +import type { SimpleEntityType } from "@local/hash-backend-utils/simplified-graph"; +import type { + CreateEmbeddingsParams, + CreateEmbeddingsReturn, +} from "@local/hash-graph-sdk/embeddings"; +import type { RequestHandler } from "express"; + export type GptQueryTypesRequestBody = { /** * Limit the response to types within the specified webs, identified by the web's uuid. diff --git a/apps/hash-api/src/ai/gpt/shared/webs.ts b/apps/hash-api/src/ai/gpt/shared/webs.ts index a26475d60e3..c521358f45f 100644 --- a/apps/hash-api/src/ai/gpt/shared/webs.ts +++ b/apps/hash-api/src/ai/gpt/shared/webs.ts @@ -1,9 +1,9 @@ -import type { ActorEntityUuid } from "@blockprotocol/type-system"; +import { getOrgMembershipOrg } from "../../../graph/knowledge/system-types/org-membership"; +import { getUserOrgMemberships } from "../../../graph/knowledge/system-types/user"; import type { ImpureGraphContext } from "../../../graph/context-types"; -import { getOrgMembershipOrg } from "../../../graph/knowledge/system-types/org-membership"; import type { User } from "../../../graph/knowledge/system-types/user"; -import { getUserOrgMemberships } from "../../../graph/knowledge/system-types/user"; +import type { ActorEntityUuid } from "@blockprotocol/type-system"; export type SimpleWeb = { uuid: string; diff --git a/apps/hash-api/src/ai/gpt/upsert-gpt-oauth-client.ts b/apps/hash-api/src/ai/gpt/upsert-gpt-oauth-client.ts index b61b2dd0279..b3ebc3adf86 100644 --- a/apps/hash-api/src/ai/gpt/upsert-gpt-oauth-client.ts +++ b/apps/hash-api/src/ai/gpt/upsert-gpt-oauth-client.ts @@ -1,8 +1,9 @@ import { isUserHashInstanceAdmin } from "@local/hash-graph-sdk/principal/hash-instance-admins"; -import type { RequestHandler } from "express"; import { hydraAdmin } from "../../auth/ory-hydra"; +import type { RequestHandler } from "express"; + type UpsertOAuthClientRequestBody = { redirectUri: string; }; diff --git a/apps/hash-api/src/ai/infer-entities-websocket.ts b/apps/hash-api/src/ai/infer-entities-websocket.ts index 678f0abdb5b..688469ad700 100644 --- a/apps/hash-api/src/ai/infer-entities-websocket.ts +++ b/apps/hash-api/src/ai/infer-entities-websocket.ts @@ -1,28 +1,29 @@ -import type http from "node:http"; +import { WebSocketServer } from "ws"; -import type { EntityUuid } from "@blockprotocol/type-system"; -import type { FileStorageProvider } from "@local/hash-backend-utils/file-storage"; import { getFlowRunEntityById, getFlowRuns, } from "@local/hash-backend-utils/flows"; +import { externalInputResponseSignal } from "@local/hash-isomorphic-utils/flows/signals"; + +import { getUserAndSession } from "../auth/create-auth-handlers"; +import { FlowRunStatus } from "../graphql/api-types.gen"; +import { handleCancelInferEntitiesRequest } from "./infer-entities-websocket/handle-cancel-infer-entities-request"; +import { handleInferEntitiesRequest } from "./infer-entities-websocket/handle-infer-entities-request"; + +import type { GraphApi, ImpureGraphContext } from "../graph/context-types"; +import type { User } from "../graph/knowledge/system-types/user"; +import type { EntityUuid } from "@blockprotocol/type-system"; +import type { FileStorageProvider } from "@local/hash-backend-utils/file-storage"; import type { Logger } from "@local/hash-backend-utils/logger"; import type { ExternalInputWebsocketRequestMessage, InferenceWebsocketClientMessage, } from "@local/hash-isomorphic-utils/ai-inference-types"; -import { externalInputResponseSignal } from "@local/hash-isomorphic-utils/flows/signals"; import type { ExternalInputResponseSignal } from "@local/hash-isomorphic-utils/flows/types"; import type { Client } from "@temporalio/client"; +import type http from "node:http"; import type { WebSocket } from "ws"; -import { WebSocketServer } from "ws"; - -import { getUserAndSession } from "../auth/create-auth-handlers"; -import type { GraphApi, ImpureGraphContext } from "../graph/context-types"; -import type { User } from "../graph/knowledge/system-types/user"; -import { FlowRunStatus } from "../graphql/api-types.gen"; -import { handleCancelInferEntitiesRequest } from "./infer-entities-websocket/handle-cancel-infer-entities-request"; -import { handleInferEntitiesRequest } from "./infer-entities-websocket/handle-infer-entities-request"; const inferEntitiesMessageHandler = async ({ socket, diff --git a/apps/hash-api/src/ai/infer-entities-websocket/handle-cancel-infer-entities-request.ts b/apps/hash-api/src/ai/infer-entities-websocket/handle-cancel-infer-entities-request.ts index e722f0c36c1..45737e15632 100644 --- a/apps/hash-api/src/ai/infer-entities-websocket/handle-cancel-infer-entities-request.ts +++ b/apps/hash-api/src/ai/infer-entities-websocket/handle-cancel-infer-entities-request.ts @@ -1,10 +1,10 @@ -import type { EntityUuid } from "@blockprotocol/type-system"; import { getFlowRunEntityById } from "@local/hash-backend-utils/flows"; -import type { CancelInferEntitiesWebsocketRequestMessage } from "@local/hash-isomorphic-utils/ai-inference-types"; -import type { Client } from "@temporalio/client"; import type { GraphApi } from "../../graph/context-types"; import type { User } from "../../graph/knowledge/system-types/user"; +import type { EntityUuid } from "@blockprotocol/type-system"; +import type { CancelInferEntitiesWebsocketRequestMessage } from "@local/hash-isomorphic-utils/ai-inference-types"; +import type { Client } from "@temporalio/client"; export const handleCancelInferEntitiesRequest = async ({ graphApiClient, diff --git a/apps/hash-api/src/ai/infer-entities-websocket/handle-infer-entities-request.ts b/apps/hash-api/src/ai/infer-entities-websocket/handle-infer-entities-request.ts index a6859170a4f..94fbd8d28f8 100644 --- a/apps/hash-api/src/ai/infer-entities-websocket/handle-infer-entities-request.ts +++ b/apps/hash-api/src/ai/infer-entities-websocket/handle-infer-entities-request.ts @@ -1,16 +1,20 @@ -import type { DistributiveOmit } from "@local/advanced-types/distribute"; import { typedEntries } from "@local/advanced-types/typed-entries"; -import type { FileStorageProvider } from "@local/hash-backend-utils/file-storage"; import { getFlowRuns } from "@local/hash-backend-utils/flows"; +import { + automaticBrowserInferenceFlowDefinition, + manualBrowserInferenceFlowDefinition, +} from "@local/hash-isomorphic-utils/flows/browser-plugin-flow-definitions"; + +import { FlowRunStatus } from "../../graphql/api-types.gen"; + +import type { User } from "../../graph/knowledge/system-types/user"; +import type { DistributiveOmit } from "@local/advanced-types/distribute"; +import type { FileStorageProvider } from "@local/hash-backend-utils/file-storage"; import type { GraphApi } from "@local/hash-graph-client"; import type { AutomaticInferenceWebsocketRequestMessage, ManualInferenceWebsocketRequestMessage, } from "@local/hash-isomorphic-utils/ai-inference-types"; -import { - automaticBrowserInferenceFlowDefinition, - manualBrowserInferenceFlowDefinition, -} from "@local/hash-isomorphic-utils/flows/browser-plugin-flow-definitions"; import type { AutomaticInferenceTriggerInputName, AutomaticInferenceTriggerInputs, @@ -25,9 +29,6 @@ import type { } from "@local/hash-isomorphic-utils/flows/types"; import type { Client } from "@temporalio/client"; -import type { User } from "../../graph/knowledge/system-types/user"; -import { FlowRunStatus } from "../../graphql/api-types.gen"; - export const handleInferEntitiesRequest = async ({ graphApiClient, storageProvider, diff --git a/apps/hash-api/src/auth/create-auth-handlers.ts b/apps/hash-api/src/auth/create-auth-handlers.ts index 6cac7ed6877..ae8b2990606 100644 --- a/apps/hash-api/src/auth/create-auth-handlers.ts +++ b/apps/hash-api/src/auth/create-auth-handlers.ts @@ -1,21 +1,23 @@ +import * as Sentry from "@sentry/node"; + import { timingSafeCompare } from "@local/hash-backend-utils/crypto"; import { getRequiredEnv } from "@local/hash-backend-utils/environment"; import { getHashInstance } from "@local/hash-backend-utils/hash-instance"; -import type { Logger } from "@local/hash-backend-utils/logger"; import { publicUserAccountId } from "@local/hash-backend-utils/public-user-account-id"; -import type { Session } from "@ory/kratos-client"; -import * as Sentry from "@sentry/node"; -import type { AxiosError } from "axios"; -import type { Express, Request, RequestHandler } from "express"; -import type { ImpureGraphContext } from "../graph/context-types"; -import type { User } from "../graph/knowledge/system-types/user"; import { createUser, getUser } from "../graph/knowledge/system-types/user"; import { systemAccountId } from "../graph/system-account"; import { hydraAdmin } from "./ory-hydra"; -import type { KratosUserIdentity } from "./ory-kratos"; import { isUserEmailVerified, kratosFrontendApi } from "./ory-kratos"; +import type { ImpureGraphContext } from "../graph/context-types"; +import type { User } from "../graph/knowledge/system-types/user"; +import type { KratosUserIdentity } from "./ory-kratos"; +import type { Logger } from "@local/hash-backend-utils/logger"; +import type { Session } from "@ory/kratos-client"; +import type { AxiosError } from "axios"; +import type { Express, Request, RequestHandler } from "express"; + const KRATOS_API_KEY = getRequiredEnv("KRATOS_API_KEY"); const requestHeaderContainsValidKratosApiKey = (req: Request): boolean => diff --git a/apps/hash-api/src/auth/create-unverified-email-cleanup-job.ts b/apps/hash-api/src/auth/create-unverified-email-cleanup-job.ts index 5d3d0fbaee4..9795b714773 100644 --- a/apps/hash-api/src/auth/create-unverified-email-cleanup-job.ts +++ b/apps/hash-api/src/auth/create-unverified-email-cleanup-job.ts @@ -1,18 +1,19 @@ -import type { Logger } from "@local/hash-backend-utils/logger"; import { queryEntities } from "@local/hash-graph-sdk/entity"; import { currentTimeInstantTemporalAxes, generateVersionedUrlMatchingFilter, } from "@local/hash-isomorphic-utils/graph-queries"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { User as UserEntity } from "@local/hash-isomorphic-utils/system-types/user"; -import type { Identity } from "@ory/kratos-client"; -import type { ImpureGraphContext } from "../graph/context-types"; import { getUserFromEntity } from "../graph/knowledge/system-types/user"; import { systemAccountId } from "../graph/system-account"; import { deleteKratosIdentity, kratosIdentityApi } from "./ory-kratos"; +import type { ImpureGraphContext } from "../graph/context-types"; +import type { Logger } from "@local/hash-backend-utils/logger"; +import type { User as UserEntity } from "@local/hash-isomorphic-utils/system-types/user"; +import type { Identity } from "@ory/kratos-client"; + /** * Identities created before this date are excluded from cleanup, preventing * retroactive deletion of accounts that existed before email verification diff --git a/apps/hash-api/src/auth/get-actor-id.ts b/apps/hash-api/src/auth/get-actor-id.ts index e3e6f5a3725..681b7dafc83 100644 --- a/apps/hash-api/src/auth/get-actor-id.ts +++ b/apps/hash-api/src/auth/get-actor-id.ts @@ -1,4 +1,5 @@ import { publicUserAccountId } from "@local/hash-backend-utils/public-user-account-id"; + import type { Request } from "express"; export const getActorIdFromRequest = (request: Request) => diff --git a/apps/hash-api/src/auth/oauth-consent-handlers.ts b/apps/hash-api/src/auth/oauth-consent-handlers.ts index 7855dc037d1..115ac2f767a 100644 --- a/apps/hash-api/src/auth/oauth-consent-handlers.ts +++ b/apps/hash-api/src/auth/oauth-consent-handlers.ts @@ -1,11 +1,12 @@ import { randomBytes } from "node:crypto"; import { timingSafeCompare } from "@local/hash-backend-utils/crypto"; -import type { RequestHandler } from "express"; import { isDevEnv } from "../lib/env-config"; import { hydraAdmin } from "./ory-hydra"; +import type { RequestHandler } from "express"; + const CSRF_COOKIE_NAME = "_csrf_consent"; /** diff --git a/apps/hash-api/src/auth/ory-kratos.ts b/apps/hash-api/src/auth/ory-kratos.ts index 127298df450..b226d84a663 100644 --- a/apps/hash-api/src/auth/ory-kratos.ts +++ b/apps/hash-api/src/auth/ory-kratos.ts @@ -1,8 +1,10 @@ -import { getRequiredEnv } from "@local/hash-backend-utils/environment"; import { Configuration } from "@ory/client"; -import type { CreateIdentityBody, Identity } from "@ory/kratos-client"; import { FrontendApi, IdentityApi } from "@ory/kratos-client"; +import { getRequiredEnv } from "@local/hash-backend-utils/environment"; + +import type { CreateIdentityBody, Identity } from "@ory/kratos-client"; + export const kratosPublicUrl = getRequiredEnv("HASH_KRATOS_PUBLIC_URL"); export const kratosFrontendApi = new FrontendApi( diff --git a/apps/hash-api/src/block-protocol-external-service-method-proxy.ts b/apps/hash-api/src/block-protocol-external-service-method-proxy.ts index c278cb63906..00918922328 100644 --- a/apps/hash-api/src/block-protocol-external-service-method-proxy.ts +++ b/apps/hash-api/src/block-protocol-external-service-method-proxy.ts @@ -1,6 +1,8 @@ +import { createProxyMiddleware } from "http-proxy-middleware"; + import { blockProtocolHubOrigin } from "@local/hash-isomorphic-utils/blocks-constants"; + import type { Express, Request, Response } from "express"; -import { createProxyMiddleware } from "http-proxy-middleware"; /** * Set up a proxy to the blockprotocol.org proxy for the internal API, diff --git a/apps/hash-api/src/email/create-email-transporter.ts b/apps/hash-api/src/email/create-email-transporter.ts index 8f0ad8a8ece..18fde6d81ae 100644 --- a/apps/hash-api/src/email/create-email-transporter.ts +++ b/apps/hash-api/src/email/create-email-transporter.ts @@ -10,6 +10,7 @@ import { isDevEnv, isProdEnv, isTestEnv } from "../lib/env-config"; import { logger } from "../logger"; import { AwsSesEmailTransporter, DummyEmailTransporter } from "./transporters"; import { SmtpEmailTransporter } from "./transporters/smtp-email-transporter"; + import type { EmailTransporter } from "./transporters/types"; const transporterType = process.env.HASH_EMAIL_TRANSPORTER; diff --git a/apps/hash-api/src/email/transporters/aws-ses-email-transporter.ts b/apps/hash-api/src/email/transporters/aws-ses-email-transporter.ts index 05d7b0f816a..3fbd2b7fe31 100644 --- a/apps/hash-api/src/email/transporters/aws-ses-email-transporter.ts +++ b/apps/hash-api/src/email/transporters/aws-ses-email-transporter.ts @@ -2,13 +2,14 @@ import { SendEmailCommand, SESv2Client } from "@aws-sdk/client-sesv2"; import { defaultProvider } from "@aws-sdk/credential-provider-node"; import { convert } from "html-to-text"; import nodemailer from "nodemailer"; -import type SESTransport from "nodemailer/lib/ses-transport"; import { logger } from "../../logger"; + import type { EmailTransporter, EmailTransporterSendMailOptions, } from "./types"; +import type SESTransport from "nodemailer/lib/ses-transport"; export interface AwsSesEmailTransporterConfig { from: string; diff --git a/apps/hash-api/src/email/transporters/dummy-email-transporter.ts b/apps/hash-api/src/email/transporters/dummy-email-transporter.ts index c6eb2ec70f6..137c9308bfa 100644 --- a/apps/hash-api/src/email/transporters/dummy-email-transporter.ts +++ b/apps/hash-api/src/email/transporters/dummy-email-transporter.ts @@ -6,6 +6,7 @@ import { convert } from "html-to-text"; import { dump } from "js-yaml"; import { logger } from "../../logger"; + import type { EmailTransporter, EmailTransporterSendMailOptions, diff --git a/apps/hash-api/src/email/transporters/smtp-email-transporter.ts b/apps/hash-api/src/email/transporters/smtp-email-transporter.ts index 864ce431bea..2dbe081fe39 100644 --- a/apps/hash-api/src/email/transporters/smtp-email-transporter.ts +++ b/apps/hash-api/src/email/transporters/smtp-email-transporter.ts @@ -1,13 +1,15 @@ -import { getRequiredEnv } from "@local/hash-backend-utils/environment"; import { convert } from "html-to-text"; import nodemailer from "nodemailer"; -import type SMTPTransport from "nodemailer/lib/smtp-transport"; + +import { getRequiredEnv } from "@local/hash-backend-utils/environment"; import { logger } from "../../logger"; + import type { EmailTransporter, EmailTransporterSendMailOptions, } from "./types"; +import type SMTPTransport from "nodemailer/lib/smtp-transport"; export interface SmtpEmailTransporterConfig { from: string; diff --git a/apps/hash-api/src/ensure-system-graph-is-initialized.ts b/apps/hash-api/src/ensure-system-graph-is-initialized.ts index 67ee8978b79..eaa8b9ce504 100644 --- a/apps/hash-api/src/ensure-system-graph-is-initialized.ts +++ b/apps/hash-api/src/ensure-system-graph-is-initialized.ts @@ -2,10 +2,11 @@ import { createGraphClient } from "@local/hash-backend-utils/create-graph-client import { getRequiredEnv } from "@local/hash-backend-utils/environment"; import { createTemporalClient } from "@local/hash-backend-utils/temporal"; -import type { ImpureGraphContext } from "./graph/context-types"; import { ensureSystemGraphIsInitialized } from "./graph/ensure-system-graph-is-initialized"; import { logger } from "./logger"; +import type { ImpureGraphContext } from "./graph/context-types"; + const context: ImpureGraphContext = { provenance: { actorType: "machine", diff --git a/apps/hash-api/src/express.d.ts b/apps/hash-api/src/express.d.ts index 96bee9b7d84..2acdc757866 100644 --- a/apps/hash-api/src/express.d.ts +++ b/apps/hash-api/src/express.d.ts @@ -1,8 +1,7 @@ -import type { VaultClient } from "@local/hash-backend-utils/vault"; -import type { Session } from "@ory/kratos-client"; - import type { ImpureGraphContext } from "./graph/context-types"; import type { User } from "./graph/knowledge/system-types/user"; +import type { VaultClient } from "@local/hash-backend-utils/vault"; +import type { Session } from "@ory/kratos-client"; declare global { namespace Express { diff --git a/apps/hash-api/src/generate-ontology-type-ids.ts b/apps/hash-api/src/generate-ontology-type-ids.ts index 4791a5972da..5e39533beeb 100644 --- a/apps/hash-api/src/generate-ontology-type-ids.ts +++ b/apps/hash-api/src/generate-ontology-type-ids.ts @@ -2,14 +2,6 @@ import { writeFile } from "node:fs/promises"; import path from "node:path"; import { fileURLToPath } from "node:url"; -import type { - DataType, - DataTypeWithMetadata, - EntityType, - EntityTypeWithMetadata, - PropertyType, - PropertyTypeWithMetadata, -} from "@blockprotocol/type-system"; import { extractBaseUrl } from "@blockprotocol/type-system"; import { createGraphClient } from "@local/hash-backend-utils/create-graph-client"; import { getRequiredEnv } from "@local/hash-backend-utils/environment"; @@ -20,13 +12,22 @@ import { queryEntityTypes } from "@local/hash-graph-sdk/entity-type"; import { queryPropertyTypes } from "@local/hash-graph-sdk/property-type"; import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; +import { getOrgByShortname } from "./graph/knowledge/system-types/org"; +import { isEntityTypeLinkEntityType } from "./graph/ontology/primitive/entity-type"; + import type { ImpureGraphContext, ImpureGraphFunction, } from "./graph/context-types"; import type { Org } from "./graph/knowledge/system-types/org"; -import { getOrgByShortname } from "./graph/knowledge/system-types/org"; -import { isEntityTypeLinkEntityType } from "./graph/ontology/primitive/entity-type"; +import type { + DataType, + DataTypeWithMetadata, + EntityType, + EntityTypeWithMetadata, + PropertyType, + PropertyTypeWithMetadata, +} from "@blockprotocol/type-system"; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized.ts index 0e9809d9517..ec547735b86 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized.ts @@ -1,10 +1,10 @@ -import type { Logger } from "@local/hash-backend-utils/logger"; - -import type { ImpureGraphContext } from "./context-types"; import { migrateOntologyTypes } from "./ensure-system-graph-is-initialized/migrate-ontology-types"; import { ensureSystemEntitiesExist } from "./ensure-system-graph-is-initialized/system-webs-and-entities"; import { ensureHashSystemAccountExists } from "./system-account"; +import type { ImpureGraphContext } from "./context-types"; +import type { Logger } from "@local/hash-backend-utils/logger"; + export const ensureSystemGraphIsInitialized = async (params: { logger: Logger; context: ImpureGraphContext; diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types.ts index 4fe93d14abb..424f9c671ae 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types.ts @@ -4,19 +4,20 @@ import { fileURLToPath } from "node:url"; import { extractVersion } from "@blockprotocol/type-system"; import { NotFoundError } from "@local/hash-backend-utils/error"; -import type { HashInstance } from "@local/hash-backend-utils/hash-instance"; import { getHashInstance } from "@local/hash-backend-utils/hash-instance"; -import type { Logger } from "@local/hash-backend-utils/logger"; import { systemPropertyTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { MigrationsCompletedPropertyValueWithMetadata } from "@local/hash-isomorphic-utils/system-types/hashinstance"; import { isProdEnv } from "../../lib/env-config"; -import type { ImpureGraphContext } from "../context-types"; import { systemAccountId } from "../system-account"; + +import type { ImpureGraphContext } from "../context-types"; import type { MigrationFunction, MigrationState, } from "./migrate-ontology-types/types"; +import type { HashInstance } from "@local/hash-backend-utils/hash-instance"; +import type { Logger } from "@local/hash-backend-utils/logger"; +import type { MigrationsCompletedPropertyValueWithMetadata } from "@local/hash-isomorphic-utils/system-types/hashinstance"; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/000-create-first-custom-data-types.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/000-create-first-custom-data-types.migration.ts index 9841e2ebac8..885234020d0 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/000-create-first-custom-data-types.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/000-create-first-custom-data-types.migration.ts @@ -1,8 +1,9 @@ import { blockProtocolDataTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { MigrationFunction } from "../types"; import { createSystemDataTypeIfNotExists } from "../util"; +import type { MigrationFunction } from "../types"; + const migrate: MigrationFunction = async ({ context, authentication, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/001-create-hash-system-types.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/001-create-hash-system-types.migration.ts index f19559a383a..9637764be7b 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/001-create-hash-system-types.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/001-create-hash-system-types.migration.ts @@ -7,13 +7,14 @@ import { systemPropertyTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { MigrationFunction } from "../types"; import { createSystemEntityTypeIfNotExists, createSystemPropertyTypeIfNotExists, getCurrentHashDataTypeId, } from "../util"; +import type { MigrationFunction } from "../types"; + /** * @todo H-4065 / H-4066: Support array and tuple data types (add /list/ here, which they should inherit from) */ diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/003-create-linear-system-types.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/003-create-linear-system-types.migration.ts index 1fb064011cc..635cd9be642 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/003-create-linear-system-types.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/003-create-linear-system-types.migration.ts @@ -1,7 +1,6 @@ import { blockProtocolEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { enabledIntegrations } from "../../../../integrations/enabled-integrations"; -import type { MigrationFunction } from "../types"; import { createSystemEntityTypeIfNotExists, createSystemPropertyTypeIfNotExists, @@ -9,6 +8,8 @@ import { getCurrentHashPropertyTypeId, } from "../util"; +import type { MigrationFunction } from "../types"; + const migrate: MigrationFunction = async ({ context, authentication, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/004-create-machines-update-users.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/004-create-machines-update-users.migration.ts index 1b566ce63ac..3cc357d80c7 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/004-create-machines-update-users.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/004-create-machines-update-users.migration.ts @@ -1,11 +1,9 @@ -import type { EntityType } from "@blockprotocol/type-system"; import { atLeastOne } from "@blockprotocol/type-system"; import { NotFoundError } from "@local/hash-backend-utils/error"; import { getEntityTypeById } from "@local/hash-graph-sdk/entity-type"; import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; import { blockProtocolPropertyTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { MigrationFunction } from "../types"; import { createSystemEntityTypeIfNotExists, createSystemPropertyTypeIfNotExists, @@ -15,6 +13,9 @@ import { upgradeDependenciesInHashEntityType, } from "../util"; +import type { MigrationFunction } from "../types"; +import type { EntityType } from "@blockprotocol/type-system"; + const migrate: MigrationFunction = async ({ context, authentication, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/005-create-hash-system-entities-and-web-bots.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/005-create-hash-system-entities-and-web-bots.migration.ts index abaa4b84a0f..567ac5d516b 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/005-create-hash-system-entities-and-web-bots.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/005-create-hash-system-entities-and-web-bots.migration.ts @@ -14,12 +14,13 @@ import { ensureSystemWebEntitiesExist, owningWebs, } from "../../system-webs-and-entities"; -import type { MigrationFunction } from "../types"; import { getCurrentHashSystemEntityTypeId, getExistingUsersAndOrgs, } from "../util"; +import type { MigrationFunction } from "../types"; + const migrate: MigrationFunction = async ({ authentication, context, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/007-create-api-usage-tracking.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/007-create-api-usage-tracking.migration.ts index 75a9e38072f..6389b0bd3f6 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/007-create-api-usage-tracking.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/007-create-api-usage-tracking.migration.ts @@ -1,12 +1,9 @@ -import type { Entity } from "@blockprotocol/type-system"; import { blockProtocolEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-properties"; -import type { ServiceFeature } from "@local/hash-isomorphic-utils/system-types/shared"; import { logger } from "../../../../logger"; import { createEntity } from "../../../knowledge/primitive/entity"; import { getOrgByShortname } from "../../../knowledge/system-types/org"; -import type { MigrationFunction } from "../types"; import { createSystemEntityTypeIfNotExists, createSystemPropertyTypeIfNotExists, @@ -14,6 +11,10 @@ import { getEntitiesByType, } from "../util"; +import type { MigrationFunction } from "../types"; +import type { Entity } from "@blockprotocol/type-system"; +import type { ServiceFeature } from "@local/hash-isomorphic-utils/system-types/shared"; + const migrate: MigrationFunction = async ({ context, authentication, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/008-create-plugin-settings-update-users.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/008-create-plugin-settings-update-users.migration.ts index ab300621369..8b8175c43ef 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/008-create-plugin-settings-update-users.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/008-create-plugin-settings-update-users.migration.ts @@ -1,4 +1,3 @@ -import type { BaseUrl, EntityType } from "@blockprotocol/type-system"; import { NotFoundError } from "@local/hash-backend-utils/error"; import { getEntityTypeById } from "@local/hash-graph-sdk/entity-type"; import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; @@ -7,7 +6,6 @@ import { systemEntityTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { MigrationFunction } from "../types"; import { createSystemEntityTypeIfNotExists, createSystemPropertyTypeIfNotExists, @@ -17,6 +15,9 @@ import { upgradeEntitiesToNewTypeVersion, } from "../util"; +import type { MigrationFunction } from "../types"; +import type { BaseUrl, EntityType } from "@blockprotocol/type-system"; + const migrate: MigrationFunction = async ({ context, authentication, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/009-add-upload-completed-at-property-type.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/009-add-upload-completed-at-property-type.migration.ts index ca057dd5bf7..2ad8199266f 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/009-add-upload-completed-at-property-type.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/009-add-upload-completed-at-property-type.migration.ts @@ -1,11 +1,9 @@ -import type { BaseUrl, EntityType } from "@blockprotocol/type-system"; import { extractBaseUrl } from "@blockprotocol/type-system"; import { NotFoundError } from "@local/hash-backend-utils/error"; import { getEntityTypeById } from "@local/hash-graph-sdk/entity-type"; import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { MigrationFunction } from "../types"; import { createSystemPropertyTypeIfNotExists, getCurrentHashDataTypeId, @@ -15,6 +13,9 @@ import { upgradeEntitiesToNewTypeVersion, } from "../util"; +import type { MigrationFunction } from "../types"; +import type { BaseUrl, EntityType } from "@blockprotocol/type-system"; + const migrate: MigrationFunction = async ({ context, authentication, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/010-create-office-file-types.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/010-create-office-file-types.migration.ts index 8df0a3b88f1..29092698268 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/010-create-office-file-types.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/010-create-office-file-types.migration.ts @@ -1,9 +1,10 @@ -import type { MigrationFunction } from "../types"; import { createSystemEntityTypeIfNotExists, getCurrentHashSystemEntityTypeId, } from "../util"; +import type { MigrationFunction } from "../types"; + const migrate: MigrationFunction = async ({ context, authentication, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/011-deprecate-preferred-name.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/011-deprecate-preferred-name.migration.ts index b1bfc156ae0..7e42170674c 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/011-deprecate-preferred-name.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/011-deprecate-preferred-name.migration.ts @@ -1,4 +1,3 @@ -import type { BaseUrl, EntityType } from "@blockprotocol/type-system"; import { NotFoundError } from "@local/hash-backend-utils/error"; import { getEntityTypeById } from "@local/hash-graph-sdk/entity-type"; import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; @@ -8,7 +7,6 @@ import { systemPropertyTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { MigrationFunction } from "../types"; import { getCurrentHashSystemEntityTypeId, updateSystemEntityType, @@ -17,6 +15,9 @@ import { } from "../util"; import { upgradeEntityTypeDependencies } from "../util/upgrade-entity-type-dependencies"; +import type { MigrationFunction } from "../types"; +import type { BaseUrl, EntityType } from "@blockprotocol/type-system"; + const migrate: MigrationFunction = async ({ context, authentication, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/012-create-google-sheets-system-types.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/012-create-google-sheets-system-types.migration.ts index 33c3f125441..9e2eecd4026 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/012-create-google-sheets-system-types.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/012-create-google-sheets-system-types.migration.ts @@ -5,7 +5,6 @@ import { } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { enabledIntegrations } from "../../../../integrations/enabled-integrations"; -import type { MigrationFunction } from "../types"; import { createSystemDataTypeIfNotExists, createSystemEntityTypeIfNotExists, @@ -15,6 +14,8 @@ import { getCurrentHashSystemEntityTypeId, } from "../util"; +import type { MigrationFunction } from "../types"; + const migrate: MigrationFunction = async ({ context, authentication, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/013-add-enabled-feature-flags-property.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/013-add-enabled-feature-flags-property.migration.ts index 25d0748fec9..eac96fbfb7d 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/013-add-enabled-feature-flags-property.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/013-add-enabled-feature-flags-property.migration.ts @@ -1,11 +1,9 @@ -import type { BaseUrl, EntityType } from "@blockprotocol/type-system"; import { extractBaseUrl } from "@blockprotocol/type-system"; import { NotFoundError } from "@local/hash-backend-utils/error"; import { getEntityTypeById } from "@local/hash-graph-sdk/entity-type"; import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { MigrationFunction } from "../types"; import { createSystemPropertyTypeIfNotExists, getCurrentHashSystemEntityTypeId, @@ -14,6 +12,9 @@ import { upgradeEntitiesToNewTypeVersion, } from "../util"; +import type { MigrationFunction } from "../types"; +import type { BaseUrl, EntityType } from "@blockprotocol/type-system"; + const migrate: MigrationFunction = async ({ context, authentication, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/017-add-use-case-form-and-example-org.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/017-add-use-case-form-and-example-org.migration.ts index 17856d154bb..f83ac3421f0 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/017-add-use-case-form-and-example-org.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/017-add-use-case-form-and-example-org.migration.ts @@ -9,13 +9,14 @@ import { createOrg, getOrgByShortname, } from "../../../knowledge/system-types/org"; -import type { MigrationFunction } from "../types"; import { createSystemEntityTypeIfNotExists, createSystemPropertyTypeIfNotExists, getCurrentHashPropertyTypeId, } from "../util"; +import type { MigrationFunction } from "../types"; + const migrate: MigrationFunction = async ({ context, authentication, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/018-add-application-preferences-property.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/018-add-application-preferences-property.migration.ts index b614711c784..974a44f6d97 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/018-add-application-preferences-property.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/018-add-application-preferences-property.migration.ts @@ -1,11 +1,9 @@ -import type { BaseUrl, EntityType } from "@blockprotocol/type-system"; import { extractBaseUrl } from "@blockprotocol/type-system"; import { NotFoundError } from "@local/hash-backend-utils/error"; import { getEntityTypeById } from "@local/hash-graph-sdk/entity-type"; import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { MigrationFunction } from "../types"; import { createSystemPropertyTypeIfNotExists, getCurrentHashSystemEntityTypeId, @@ -14,6 +12,9 @@ import { upgradeEntitiesToNewTypeVersion, } from "../util"; +import type { MigrationFunction } from "../types"; +import type { BaseUrl, EntityType } from "@blockprotocol/type-system"; + const migrate: MigrationFunction = async ({ context, authentication, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/019-add-doc-company-and-person-types.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/019-add-doc-company-and-person-types.migration.ts index f6ca97d4734..cf2dd480bae 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/019-add-doc-company-and-person-types.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/019-add-doc-company-and-person-types.migration.ts @@ -5,7 +5,6 @@ import { systemPropertyTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { MigrationFunction } from "../types"; import { createSystemDataTypeIfNotExists, createSystemEntityTypeIfNotExists, @@ -15,6 +14,8 @@ import { getCurrentHashPropertyTypeId, } from "../util"; +import type { MigrationFunction } from "../types"; + const migrate: MigrationFunction = async ({ context, authentication, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/020-add-integration-parent-type.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/020-add-integration-parent-type.migration.ts index d6c8957e1bf..c7a196b7097 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/020-add-integration-parent-type.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/020-add-integration-parent-type.migration.ts @@ -1,11 +1,9 @@ -import type { EntityType } from "@blockprotocol/type-system"; import { NotFoundError } from "@local/hash-backend-utils/error"; import { getEntityTypeById } from "@local/hash-graph-sdk/entity-type"; import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { enabledIntegrations } from "../../../../integrations/enabled-integrations"; -import type { MigrationFunction } from "../types"; import { createSystemEntityTypeIfNotExists, getCurrentHashSystemEntityTypeId, @@ -13,6 +11,9 @@ import { upgradeEntitiesToNewTypeVersion, } from "../util"; +import type { MigrationFunction } from "../types"; +import type { EntityType } from "@blockprotocol/type-system"; + const migrate: MigrationFunction = async ({ context, authentication, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/021-add-org-invites.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/021-add-org-invites.migration.ts index 90c6c4c41f7..0183d8231d0 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/021-add-org-invites.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/021-add-org-invites.migration.ts @@ -1,4 +1,3 @@ -import type { BaseUrl, EntityType } from "@blockprotocol/type-system"; import { NotFoundError } from "@local/hash-backend-utils/error"; import { getEntityTypeById } from "@local/hash-graph-sdk/entity-type"; import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; @@ -7,7 +6,6 @@ import { systemEntityTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { MigrationFunction } from "../types"; import { createSystemEntityTypeIfNotExists, getCurrentHashPropertyTypeId, @@ -17,6 +15,9 @@ import { upgradeEntitiesToNewTypeVersion, } from "../util"; +import type { MigrationFunction } from "../types"; +import type { BaseUrl, EntityType } from "@blockprotocol/type-system"; + const migrate: MigrationFunction = async ({ context, authentication, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/022-add-migrations-completed-to-hash-instance.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/022-add-migrations-completed-to-hash-instance.migration.ts index 4fb253930ad..2416a9f160f 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/022-add-migrations-completed-to-hash-instance.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/022-add-migrations-completed-to-hash-instance.migration.ts @@ -6,7 +6,6 @@ import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/gra import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { getOrCreateOwningWebId } from "../../system-webs-and-entities"; -import type { MigrationFunction } from "../types"; import { createSystemPropertyTypeIfNotExists, getCurrentHashSystemEntityTypeId, @@ -14,6 +13,8 @@ import { upgradeEntitiesToNewTypeVersion, } from "../util"; +import type { MigrationFunction } from "../types"; + /** * This migration adds tracking properties to the HASH Instance entity type: * - `migrationsCompleted`: Array of migration numbers that have been run diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/023-create-more-custom-data-types.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/023-create-more-custom-data-types.migration.ts index fb34261a6e2..d80819fab02 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/023-create-more-custom-data-types.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/023-create-more-custom-data-types.migration.ts @@ -1,8 +1,9 @@ import { blockProtocolDataTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { MigrationFunction } from "../types"; import { createSystemDataTypeIfNotExists } from "../util"; +import type { MigrationFunction } from "../types"; + const migrate: MigrationFunction = async ({ context, authentication, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/024-add-flow-types.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/024-add-flow-types.migration.ts index 29504c66c68..53ad176ba9d 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/024-add-flow-types.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/024-add-flow-types.migration.ts @@ -1,4 +1,3 @@ -import type { EntityType } from "@blockprotocol/type-system"; import { NotFoundError } from "@local/hash-backend-utils/error"; import { getEntityTypeById } from "@local/hash-graph-sdk/entity-type"; import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; @@ -9,7 +8,6 @@ import { systemEntityTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { MigrationFunction } from "../types"; import { createSystemDataTypeIfNotExists, createSystemEntityTypeIfNotExists, @@ -20,6 +18,9 @@ import { upgradeEntitiesToNewTypeVersion, } from "../util"; +import type { MigrationFunction } from "../types"; +import type { EntityType } from "@blockprotocol/type-system"; + const migrate: MigrationFunction = async ({ context, authentication, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/086-add-study-record-type.dev.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/086-add-study-record-type.dev.migration.ts index 88d4cabc728..954d4963d55 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/086-add-study-record-type.dev.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/086-add-study-record-type.dev.migration.ts @@ -5,7 +5,6 @@ import { systemPropertyTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { MigrationFunction } from "../types"; import { createSystemDataTypeIfNotExists, createSystemEntityTypeIfNotExists, @@ -15,6 +14,8 @@ import { getCurrentHashSystemEntityTypeId, } from "../util"; +import type { MigrationFunction } from "../types"; + const migrate: MigrationFunction = async ({ context, authentication, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/087-add-initial-currency-data-types.dev.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/087-add-initial-currency-data-types.dev.migration.ts index 4b95fc86179..435a913b2a2 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/087-add-initial-currency-data-types.dev.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/087-add-initial-currency-data-types.dev.migration.ts @@ -1,8 +1,9 @@ import { blockProtocolDataTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { MigrationFunction } from "../types"; import { createSystemDataTypeIfNotExists } from "../util"; +import type { MigrationFunction } from "../types"; + const migrate: MigrationFunction = async ({ context, authentication, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/090-add-aviation-types.dev.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/090-add-aviation-types.dev.migration.ts index 4cb73021291..c7f729ae636 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/090-add-aviation-types.dev.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/090-add-aviation-types.dev.migration.ts @@ -4,7 +4,6 @@ import { blockProtocolPropertyTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { MigrationFunction } from "../types"; import { createSystemDataTypeIfNotExists, createSystemEntityTypeIfNotExists, @@ -12,6 +11,8 @@ import { getCurrentHashDataTypeId, } from "../util"; +import type { MigrationFunction } from "../types"; + const migrate: MigrationFunction = async ({ context, authentication, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/091-add-petri-nets.dev.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/091-add-petri-nets.dev.migration.ts index 5edb1cb6438..fdafe4fbf47 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/091-add-petri-nets.dev.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/091-add-petri-nets.dev.migration.ts @@ -1,12 +1,13 @@ import { blockProtocolEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { MigrationFunction } from "../types"; import { createSystemEntityTypeIfNotExists, createSystemPropertyTypeIfNotExists, getCurrentHashPropertyTypeId, } from "../util"; +import type { MigrationFunction } from "../types"; + const migrate: MigrationFunction = async ({ context, authentication, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/types.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/types.ts index 75ac2983245..a1f5f6da1dc 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/types.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/types.ts @@ -1,8 +1,7 @@ +import type { ImpureGraphContext } from "../../context-types"; import type { BaseUrl, OntologyTypeVersion } from "@blockprotocol/type-system"; import type { AuthenticationContext } from "@local/hash-graph-sdk/authentication-context"; -import type { ImpureGraphContext } from "../../context-types"; - export type MigrationState = { propertyTypeVersions: Record; entityTypeVersions: Record; diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/util.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/util.ts index 4d2c3cd3dd3..de122819d64 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/util.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/util.ts @@ -2,30 +2,6 @@ import path from "node:path"; import { fileURLToPath } from "node:url"; -import type { - BaseUrl, - Conversions, - DataType, - DataTypeMetadata, - DataTypeReference, - DataTypeWithMetadata, - Entity, - EntityType, - EntityTypeMetadata, - EntityTypeWithMetadata, - OneOfSchema, - OntologyTypeRecordId, - PropertyObjectWithMetadata, - PropertyType, - PropertyTypeMetadata, - PropertyTypeReference, - PropertyTypeWithMetadata, - PropertyValueArray, - PropertyValueObject, - PropertyValues, - ValueOrArray, - VersionedUrl, -} from "@blockprotocol/type-system"; import { atLeastOne, componentsFromVersionedUrl, @@ -39,11 +15,9 @@ import { versionedUrlFromComponents, } from "@blockprotocol/type-system"; import { NotFoundError } from "@local/hash-backend-utils/error"; -import type { UpdatePropertyType } from "@local/hash-graph-client"; import { getDataTypeById } from "@local/hash-graph-sdk/data-type"; import { queryEntities } from "@local/hash-graph-sdk/entity"; import { getEntityTypeById } from "@local/hash-graph-sdk/entity-type"; -import type { ConstructDataTypeParams } from "@local/hash-graph-sdk/ontology"; import { getPropertyTypeById } from "@local/hash-graph-sdk/property-type"; import { currentTimeInstantTemporalAxes, @@ -57,25 +31,52 @@ import { systemLinkEntityTypes, systemPropertyTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { - SchemaKind, - SystemTypeWebShortname, -} from "@local/hash-isomorphic-utils/ontology-types"; import { generateLinkMapWithConsistentSelfReferences, generateTypeBaseUrl, } from "@local/hash-isomorphic-utils/ontology-types"; -import type { ImpureGraphFunction } from "../../context-types"; import { createDataType } from "../../ontology/primitive/data-type"; import { createEntityType } from "../../ontology/primitive/entity-type"; import { createPropertyType } from "../../ontology/primitive/property-type"; -import type { PrimitiveDataTypeKey } from "../system-webs-and-entities"; import { getOrCreateOwningWebId } from "../system-webs-and-entities"; -import type { MigrationState } from "./types"; import { upgradeWebEntities } from "./util/upgrade-entities"; import { upgradeEntityTypeDependencies } from "./util/upgrade-entity-type-dependencies"; +import type { ImpureGraphFunction } from "../../context-types"; +import type { PrimitiveDataTypeKey } from "../system-webs-and-entities"; +import type { MigrationState } from "./types"; +import type { + BaseUrl, + Conversions, + DataType, + DataTypeMetadata, + DataTypeReference, + DataTypeWithMetadata, + Entity, + EntityType, + EntityTypeMetadata, + EntityTypeWithMetadata, + OneOfSchema, + OntologyTypeRecordId, + PropertyObjectWithMetadata, + PropertyType, + PropertyTypeMetadata, + PropertyTypeReference, + PropertyTypeWithMetadata, + PropertyValueArray, + PropertyValueObject, + PropertyValues, + ValueOrArray, + VersionedUrl, +} from "@blockprotocol/type-system"; +import type { UpdatePropertyType } from "@local/hash-graph-client"; +import type { ConstructDataTypeParams } from "@local/hash-graph-sdk/ontology"; +import type { + SchemaKind, + SystemTypeWebShortname, +} from "@local/hash-isomorphic-utils/ontology-types"; + const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/util/upgrade-entities.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/util/upgrade-entities.ts index a3623824338..c3d26b843f4 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/util/upgrade-entities.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/util/upgrade-entities.ts @@ -2,12 +2,6 @@ import { getBreadthFirstEntityTypesAndParents, getRoots, } from "@blockprotocol/graph/stdlib"; -import type { - ActorEntityUuid, - BaseUrl, - PropertyObjectWithMetadata, - WebId, -} from "@blockprotocol/type-system"; import { compareOntologyTypeVersions, componentsFromVersionedUrl, @@ -29,9 +23,16 @@ import { systemLinkEntityTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { ImpureGraphContext } from "../../../context-types"; import { updateEntity } from "../../../knowledge/primitive/entity"; + +import type { ImpureGraphContext } from "../../../context-types"; import type { MigrationState } from "../types"; +import type { + ActorEntityUuid, + BaseUrl, + PropertyObjectWithMetadata, + WebId, +} from "@blockprotocol/type-system"; export const upgradeWebEntities = async ({ authentication, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/util/upgrade-entity-type-dependencies.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/util/upgrade-entity-type-dependencies.ts index dc0daf77010..0d63f76fb0d 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/util/upgrade-entity-type-dependencies.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/util/upgrade-entity-type-dependencies.ts @@ -1,10 +1,11 @@ +import { atLeastOne, extractBaseUrl } from "@blockprotocol/type-system"; +import { typedEntries } from "@local/advanced-types/typed-entries"; + import type { EntityType, EntityTypeReference, VersionedUrl, } from "@blockprotocol/type-system"; -import { atLeastOne, extractBaseUrl } from "@blockprotocol/type-system"; -import { typedEntries } from "@local/advanced-types/typed-entries"; export const replaceEntityTypeReference = ({ reference, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/system-webs-and-entities.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/system-webs-and-entities.ts index c567d480c7c..9266814d936 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/system-webs-and-entities.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/system-webs-and-entities.ts @@ -1,8 +1,3 @@ -import type { - MachineId, - VersionedUrl, - WebId, -} from "@blockprotocol/type-system"; import { componentsFromVersionedUrl } from "@blockprotocol/type-system"; import { typedEntries } from "@local/advanced-types/typed-entries"; import { NotFoundError } from "@local/hash-backend-utils/error"; @@ -16,16 +11,22 @@ import { createAiActor, } from "@local/hash-graph-sdk/principal/actor-group"; import { getWebByShortname } from "@local/hash-graph-sdk/principal/web"; -import type { blockProtocolDataTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { SystemTypeWebShortname } from "@local/hash-isomorphic-utils/ontology-types"; import { enabledIntegrations } from "../../integrations/enabled-integrations"; import { logger } from "../../logger"; -import type { ImpureGraphContext } from "../context-types"; import { createOrg, getOrgByShortname } from "../knowledge/system-types/org"; import { systemAccountId } from "../system-account"; +import type { ImpureGraphContext } from "../context-types"; +import type { + MachineId, + VersionedUrl, + WebId, +} from "@blockprotocol/type-system"; +import type { blockProtocolDataTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; +import type { SystemTypeWebShortname } from "@local/hash-isomorphic-utils/ontology-types"; + export const owningWebs: Record< SystemTypeWebShortname, { diff --git a/apps/hash-api/src/graph/knowledge/primitive/entity.ts b/apps/hash-api/src/graph/knowledge/primitive/entity.ts index b1431016a77..aaeb2ed650d 100644 --- a/apps/hash-api/src/graph/knowledge/primitive/entity.ts +++ b/apps/hash-api/src/graph/knowledge/primitive/entity.ts @@ -4,39 +4,14 @@ import { type QueryTemporalAxesUnresolved, type Subgraph, } from "@blockprotocol/graph"; -import type { - BaseUrl, - Entity, - EntityEditionId, - EntityId, - LinkData, - PropertyObject, - PropertyPatchOperation, - TeamId, - TypeIdsAndPropertiesForEntity, - VersionedUrl, - WebId, -} from "@blockprotocol/type-system"; import { extractDraftIdFromEntityId, extractEntityUuidFromEntityId, extractWebIdFromEntityId, splitEntityId, } from "@blockprotocol/type-system"; -import type { Subtype } from "@local/advanced-types/subtype"; import { typedKeys } from "@local/advanced-types/typed-entries"; import { publicUserAccountId } from "@local/hash-backend-utils/public-user-account-id"; -import type { - AllFilter, - CountEntitiesParams, - DiffEntityResult, - Filter, - HasPermissionForEntitiesParams, -} from "@local/hash-graph-client"; -import type { - UserPermissions, - UserPermissionsOnEntities, -} from "@local/hash-graph-sdk/authorization"; import { type CreateEntityParameters, type DiffEntityInput, @@ -53,23 +28,49 @@ import { import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-properties"; -import type { UserProperties } from "@local/hash-isomorphic-utils/system-types/user"; -import type { ActionName } from "@rust/hash-graph-authorization/types"; -import type { TraversalPath } from "@rust/hash-graph-store/types"; -import type { - EntityDefinition, - LinkedEntityDefinition, -} from "../../../graphql/api-types.gen"; import * as GraphQlError from "../../../graphql/error"; import { linkedTreeFlatten } from "../../../util"; -import type { ImpureGraphFunction } from "../../context-types"; import { afterCreateEntityHooks } from "./entity/after-create-entity-hooks"; import { afterUpdateEntityHooks } from "./entity/after-update-entity-hooks"; import { beforeCreateEntityHooks } from "./entity/before-create-entity-hooks"; import { beforeUpdateEntityHooks } from "./entity/before-update-entity-hooks"; import { createLinkEntity, isEntityLinkEntity } from "./link-entity"; +import type { + EntityDefinition, + LinkedEntityDefinition, +} from "../../../graphql/api-types.gen"; +import type { ImpureGraphFunction } from "../../context-types"; +import type { + BaseUrl, + Entity, + EntityEditionId, + EntityId, + LinkData, + PropertyObject, + PropertyPatchOperation, + TeamId, + TypeIdsAndPropertiesForEntity, + VersionedUrl, + WebId, +} from "@blockprotocol/type-system"; +import type { Subtype } from "@local/advanced-types/subtype"; +import type { + AllFilter, + CountEntitiesParams, + DiffEntityResult, + Filter, + HasPermissionForEntitiesParams, +} from "@local/hash-graph-client"; +import type { + UserPermissions, + UserPermissionsOnEntities, +} from "@local/hash-graph-sdk/authorization"; +import type { UserProperties } from "@local/hash-isomorphic-utils/system-types/user"; +import type { ActionName } from "@rust/hash-graph-authorization/types"; +import type { TraversalPath } from "@rust/hash-graph-store/types"; + /** @todo: potentially directly export this from the subgraph package */ export type PropertyValue = PropertyObject[BaseUrl]; diff --git a/apps/hash-api/src/graph/knowledge/primitive/entity/after-create-entity-hooks.ts b/apps/hash-api/src/graph/knowledge/primitive/entity/after-create-entity-hooks.ts index ae001aab7c7..e12e8bd6403 100644 --- a/apps/hash-api/src/graph/knowledge/primitive/entity/after-create-entity-hooks.ts +++ b/apps/hash-api/src/graph/knowledge/primitive/entity/after-create-entity-hooks.ts @@ -1,4 +1,3 @@ -import type { EntityUuid, WebId } from "@blockprotocol/type-system"; import { entityIdFromComponents } from "@blockprotocol/type-system"; import { systemEntityTypes, @@ -6,7 +5,6 @@ import { } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { includesPageEntityTypeId } from "@local/hash-isomorphic-utils/page-entity-type-ids"; import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-properties"; -import type { UserProperties } from "@local/hash-isomorphic-utils/system-types/user"; import { isProdEnv } from "../../../../lib/env-config"; import { createOrUpdateMailchimpUser } from "../../../../mailchimp"; @@ -32,11 +30,14 @@ import { } from "../../system-types/text"; import { getUser } from "../../system-types/user"; import { checkPermissionsOnEntity } from "../entity"; +import { getTextUpdateOccurredIn } from "./shared/mention-notification"; + import type { AfterCreateEntityHook, AfterCreateEntityHookCallback, } from "./create-entity-hooks"; -import { getTextUpdateOccurredIn } from "./shared/mention-notification"; +import type { EntityUuid, WebId } from "@blockprotocol/type-system"; +import type { UserProperties } from "@local/hash-isomorphic-utils/system-types/user"; /** * This after create `Comment` entity hook is responsible for creating diff --git a/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks.ts b/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks.ts index 7703bb4e1dc..26684c238aa 100644 --- a/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks.ts +++ b/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks.ts @@ -6,6 +6,7 @@ import { } from "./after-update-entity-hooks/file-document-after-update-entity-hook-callback"; import { textAfterUpdateEntityHookCallback } from "./after-update-entity-hooks/text-after-update-entity-hook-callback"; import { userAfterUpdateEntityHookCallback } from "./after-update-entity-hooks/user-after-update-entity-hook"; + import type { AfterUpdateEntityHook } from "./update-entity-hooks"; export const afterUpdateEntityHooks: AfterUpdateEntityHook[] = [ diff --git a/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks/file-document-after-update-entity-hook-callback.ts b/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks/file-document-after-update-entity-hook-callback.ts index 6ed73d1650e..0a7c099b21b 100644 --- a/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks/file-document-after-update-entity-hook-callback.ts +++ b/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks/file-document-after-update-entity-hook-callback.ts @@ -1,4 +1,3 @@ -import type { VersionedUrl } from "@blockprotocol/type-system"; import { extractWebIdFromEntityId } from "@blockprotocol/type-system"; import { isStorageType, @@ -10,15 +9,16 @@ import { type HashEntity, } from "@local/hash-graph-sdk/entity"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { ParseTextFromFileParams } from "@local/hash-isomorphic-utils/parse-text-from-file-types"; import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-properties"; + +import type { AfterUpdateEntityHookCallback } from "../update-entity-hooks"; +import type { VersionedUrl } from "@blockprotocol/type-system"; +import type { ParseTextFromFileParams } from "@local/hash-isomorphic-utils/parse-text-from-file-types"; import type { DOCXDocument } from "@local/hash-isomorphic-utils/system-types/docxdocument"; import type { File } from "@local/hash-isomorphic-utils/system-types/file"; import type { PDFDocument } from "@local/hash-isomorphic-utils/system-types/pdfdocument"; import type { PPTXPresentation } from "@local/hash-isomorphic-utils/system-types/pptxpresentation"; -import type { AfterUpdateEntityHookCallback } from "../update-entity-hooks"; - export const entityTypesToParseTextFrom: VersionedUrl[] = [ systemEntityTypes.docxDocument.entityTypeId, systemEntityTypes.pdfDocument.entityTypeId, diff --git a/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks/text-after-update-entity-hook-callback.ts b/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks/text-after-update-entity-hook-callback.ts index 7a4ce121276..420547003d9 100644 --- a/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks/text-after-update-entity-hook-callback.ts +++ b/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks/text-after-update-entity-hook-callback.ts @@ -1,8 +1,5 @@ -import type { EntityUuid, WebId } from "@blockprotocol/type-system"; import { entityIdFromComponents } from "@blockprotocol/type-system"; import { getDefinedPropertyFromPatchesGetter } from "@local/hash-graph-sdk/entity"; -import type { TextProperties } from "@local/hash-isomorphic-utils/system-types/shared"; -import type { TextToken } from "@local/hash-isomorphic-utils/types"; import { archiveNotification, @@ -16,7 +13,11 @@ import { import { getUser } from "../../../system-types/user"; import { checkPermissionsOnEntity } from "../../entity"; import { getTextUpdateOccurredIn } from "../shared/mention-notification"; + import type { AfterUpdateEntityHookCallback } from "../update-entity-hooks"; +import type { EntityUuid, WebId } from "@blockprotocol/type-system"; +import type { TextProperties } from "@local/hash-isomorphic-utils/system-types/shared"; +import type { TextToken } from "@local/hash-isomorphic-utils/types"; /** * This after update `Text` entity hook is responsible for creating diff --git a/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks/user-after-update-entity-hook.ts b/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks/user-after-update-entity-hook.ts index 2a36f6b1677..ed31a534fb9 100644 --- a/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks/user-after-update-entity-hook.ts +++ b/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks/user-after-update-entity-hook.ts @@ -1,6 +1,5 @@ import { getDefinedPropertyFromPatchesGetter } from "@local/hash-graph-sdk/entity"; import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-properties"; -import type { UserProperties } from "@local/hash-isomorphic-utils/system-types/user"; import { isProdEnv } from "../../../../../lib/env-config"; import { createOrUpdateMailchimpUser } from "../../../../../mailchimp"; @@ -8,7 +7,9 @@ import { getUserFromEntity, updateUserKratosIdentityTraits, } from "../../../system-types/user"; + import type { AfterUpdateEntityHookCallback } from "../update-entity-hooks"; +import type { UserProperties } from "@local/hash-isomorphic-utils/system-types/user"; export const userAfterUpdateEntityHookCallback: AfterUpdateEntityHookCallback = async ({ context, propertyPatches, updatedEntity }) => { diff --git a/apps/hash-api/src/graph/knowledge/primitive/entity/before-update-entity-hooks.ts b/apps/hash-api/src/graph/knowledge/primitive/entity/before-update-entity-hooks.ts index 71c7213c32d..0d729cff065 100644 --- a/apps/hash-api/src/graph/knowledge/primitive/entity/before-update-entity-hooks.ts +++ b/apps/hash-api/src/graph/knowledge/primitive/entity/before-update-entity-hooks.ts @@ -1,6 +1,7 @@ import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { userBeforeEntityUpdateHookCallback } from "./before-update-entity-hooks/user-before-update-entity-hook-callback"; + import type { BeforeUpdateEntityHook } from "./update-entity-hooks"; export const beforeUpdateEntityHooks: BeforeUpdateEntityHook[] = [ diff --git a/apps/hash-api/src/graph/knowledge/primitive/entity/before-update-entity-hooks/user-before-update-entity-hook-callback.ts b/apps/hash-api/src/graph/knowledge/primitive/entity/before-update-entity-hooks/user-before-update-entity-hook-callback.ts index 052466fc221..d44434c6de8 100644 --- a/apps/hash-api/src/graph/knowledge/primitive/entity/before-update-entity-hooks/user-before-update-entity-hook-callback.ts +++ b/apps/hash-api/src/graph/knowledge/primitive/entity/before-update-entity-hooks/user-before-update-entity-hook-callback.ts @@ -1,8 +1,5 @@ -import type { - ActorEntityUuid, - BaseUrl, - WebId, -} from "@blockprotocol/type-system"; +import { GraphQLError } from "graphql"; + import { getDefinedPropertyFromPatchesGetter, isValueRemovedByPatches, @@ -17,13 +14,10 @@ import { shortnamePropertyBaseUrl, userSelfUpdatablePropertyBaseUrls, } from "@local/hash-graph-sdk/user-entity-restrictions"; -import type { UserProperties } from "@local/hash-isomorphic-utils/system-types/user"; -import { GraphQLError } from "graphql"; import { isUserEmailVerified } from "../../../../../auth/ory-kratos"; import * as Error from "../../../../../graphql/error"; import { userHasAccessToHash } from "../../../../../shared/user-has-access-to-hash"; -import type { ImpureGraphContext } from "../../../../context-types"; import { systemAccountId } from "../../../../system-account"; import { shortnameContainsInvalidCharacter, @@ -33,7 +27,15 @@ import { shortnameMinimumLength, } from "../../../system-types/account.fields"; import { getUserFromEntity } from "../../../system-types/user"; + +import type { ImpureGraphContext } from "../../../../context-types"; import type { BeforeUpdateEntityHookCallback } from "../update-entity-hooks"; +import type { + ActorEntityUuid, + BaseUrl, + WebId, +} from "@blockprotocol/type-system"; +import type { UserProperties } from "@local/hash-isomorphic-utils/system-types/user"; /** * Properties that have special handling in this hook beyond the general whitelist. diff --git a/apps/hash-api/src/graph/knowledge/primitive/entity/create-entity-hooks.ts b/apps/hash-api/src/graph/knowledge/primitive/entity/create-entity-hooks.ts index 1a5b35f7e4d..c76fe11acb1 100644 --- a/apps/hash-api/src/graph/knowledge/primitive/entity/create-entity-hooks.ts +++ b/apps/hash-api/src/graph/knowledge/primitive/entity/create-entity-hooks.ts @@ -1,3 +1,4 @@ +import type { ImpureGraphContext } from "../../../context-types"; import type { PropertyObjectWithMetadata, VersionedUrl, @@ -5,8 +6,6 @@ import type { import type { AuthenticationContext } from "@local/hash-graph-sdk/authentication-context"; import type { HashEntity } from "@local/hash-graph-sdk/entity"; -import type { ImpureGraphContext } from "../../../context-types"; - export type BeforeCreateEntityHookCallback = (params: { context: ImpureGraphContext; authentication: AuthenticationContext; diff --git a/apps/hash-api/src/graph/knowledge/primitive/entity/shared/mention-notification.ts b/apps/hash-api/src/graph/knowledge/primitive/entity/shared/mention-notification.ts index 95cb6e5da16..382c248669d 100644 --- a/apps/hash-api/src/graph/knowledge/primitive/entity/shared/mention-notification.ts +++ b/apps/hash-api/src/graph/knowledge/primitive/entity/shared/mention-notification.ts @@ -1,18 +1,19 @@ import { includesPageEntityTypeId } from "@local/hash-isomorphic-utils/page-entity-type-ids"; -import type { ImpureGraphFunction } from "../../../../context-types"; -import type { Block } from "../../../system-types/block"; import { getBlockCollectionByBlock } from "../../../system-types/block"; -import type { Comment } from "../../../system-types/comment"; import { getCommentAncestorBlock } from "../../../system-types/comment"; -import type { Page } from "../../../system-types/page"; import { getPageFromEntity } from "../../../system-types/page"; -import type { Text } from "../../../system-types/text"; import { getCommentByText, getPageAndBlockByText, } from "../../../system-types/text"; +import type { ImpureGraphFunction } from "../../../../context-types"; +import type { Block } from "../../../system-types/block"; +import type { Comment } from "../../../system-types/comment"; +import type { Page } from "../../../system-types/page"; +import type { Text } from "../../../system-types/text"; + export const getTextUpdateOccurredIn: ImpureGraphFunction< { text: Text; includeDrafts?: boolean }, Promise<{ diff --git a/apps/hash-api/src/graph/knowledge/primitive/entity/update-entity-hooks.ts b/apps/hash-api/src/graph/knowledge/primitive/entity/update-entity-hooks.ts index ea4a029a5c2..be19b312c07 100644 --- a/apps/hash-api/src/graph/knowledge/primitive/entity/update-entity-hooks.ts +++ b/apps/hash-api/src/graph/knowledge/primitive/entity/update-entity-hooks.ts @@ -1,3 +1,4 @@ +import type { ImpureGraphContext } from "../../../context-types"; import type { PropertyPatchOperation, VersionedUrl, @@ -5,8 +6,6 @@ import type { import type { AuthenticationContext } from "@local/hash-graph-sdk/authentication-context"; import type { HashEntity } from "@local/hash-graph-sdk/entity"; -import type { ImpureGraphContext } from "../../../context-types"; - type UpdateEntityHookCallbackBaseParams = { context: ImpureGraphContext; authentication: AuthenticationContext; diff --git a/apps/hash-api/src/graph/knowledge/primitive/link-entity.ts b/apps/hash-api/src/graph/knowledge/primitive/link-entity.ts index cf22fd17c0e..9e40fa0f259 100644 --- a/apps/hash-api/src/graph/knowledge/primitive/link-entity.ts +++ b/apps/hash-api/src/graph/knowledge/primitive/link-entity.ts @@ -1,3 +1,9 @@ +import { HashLinkEntity } from "@local/hash-graph-sdk/entity"; + +import { getLatestEntityById } from "./entity"; +import { afterCreateEntityHooks } from "./entity/after-create-entity-hooks"; + +import type { ImpureGraphFunction } from "../../context-types"; import type { LinkData, PropertyPatchOperation, @@ -7,11 +13,6 @@ import type { CreateEntityParameters, HashEntity, } from "@local/hash-graph-sdk/entity"; -import { HashLinkEntity } from "@local/hash-graph-sdk/entity"; - -import type { ImpureGraphFunction } from "../../context-types"; -import { getLatestEntityById } from "./entity"; -import { afterCreateEntityHooks } from "./entity/after-create-entity-hooks"; export const isEntityLinkEntity = ( entity: HashEntity, diff --git a/apps/hash-api/src/graph/knowledge/system-types/account.fields.ts b/apps/hash-api/src/graph/knowledge/system-types/account.fields.ts index 987fcff6943..6276a76430e 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/account.fields.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/account.fields.ts @@ -1,9 +1,10 @@ +import { getOrgByShortname } from "./org"; +import { getUser } from "./user"; + import type { ImpureGraphFunction, PureGraphFunction, } from "../../context-types"; -import { getOrgByShortname } from "./org"; -import { getUser } from "./user"; /** @todo: enable admins to expand upon restricted shortnames block list */ export const RESTRICTED_SHORTNAMES = [ diff --git a/apps/hash-api/src/graph/knowledge/system-types/block-collection.ts b/apps/hash-api/src/graph/knowledge/system-types/block-collection.ts index 909a6092d77..2c587bff1f8 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/block-collection.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/block-collection.ts @@ -1,8 +1,3 @@ -import type { - Entity, - EntityId, - VersionedUrl, -} from "@blockprotocol/type-system"; import { extractWebIdFromEntityId } from "@blockprotocol/type-system"; import { HashLinkEntity, @@ -13,11 +8,7 @@ import { systemEntityTypes, systemLinkEntityTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { HasSpatiallyPositionedContent } from "@local/hash-isomorphic-utils/system-types/canvas"; -import type { HasIndexedContent } from "@local/hash-isomorphic-utils/system-types/shared"; -import type { PositionInput } from "../../../graphql/api-types.gen"; -import type { ImpureGraphFunction } from "../../context-types"; import { getEntityOutgoingLinks, getLatestEntityById, @@ -27,9 +18,19 @@ import { getLinkEntityRightEntity, updateLinkEntity, } from "../primitive/link-entity"; -import type { Block } from "./block"; import { getBlockFromEntity } from "./block"; +import type { PositionInput } from "../../../graphql/api-types.gen"; +import type { ImpureGraphFunction } from "../../context-types"; +import type { Block } from "./block"; +import type { + Entity, + EntityId, + VersionedUrl, +} from "@blockprotocol/type-system"; +import type { HasSpatiallyPositionedContent } from "@local/hash-isomorphic-utils/system-types/canvas"; +import type { HasIndexedContent } from "@local/hash-isomorphic-utils/system-types/shared"; + /** * Get the blocks in this blockCollection. * diff --git a/apps/hash-api/src/graph/knowledge/system-types/block.ts b/apps/hash-api/src/graph/knowledge/system-types/block.ts index f8880ce5813..84f7c59521e 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/block.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/block.ts @@ -1,4 +1,3 @@ -import type { Entity, EntityId } from "@blockprotocol/type-system"; import { extractEntityUuidFromEntityId, extractWebIdFromEntityId, @@ -19,15 +18,7 @@ import { } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { contentLinkTypeFilter } from "@local/hash-isomorphic-utils/page-entity-type-ids"; import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-properties"; -import type { - Block as BlockEntity, - HasData, -} from "@local/hash-isomorphic-utils/system-types/shared"; -import type { - ImpureGraphFunction, - PureGraphFunction, -} from "../../context-types"; import { createEntity, getEntityIncomingLinks, @@ -40,9 +31,19 @@ import { getLinkEntityRightEntity, isEntityLinkEntity, } from "../primitive/link-entity"; -import type { Comment } from "./comment"; import { getCommentFromEntity } from "./comment"; +import type { + ImpureGraphFunction, + PureGraphFunction, +} from "../../context-types"; +import type { Comment } from "./comment"; +import type { Entity, EntityId } from "@blockprotocol/type-system"; +import type { + Block as BlockEntity, + HasData, +} from "@local/hash-isomorphic-utils/system-types/shared"; + export type Block = { componentId: string; entity: HashEntity; diff --git a/apps/hash-api/src/graph/knowledge/system-types/comment.ts b/apps/hash-api/src/graph/knowledge/system-types/comment.ts index 338b7ec63f3..c1cfcc97464 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/comment.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/comment.ts @@ -1,9 +1,4 @@ -import type { EntityId, EntityUuid } from "@blockprotocol/type-system"; import { EntityTypeMismatchError } from "@local/hash-backend-utils/error"; -import type { - CreateEntityParameters, - HashEntity, -} from "@local/hash-graph-sdk/entity"; import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; import { blockProtocolPropertyTypes, @@ -11,18 +6,7 @@ import { systemLinkEntityTypes, systemPropertyTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { - Comment as CommentEntity, - CommentPropertiesWithMetadata, - Text as TextEntity, - TextPropertiesWithMetadata, -} from "@local/hash-isomorphic-utils/system-types/shared"; -import type { TextToken } from "@local/hash-isomorphic-utils/types"; -import type { - ImpureGraphFunction, - PureGraphFunction, -} from "../../context-types"; import { createEntity, getEntityIncomingLinks, @@ -34,13 +18,30 @@ import { getLinkEntityLeftEntity, getLinkEntityRightEntity, } from "../primitive/link-entity"; -import type { Block } from "./block"; import { getBlockFromEntity } from "./block"; -import type { Text } from "./text"; import { getTextFromEntity } from "./text"; -import type { User } from "./user"; import { getUserFromEntity } from "./user"; +import type { + ImpureGraphFunction, + PureGraphFunction, +} from "../../context-types"; +import type { Block } from "./block"; +import type { Text } from "./text"; +import type { User } from "./user"; +import type { EntityId, EntityUuid } from "@blockprotocol/type-system"; +import type { + CreateEntityParameters, + HashEntity, +} from "@local/hash-graph-sdk/entity"; +import type { + Comment as CommentEntity, + CommentPropertiesWithMetadata, + Text as TextEntity, + TextPropertiesWithMetadata, +} from "@local/hash-isomorphic-utils/system-types/shared"; +import type { TextToken } from "@local/hash-isomorphic-utils/types"; + export type Comment = { /** * @todo - these should probably be changed to encapsulate multi-axis versioning information, or should be explicitly diff --git a/apps/hash-api/src/graph/knowledge/system-types/file.ts b/apps/hash-api/src/graph/knowledge/system-types/file.ts index e5fdf71dd8f..944d95b7c26 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/file.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/file.ts @@ -1,24 +1,21 @@ -import type { - BaseUrl, - Entity, - VersionedUrl, - WebId, -} from "@blockprotocol/type-system"; +import mime from "mime-types"; + import { extractWebIdFromEntityId } from "@blockprotocol/type-system"; import { typedEntries } from "@local/advanced-types/typed-entries"; -import type { PresignedPutUpload } from "@local/hash-backend-utils/file-storage"; import { formatFileUrl, getEntityTypeIdForMimeType, } from "@local/hash-backend-utils/file-storage"; import { validateExternalUrl } from "@local/hash-backend-utils/url-validation"; -import type { AuthenticationContext } from "@local/hash-graph-sdk/authentication-context"; -import type { HashEntity } from "@local/hash-graph-sdk/entity"; import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; import { normalizeWhitespace } from "@local/hash-isomorphic-utils/normalize"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { File } from "@local/hash-isomorphic-utils/system-types/shared"; -import mime from "mime-types"; + +import { + createEntity, + getLatestEntityById, + updateEntity, +} from "../primitive/entity"; import type { MutationCreateFileFromUrlArgs, @@ -28,11 +25,16 @@ import type { ImpureGraphContext, ImpureGraphFunction, } from "../../context-types"; -import { - createEntity, - getLatestEntityById, - updateEntity, -} from "../primitive/entity"; +import type { + BaseUrl, + Entity, + VersionedUrl, + WebId, +} from "@blockprotocol/type-system"; +import type { PresignedPutUpload } from "@local/hash-backend-utils/file-storage"; +import type { AuthenticationContext } from "@local/hash-graph-sdk/authentication-context"; +import type { HashEntity } from "@local/hash-graph-sdk/entity"; +import type { File } from "@local/hash-isomorphic-utils/system-types/shared"; // 1800 seconds const UPLOAD_URL_EXPIRATION_SECONDS = 60 * 30; diff --git a/apps/hash-api/src/graph/knowledge/system-types/flow-schedule.ts b/apps/hash-api/src/graph/knowledge/system-types/flow-schedule.ts index fd2872d37c7..678d15af3b4 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/flow-schedule.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/flow-schedule.ts @@ -1,10 +1,4 @@ -import type { EntityId } from "@blockprotocol/type-system"; import { EntityTypeMismatchError } from "@local/hash-backend-utils/error"; -import type { HashEntity } from "@local/hash-graph-sdk/entity"; -import type { - CreateFlowScheduleInput, - UpdateFlowScheduleInput, -} from "@local/hash-isomorphic-utils/flows/schedule-types"; import { defaultScheduleCatchupWindowMs, defaultScheduleOverlapPolicy, @@ -15,20 +9,27 @@ import { systemEntityTypes, systemPropertyTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { - FlowSchedule, - FlowSchedulePropertiesWithMetadata, - SchedulePauseStatePropertyValueWithMetadata, - ScheduleStatusPropertyValueWithMetadata, -} from "@local/hash-isomorphic-utils/system-types/shared"; -import type { ImpureGraphFunction } from "../../context-types"; import { createEntity, getLatestEntityById, updateEntity, } from "../primitive/entity"; +import type { ImpureGraphFunction } from "../../context-types"; +import type { EntityId } from "@blockprotocol/type-system"; +import type { HashEntity } from "@local/hash-graph-sdk/entity"; +import type { + CreateFlowScheduleInput, + UpdateFlowScheduleInput, +} from "@local/hash-isomorphic-utils/flows/schedule-types"; +import type { + FlowSchedule, + FlowSchedulePropertiesWithMetadata, + SchedulePauseStatePropertyValueWithMetadata, + ScheduleStatusPropertyValueWithMetadata, +} from "@local/hash-isomorphic-utils/system-types/shared"; + const isEntityFlowScheduleEntity = ( entity: HashEntity, ): entity is HashEntity => diff --git a/apps/hash-api/src/graph/knowledge/system-types/hash-instance.ts b/apps/hash-api/src/graph/knowledge/system-types/hash-instance.ts index 5b04d4c27e8..12e0208558b 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/hash-instance.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/hash-instance.ts @@ -1,18 +1,19 @@ -import type { ActorId, VersionedUrl } from "@blockprotocol/type-system"; import { NotFoundError } from "@local/hash-backend-utils/error"; -import type { HashInstance } from "@local/hash-backend-utils/hash-instance"; import { getHashInstance, getHashInstanceFromEntity, } from "@local/hash-backend-utils/hash-instance"; import { createPolicy, deletePolicyById } from "@local/hash-graph-sdk/policy"; import { getInstanceAdminsTeam } from "@local/hash-graph-sdk/principal/hash-instance-admins"; -import type { HASHInstance as HashInstanceEntity } from "@local/hash-isomorphic-utils/system-types/hashinstance"; import { logger } from "../../../logger"; -import type { ImpureGraphFunction } from "../../context-types"; import { createEntity } from "../primitive/entity"; +import type { ImpureGraphFunction } from "../../context-types"; +import type { ActorId, VersionedUrl } from "@blockprotocol/type-system"; +import type { HashInstance } from "@local/hash-backend-utils/hash-instance"; +import type { HASHInstance as HashInstanceEntity } from "@local/hash-isomorphic-utils/system-types/hashinstance"; + /** * Create the hash instance entity. * diff --git a/apps/hash-api/src/graph/knowledge/system-types/linear-integration-entity.ts b/apps/hash-api/src/graph/knowledge/system-types/linear-integration-entity.ts index 3499616ee40..70818ab2ddb 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/linear-integration-entity.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/linear-integration-entity.ts @@ -2,13 +2,6 @@ import { getRightEntityForLinkEntity, getRoots, } from "@blockprotocol/graph/stdlib"; -import type { - ActorEntityUuid, - BaseUrl, - Entity, - EntityId, - EntityUuid, -} from "@blockprotocol/type-system"; import { extractEntityUuidFromEntityId, extractWebIdFromEntityId, @@ -30,18 +23,26 @@ import { systemPropertyTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-properties"; -import type { - LinearIntegration as LinearIntegrationEntity, - SyncLinearDataWith, - SyncLinearDataWithProperties, -} from "@local/hash-isomorphic-utils/system-types/linearintegration"; + +import { getLatestEntityById, updateEntity } from "../primitive/entity"; +import { createLinkEntity } from "../primitive/link-entity"; import type { ImpureGraphFunction, PureGraphFunction, } from "../../context-types"; -import { getLatestEntityById, updateEntity } from "../primitive/entity"; -import { createLinkEntity } from "../primitive/link-entity"; +import type { + ActorEntityUuid, + BaseUrl, + Entity, + EntityId, + EntityUuid, +} from "@blockprotocol/type-system"; +import type { + LinearIntegration as LinearIntegrationEntity, + SyncLinearDataWith, + SyncLinearDataWithProperties, +} from "@local/hash-isomorphic-utils/system-types/linearintegration"; export type LinearIntegration = { linearOrgId: string; diff --git a/apps/hash-api/src/graph/knowledge/system-types/linear-user-secret.ts b/apps/hash-api/src/graph/knowledge/system-types/linear-user-secret.ts index 241719a29b8..3217556a34f 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/linear-user-secret.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/linear-user-secret.ts @@ -1,9 +1,5 @@ -import type { - ActorEntityUuid, - Entity, - EntityId, - WebId, -} from "@blockprotocol/type-system"; +import * as Sentry from "@sentry/node"; + import { extractWebIdFromEntityId, splitEntityId, @@ -12,7 +8,6 @@ import { EntityTypeMismatchError, NotFoundError, } from "@local/hash-backend-utils/error"; -import type { VaultClient } from "@local/hash-backend-utils/vault"; import { queryEntities } from "@local/hash-graph-sdk/entity"; import { currentTimeInstantTemporalAxes, @@ -24,14 +19,20 @@ import { systemPropertyTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-properties"; -import type { LinearIntegration } from "@local/hash-isomorphic-utils/system-types/linearintegration"; -import type { UserSecret } from "@local/hash-isomorphic-utils/system-types/shared"; -import * as Sentry from "@sentry/node"; import type { ImpureGraphFunction, PureGraphFunction, } from "../../context-types"; +import type { + ActorEntityUuid, + Entity, + EntityId, + WebId, +} from "@blockprotocol/type-system"; +import type { VaultClient } from "@local/hash-backend-utils/vault"; +import type { LinearIntegration } from "@local/hash-isomorphic-utils/system-types/linearintegration"; +import type { UserSecret } from "@local/hash-isomorphic-utils/system-types/shared"; export type LinearUserSecret = { connectionSourceName: string; diff --git a/apps/hash-api/src/graph/knowledge/system-types/notification.ts b/apps/hash-api/src/graph/knowledge/system-types/notification.ts index 1846176fc33..ffb396c9a10 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/notification.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/notification.ts @@ -2,13 +2,8 @@ import { getOutgoingLinksForEntity, getRoots, } from "@blockprotocol/graph/stdlib"; -import type { EntityId, VersionedUrl } from "@blockprotocol/type-system"; import { EntityTypeMismatchError } from "@local/hash-backend-utils/error"; import { getWebMachineId } from "@local/hash-backend-utils/machine-actors"; -import type { - CreateEntityParameters, - HashEntity, -} from "@local/hash-graph-sdk/entity"; import { HashLinkEntity, queryEntitySubgraph, @@ -24,6 +19,24 @@ import { systemPropertyTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-properties"; + +import { createEntity, updateEntity } from "../primitive/entity"; +import { createLinkEntity } from "../primitive/link-entity"; + +import type { + ImpureGraphFunction, + PureGraphFunction, +} from "../../context-types"; +import type { Block } from "./block"; +import type { Comment } from "./comment"; +import type { Page } from "./page"; +import type { Text } from "./text"; +import type { User } from "./user"; +import type { EntityId, VersionedUrl } from "@blockprotocol/type-system"; +import type { + CreateEntityParameters, + HashEntity, +} from "@local/hash-graph-sdk/entity"; import type { ArchivedPropertyValueWithMetadata, CommentNotification as CommentNotificationEntity, @@ -38,18 +51,6 @@ import type { } from "@local/hash-isomorphic-utils/system-types/mentionnotification"; import type { Notification as NotificationEntity } from "@local/hash-isomorphic-utils/system-types/notification"; -import type { - ImpureGraphFunction, - PureGraphFunction, -} from "../../context-types"; -import { createEntity, updateEntity } from "../primitive/entity"; -import { createLinkEntity } from "../primitive/link-entity"; -import type { Block } from "./block"; -import type { Comment } from "./comment"; -import type { Page } from "./page"; -import type { Text } from "./text"; -import type { User } from "./user"; - type Notification = { archived?: boolean; entity: HashEntity; diff --git a/apps/hash-api/src/graph/knowledge/system-types/org-membership.ts b/apps/hash-api/src/graph/knowledge/system-types/org-membership.ts index 9dbb54cc669..e65c76553a5 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/org-membership.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/org-membership.ts @@ -1,34 +1,35 @@ -import type { - ActorEntityUuid, - EntityId, - EntityUuid, - UserId, -} from "@blockprotocol/type-system"; import { extractWebIdFromEntityId } from "@blockprotocol/type-system"; import { EntityTypeMismatchError } from "@local/hash-backend-utils/error"; -import type { HashLinkEntity } from "@local/hash-graph-sdk/entity"; import { addActorGroupMember, removeActorGroupMember, } from "@local/hash-graph-sdk/principal/actor-group"; import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; import { systemLinkEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { IsMemberOf } from "@local/hash-isomorphic-utils/system-types/shared"; -import type { - ImpureGraphFunction, - PureGraphFunction, -} from "../../context-types"; import { createLinkEntity, getLinkEntityLeftEntity, getLinkEntityRightEntity, } from "../primitive/link-entity"; -import type { Org } from "./org"; import { getOrgFromEntity } from "./org"; -import type { User } from "./user"; import { getUserFromEntity } from "./user"; +import type { + ImpureGraphFunction, + PureGraphFunction, +} from "../../context-types"; +import type { Org } from "./org"; +import type { User } from "./user"; +import type { + ActorEntityUuid, + EntityId, + EntityUuid, + UserId, +} from "@blockprotocol/type-system"; +import type { HashLinkEntity } from "@local/hash-graph-sdk/entity"; +import type { IsMemberOf } from "@local/hash-isomorphic-utils/system-types/shared"; + export type OrgMembership = { linkEntity: HashLinkEntity; }; diff --git a/apps/hash-api/src/graph/knowledge/system-types/org.ts b/apps/hash-api/src/graph/knowledge/system-types/org.ts index ccc7952ebc3..188e836f298 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/org.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/org.ts @@ -1,10 +1,3 @@ -import type { - ActorId, - EntityId, - MachineId, - OntologyTypeVersion, - WebId, -} from "@blockprotocol/type-system"; import { extractBaseUrl, extractWebIdFromEntityId, @@ -28,18 +21,8 @@ import { } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { validateOrgName } from "@local/hash-isomorphic-utils/organization"; import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-properties"; -import type { - Organization, - OrganizationNamePropertyValueWithMetadata, - OrganizationPropertiesWithMetadata, -} from "@local/hash-isomorphic-utils/system-types/shared"; -import type { PolicyId } from "@rust/hash-graph-authorization/types"; import { logger } from "../../../logger"; -import type { - ImpureGraphFunction, - PureGraphFunction, -} from "../../context-types"; import { systemAccountId } from "../../system-account"; import { createEntity, @@ -52,6 +35,24 @@ import { shortnameIsTaken, } from "./account.fields"; +import type { + ImpureGraphFunction, + PureGraphFunction, +} from "../../context-types"; +import type { + ActorId, + EntityId, + MachineId, + OntologyTypeVersion, + WebId, +} from "@blockprotocol/type-system"; +import type { + Organization, + OrganizationNamePropertyValueWithMetadata, + OrganizationPropertiesWithMetadata, +} from "@local/hash-isomorphic-utils/system-types/shared"; +import type { PolicyId } from "@rust/hash-graph-authorization/types"; + export type Org = { webId: WebId; orgName: string; diff --git a/apps/hash-api/src/graph/knowledge/system-types/page.ts b/apps/hash-api/src/graph/knowledge/system-types/page.ts index 9b65faf9823..5c7cb1e040b 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/page.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/page.ts @@ -1,4 +1,5 @@ -import type { EntityId, WebId } from "@blockprotocol/type-system"; +import { generateKeyBetween } from "fractional-indexing"; + import { EntityTypeMismatchError } from "@local/hash-backend-utils/error"; import { type CreateEntityParameters, @@ -19,21 +20,8 @@ import { pageEntityTypeIds, } from "@local/hash-isomorphic-utils/page-entity-type-ids"; import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-properties"; -import type { - Canvas, - FractionalIndexPropertyValueWithMetadata, - HasParent, - HasSpatiallyPositionedContent, -} from "@local/hash-isomorphic-utils/system-types/canvas"; -import type { Document } from "@local/hash-isomorphic-utils/system-types/document"; -import type { HasIndexedContent } from "@local/hash-isomorphic-utils/system-types/shared"; -import { generateKeyBetween } from "fractional-indexing"; import * as GraphQlError from "../../../graphql/error"; -import type { - ImpureGraphFunction, - PureGraphFunction, -} from "../../context-types"; import { createEntity, getEntityOutgoingLinks, @@ -44,10 +32,24 @@ import { createLinkEntity, getLinkEntityRightEntity, } from "../primitive/link-entity"; -import type { Block } from "./block"; import { getBlockComments, getBlockFromEntity } from "./block"; import { addBlockToBlockCollection } from "./block-collection"; + +import type { + ImpureGraphFunction, + PureGraphFunction, +} from "../../context-types"; +import type { Block } from "./block"; import type { Comment } from "./comment"; +import type { EntityId, WebId } from "@blockprotocol/type-system"; +import type { + Canvas, + FractionalIndexPropertyValueWithMetadata, + HasParent, + HasSpatiallyPositionedContent, +} from "@local/hash-isomorphic-utils/system-types/canvas"; +import type { Document } from "@local/hash-isomorphic-utils/system-types/document"; +import type { HasIndexedContent } from "@local/hash-isomorphic-utils/system-types/shared"; export type Page = { title: string; diff --git a/apps/hash-api/src/graph/knowledge/system-types/text.ts b/apps/hash-api/src/graph/knowledge/system-types/text.ts index 6ef78af22d7..8dcf562383e 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/text.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/text.ts @@ -1,4 +1,3 @@ -import type { EntityId } from "@blockprotocol/type-system"; import { extractEntityUuidFromEntityId } from "@blockprotocol/type-system"; import { EntityTypeMismatchError } from "@local/hash-backend-utils/error"; import { type HashEntity, queryEntities } from "@local/hash-graph-sdk/entity"; @@ -15,23 +14,25 @@ import { pageEntityTypeFilter, } from "@local/hash-isomorphic-utils/page-entity-type-ids"; import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-properties"; -import type { Text as TextEntity } from "@local/hash-isomorphic-utils/system-types/shared"; -import type { TextToken } from "@local/hash-isomorphic-utils/types"; + +import { getLatestEntityById } from "../primitive/entity"; +import { isEntityLinkEntity } from "../primitive/link-entity"; +import { getBlockById } from "./block"; +import { getCommentById } from "./comment"; +import { getPageFromEntity } from "./page"; +import { getUser } from "./user"; import type { ImpureGraphFunction, PureGraphFunction, } from "../../context-types"; -import { getLatestEntityById } from "../primitive/entity"; -import { isEntityLinkEntity } from "../primitive/link-entity"; import type { Block } from "./block"; -import { getBlockById } from "./block"; import type { Comment } from "./comment"; -import { getCommentById } from "./comment"; import type { Page } from "./page"; -import { getPageFromEntity } from "./page"; import type { User } from "./user"; -import { getUser } from "./user"; +import type { EntityId } from "@blockprotocol/type-system"; +import type { Text as TextEntity } from "@local/hash-isomorphic-utils/system-types/shared"; +import type { TextToken } from "@local/hash-isomorphic-utils/types"; export type Text = { textualContent: TextToken[]; diff --git a/apps/hash-api/src/graph/knowledge/system-types/user-secret.ts b/apps/hash-api/src/graph/knowledge/system-types/user-secret.ts index 313fa18584f..2b8928b9b3e 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/user-secret.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/user-secret.ts @@ -1,3 +1,14 @@ +import { getSecretEntitiesForIntegration } from "@local/hash-backend-utils/user-secret"; +import { createUserSecretPath } from "@local/hash-backend-utils/vault"; +import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; +import { + systemEntityTypes, + systemLinkEntityTypes, +} from "@local/hash-isomorphic-utils/ontology-type-ids"; + +import { createEntity } from "../primitive/entity"; +import { createLinkEntity } from "../primitive/link-entity"; + import type { EntityId, EntityUuid, @@ -6,25 +17,15 @@ import type { UserId, WebId, } from "@blockprotocol/type-system"; -import { getSecretEntitiesForIntegration } from "@local/hash-backend-utils/user-secret"; import type { UserSecretService, VaultClient, } from "@local/hash-backend-utils/vault"; -import { createUserSecretPath } from "@local/hash-backend-utils/vault"; import type { GraphApi } from "@local/hash-graph-client"; -import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; -import { - systemEntityTypes, - systemLinkEntityTypes, -} from "@local/hash-isomorphic-utils/ontology-type-ids"; import type { UsesUserSecret } from "@local/hash-isomorphic-utils/system-types/google/shared"; import type { UserSecret } from "@local/hash-isomorphic-utils/system-types/shared"; import type { Auth } from "googleapis"; -import { createEntity } from "../primitive/entity"; -import { createLinkEntity } from "../primitive/link-entity"; - type CreateUserSecretParams = { /** * Whether to archive all existing secrets linked from the sourceIntegrationEntityId. diff --git a/apps/hash-api/src/graph/knowledge/system-types/user.ts b/apps/hash-api/src/graph/knowledge/system-types/user.ts index 022193eb4dd..4e2eea5c1d9 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/user.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/user.ts @@ -1,4 +1,3 @@ -import type { EntityId, EntityUuid, UserId } from "@blockprotocol/type-system"; import { atLeastOne, extractBaseUrl, @@ -7,7 +6,6 @@ import { } from "@blockprotocol/type-system"; import { EntityTypeMismatchError } from "@local/hash-backend-utils/error"; import { createWebMachineActorEntity } from "@local/hash-backend-utils/machine-actors"; -import type { Filter } from "@local/hash-graph-client"; import { type HashEntity, queryEntities, @@ -26,29 +24,16 @@ import { currentTimeInstantTemporalAxes, generateVersionedUrlMatchingFilter, } from "@local/hash-isomorphic-utils/graph-queries"; -import type { PendingOrgInvitation } from "@local/hash-isomorphic-utils/graphql/api-types.gen"; import { systemEntityTypes, systemLinkEntityTypes, systemPropertyTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-properties"; -import type { - EnabledFeatureFlagsPropertyValue, - User as UserEntity, -} from "@local/hash-isomorphic-utils/system-types/user"; -import type { - KratosUserIdentity, - KratosUserIdentityTraits, -} from "../../../auth/ory-kratos"; import { kratosIdentityApi } from "../../../auth/ory-kratos"; import { getPendingOrgInvitationsFromSubgraph } from "../../../graphql/resolvers/knowledge/org/shared"; import { logger } from "../../../logger"; -import type { - ImpureGraphFunction, - PureGraphFunction, -} from "../../context-types"; import { systemAccountId } from "../../system-account"; import { createEntity, @@ -60,13 +45,29 @@ import { shortnameIsRestricted, shortnameIsTaken, } from "./account.fields"; -import type { OrgMembership } from "./org-membership"; import { createOrgMembership, getOrgMembershipFromLinkEntity, getOrgMembershipOrg, } from "./org-membership"; +import type { + KratosUserIdentity, + KratosUserIdentityTraits, +} from "../../../auth/ory-kratos"; +import type { + ImpureGraphFunction, + PureGraphFunction, +} from "../../context-types"; +import type { OrgMembership } from "./org-membership"; +import type { EntityId, EntityUuid, UserId } from "@blockprotocol/type-system"; +import type { Filter } from "@local/hash-graph-client"; +import type { PendingOrgInvitation } from "@local/hash-isomorphic-utils/graphql/api-types.gen"; +import type { + EnabledFeatureFlagsPropertyValue, + User as UserEntity, +} from "@local/hash-isomorphic-utils/system-types/user"; + export type User = { accountId: UserId; displayName?: string; diff --git a/apps/hash-api/src/graph/ontology/primitive/data-type.ts b/apps/hash-api/src/graph/ontology/primitive/data-type.ts index b45db4428bf..7480ebf2343 100644 --- a/apps/hash-api/src/graph/ontology/primitive/data-type.ts +++ b/apps/hash-api/src/graph/ontology/primitive/data-type.ts @@ -1,3 +1,14 @@ +import { + DATA_TYPE_META_SCHEMA, + ontologyTypeRecordIdToVersionedUrl, +} from "@blockprotocol/type-system"; +import { publicUserAccountId } from "@local/hash-backend-utils/public-user-account-id"; +import { hasPermissionForDataTypes } from "@local/hash-graph-sdk/data-type"; +import { generateTypeId } from "@local/hash-isomorphic-utils/ontology-types"; + +import { getWebShortname } from "./util"; + +import type { ImpureGraphFunction } from "../../context-types"; import type { BaseUrl, Conversions, @@ -9,25 +20,15 @@ import type { VersionedUrl, WebId, } from "@blockprotocol/type-system"; -import { - DATA_TYPE_META_SCHEMA, - ontologyTypeRecordIdToVersionedUrl, -} from "@blockprotocol/type-system"; -import { publicUserAccountId } from "@local/hash-backend-utils/public-user-account-id"; import type { ArchiveDataTypeParams, UnarchiveDataTypeParams, } from "@local/hash-graph-client"; import type { UserPermissionsOnDataType } from "@local/hash-graph-sdk/authorization"; -import { hasPermissionForDataTypes } from "@local/hash-graph-sdk/data-type"; import type { ConstructDataTypeParams, DataTypeDirectConversionsMap, } from "@local/hash-graph-sdk/ontology"; -import { generateTypeId } from "@local/hash-isomorphic-utils/ontology-types"; - -import type { ImpureGraphFunction } from "../../context-types"; -import { getWebShortname } from "./util"; /** * Create a data type. diff --git a/apps/hash-api/src/graph/ontology/primitive/entity-type.ts b/apps/hash-api/src/graph/ontology/primitive/entity-type.ts index 4270d41d1f9..f06d4001854 100644 --- a/apps/hash-api/src/graph/ontology/primitive/entity-type.ts +++ b/apps/hash-api/src/graph/ontology/primitive/entity-type.ts @@ -1,3 +1,20 @@ +import { + ENTITY_TYPE_META_SCHEMA, + ontologyTypeRecordIdToVersionedUrl, +} from "@blockprotocol/type-system"; +import { NotFoundError } from "@local/hash-backend-utils/error"; +import { publicUserAccountId } from "@local/hash-backend-utils/public-user-account-id"; +import { + getEntityTypeById, + hasPermissionForEntityTypes, +} from "@local/hash-graph-sdk/entity-type"; +import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; +import { blockProtocolEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; +import { generateTypeId } from "@local/hash-isomorphic-utils/ontology-types"; + +import { getWebShortname } from "./util"; + +import type { ImpureGraphFunction } from "../../context-types"; import type { EntityType, EntityTypeMetadata, @@ -8,29 +25,13 @@ import type { VersionedUrl, WebId, } from "@blockprotocol/type-system"; -import { - ENTITY_TYPE_META_SCHEMA, - ontologyTypeRecordIdToVersionedUrl, -} from "@blockprotocol/type-system"; -import { NotFoundError } from "@local/hash-backend-utils/error"; -import { publicUserAccountId } from "@local/hash-backend-utils/public-user-account-id"; import type { ArchiveEntityTypeParams, UnarchiveEntityTypeParams, UpdateEntityTypeRequest, } from "@local/hash-graph-client"; import type { UserPermissionsOnEntityType } from "@local/hash-graph-sdk/authorization"; -import { - getEntityTypeById, - hasPermissionForEntityTypes, -} from "@local/hash-graph-sdk/entity-type"; import type { ConstructEntityTypeParams } from "@local/hash-graph-sdk/ontology"; -import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; -import { blockProtocolEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import { generateTypeId } from "@local/hash-isomorphic-utils/ontology-types"; - -import type { ImpureGraphFunction } from "../../context-types"; -import { getWebShortname } from "./util"; export const checkPermissionsOnEntityType: ImpureGraphFunction< { entityTypeId: VersionedUrl }, diff --git a/apps/hash-api/src/graph/ontology/primitive/property-type.ts b/apps/hash-api/src/graph/ontology/primitive/property-type.ts index 498bd5b4caa..7a33c815b3b 100644 --- a/apps/hash-api/src/graph/ontology/primitive/property-type.ts +++ b/apps/hash-api/src/graph/ontology/primitive/property-type.ts @@ -1,3 +1,12 @@ +import { + ontologyTypeRecordIdToVersionedUrl, + PROPERTY_TYPE_META_SCHEMA, +} from "@blockprotocol/type-system"; +import { generateTypeId } from "@local/hash-isomorphic-utils/ontology-types"; + +import { getWebShortname } from "./util"; + +import type { ImpureGraphFunction } from "../../context-types"; import type { OntologyTemporalMetadata, OntologyTypeRecordId, @@ -7,20 +16,12 @@ import type { VersionedUrl, WebId, } from "@blockprotocol/type-system"; -import { - ontologyTypeRecordIdToVersionedUrl, - PROPERTY_TYPE_META_SCHEMA, -} from "@blockprotocol/type-system"; import type { ArchivePropertyTypeParams, UnarchivePropertyTypeParams, UpdatePropertyTypeRequest, } from "@local/hash-graph-client"; import type { ConstructPropertyTypeParams } from "@local/hash-graph-sdk/ontology"; -import { generateTypeId } from "@local/hash-isomorphic-utils/ontology-types"; - -import type { ImpureGraphFunction } from "../../context-types"; -import { getWebShortname } from "./util"; /** * Create a property type. diff --git a/apps/hash-api/src/graph/ontology/primitive/util.ts b/apps/hash-api/src/graph/ontology/primitive/util.ts index 04682e4e52d..913ebe2d7a8 100644 --- a/apps/hash-api/src/graph/ontology/primitive/util.ts +++ b/apps/hash-api/src/graph/ontology/primitive/util.ts @@ -1,9 +1,9 @@ -import type { VersionedUrl, WebId } from "@blockprotocol/type-system"; import { getWebById } from "@local/hash-graph-sdk/principal/web"; import { frontendUrl } from "@local/hash-isomorphic-utils/environment"; import { isSelfHostedInstance } from "@local/hash-isomorphic-utils/instance"; import type { ImpureGraphFunction } from "../../context-types"; +import type { VersionedUrl, WebId } from "@blockprotocol/type-system"; export const isExternalTypeId = (typeId: VersionedUrl) => !typeId.startsWith(frontendUrl) && diff --git a/apps/hash-api/src/graph/system-account.ts b/apps/hash-api/src/graph/system-account.ts index 3ded8563642..d517ff25e1d 100644 --- a/apps/hash-api/src/graph/system-account.ts +++ b/apps/hash-api/src/graph/system-account.ts @@ -1,8 +1,7 @@ +import type { ImpureGraphContext } from "./context-types"; import type { MachineId } from "@blockprotocol/type-system"; import type { Logger } from "@local/hash-backend-utils/logger"; -import type { ImpureGraphContext } from "./context-types"; - // eslint-disable-next-line import/no-mutable-exports export let systemAccountId: MachineId; diff --git a/apps/hash-api/src/graphql/context.ts b/apps/hash-api/src/graphql/context.ts index 253f450fca6..e8448430b4b 100644 --- a/apps/hash-api/src/graphql/context.ts +++ b/apps/hash-api/src/graphql/context.ts @@ -1,3 +1,6 @@ +import type { EmailTransporter } from "../email/transporters"; +import type { GraphApi } from "../graph/context-types"; +import type { User } from "../graph/knowledge/system-types/user"; import type { ProvidedEntityEditionProvenance } from "@blockprotocol/type-system"; import type { FileStorageProvider } from "@local/hash-backend-utils/file-storage"; import type { Logger } from "@local/hash-backend-utils/logger"; @@ -5,10 +8,6 @@ import type { TemporalClient } from "@local/hash-backend-utils/temporal"; import type { VaultClient } from "@local/hash-backend-utils/vault"; import type { AuthenticationContext } from "@local/hash-graph-sdk/authentication-context"; -import type { EmailTransporter } from "../email/transporters"; -import type { GraphApi } from "../graph/context-types"; -import type { User } from "../graph/knowledge/system-types/user"; - /** * Apollo context object with dataSources. For details see: * https://www.apollographql.com/docs/apollo-server/data/data-sources/ diff --git a/apps/hash-api/src/graphql/create-apollo-server.ts b/apps/hash-api/src/graphql/create-apollo-server.ts index 372247b9b4f..dbef03b36ac 100644 --- a/apps/hash-api/src/graphql/create-apollo-server.ts +++ b/apps/hash-api/src/graphql/create-apollo-server.ts @@ -1,4 +1,3 @@ -import type { Server } from "node:http"; import { performance } from "node:perf_hooks"; import { ApolloServer, type ApolloServerPlugin } from "@apollo/server"; @@ -10,25 +9,28 @@ import { import { KeyvAdapter } from "@apollo/utils.keyvadapter"; import { expressMiddleware } from "@as-integrations/express5"; import { makeExecutableSchema } from "@graphql-tools/schema"; -import type { FileStorageProvider } from "@local/hash-backend-utils/file-storage"; -import type { Logger } from "@local/hash-backend-utils/logger"; -import type { TemporalClient } from "@local/hash-backend-utils/temporal"; -import type { VaultClient } from "@local/hash-backend-utils/vault"; +import * as Sentry from "@sentry/node"; + import { schema } from "@local/hash-isomorphic-utils/graphql/type-defs/schema"; import { getHashClientTypeFromRequest, hashClientHeaderKey, } from "@local/hash-isomorphic-utils/http-requests"; -import * as Sentry from "@sentry/node"; -import type { StatsD } from "hot-shots"; -import type Keyv from "keyv"; import { getActorIdFromRequest } from "../auth/get-actor-id"; +import { isProdEnv } from "../lib/env-config"; +import { resolvers } from "./resolvers"; + import type { EmailTransporter } from "../email/transporters"; import type { GraphApi } from "../graph/context-types"; -import { isProdEnv } from "../lib/env-config"; import type { GraphQLContext } from "./context"; -import { resolvers } from "./resolvers"; +import type { FileStorageProvider } from "@local/hash-backend-utils/file-storage"; +import type { Logger } from "@local/hash-backend-utils/logger"; +import type { TemporalClient } from "@local/hash-backend-utils/temporal"; +import type { VaultClient } from "@local/hash-backend-utils/vault"; +import type { StatsD } from "hot-shots"; +import type Keyv from "keyv"; +import type { Server } from "node:http"; const statsPlugin = ({ statsd, diff --git a/apps/hash-api/src/graphql/resolvers/blockprotocol/get-block.ts b/apps/hash-api/src/graphql/resolvers/blockprotocol/get-block.ts index 8fe2f17e121..384234d6eff 100644 --- a/apps/hash-api/src/graphql/resolvers/blockprotocol/get-block.ts +++ b/apps/hash-api/src/graphql/resolvers/blockprotocol/get-block.ts @@ -1,8 +1,9 @@ import { blockProtocolHubOrigin } from "@local/hash-isomorphic-utils/blocks-constants"; +import * as Error from "../../error"; + import type { BlockProtocolBlock, ResolverFn } from "../../api-types.gen"; import type { GraphQLContext } from "../../context"; -import * as Error from "../../error"; export const getBlockProtocolBlocksResolver: ResolverFn< BlockProtocolBlock[], diff --git a/apps/hash-api/src/graphql/resolvers/embed/index.ts b/apps/hash-api/src/graphql/resolvers/embed/index.ts index ad90d5ec555..25a7508d107 100644 --- a/apps/hash-api/src/graphql/resolvers/embed/index.ts +++ b/apps/hash-api/src/graphql/resolvers/embed/index.ts @@ -1,6 +1,8 @@ import oEmbedData from "oembed-providers/providers.json"; import sanitizeHtml from "sanitize-html"; +import * as Error from "../../error"; + import type { Embed, Maybe, @@ -8,7 +10,6 @@ import type { ResolverFn, } from "../../api-types.gen"; import type { GraphQLContext } from "../../context"; -import * as Error from "../../error"; /** * Sanitize oEmbed HTML to prevent XSS from third-party providers. diff --git a/apps/hash-api/src/graphql/resolvers/flows/cancel-flow.ts b/apps/hash-api/src/graphql/resolvers/flows/cancel-flow.ts index 24db3d40580..c1792600628 100644 --- a/apps/hash-api/src/graphql/resolvers/flows/cancel-flow.ts +++ b/apps/hash-api/src/graphql/resolvers/flows/cancel-flow.ts @@ -1,12 +1,13 @@ -import type { EntityUuid } from "@blockprotocol/type-system"; import { getFlowRunEntityById } from "@local/hash-backend-utils/flows"; import { temporalNamespace } from "@local/hash-backend-utils/temporal"; import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; import { checkEntityPermission } from "../../../graph/knowledge/primitive/entity"; +import * as Error from "../../error"; + import type { MutationResetFlowArgs, ResolverFn } from "../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../context"; -import * as Error from "../../error"; +import type { EntityUuid } from "@blockprotocol/type-system"; export const cancelFlow: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/flows/flow-schedule.ts b/apps/hash-api/src/graphql/resolvers/flows/flow-schedule.ts index 737de5c23c2..614791aa478 100644 --- a/apps/hash-api/src/graphql/resolvers/flows/flow-schedule.ts +++ b/apps/hash-api/src/graphql/resolvers/flows/flow-schedule.ts @@ -1,11 +1,11 @@ +import { ScheduleNotFoundError } from "@temporalio/client"; + import { extractEntityUuidFromEntityId } from "@blockprotocol/type-system"; import { defaultScheduleCatchupWindowMs, scheduleSpecToTemporalSpec, } from "@local/hash-isomorphic-utils/flows/schedule-types"; -import type { RunFlowWorkflowParams } from "@local/hash-isomorphic-utils/flows/temporal-types"; import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-properties"; -import { ScheduleNotFoundError } from "@temporalio/client"; import { createFlowSchedule as createFlowScheduleEntity, @@ -16,6 +16,9 @@ import { revertFlowScheduleResume, updateFlowSchedule as updateFlowScheduleEntity, } from "../../../graph/knowledge/system-types/flow-schedule"; +import * as GraphQLError from "../../error"; +import { graphQLContextToImpureGraphContext } from "../util"; + import type { Mutation, MutationArchiveFlowScheduleArgs, @@ -26,8 +29,7 @@ import type { ResolverFn, } from "../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../context"; -import * as GraphQLError from "../../error"; -import { graphQLContextToImpureGraphContext } from "../util"; +import type { RunFlowWorkflowParams } from "@local/hash-isomorphic-utils/flows/temporal-types"; export const createFlowScheduleResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/flows/get-flow-run-by-id.ts b/apps/hash-api/src/graphql/resolvers/flows/get-flow-run-by-id.ts index ec1a00992ae..0e647e13cbd 100644 --- a/apps/hash-api/src/graphql/resolvers/flows/get-flow-run-by-id.ts +++ b/apps/hash-api/src/graphql/resolvers/flows/get-flow-run-by-id.ts @@ -1,6 +1,7 @@ -import type { EntityUuid } from "@blockprotocol/type-system"; import { getFlowRunById } from "@local/hash-backend-utils/flows"; -import type { SparseFlowRun } from "@local/hash-isomorphic-utils/flows/types"; + +import * as Error from "../../error"; +import { wereDetailedFieldsRequested } from "./shared/were-detailed-fields-requested"; import type { FlowRun, @@ -8,8 +9,8 @@ import type { ResolverFn, } from "../../api-types.gen"; import type { GraphQLContext } from "../../context"; -import * as Error from "../../error"; -import { wereDetailedFieldsRequested } from "./shared/were-detailed-fields-requested"; +import type { EntityUuid } from "@blockprotocol/type-system"; +import type { SparseFlowRun } from "@local/hash-isomorphic-utils/flows/types"; export const getFlowRunByIdResolver: ResolverFn< FlowRun | SparseFlowRun, diff --git a/apps/hash-api/src/graphql/resolvers/flows/get-flow-runs.ts b/apps/hash-api/src/graphql/resolvers/flows/get-flow-runs.ts index 8f9a8a0b898..8d27ac2f0e2 100644 --- a/apps/hash-api/src/graphql/resolvers/flows/get-flow-runs.ts +++ b/apps/hash-api/src/graphql/resolvers/flows/get-flow-runs.ts @@ -1,5 +1,6 @@ import { getFlowRuns } from "@local/hash-backend-utils/flows"; -import type { SparseFlowRun } from "@local/hash-isomorphic-utils/flows/types"; + +import { wereDetailedFieldsRequested } from "./shared/were-detailed-fields-requested"; import type { FlowRun, @@ -7,7 +8,7 @@ import type { ResolverFn, } from "../../api-types.gen"; import type { GraphQLContext } from "../../context"; -import { wereDetailedFieldsRequested } from "./shared/were-detailed-fields-requested"; +import type { SparseFlowRun } from "@local/hash-isomorphic-utils/flows/types"; export const getFlowRunsResolver: ResolverFn< { diff --git a/apps/hash-api/src/graphql/resolvers/flows/reset-flow.ts b/apps/hash-api/src/graphql/resolvers/flows/reset-flow.ts index de63a8ab860..f5811ba8003 100644 --- a/apps/hash-api/src/graphql/resolvers/flows/reset-flow.ts +++ b/apps/hash-api/src/graphql/resolvers/flows/reset-flow.ts @@ -1,14 +1,16 @@ -import type { EntityUuid } from "@blockprotocol/type-system"; +import proto from "@temporalio/proto"; +import Long from "long"; + import { getFlowRunEntityById } from "@local/hash-backend-utils/flows"; import { temporalNamespace } from "@local/hash-backend-utils/temporal"; import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; -import proto from "@temporalio/proto"; -import Long from "long"; import { checkEntityPermission } from "../../../graph/knowledge/primitive/entity"; +import * as Error from "../../error"; + import type { MutationResetFlowArgs, ResolverFn } from "../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../context"; -import * as Error from "../../error"; +import type { EntityUuid } from "@blockprotocol/type-system"; export const resetFlow: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/flows/shared/were-detailed-fields-requested.ts b/apps/hash-api/src/graphql/resolvers/flows/shared/were-detailed-fields-requested.ts index 233bd87f3c6..7876e1d4a40 100644 --- a/apps/hash-api/src/graphql/resolvers/flows/shared/were-detailed-fields-requested.ts +++ b/apps/hash-api/src/graphql/resolvers/flows/shared/were-detailed-fields-requested.ts @@ -1,8 +1,10 @@ -import type { DetailedFlowField } from "@local/hash-isomorphic-utils/flows/types"; +import { parseResolveInfo } from "graphql-parse-resolve-info"; + import { detailedFlowFields } from "@local/hash-isomorphic-utils/flows/types"; + +import type { DetailedFlowField } from "@local/hash-isomorphic-utils/flows/types"; import type { GraphQLResolveInfo } from "graphql"; import type { ResolveTree } from "graphql-parse-resolve-info"; -import { parseResolveInfo } from "graphql-parse-resolve-info"; /** * Works for both `getFlowRuns` (returns `PaginatedFlowRuns` wrapping `FlowRun`) diff --git a/apps/hash-api/src/graphql/resolvers/flows/start-flow.ts b/apps/hash-api/src/graphql/resolvers/flows/start-flow.ts index e939ce21f96..492619419c8 100644 --- a/apps/hash-api/src/graphql/resolvers/flows/start-flow.ts +++ b/apps/hash-api/src/graphql/resolvers/flows/start-flow.ts @@ -1,8 +1,3 @@ -import type { EntityUuid } from "@blockprotocol/type-system"; -import type { - RunFlowWorkflowParams, - RunFlowWorkflowResponse, -} from "@local/hash-isomorphic-utils/flows/temporal-types"; import { validateFlowDefinition } from "@local/hash-isomorphic-utils/flows/util"; import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; @@ -10,9 +5,15 @@ import { type MutationStartFlowArgs, type ResolverFn, } from "../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../context"; import * as Error from "../../error"; +import type { LoggedInGraphQLContext } from "../../context"; +import type { EntityUuid } from "@blockprotocol/type-system"; +import type { + RunFlowWorkflowParams, + RunFlowWorkflowResponse, +} from "@local/hash-isomorphic-utils/flows/temporal-types"; + export const startFlow: ResolverFn< Promise, Record, diff --git a/apps/hash-api/src/graphql/resolvers/flows/submit-external-input-response.ts b/apps/hash-api/src/graphql/resolvers/flows/submit-external-input-response.ts index 8cb9ccfd94f..91ddb0ed5f6 100644 --- a/apps/hash-api/src/graphql/resolvers/flows/submit-external-input-response.ts +++ b/apps/hash-api/src/graphql/resolvers/flows/submit-external-input-response.ts @@ -1,13 +1,14 @@ -import type { EntityUuid } from "@blockprotocol/type-system"; import { getFlowRunEntityById } from "@local/hash-backend-utils/flows"; import { externalInputResponseSignal } from "@local/hash-isomorphic-utils/flows/signals"; +import * as Error from "../../error"; + import type { MutationSubmitExternalInputResponseArgs, ResolverFn, } from "../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../context"; -import * as Error from "../../error"; +import type { EntityUuid } from "@blockprotocol/type-system"; export const submitExternalInputResponse: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/generation/generate-inverse.ts b/apps/hash-api/src/graphql/resolvers/generation/generate-inverse.ts index 496a7a0d53f..a149809841a 100644 --- a/apps/hash-api/src/graphql/resolvers/generation/generate-inverse.ts +++ b/apps/hash-api/src/graphql/resolvers/generation/generate-inverse.ts @@ -1,10 +1,11 @@ import { backOff } from "exponential-backoff"; -import type { QueryGenerateInverseArgs, ResolverFn } from "../../api-types.gen"; -import type { GraphQLContext } from "../../context"; import * as Error from "../../error"; import { getOpenAiClient } from "./shared/openai-client"; +import type { QueryGenerateInverseArgs, ResolverFn } from "../../api-types.gen"; +import type { GraphQLContext } from "../../context"; + const generatePrompt = (relationship: string): string => ` You are building the ontology for a knowledge graph. You have a directed relationship between two nodes called "${relationship}". diff --git a/apps/hash-api/src/graphql/resolvers/generation/generate-plural.ts b/apps/hash-api/src/graphql/resolvers/generation/generate-plural.ts index 8d329517bc9..d0388331207 100644 --- a/apps/hash-api/src/graphql/resolvers/generation/generate-plural.ts +++ b/apps/hash-api/src/graphql/resolvers/generation/generate-plural.ts @@ -1,10 +1,11 @@ import { backOff } from "exponential-backoff"; -import type { QueryGeneratePluralArgs, ResolverFn } from "../../api-types.gen"; -import type { GraphQLContext } from "../../context"; import * as Error from "../../error"; import { getOpenAiClient } from "./shared/openai-client"; +import type { QueryGeneratePluralArgs, ResolverFn } from "../../api-types.gen"; +import type { GraphQLContext } from "../../context"; + const generatePrompt = (type: string): string => ` You are building the ontology for a knowledge graph. diff --git a/apps/hash-api/src/graphql/resolvers/generation/is-generation-available.ts b/apps/hash-api/src/graphql/resolvers/generation/is-generation-available.ts index 0adddb4eb59..2b6f441d59a 100644 --- a/apps/hash-api/src/graphql/resolvers/generation/is-generation-available.ts +++ b/apps/hash-api/src/graphql/resolvers/generation/is-generation-available.ts @@ -1,11 +1,11 @@ -import type OpenAI from "openai"; +import { getOpenAiClient } from "./shared/openai-client"; import type { IsGenerationAvailableResponse, ResolverFn, } from "../../api-types.gen"; import type { GraphQLContext } from "../../context"; -import { getOpenAiClient } from "./shared/openai-client"; +import type OpenAI from "openai"; export const isGenerationAvailableResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/index.ts b/apps/hash-api/src/graphql/resolvers/index.ts index f3806010fe4..1dbfa76322a 100644 --- a/apps/hash-api/src/graphql/resolvers/index.ts +++ b/apps/hash-api/src/graphql/resolvers/index.ts @@ -1,12 +1,5 @@ import { JSONObjectResolver } from "graphql-scalars"; -import type { - EntityAuthorizationSubject, - MutationResolvers, - PendingOrgInvitation, - QueryResolvers, - Resolvers, -} from "../api-types.gen"; import { getBlockProtocolBlocksResolver } from "./blockprotocol/get-block"; import { embedCode } from "./embed"; import { cancelFlow } from "./flows/cancel-flow"; @@ -114,6 +107,14 @@ import { updatePropertyTypeResolver, } from "./ontology/property-type"; +import type { + EntityAuthorizationSubject, + MutationResolvers, + PendingOrgInvitation, + QueryResolvers, + Resolvers, +} from "../api-types.gen"; + export const resolvers: Omit & { Query: Required; Mutation: Required; diff --git a/apps/hash-api/src/graphql/resolvers/integrations/linear/linear-organization.ts b/apps/hash-api/src/graphql/resolvers/integrations/linear/linear-organization.ts index fd9cbd855d7..2d6f0d6bd63 100644 --- a/apps/hash-api/src/graphql/resolvers/integrations/linear/linear-organization.ts +++ b/apps/hash-api/src/graphql/resolvers/integrations/linear/linear-organization.ts @@ -1,12 +1,13 @@ import { getLinearUserSecretByLinearOrgId } from "../../../../graph/knowledge/system-types/linear-user-secret"; import { getOrganization, listTeams } from "../../../../integrations/linear"; +import { graphQLContextToImpureGraphContext } from "../../util"; + import type { LinearOrganization, QueryGetLinearOrganizationArgs, ResolverFn, } from "../../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; export const getLinearOrganizationResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/integrations/linear/sync-linear-integration-with-webs.ts b/apps/hash-api/src/graphql/resolvers/integrations/linear/sync-linear-integration-with-webs.ts index ba7a2382224..e80fa40c843 100644 --- a/apps/hash-api/src/graphql/resolvers/integrations/linear/sync-linear-integration-with-webs.ts +++ b/apps/hash-api/src/graphql/resolvers/integrations/linear/sync-linear-integration-with-webs.ts @@ -1,8 +1,3 @@ -import type { - ActorEntityUuid, - Entity, - WebId, -} from "@blockprotocol/type-system"; import { extractEntityUuidFromEntityId, extractWebIdFromEntityId, @@ -20,12 +15,18 @@ import { } from "../../../../graph/knowledge/system-types/linear-integration-entity"; import { getLinearUserSecretByLinearOrgId } from "../../../../graph/knowledge/system-types/linear-user-secret"; import { Linear } from "../../../../integrations/linear"; +import { graphQLContextToImpureGraphContext } from "../../util"; + import type { MutationSyncLinearIntegrationWithWebsArgs, ResolverFn, } from "../../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; +import type { + ActorEntityUuid, + Entity, + WebId, +} from "@blockprotocol/type-system"; export const syncLinearIntegrationWithWebsMutation: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/block-collection/block-collection-contents.ts b/apps/hash-api/src/graphql/resolvers/knowledge/block-collection/block-collection-contents.ts index afb9a3b0e80..7550d253a64 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/block-collection/block-collection-contents.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/block-collection/block-collection-contents.ts @@ -1,14 +1,14 @@ -import type { Entity } from "@blockprotocol/type-system"; -import type { HashLinkEntity } from "@local/hash-graph-sdk/entity"; -import type { HasSpatiallyPositionedContent } from "@local/hash-isomorphic-utils/system-types/canvas"; -import type { HasIndexedContent } from "@local/hash-isomorphic-utils/system-types/shared"; - import { getBlockCollectionBlocks } from "../../../../graph/knowledge/system-types/block-collection"; +import { graphQLContextToImpureGraphContext } from "../../util"; +import { mapBlockToGQL } from "../graphql-mapping"; + import type { ResolverFn } from "../../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; import type { UnresolvedBlockGQL } from "../graphql-mapping"; -import { mapBlockToGQL } from "../graphql-mapping"; +import type { Entity } from "@blockprotocol/type-system"; +import type { HashLinkEntity } from "@local/hash-graph-sdk/entity"; +import type { HasSpatiallyPositionedContent } from "@local/hash-isomorphic-utils/system-types/canvas"; +import type { HasIndexedContent } from "@local/hash-isomorphic-utils/system-types/shared"; export const blockCollectionContents: ResolverFn< { diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/block-collection/update-block-collection-actions.ts b/apps/hash-api/src/graphql/resolvers/knowledge/block-collection/update-block-collection-actions.ts index 50a8ff1f9a8..c248436d8db 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/block-collection/update-block-collection-actions.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/block-collection/update-block-collection-actions.ts @@ -1,30 +1,25 @@ import { ApolloServerErrorCode } from "@apollo/server/errors"; -import type { - Entity, - EntityId, - PropertyPatchOperation, - VersionedUrl, - WebId, -} from "@blockprotocol/type-system"; -import { typedEntries } from "@local/advanced-types/typed-entries"; -import type { AuthenticationContext } from "@local/hash-graph-sdk/authentication-context"; -import { mergePropertiesAndMetadata } from "@local/hash-graph-sdk/entity"; import { GraphQLError } from "graphql"; import { produce } from "immer"; -import type { ImpureGraphContext } from "../../../../graph/context-types"; -import type { PropertyValue } from "../../../../graph/knowledge/primitive/entity"; +import { typedEntries } from "@local/advanced-types/typed-entries"; +import { mergePropertiesAndMetadata } from "@local/hash-graph-sdk/entity"; + import { createEntityWithLinks, getLatestEntityById, updateEntity, } from "../../../../graph/knowledge/primitive/entity"; -import type { Block } from "../../../../graph/knowledge/system-types/block"; import { createBlock, getBlockById, updateBlockDataEntity, } from "../../../../graph/knowledge/system-types/block"; +import * as Error from "../../../error"; + +import type { ImpureGraphContext } from "../../../../graph/context-types"; +import type { PropertyValue } from "../../../../graph/knowledge/primitive/entity"; +import type { Block } from "../../../../graph/knowledge/system-types/block"; import type { User } from "../../../../graph/knowledge/system-types/user"; import type { CreateEntityAction, @@ -34,7 +29,14 @@ import type { UpdateBlockCollectionAction, UpdateEntityAction, } from "../../../api-types.gen"; -import * as Error from "../../../error"; +import type { + Entity, + EntityId, + PropertyPatchOperation, + VersionedUrl, + WebId, +} from "@blockprotocol/type-system"; +import type { AuthenticationContext } from "@local/hash-graph-sdk/authentication-context"; export const createEntityWithPlaceholdersFn = ( diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/block-collection/update-block-collection-contents.ts b/apps/hash-api/src/graphql/resolvers/knowledge/block-collection/update-block-collection-contents.ts index 74ecc11cd34..9f850d63040 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/block-collection/update-block-collection-contents.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/block-collection/update-block-collection-contents.ts @@ -1,5 +1,3 @@ -import type { Entity } from "@blockprotocol/type-system"; - import { getLatestEntityById } from "../../../../graph/knowledge/primitive/entity"; import { addBlockToBlockCollection, @@ -7,12 +5,6 @@ import { removeBlockFromBlockCollection, } from "../../../../graph/knowledge/system-types/block-collection"; import { exactlyOne } from "../../../../util"; -import type { - MutationUpdateBlockCollectionContentsArgs, - ResolverFn, - UpdateBlockCollectionContentsResult, -} from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; import * as Error from "../../../error"; import { graphQLContextToImpureGraphContext } from "../../util"; import { @@ -25,6 +17,14 @@ import { PlaceholderResultsMap, } from "./update-block-collection-actions"; +import type { + MutationUpdateBlockCollectionContentsArgs, + ResolverFn, + UpdateBlockCollectionContentsResult, +} from "../../../api-types.gen"; +import type { LoggedInGraphQLContext } from "../../../context"; +import type { Entity } from "@blockprotocol/type-system"; + /** * @todo This operation should ideally be atomic in nature, either we do all * updates or none. currently there is no guarantee that a failure rolls back diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/block/block.ts b/apps/hash-api/src/graphql/resolvers/knowledge/block/block.ts index 67538bca43f..1781a2f2b35 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/block/block.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/block/block.ts @@ -1,7 +1,8 @@ import { getBlockById } from "../../../../graph/knowledge/system-types/block"; +import { graphQLContextToImpureGraphContext } from "../../util"; + import type { QueryBlocksArgs, ResolverFn } from "../../../api-types.gen"; import type { GraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; import type { UnresolvedBlockGQL } from "../graphql-mapping"; export const blocksResolver: ResolverFn< diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/block/data-entity.ts b/apps/hash-api/src/graphql/resolvers/knowledge/block/data-entity.ts index 49243c277de..ad62bc6f12a 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/block/data-entity.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/block/data-entity.ts @@ -1,13 +1,13 @@ -import type { SerializedEntity } from "@local/hash-graph-sdk/entity"; - import { getBlockById, getBlockData, } from "../../../../graph/knowledge/system-types/block"; +import { graphQLContextToImpureGraphContext } from "../../util"; + import type { ResolverFn } from "../../../api-types.gen"; import type { GraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; import type { UnresolvedBlockGQL } from "../graphql-mapping"; +import type { SerializedEntity } from "@local/hash-graph-sdk/entity"; export const blockChildEntityResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/comment/author.ts b/apps/hash-api/src/graphql/resolvers/knowledge/comment/author.ts index eec16745ade..e94d5b43a28 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/comment/author.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/comment/author.ts @@ -1,10 +1,10 @@ -import type { SerializedEntity } from "@local/hash-graph-sdk/entity"; - import { getCommentAuthor } from "../../../../graph/knowledge/system-types/comment"; +import { graphQLContextToImpureGraphContext } from "../../util"; + import type { ResolverFn } from "../../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; import type { UnresolvedCommentGQL } from "../graphql-mapping"; +import type { SerializedEntity } from "@local/hash-graph-sdk/entity"; export const commentAuthorResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/comment/comment.ts b/apps/hash-api/src/graphql/resolvers/knowledge/comment/comment.ts index e6996d6105e..dac2af85ec1 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/comment/comment.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/comment/comment.ts @@ -1,14 +1,15 @@ import { extractWebIdFromEntityId } from "@blockprotocol/type-system"; import { createComment } from "../../../../graph/knowledge/system-types/comment"; +import { graphQLContextToImpureGraphContext } from "../../util"; +import { mapCommentToGQL } from "../graphql-mapping"; + import type { MutationCreateCommentArgs, ResolverFn, } from "../../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; import type { UnresolvedCommentGQL } from "../graphql-mapping"; -import { mapCommentToGQL } from "../graphql-mapping"; export const createCommentResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/comment/delete.ts b/apps/hash-api/src/graphql/resolvers/knowledge/comment/delete.ts index af3c769c648..d0413502960 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/comment/delete.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/comment/delete.ts @@ -2,14 +2,15 @@ import { deleteComment, getCommentById, } from "../../../../graph/knowledge/system-types/comment"; +import { graphQLContextToImpureGraphContext } from "../../util"; +import { mapCommentToGQL } from "../graphql-mapping"; + import type { MutationDeleteCommentArgs, ResolverFn, } from "../../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; import type { UnresolvedCommentGQL } from "../graphql-mapping"; -import { mapCommentToGQL } from "../graphql-mapping"; export const deleteCommentResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/comment/has-text.ts b/apps/hash-api/src/graphql/resolvers/knowledge/comment/has-text.ts index 61b18eff06d..724046750b6 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/comment/has-text.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/comment/has-text.ts @@ -1,10 +1,10 @@ -import type { TextToken } from "@local/hash-isomorphic-utils/types"; - import { getCommentText } from "../../../../graph/knowledge/system-types/comment"; +import { graphQLContextToImpureGraphContext } from "../../util"; + import type { ResolverFn } from "../../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; import type { UnresolvedCommentGQL } from "../graphql-mapping"; +import type { TextToken } from "@local/hash-isomorphic-utils/types"; export const commentHasTextResolver: ResolverFn< TextToken[], diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/comment/parent.ts b/apps/hash-api/src/graphql/resolvers/knowledge/comment/parent.ts index 3404ac698c5..3771dbacc1a 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/comment/parent.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/comment/parent.ts @@ -1,10 +1,10 @@ -import type { SerializedEntity } from "@local/hash-graph-sdk/entity"; - import { getCommentParent } from "../../../../graph/knowledge/system-types/comment"; +import { graphQLContextToImpureGraphContext } from "../../util"; + import type { ResolverFn } from "../../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; import type { UnresolvedCommentGQL } from "../graphql-mapping"; +import type { SerializedEntity } from "@local/hash-graph-sdk/entity"; export const commentParentResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/comment/replies.ts b/apps/hash-api/src/graphql/resolvers/knowledge/comment/replies.ts index e4cee3cb2e8..a3e563bae7d 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/comment/replies.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/comment/replies.ts @@ -1,9 +1,10 @@ import { getCommentReplies } from "../../../../graph/knowledge/system-types/comment"; +import { graphQLContextToImpureGraphContext } from "../../util"; +import { mapCommentToGQL } from "../graphql-mapping"; + import type { ResolverFn } from "../../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; import type { UnresolvedCommentGQL } from "../graphql-mapping"; -import { mapCommentToGQL } from "../graphql-mapping"; export const commentRepliesResolver: ResolverFn< UnresolvedCommentGQL[], diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/comment/resolve.ts b/apps/hash-api/src/graphql/resolvers/knowledge/comment/resolve.ts index d60a8a5e231..f14b4876f80 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/comment/resolve.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/comment/resolve.ts @@ -2,14 +2,15 @@ import { getCommentById, resolveComment, } from "../../../../graph/knowledge/system-types/comment"; +import { graphQLContextToImpureGraphContext } from "../../util"; +import { mapCommentToGQL } from "../graphql-mapping"; + import type { MutationResolveCommentArgs, ResolverFn, } from "../../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; import type { UnresolvedCommentGQL } from "../graphql-mapping"; -import { mapCommentToGQL } from "../graphql-mapping"; export const resolveCommentResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/comment/text-updated-at.ts b/apps/hash-api/src/graphql/resolvers/knowledge/comment/text-updated-at.ts index d523f3642fa..8d6bca8811e 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/comment/text-updated-at.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/comment/text-updated-at.ts @@ -1,7 +1,8 @@ import { getCommentText } from "../../../../graph/knowledge/system-types/comment"; +import { graphQLContextToImpureGraphContext } from "../../util"; + import type { CommentResolvers } from "../../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; export const commentTextUpdatedAtResolver: CommentResolvers["textUpdatedAt"] = async ({ metadata }, _, graphQLContext) => { diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/comment/update-text.ts b/apps/hash-api/src/graphql/resolvers/knowledge/comment/update-text.ts index 92bf7194aae..89961872a54 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/comment/update-text.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/comment/update-text.ts @@ -2,14 +2,15 @@ import { getCommentById, updateCommentText, } from "../../../../graph/knowledge/system-types/comment"; +import { graphQLContextToImpureGraphContext } from "../../util"; +import { mapCommentToGQL } from "../graphql-mapping"; + import type { MutationUpdateCommentTextArgs, ResolverFn, } from "../../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; import type { UnresolvedCommentGQL } from "../graphql-mapping"; -import { mapCommentToGQL } from "../graphql-mapping"; export const updateCommentTextResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/entity/entity.ts b/apps/hash-api/src/graphql/resolvers/knowledge/entity/entity.ts index 08c54ec7909..a9c43736b1b 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/entity/entity.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/entity/entity.ts @@ -1,4 +1,3 @@ -import type { Entity, EntityId, WebId } from "@blockprotocol/type-system"; import { extractEntityUuidFromEntityId, mustHaveAtLeastOne, @@ -16,7 +15,6 @@ import { deletePolicyById, queryPolicies, } from "@local/hash-graph-sdk/policy"; -import type { EntityValidationReport } from "@local/hash-graph-sdk/validation"; import { canUserReadEntity, @@ -31,6 +29,10 @@ import { isEntityLinkEntity, updateLinkEntity, } from "../../../../graph/knowledge/primitive/link-entity"; +import { AuthorizationSubjectKind } from "../../../api-types.gen"; +import * as Error from "../../../error"; +import { graphQLContextToImpureGraphContext } from "../../util"; + import type { MutationAddEntityViewerArgs, MutationArchiveEntitiesArgs, @@ -47,10 +49,9 @@ import type { QueryValidateEntityArgs, ResolverFn, } from "../../../api-types.gen"; -import { AuthorizationSubjectKind } from "../../../api-types.gen"; import type { GraphQLContext, LoggedInGraphQLContext } from "../../../context"; -import * as Error from "../../../error"; -import { graphQLContextToImpureGraphContext } from "../../util"; +import type { Entity, EntityId, WebId } from "@blockprotocol/type-system"; +import type { EntityValidationReport } from "@local/hash-graph-sdk/validation"; export const createEntityResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/entity/get-entity-diffs.ts b/apps/hash-api/src/graphql/resolvers/knowledge/entity/get-entity-diffs.ts index 107aeca0577..832747c5e29 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/entity/get-entity-diffs.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/entity/get-entity-diffs.ts @@ -1,4 +1,5 @@ import { calculateEntityDiff } from "../../../../graph/knowledge/primitive/entity"; + import type { EntityDiff, Query, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/file/create-file-from-url.ts b/apps/hash-api/src/graphql/resolvers/knowledge/file/create-file-from-url.ts index 36e43a97bcd..2bfd2cd6caf 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/file/create-file-from-url.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/file/create-file-from-url.ts @@ -1,15 +1,16 @@ -import type { Entity } from "@blockprotocol/type-system"; import { extractWebIdFromEntityId } from "@blockprotocol/type-system"; -import type { File as FileEntity } from "@local/hash-isomorphic-utils/system-types/shared"; import { createFileFromExternalUrl } from "../../../../graph/knowledge/system-types/file"; +import { graphQLContextToImpureGraphContext } from "../../util"; +import { triggerPdfAnalysisWorkflow } from "./shared"; + import type { MutationCreateFileFromUrlArgs, ResolverFn, } from "../../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; -import { triggerPdfAnalysisWorkflow } from "./shared"; +import type { Entity } from "@blockprotocol/type-system"; +import type { File as FileEntity } from "@local/hash-isomorphic-utils/system-types/shared"; export const createFileFromUrl: ResolverFn< Promise>, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/file/request-file-upload.ts b/apps/hash-api/src/graphql/resolvers/knowledge/file/request-file-upload.ts index b96e4cead43..2b22e5c48c5 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/file/request-file-upload.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/file/request-file-upload.ts @@ -1,15 +1,16 @@ import { extractWebIdFromEntityId } from "@blockprotocol/type-system"; import { createFileFromUploadRequest } from "../../../../graph/knowledge/system-types/file"; +import * as Error from "../../../error"; +import { graphQLContextToImpureGraphContext } from "../../util"; +import { triggerPdfAnalysisWorkflow } from "./shared"; + import type { MutationRequestFileUploadArgs, RequestFileUploadResponse, ResolverFn, } from "../../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../../context"; -import * as Error from "../../../error"; -import { graphQLContextToImpureGraphContext } from "../../util"; -import { triggerPdfAnalysisWorkflow } from "./shared"; /** * We want to limit the size of files that can be uploaded to account diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/file/shared.ts b/apps/hash-api/src/graphql/resolvers/knowledge/file/shared.ts index 23b9d00923e..f708489e997 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/file/shared.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/file/shared.ts @@ -1,11 +1,12 @@ +import { inferMetadataFromDocumentFlowDefinition } from "@local/hash-isomorphic-utils/flows/file-flow-definitions"; +import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; + import type { Entity, UserId, WebId } from "@blockprotocol/type-system"; import type { TemporalClient } from "@local/hash-backend-utils/temporal"; -import { inferMetadataFromDocumentFlowDefinition } from "@local/hash-isomorphic-utils/flows/file-flow-definitions"; import type { RunFlowWorkflowParams, RunFlowWorkflowResponse, } from "@local/hash-isomorphic-utils/flows/temporal-types"; -import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; import type { File } from "@local/hash-isomorphic-utils/system-types/shared"; export const triggerPdfAnalysisWorkflow = async ({ diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/hash-instance/hash-instance.ts b/apps/hash-api/src/graphql/resolvers/knowledge/hash-instance/hash-instance.ts index 601a262be41..49fbcd34bb9 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/hash-instance/hash-instance.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/hash-instance/hash-instance.ts @@ -2,9 +2,10 @@ import { getHashInstance } from "@local/hash-backend-utils/hash-instance"; import { isUserHashInstanceAdmin } from "@local/hash-graph-sdk/principal/hash-instance-admins"; import { enabledIntegrations } from "../../../../integrations/enabled-integrations"; +import { graphQLContextToImpureGraphContext } from "../../util"; + import type { HashInstanceSettings, ResolverFn } from "../../../api-types.gen"; import type { GraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; export const hashInstanceSettingsResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/org/accept-org-invitation.ts b/apps/hash-api/src/graphql/resolvers/knowledge/org/accept-org-invitation.ts index ab553b197b7..17587128d13 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/org/accept-org-invitation.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/org/accept-org-invitation.ts @@ -1,7 +1,5 @@ import { extractWebIdFromEntityId } from "@blockprotocol/type-system"; -import type { HashEntity } from "@local/hash-graph-sdk/entity"; import { getActorGroupRole } from "@local/hash-graph-sdk/principal/actor-group"; -import type { MutationAcceptOrgInvitationArgs } from "@local/hash-isomorphic-utils/graphql/api-types.gen"; import { systemLinkEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { isInvitationByEmail, @@ -21,13 +19,16 @@ import { joinOrg, } from "../../../../graph/knowledge/system-types/user"; import { systemAccountId } from "../../../../graph/system-account"; +import * as Error from "../../../error"; +import { graphQLContextToImpureGraphContext } from "../../util"; + import type { AcceptInvitationResult, ResolverFn, } from "../../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../../context"; -import * as Error from "../../../error"; -import { graphQLContextToImpureGraphContext } from "../../util"; +import type { HashEntity } from "@local/hash-graph-sdk/entity"; +import type { MutationAcceptOrgInvitationArgs } from "@local/hash-isomorphic-utils/graphql/api-types.gen"; export const acceptOrgInvitationResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/org/create-org.ts b/apps/hash-api/src/graphql/resolvers/knowledge/org/create-org.ts index ccbd33cb262..bf2c150262c 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/org/create-org.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/org/create-org.ts @@ -1,10 +1,10 @@ -import type { SerializedEntity } from "@local/hash-graph-sdk/entity"; - import { createOrg } from "../../../../graph/knowledge/system-types/org"; import { createOrgMembershipLinkEntity } from "../../../../graph/knowledge/system-types/org-membership"; +import { graphQLContextToImpureGraphContext } from "../../util"; + import type { MutationCreateOrgArgs, ResolverFn } from "../../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; +import type { SerializedEntity } from "@local/hash-graph-sdk/entity"; export const createOrgResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/org/decline-org-invitation.ts b/apps/hash-api/src/graphql/resolvers/knowledge/org/decline-org-invitation.ts index 2eea5f7369e..47a0244e63b 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/org/decline-org-invitation.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/org/decline-org-invitation.ts @@ -1,13 +1,13 @@ -import type { MutationDeclineOrgInvitationArgs } from "@local/hash-isomorphic-utils/graphql/api-types.gen"; - import { getLatestEntityRootedSubgraph } from "../../../../graph/knowledge/primitive/entity"; import { systemAccountId } from "../../../../graph/system-account"; -import type { ResolverFn } from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; import * as Error from "../../../error"; import { graphQLContextToImpureGraphContext } from "../../util"; import { getPendingOrgInvitationsFromSubgraph } from "./shared"; +import type { ResolverFn } from "../../../api-types.gen"; +import type { LoggedInGraphQLContext } from "../../../context"; +import type { MutationDeclineOrgInvitationArgs } from "@local/hash-isomorphic-utils/graphql/api-types.gen"; + /** * This resolver is used specifically to get an invitation to an organization issued to a user not yet signed up for HASH. * They will be emailed a link to sign up, which includes the entityId, and we need to retrieve it to show the invitation details on the signup page. diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/org/get-my-pending-invitations.ts b/apps/hash-api/src/graphql/resolvers/knowledge/org/get-my-pending-invitations.ts index 4ae87b7ca81..924df43e90c 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/org/get-my-pending-invitations.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/org/get-my-pending-invitations.ts @@ -1,9 +1,9 @@ -import type { PendingOrgInvitation } from "@local/hash-isomorphic-utils/graphql/api-types.gen"; - import { getUserPendingInvitations } from "../../../../graph/knowledge/system-types/user"; +import { graphQLContextToImpureGraphContext } from "../../util"; + import type { ResolverFn } from "../../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; +import type { PendingOrgInvitation } from "@local/hash-isomorphic-utils/graphql/api-types.gen"; export const getMyPendingInvitationsResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/org/get-pending-invitation-by-entity-id.ts b/apps/hash-api/src/graphql/resolvers/knowledge/org/get-pending-invitation-by-entity-id.ts index efa0fd338b1..f2e3dfe743d 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/org/get-pending-invitation-by-entity-id.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/org/get-pending-invitation-by-entity-id.ts @@ -1,14 +1,14 @@ -import type { PendingOrgInvitation } from "@local/hash-isomorphic-utils/graphql/api-types.gen"; - import { getLatestEntityRootedSubgraph } from "../../../../graph/knowledge/primitive/entity"; import { systemAccountId } from "../../../../graph/system-account"; +import { graphQLContextToImpureGraphContext } from "../../util"; +import { getPendingOrgInvitationsFromSubgraph } from "./shared"; + import type { QueryGetPendingInvitationByEntityIdArgs, ResolverFn, } from "../../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; -import { getPendingOrgInvitationsFromSubgraph } from "./shared"; +import type { PendingOrgInvitation } from "@local/hash-isomorphic-utils/graphql/api-types.gen"; /** * This resolver is used specifically to get an invitation to an organization issued to a user not yet signed up for HASH. diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/org/invite-user-to-org.ts b/apps/hash-api/src/graphql/resolvers/knowledge/org/invite-user-to-org.ts index 1d6713a936d..14ded700bc1 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/org/invite-user-to-org.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/org/invite-user-to-org.ts @@ -1,3 +1,6 @@ +import dedent from "dedent"; +import sanitizeHtml from "sanitize-html"; + import { type EntityId, entityIdFromComponents, @@ -13,7 +16,6 @@ import { currentTimeInstantTemporalAxes, generateVersionedUrlMatchingFilter, } from "@local/hash-isomorphic-utils/graph-queries"; -import type { MutationInviteUserToOrgArgs } from "@local/hash-isomorphic-utils/graphql/api-types.gen"; import { blockProtocolDataTypes, systemDataTypes, @@ -21,15 +23,7 @@ import { systemLinkEntityTypes, systemPropertyTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { - HasIssuedInvitation, - InvitationViaEmail, - InvitationViaShortname, -} from "@local/hash-isomorphic-utils/system-types/shared"; -import dedent from "dedent"; -import sanitizeHtml from "sanitize-html"; -import type { EmailTransporter } from "../../../../email/transporters"; import { createEntity } from "../../../../graph/knowledge/primitive/entity"; import { createLinkEntity } from "../../../../graph/knowledge/primitive/link-entity"; import { @@ -41,12 +35,20 @@ import { isUserMemberOfOrg, type User, } from "../../../../graph/knowledge/system-types/user"; -import type { ResolverFn } from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; import * as Error from "../../../error"; import { graphQLContextToImpureGraphContext } from "../../util"; import { getPendingOrgInvitationsFromSubgraph } from "./shared"; +import type { EmailTransporter } from "../../../../email/transporters"; +import type { ResolverFn } from "../../../api-types.gen"; +import type { LoggedInGraphQLContext } from "../../../context"; +import type { MutationInviteUserToOrgArgs } from "@local/hash-isomorphic-utils/graphql/api-types.gen"; +import type { + HasIssuedInvitation, + InvitationViaEmail, + InvitationViaShortname, +} from "@local/hash-isomorphic-utils/system-types/shared"; + const invitationDurationInDays = 30; const sendOrgEmailInvitationToEmailAddress = async (params: { diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/org/remove-user-from-org.ts b/apps/hash-api/src/graphql/resolvers/knowledge/org/remove-user-from-org.ts index 16ee4544b7a..b0b188289f1 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/org/remove-user-from-org.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/org/remove-user-from-org.ts @@ -6,16 +6,17 @@ import { import { queryEntities } from "@local/hash-graph-sdk/entity"; import { removeActorGroupMember } from "@local/hash-graph-sdk/principal/actor-group"; import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; -import type { MutationRemoveUserFromOrgArgs } from "@local/hash-isomorphic-utils/graphql/api-types.gen"; import { systemLinkEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { getOrgById } from "../../../../graph/knowledge/system-types/org"; import { getUser } from "../../../../graph/knowledge/system-types/user"; -import type { ResolverFn } from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; import * as Error from "../../../error"; import { graphQLContextToImpureGraphContext } from "../../util"; +import type { ResolverFn } from "../../../api-types.gen"; +import type { LoggedInGraphQLContext } from "../../../context"; +import type { MutationRemoveUserFromOrgArgs } from "@local/hash-isomorphic-utils/graphql/api-types.gen"; + export const removeUserFromOrgResolver: ResolverFn< Promise, Record, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/org/shared.ts b/apps/hash-api/src/graphql/resolvers/knowledge/org/shared.ts index e985ea38709..e56150675e7 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/org/shared.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/org/shared.ts @@ -1,8 +1,3 @@ -import type { - EntityRootType, - LinkEntityAndLeftEntity, - Subgraph, -} from "@blockprotocol/graph"; import { getIncomingLinkAndSourceEntities, getRoots, @@ -13,9 +8,6 @@ import { extractWebIdFromEntityId, type WebId, } from "@blockprotocol/type-system"; -import type { AuthenticationContext } from "@local/hash-graph-sdk/authentication-context"; -import type { HashEntity, HashLinkEntity } from "@local/hash-graph-sdk/entity"; -import type { PendingOrgInvitation } from "@local/hash-isomorphic-utils/graphql/api-types.gen"; import { systemEntityTypes, systemLinkEntityTypes, @@ -24,14 +16,23 @@ import { isInvitationByEmail, isInvitationByShortname, } from "@local/hash-isomorphic-utils/organization"; -import type { Organization } from "@local/hash-isomorphic-utils/system-types/shared"; -import type { ImpureGraphContext } from "../../../../graph/context-types"; import { getUser, type User, } from "../../../../graph/knowledge/system-types/user"; +import type { ImpureGraphContext } from "../../../../graph/context-types"; +import type { + EntityRootType, + LinkEntityAndLeftEntity, + Subgraph, +} from "@blockprotocol/graph"; +import type { AuthenticationContext } from "@local/hash-graph-sdk/authentication-context"; +import type { HashEntity, HashLinkEntity } from "@local/hash-graph-sdk/entity"; +import type { PendingOrgInvitation } from "@local/hash-isomorphic-utils/graphql/api-types.gen"; +import type { Organization } from "@local/hash-isomorphic-utils/system-types/shared"; + const isOrgEntity = (entity: HashEntity): entity is HashEntity => entity.metadata.entityTypeIds.includes( systemEntityTypes.organization.entityTypeId, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/page/page-contents.ts b/apps/hash-api/src/graphql/resolvers/knowledge/page/page-contents.ts index 75c0b69f06e..90aa5ced459 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/page/page-contents.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/page/page-contents.ts @@ -1,14 +1,15 @@ -import type { Entity } from "@blockprotocol/type-system"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { HasSpatiallyPositionedContent } from "@local/hash-isomorphic-utils/system-types/canvas"; -import type { HasIndexedContent } from "@local/hash-isomorphic-utils/system-types/shared"; import { getPageBlocks } from "../../../../graph/knowledge/system-types/page"; +import { graphQLContextToImpureGraphContext } from "../../util"; +import { mapBlockToGQL } from "../graphql-mapping"; + import type { ResolverFn } from "../../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; import type { UnresolvedBlockGQL, UnresolvedPageGQL } from "../graphql-mapping"; -import { mapBlockToGQL } from "../graphql-mapping"; +import type { Entity } from "@blockprotocol/type-system"; +import type { HasSpatiallyPositionedContent } from "@local/hash-isomorphic-utils/system-types/canvas"; +import type { HasIndexedContent } from "@local/hash-isomorphic-utils/system-types/shared"; export const pageContents: ResolverFn< { diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/page/page.ts b/apps/hash-api/src/graphql/resolvers/knowledge/page/page.ts index fb0fd9f7ef5..72edf663c78 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/page/page.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/page/page.ts @@ -2,18 +2,19 @@ import { createPage, getPageComments, } from "../../../../graph/knowledge/system-types/page"; +import { graphQLContextToImpureGraphContext } from "../../util"; +import { mapCommentToGQL, mapPageToGQL } from "../graphql-mapping"; + import type { MutationCreatePageArgs, QueryPageCommentsArgs, ResolverFn, } from "../../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; import type { UnresolvedCommentGQL, UnresolvedPageGQL, } from "../graphql-mapping"; -import { mapCommentToGQL, mapPageToGQL } from "../graphql-mapping"; export const createPageResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/page/set-parent-page.ts b/apps/hash-api/src/graphql/resolvers/knowledge/page/set-parent-page.ts index 329db44d3e2..44fcc10bdf5 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/page/set-parent-page.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/page/set-parent-page.ts @@ -2,15 +2,16 @@ import { getPageById, setPageParentPage, } from "../../../../graph/knowledge/system-types/page"; +import * as Error from "../../../error"; +import { graphQLContextToImpureGraphContext } from "../../util"; +import { mapPageToGQL } from "../graphql-mapping"; + import type { MutationSetParentPageArgs, ResolverFn, } from "../../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../../context"; -import * as Error from "../../../error"; -import { graphQLContextToImpureGraphContext } from "../../util"; import type { UnresolvedPageGQL } from "../graphql-mapping"; -import { mapPageToGQL } from "../graphql-mapping"; export const setParentPageResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/page/update-page.ts b/apps/hash-api/src/graphql/resolvers/knowledge/page/update-page.ts index f8907902282..7a3118f12fe 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/page/update-page.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/page/update-page.ts @@ -6,14 +6,15 @@ import { getPageById, getPageFromEntity, } from "../../../../graph/knowledge/system-types/page"; +import { graphQLContextToImpureGraphContext } from "../../util"; +import { mapPageToGQL } from "../graphql-mapping"; + import type { MutationUpdatePageArgs, ResolverFn, } from "../../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; import type { UnresolvedPageGQL } from "../graphql-mapping"; -import { mapPageToGQL } from "../graphql-mapping"; export const updatePageResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/shared/check-permissions.ts b/apps/hash-api/src/graphql/resolvers/knowledge/shared/check-permissions.ts index fa418b2aae6..3b30feab37b 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/shared/check-permissions.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/shared/check-permissions.ts @@ -1,13 +1,13 @@ -import type { Entity } from "@blockprotocol/type-system"; -import type { UserPermissions } from "@local/hash-graph-sdk/authorization"; - import { checkEntityPermission, checkPermissionsOnEntity, } from "../../../../graph/knowledge/primitive/entity"; +import { graphQLContextToImpureGraphContext } from "../../util"; + import type { ResolverFn } from "../../../api-types.gen"; import type { GraphQLContext, LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; +import type { Entity } from "@blockprotocol/type-system"; +import type { UserPermissions } from "@local/hash-graph-sdk/authorization"; export const checkUserPermissionsOnEntity: ResolverFn< UserPermissions, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/shared/get-user-permissions-on-subgraph.ts b/apps/hash-api/src/graphql/resolvers/knowledge/shared/get-user-permissions-on-subgraph.ts index 4e593f832b0..883f9093300 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/shared/get-user-permissions-on-subgraph.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/shared/get-user-permissions-on-subgraph.ts @@ -1,13 +1,14 @@ -import type { Subgraph } from "@blockprotocol/graph"; -import type { UserPermissionsOnEntities } from "@local/hash-graph-sdk/authorization"; -import type { GraphQLResolveInfo } from "graphql"; -import type { ResolveTree } from "graphql-parse-resolve-info"; import { parseResolveInfo } from "graphql-parse-resolve-info"; import { checkPermissionsOnEntitiesInSubgraph } from "../../../../graph/knowledge/primitive/entity"; +import { graphQLContextToImpureGraphContext } from "../../util"; + import type { SubgraphAndPermissions } from "../../../api-types.gen"; import type { GraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; +import type { Subgraph } from "@blockprotocol/graph"; +import type { UserPermissionsOnEntities } from "@local/hash-graph-sdk/authorization"; +import type { GraphQLResolveInfo } from "graphql"; +import type { ResolveTree } from "graphql-parse-resolve-info"; const werePermissionsRequested = (info: GraphQLResolveInfo) => { const parsedResolveInfoFragment = parseResolveInfo(info); diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/user/get-usage-records.ts b/apps/hash-api/src/graphql/resolvers/knowledge/user/get-usage-records.ts index 2285f4bcff7..3756d93b3d1 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/user/get-usage-records.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/user/get-usage-records.ts @@ -11,7 +11,9 @@ import { } from "@local/hash-isomorphic-utils/graph-queries"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-properties"; -import type { UserProperties } from "@local/hash-isomorphic-utils/system-types/user"; + +import * as Error from "../../../error"; +import { graphQLContextToImpureGraphContext } from "../../util"; import type { Query, @@ -19,8 +21,7 @@ import type { UserUsageRecords, } from "../../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../../context"; -import * as Error from "../../../error"; -import { graphQLContextToImpureGraphContext } from "../../util"; +import type { UserProperties } from "@local/hash-isomorphic-utils/system-types/user"; export const getUsageRecordsResolver: ResolverFn< Query["getUsageRecords"], diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/user/get-waitlist-position.ts b/apps/hash-api/src/graphql/resolvers/knowledge/user/get-waitlist-position.ts index e90d31c13e8..391c42e9833 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/user/get-waitlist-position.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/user/get-waitlist-position.ts @@ -1,9 +1,9 @@ import { internalApiClient } from "@local/hash-backend-utils/internal-api-client"; import { isSelfHostedInstance } from "@local/hash-isomorphic-utils/instance"; -import type { GetWaitlistPosition200Response } from "@local/internal-api-client"; import type { Query, ResolverFn } from "../../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../../context"; +import type { GetWaitlistPosition200Response } from "@local/internal-api-client"; export const getWaitlistPositionResolver: ResolverFn< Query["getWaitlistPosition"], diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/user/has-access-to-hash.ts b/apps/hash-api/src/graphql/resolvers/knowledge/user/has-access-to-hash.ts index d985b39e453..b9f388b6d40 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/user/has-access-to-hash.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/user/has-access-to-hash.ts @@ -1,7 +1,8 @@ import { userHasAccessToHash } from "../../../../shared/user-has-access-to-hash"; +import { graphQLContextToImpureGraphContext } from "../../util"; + import type { Query, ResolverFn } from "../../../api-types.gen"; import type { GraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; export const hasAccessToHashResolver: ResolverFn< Query["hasAccessToHash"], diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/user/is-shortname-taken.ts b/apps/hash-api/src/graphql/resolvers/knowledge/user/is-shortname-taken.ts index dc6d9a90863..7cf531cc8ec 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/user/is-shortname-taken.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/user/is-shortname-taken.ts @@ -2,12 +2,13 @@ import { shortnameIsRestricted, shortnameIsTaken, } from "../../../../graph/knowledge/system-types/account.fields"; +import { graphQLContextToImpureGraphContext } from "../../util"; + import type { QueryIsShortnameTakenArgs, ResolverFn, } from "../../../api-types.gen"; import type { GraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; export const isShortnameTakenResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/user/me.ts b/apps/hash-api/src/graphql/resolvers/knowledge/user/me.ts index 7e4bf2d6271..13d4bbedf04 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/user/me.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/user/me.ts @@ -5,9 +5,10 @@ import { } from "@local/hash-graph-sdk/entity"; import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; +import { graphQLContextToImpureGraphContext } from "../../util"; + import type { Query, ResolverFn } from "../../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; export const meResolver: ResolverFn< Query["me"], diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/user/submit-early-access-form.ts b/apps/hash-api/src/graphql/resolvers/knowledge/user/submit-early-access-form.ts index 6c5ad1145c5..872bf36c243 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/user/submit-early-access-form.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/user/submit-early-access-form.ts @@ -1,16 +1,17 @@ -import type { WebId } from "@blockprotocol/type-system"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-properties"; -import type { ProspectiveUser } from "@local/hash-isomorphic-utils/system-types/prospectiveuser"; import { createEntity } from "../../../../graph/knowledge/primitive/entity"; import { systemAccountId } from "../../../../graph/system-account"; +import { graphQLContextToImpureGraphContext } from "../../util"; + import type { MutationSubmitEarlyAccessFormArgs, ResolverFn, } from "../../../api-types.gen"; import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; +import type { WebId } from "@blockprotocol/type-system"; +import type { ProspectiveUser } from "@local/hash-isomorphic-utils/system-types/prospectiveuser"; export const submitEarlyAccessFormResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/middlewares/logged-in-and-signed-up.ts b/apps/hash-api/src/graphql/resolvers/middlewares/logged-in-and-signed-up.ts index 88609a464bf..693466fc4d4 100644 --- a/apps/hash-api/src/graphql/resolvers/middlewares/logged-in-and-signed-up.ts +++ b/apps/hash-api/src/graphql/resolvers/middlewares/logged-in-and-signed-up.ts @@ -1,8 +1,9 @@ -import type { GraphQLContext, LoggedInGraphQLContext } from "../../context"; import { loggedInMiddleware } from "./logged-in"; -import type { ResolverMiddleware } from "./middleware-types"; import { signedUpMiddleware } from "./signed-up"; +import type { GraphQLContext, LoggedInGraphQLContext } from "../../context"; +import type { ResolverMiddleware } from "./middleware-types"; + export const loggedInAndSignedUpMiddleware: ResolverMiddleware< GraphQLContext, Record, diff --git a/apps/hash-api/src/graphql/resolvers/middlewares/logged-in.ts b/apps/hash-api/src/graphql/resolvers/middlewares/logged-in.ts index 87e4d6ea61b..36c4eb840dc 100644 --- a/apps/hash-api/src/graphql/resolvers/middlewares/logged-in.ts +++ b/apps/hash-api/src/graphql/resolvers/middlewares/logged-in.ts @@ -1,5 +1,6 @@ -import type { GraphQLContext, LoggedInGraphQLContext } from "../../context"; import * as Error from "../../error"; + +import type { GraphQLContext, LoggedInGraphQLContext } from "../../context"; import type { ResolverMiddleware } from "./middleware-types"; export const loggedInMiddleware: ResolverMiddleware< diff --git a/apps/hash-api/src/graphql/resolvers/middlewares/signed-up.ts b/apps/hash-api/src/graphql/resolvers/middlewares/signed-up.ts index f352c496e07..84e634d1ebb 100644 --- a/apps/hash-api/src/graphql/resolvers/middlewares/signed-up.ts +++ b/apps/hash-api/src/graphql/resolvers/middlewares/signed-up.ts @@ -1,5 +1,6 @@ -import type { LoggedInGraphQLContext } from "../../context"; import * as Error from "../../error"; + +import type { LoggedInGraphQLContext } from "../../context"; import type { ResolverMiddleware } from "./middleware-types"; export const signedUpMiddleware: ResolverMiddleware< diff --git a/apps/hash-api/src/graphql/resolvers/ontology/data-type.ts b/apps/hash-api/src/graphql/resolvers/ontology/data-type.ts index 853d650df34..edd876c553a 100644 --- a/apps/hash-api/src/graphql/resolvers/ontology/data-type.ts +++ b/apps/hash-api/src/graphql/resolvers/ontology/data-type.ts @@ -1,19 +1,9 @@ -import type { - DataTypeWithMetadata, - OntologyTemporalMetadata, -} from "@blockprotocol/type-system"; -import type { UserPermissionsOnDataType } from "@local/hash-graph-sdk/authorization"; -import type { - QueryDataTypesResponse, - SerializedQueryDataTypeSubgraphResponse, -} from "@local/hash-graph-sdk/data-type"; import { findDataTypeConversionTargets, queryDataTypes, queryDataTypeSubgraph, serializeQueryDataTypeSubgraphResponse, } from "@local/hash-graph-sdk/data-type"; -import type { DataTypeFullConversionTargetsMap } from "@local/hash-graph-sdk/ontology"; import { archiveDataType, @@ -22,6 +12,8 @@ import { unarchiveDataType, updateDataType, } from "../../../graph/ontology/primitive/data-type"; +import { graphQLContextToImpureGraphContext } from "../util"; + import type { MutationArchiveDataTypeArgs, MutationCreateDataTypeArgs, @@ -34,7 +26,16 @@ import type { ResolverFn, } from "../../api-types.gen"; import type { GraphQLContext, LoggedInGraphQLContext } from "../../context"; -import { graphQLContextToImpureGraphContext } from "../util"; +import type { + DataTypeWithMetadata, + OntologyTemporalMetadata, +} from "@blockprotocol/type-system"; +import type { UserPermissionsOnDataType } from "@local/hash-graph-sdk/authorization"; +import type { + QueryDataTypesResponse, + SerializedQueryDataTypeSubgraphResponse, +} from "@local/hash-graph-sdk/data-type"; +import type { DataTypeFullConversionTargetsMap } from "@local/hash-graph-sdk/ontology"; export const queryDataTypesResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/ontology/entity-type.ts b/apps/hash-api/src/graphql/resolvers/ontology/entity-type.ts index b0e345818ad..4c3baf987fa 100644 --- a/apps/hash-api/src/graphql/resolvers/ontology/entity-type.ts +++ b/apps/hash-api/src/graphql/resolvers/ontology/entity-type.ts @@ -1,14 +1,3 @@ -import type { - EntityTypeWithMetadata, - OntologyTemporalMetadata, - WebId, -} from "@blockprotocol/type-system"; -import type { UserPermissionsOnEntityType } from "@local/hash-graph-sdk/authorization"; -import type { - GetClosedMultiEntityTypesResponse, - QueryEntityTypesResponse, - SerializedQueryEntityTypeSubgraphResponse, -} from "@local/hash-graph-sdk/entity-type"; import { getClosedMultiEntityTypes, queryEntityTypes, @@ -24,6 +13,8 @@ import { updateEntityType, updateEntityTypes, } from "../../../graph/ontology/primitive/entity-type"; +import { graphQLContextToImpureGraphContext } from "../util"; + import type { MutationArchiveEntityTypeArgs, MutationCreateEntityTypeArgs, @@ -37,7 +28,17 @@ import type { ResolverFn, } from "../../api-types.gen"; import type { GraphQLContext, LoggedInGraphQLContext } from "../../context"; -import { graphQLContextToImpureGraphContext } from "../util"; +import type { + EntityTypeWithMetadata, + OntologyTemporalMetadata, + WebId, +} from "@blockprotocol/type-system"; +import type { UserPermissionsOnEntityType } from "@local/hash-graph-sdk/authorization"; +import type { + GetClosedMultiEntityTypesResponse, + QueryEntityTypesResponse, + SerializedQueryEntityTypeSubgraphResponse, +} from "@local/hash-graph-sdk/entity-type"; export const createEntityTypeResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/ontology/property-type.ts b/apps/hash-api/src/graphql/resolvers/ontology/property-type.ts index 76d2fd48187..0f52e150014 100644 --- a/apps/hash-api/src/graphql/resolvers/ontology/property-type.ts +++ b/apps/hash-api/src/graphql/resolvers/ontology/property-type.ts @@ -1,8 +1,3 @@ -import type { - OntologyTemporalMetadata, - PropertyTypeWithMetadata, - WebId, -} from "@blockprotocol/type-system"; import { queryPropertyTypes, type QueryPropertyTypesResponse, @@ -17,6 +12,8 @@ import { unarchivePropertyType, updatePropertyType, } from "../../../graph/ontology/primitive/property-type"; +import { graphQLContextToImpureGraphContext } from "../util"; + import type { MutationArchivePropertyTypeArgs, MutationCreatePropertyTypeArgs, @@ -27,7 +24,11 @@ import type { ResolverFn, } from "../../api-types.gen"; import type { GraphQLContext, LoggedInGraphQLContext } from "../../context"; -import { graphQLContextToImpureGraphContext } from "../util"; +import type { + OntologyTemporalMetadata, + PropertyTypeWithMetadata, + WebId, +} from "@blockprotocol/type-system"; export const createPropertyTypeResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/index.ts b/apps/hash-api/src/index.ts index 0f9f29e84b2..573cb5bbbb5 100644 --- a/apps/hash-api/src/index.ts +++ b/apps/hash-api/src/index.ts @@ -1,8 +1,26 @@ import http from "node:http"; import { promisify } from "node:util"; -import type { ProvidedEntityEditionProvenance } from "@blockprotocol/type-system"; import KeyvRedis from "@keyv/redis"; +import * as Sentry from "@sentry/node"; +import bodyParser from "body-parser"; +import cors from "cors"; +import { Effect, Exit, Layer, Logger, LogLevel, ManagedRuntime } from "effect"; +import { RuntimeException } from "effect/Cause"; +import express, { raw } from "express"; +import { create as handlebarsCreate } from "express-handlebars"; +import { ipKeyGenerator, rateLimit } from "express-rate-limit"; +import helmet from "helmet"; +import { StatsD } from "hot-shots"; +import { + createProxyMiddleware, + fixRequestBody, + responseInterceptor, +} from "http-proxy-middleware"; +import httpTerminator from "http-terminator"; +import Keyv from "keyv"; +import { customAlphabet } from "nanoid"; + import { JsonDecoder, JsonEncoder } from "@local/harpc-client/codec"; import { Client as RpcClient, Transport } from "@local/harpc-client/net"; import { RequestIdProducer } from "@local/harpc-client/wire-protocol"; @@ -23,26 +41,6 @@ import { hashClientHeaderKey, } from "@local/hash-isomorphic-utils/http-requests"; import { isSelfHostedInstance } from "@local/hash-isomorphic-utils/instance"; -import * as Sentry from "@sentry/node"; -import bodyParser from "body-parser"; -import cors from "cors"; -import { Effect, Exit, Layer, Logger, LogLevel, ManagedRuntime } from "effect"; -import { RuntimeException } from "effect/Cause"; -import type { ErrorRequestHandler, Request, Response } from "express"; -import express, { raw } from "express"; -import { create as handlebarsCreate } from "express-handlebars"; -import type { Options as RateLimitOptions } from "express-rate-limit"; -import { ipKeyGenerator, rateLimit } from "express-rate-limit"; -import helmet from "helmet"; -import { StatsD } from "hot-shots"; -import { - createProxyMiddleware, - fixRequestBody, - responseInterceptor, -} from "http-proxy-middleware"; -import httpTerminator from "http-terminator"; -import Keyv from "keyv"; -import { customAlphabet } from "nanoid"; import { gptGetUserWebs } from "./ai/gpt/gpt-get-user-webs"; import { gptQueryEntities } from "./ai/gpt/gpt-query-entities"; @@ -95,6 +93,10 @@ import { } from "./storage"; import { setupTelemetry } from "./telemetry/snowplow-setup"; +import type { ProvidedEntityEditionProvenance } from "@blockprotocol/type-system"; +import type { ErrorRequestHandler, Request, Response } from "express"; +import type { Options as RateLimitOptions } from "express-rate-limit"; + const app = express(); const httpServer = http.createServer(app); diff --git a/apps/hash-api/src/instrument.mjs b/apps/hash-api/src/instrument.mjs index 68b4df200f7..9f48bdef97d 100644 --- a/apps/hash-api/src/instrument.mjs +++ b/apps/hash-api/src/instrument.mjs @@ -1,10 +1,5 @@ /** Required to load environment variables */ import "@local/hash-backend-utils/environment"; -import { - createHttpInstrumentation, - createUndiciInstrumentation, - registerOpenTelemetry, -} from "@local/hash-backend-utils/opentelemetry"; import { ExpressInstrumentation, ExpressLayerType, @@ -12,6 +7,12 @@ import { import { GraphQLInstrumentation } from "@opentelemetry/instrumentation-graphql"; import * as Sentry from "@sentry/node"; +import { + createHttpInstrumentation, + createUndiciInstrumentation, + registerOpenTelemetry, +} from "@local/hash-backend-utils/opentelemetry"; + import { isProdEnv } from "./lib/env-config"; /** diff --git a/apps/hash-api/src/integrations/google/check-access-token.ts b/apps/hash-api/src/integrations/google/check-access-token.ts index 6ab26f66b6d..46c6e8c443e 100644 --- a/apps/hash-api/src/integrations/google/check-access-token.ts +++ b/apps/hash-api/src/integrations/google/check-access-token.ts @@ -1,11 +1,11 @@ +import { getGoogleAccessTokenForExpressRequest } from "./shared/get-or-check-access-token"; + import type { CheckGoogleTokenRequest, CheckGoogleTokenResponse, } from "@local/hash-isomorphic-utils/google-integration"; import type { RequestHandler } from "express"; -import { getGoogleAccessTokenForExpressRequest } from "./shared/get-or-check-access-token"; - /** * Check if a valid access token is present for the requested Google Account. * If the access token itself is required, use the route controlled by getGoogleAccessToken instead. diff --git a/apps/hash-api/src/integrations/google/get-access-token.ts b/apps/hash-api/src/integrations/google/get-access-token.ts index d74a306991e..14c903ebe5b 100644 --- a/apps/hash-api/src/integrations/google/get-access-token.ts +++ b/apps/hash-api/src/integrations/google/get-access-token.ts @@ -1,10 +1,10 @@ +import { getGoogleAccessTokenForExpressRequest } from "./shared/get-or-check-access-token"; + import type { GetGoogleTokenRequest, GetGoogleTokenResponse, } from "@local/hash-isomorphic-utils/google-integration"; import type { RequestHandler } from "express"; - -import { getGoogleAccessTokenForExpressRequest } from "./shared/get-or-check-access-token"; /** * Get an access token for use in the client where unavoidable, e.g. to use the Google File Picker. * Access tokens last for 1 hour. diff --git a/apps/hash-api/src/integrations/google/oauth-callback.ts b/apps/hash-api/src/integrations/google/oauth-callback.ts index e6f59a0f0a7..9310243169d 100644 --- a/apps/hash-api/src/integrations/google/oauth-callback.ts +++ b/apps/hash-api/src/integrations/google/oauth-callback.ts @@ -1,22 +1,24 @@ -import type { WebId } from "@blockprotocol/type-system"; +import { google } from "googleapis"; + import { NotFoundError } from "@local/hash-backend-utils/error"; import { createGoogleOAuth2Client, getGoogleAccountById, } from "@local/hash-backend-utils/google"; import { getMachineIdByIdentifier } from "@local/hash-backend-utils/machine-actors"; +import { googleEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; + +import { createEntity } from "../../graph/knowledge/primitive/entity"; +import { createUserSecret } from "../../graph/knowledge/system-types/user-secret"; +import { enabledIntegrations } from "../enabled-integrations"; + +import type { WebId } from "@blockprotocol/type-system"; import type { GoogleOAuth2CallbackRequest, GoogleOAuth2CallbackResponse, } from "@local/hash-isomorphic-utils/google-integration"; -import { googleEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; import type { Account as GoogleAccount } from "@local/hash-isomorphic-utils/system-types/google/account"; import type { RequestHandler } from "express"; -import { google } from "googleapis"; - -import { createEntity } from "../../graph/knowledge/primitive/entity"; -import { createUserSecret } from "../../graph/knowledge/system-types/user-secret"; -import { enabledIntegrations } from "../enabled-integrations"; export const googleOAuthCallback: RequestHandler< Record, diff --git a/apps/hash-api/src/integrations/google/shared/get-or-check-access-token.ts b/apps/hash-api/src/integrations/google/shared/get-or-check-access-token.ts index cf7d70045a9..2cdf804eb00 100644 --- a/apps/hash-api/src/integrations/google/shared/get-or-check-access-token.ts +++ b/apps/hash-api/src/integrations/google/shared/get-or-check-access-token.ts @@ -3,10 +3,11 @@ import { getGoogleAccountById, getTokensForGoogleAccount, } from "@local/hash-backend-utils/google"; -import type { Request, Response } from "express"; import { enabledIntegrations } from "../../enabled-integrations"; +import type { Request, Response } from "express"; + /** * Shared function to retrieve a Google access token for an Express request, * providing standard error handling and response handling. diff --git a/apps/hash-api/src/integrations/linear.ts b/apps/hash-api/src/integrations/linear.ts index 974c6a9e234..0d503a0bbab 100644 --- a/apps/hash-api/src/integrations/linear.ts +++ b/apps/hash-api/src/integrations/linear.ts @@ -1,9 +1,11 @@ +import { LinearClient } from "@linear/sdk"; + +import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; + import type { MachineId, WebId } from "@blockprotocol/type-system"; import type { Organization, Team } from "@linear/sdk"; -import { LinearClient } from "@linear/sdk"; import type { TemporalClient } from "@local/hash-backend-utils/temporal"; import type { SyncWebWorkflow } from "@local/hash-backend-utils/temporal-integration-workflow-types"; -import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; export const listTeams = async (params: { apiKey: string; diff --git a/apps/hash-api/src/integrations/linear/oauth.ts b/apps/hash-api/src/integrations/linear/oauth.ts index 451702917ce..084fbe86f57 100644 --- a/apps/hash-api/src/integrations/linear/oauth.ts +++ b/apps/hash-api/src/integrations/linear/oauth.ts @@ -1,14 +1,8 @@ import crypto from "node:crypto"; -import type { - Entity, - EntityId, - EntityUuid, - UserId, - WebId, -} from "@blockprotocol/type-system"; -import { extractEntityUuidFromEntityId } from "@blockprotocol/type-system"; import { LinearClient } from "@linear/sdk"; + +import { extractEntityUuidFromEntityId } from "@blockprotocol/type-system"; import { getMachineIdByIdentifier } from "@local/hash-backend-utils/machine-actors"; import { apiOrigin, @@ -16,11 +10,8 @@ import { } from "@local/hash-isomorphic-utils/environment"; import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { LinearIntegrationPropertiesWithMetadata } from "@local/hash-isomorphic-utils/system-types/linearintegration"; -import type { RequestHandler } from "express"; import { createEntity } from "../../graph/knowledge/primitive/entity"; -import type { LinearIntegration } from "../../graph/knowledge/system-types/linear-integration-entity"; import { getLinearIntegrationByLinearOrgId, getLinearIntegrationFromEntity, @@ -28,6 +19,17 @@ import { import { isUserMemberOfOrg } from "../../graph/knowledge/system-types/user"; import { createUserSecret } from "../../graph/knowledge/system-types/user-secret"; +import type { LinearIntegration } from "../../graph/knowledge/system-types/linear-integration-entity"; +import type { + Entity, + EntityId, + EntityUuid, + UserId, + WebId, +} from "@blockprotocol/type-system"; +import type { LinearIntegrationPropertiesWithMetadata } from "@local/hash-isomorphic-utils/system-types/linearintegration"; +import type { RequestHandler } from "express"; + const linearClientId = process.env.LINEAR_CLIENT_ID; const linearClientSecret = process.env.LINEAR_CLIENT_SECRET; diff --git a/apps/hash-api/src/integrations/linear/sync-back.ts b/apps/hash-api/src/integrations/linear/sync-back.ts index 742726f6fd9..083d36b0f8f 100644 --- a/apps/hash-api/src/integrations/linear/sync-back.ts +++ b/apps/hash-api/src/integrations/linear/sync-back.ts @@ -1,4 +1,3 @@ -import type { EntityUuid, VersionedUrl } from "@blockprotocol/type-system"; import { entityIdFromComponents, extractWebIdFromEntityId, @@ -6,18 +5,20 @@ import { import { linearTypeMappings } from "@local/hash-backend-utils/linear-type-mappings"; import { getMachineIdByIdentifier } from "@local/hash-backend-utils/machine-actors"; import { createTemporalClient } from "@local/hash-backend-utils/temporal"; -import type { UpdateLinearDataWorkflow } from "@local/hash-backend-utils/temporal-integration-workflow-types"; import { type VaultClient } from "@local/hash-backend-utils/vault"; -import type { GraphApi } from "@local/hash-graph-client"; import { type HashEntity, HashLinkEntity } from "@local/hash-graph-sdk/entity"; import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; import { linearPropertyTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { ImpureGraphContext } from "../../graph/context-types"; import { getLatestEntityById } from "../../graph/knowledge/primitive/entity"; import { getLinearSecretValueByHashWebEntityId } from "../../graph/knowledge/system-types/linear-user-secret"; import { systemAccountId } from "../../graph/system-account"; +import type { ImpureGraphContext } from "../../graph/context-types"; +import type { EntityUuid, VersionedUrl } from "@blockprotocol/type-system"; +import type { UpdateLinearDataWorkflow } from "@local/hash-backend-utils/temporal-integration-workflow-types"; +import type { GraphApi } from "@local/hash-graph-client"; + const supportedLinearEntityTypeIds = linearTypeMappings.map( ({ hashEntityTypeId }) => hashEntityTypeId as VersionedUrl, ); diff --git a/apps/hash-api/src/integrations/linear/webhook.ts b/apps/hash-api/src/integrations/linear/webhook.ts index c5b39974f73..c4482cc0ecb 100644 --- a/apps/hash-api/src/integrations/linear/webhook.ts +++ b/apps/hash-api/src/integrations/linear/webhook.ts @@ -1,17 +1,13 @@ import crypto from "node:crypto"; -import type { WebId } from "@blockprotocol/type-system"; import { extractEntityUuidFromEntityId } from "@blockprotocol/type-system"; import { tupleIncludes } from "@local/advanced-types/includes"; import { timingSafeCompare } from "@local/hash-backend-utils/crypto"; import { getMachineIdByIdentifier } from "@local/hash-backend-utils/machine-actors"; import { createTemporalClient } from "@local/hash-backend-utils/temporal"; -import type { WorkflowTypeMap } from "@local/hash-backend-utils/temporal-integration-workflow-types"; import { supportedLinearTypes } from "@local/hash-backend-utils/temporal-integration-workflow-types"; import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; -import type { RequestHandler } from "express"; -import type { ImpureGraphContext } from "../../graph/context-types"; import { getAllLinearIntegrationsWithLinearOrgId, getSyncedWebsForLinearIntegration, @@ -20,6 +16,11 @@ import { getLinearSecretValueByHashWebEntityId } from "../../graph/knowledge/sys import { systemAccountId } from "../../graph/system-account"; import { logger } from "../../logger"; +import type { ImpureGraphContext } from "../../graph/context-types"; +import type { WebId } from "@blockprotocol/type-system"; +import type { WorkflowTypeMap } from "@local/hash-backend-utils/temporal-integration-workflow-types"; +import type { RequestHandler } from "express"; + type LinearWebhookPayload = { action: "create" | "update" | "delete"; createdAt: string; // ISO timestamp when the action took place. diff --git a/apps/hash-api/src/integrations/sync-back-watcher.ts b/apps/hash-api/src/integrations/sync-back-watcher.ts index 25580bacd75..3e15e8fa813 100644 --- a/apps/hash-api/src/integrations/sync-back-watcher.ts +++ b/apps/hash-api/src/integrations/sync-back-watcher.ts @@ -1,10 +1,6 @@ import { getRequiredEnv } from "@local/hash-backend-utils/environment"; -import type { Logger } from "@local/hash-backend-utils/logger"; import { getMachineIdByIdentifier } from "@local/hash-backend-utils/machine-actors"; import { RedisQueueExclusiveConsumer } from "@local/hash-backend-utils/queue/redis"; -import type { RedisClient } from "@local/hash-backend-utils/redis"; -import type { VaultClient } from "@local/hash-backend-utils/vault"; -import type { GraphApi } from "@local/hash-graph-client"; import { type HashEntity, queryEntities } from "@local/hash-graph-sdk/entity"; import { fullDecisionTimeAxis } from "@local/hash-isomorphic-utils/graph-queries"; @@ -14,6 +10,11 @@ import { supportedLinearTypeIds, } from "./linear/sync-back"; +import type { Logger } from "@local/hash-backend-utils/logger"; +import type { RedisClient } from "@local/hash-backend-utils/redis"; +import type { VaultClient } from "@local/hash-backend-utils/vault"; +import type { GraphApi } from "@local/hash-graph-client"; + const sendEntityToRelevantProcessor = ({ entity, graphApi, diff --git a/apps/hash-api/src/lib/config.ts b/apps/hash-api/src/lib/config.ts index 3c0a7bc99a2..38b62a55b53 100644 --- a/apps/hash-api/src/lib/config.ts +++ b/apps/hash-api/src/lib/config.ts @@ -1,6 +1,7 @@ -import type { StorageType } from "@local/hash-backend-utils/file-storage"; import { storageTypes } from "@local/hash-backend-utils/file-storage"; import { frontendUrl } from "@local/hash-isomorphic-utils/environment"; + +import type { StorageType } from "@local/hash-backend-utils/file-storage"; import type corsMiddleware from "cors"; export function getEnvStorageType(): StorageType { diff --git a/apps/hash-api/src/seed-data/index.ts b/apps/hash-api/src/seed-data/index.ts index 5b267ec208d..9db3c9fc39f 100644 --- a/apps/hash-api/src/seed-data/index.ts +++ b/apps/hash-api/src/seed-data/index.ts @@ -1,19 +1,20 @@ import { extractWebIdFromEntityId } from "@blockprotocol/type-system"; -import type { Logger } from "@local/hash-backend-utils/logger"; -import type { ImpureGraphContext } from "../graph/context-types"; -import type { Org } from "../graph/knowledge/system-types/org"; import { createOrg, getOrgByShortname, } from "../graph/knowledge/system-types/org"; import { createOrgMembershipLinkEntity } from "../graph/knowledge/system-types/org-membership"; -import type { User } from "../graph/knowledge/system-types/user"; import { joinOrg } from "../graph/knowledge/system-types/user"; -import type { PageDefinition } from "./seed-pages"; import { seedPages } from "./seed-pages"; import { ensureUsersAreSeeded } from "./seed-users"; +import type { ImpureGraphContext } from "../graph/context-types"; +import type { Org } from "../graph/knowledge/system-types/org"; +import type { User } from "../graph/knowledge/system-types/user"; +import type { PageDefinition } from "./seed-pages"; +import type { Logger } from "@local/hash-backend-utils/logger"; + // Seed Org with some pages. const seedOrg = async (params: { logger: Logger; diff --git a/apps/hash-api/src/seed-data/seed-flow-test-types.ts b/apps/hash-api/src/seed-data/seed-flow-test-types.ts index c946e536440..9a99b34d22e 100644 --- a/apps/hash-api/src/seed-data/seed-flow-test-types.ts +++ b/apps/hash-api/src/seed-data/seed-flow-test-types.ts @@ -20,11 +20,6 @@ import { systemPropertyTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { ImpureGraphFunction } from "../graph/context-types"; -import type { - EntityTypeDefinition, - PropertyTypeDefinition, -} from "../graph/ensure-system-graph-is-initialized/migrate-ontology-types/util"; import { generateSystemEntityTypeSchema, generateSystemPropertyTypeSchema, @@ -38,6 +33,12 @@ import { createEntityType } from "../graph/ontology/primitive/entity-type"; import { createPropertyType } from "../graph/ontology/primitive/property-type"; import { logger } from "../logger"; +import type { ImpureGraphFunction } from "../graph/context-types"; +import type { + EntityTypeDefinition, + PropertyTypeDefinition, +} from "../graph/ensure-system-graph-is-initialized/migrate-ontology-types/util"; + const provenance: ProvidedEntityEditionProvenance = { actorType: "machine", origin: { diff --git a/apps/hash-api/src/seed-data/seed-pages.ts b/apps/hash-api/src/seed-data/seed-pages.ts index 21269f6ff6b..ba75b4d3353 100644 --- a/apps/hash-api/src/seed-data/seed-pages.ts +++ b/apps/hash-api/src/seed-data/seed-pages.ts @@ -1,14 +1,14 @@ -import type { WebId } from "@blockprotocol/type-system"; -import type { Logger } from "@local/hash-backend-utils/logger"; -import type { AuthenticationContext } from "@local/hash-graph-sdk/authentication-context"; - -import type { ImpureGraphContext } from "../graph/context-types"; -import type { Page } from "../graph/knowledge/system-types/page"; import { createPage, setPageParentPage, } from "../graph/knowledge/system-types/page"; +import type { ImpureGraphContext } from "../graph/context-types"; +import type { Page } from "../graph/knowledge/system-types/page"; +import type { WebId } from "@blockprotocol/type-system"; +import type { Logger } from "@local/hash-backend-utils/logger"; +import type { AuthenticationContext } from "@local/hash-graph-sdk/authentication-context"; + export type PageDefinition = { title: string; nestedPages?: PageDefinition[]; diff --git a/apps/hash-api/src/seed-data/seed-users.ts b/apps/hash-api/src/seed-data/seed-users.ts index 96a784734e8..d2f993a5aad 100644 --- a/apps/hash-api/src/seed-data/seed-users.ts +++ b/apps/hash-api/src/seed-data/seed-users.ts @@ -1,15 +1,16 @@ -import type { Logger } from "@local/hash-backend-utils/logger"; -import type { FeatureFlag } from "@local/hash-isomorphic-utils/feature-flags"; import { featureFlags } from "@local/hash-isomorphic-utils/feature-flags"; -import type { AxiosError } from "axios"; import { createKratosIdentity } from "../auth/ory-kratos"; -import type { ImpureGraphContext } from "../graph/context-types"; -import type { User } from "../graph/knowledge/system-types/user"; import { createUser } from "../graph/knowledge/system-types/user"; import { systemAccountId } from "../graph/system-account"; import { isDevEnv, isTestEnv } from "../lib/env-config"; +import type { ImpureGraphContext } from "../graph/context-types"; +import type { User } from "../graph/knowledge/system-types/user"; +import type { Logger } from "@local/hash-backend-utils/logger"; +import type { FeatureFlag } from "@local/hash-isomorphic-utils/feature-flags"; +import type { AxiosError } from "axios"; + type SeededUser = { email: string; shortname: string; diff --git a/apps/hash-api/src/shared/user-has-access-to-hash.ts b/apps/hash-api/src/shared/user-has-access-to-hash.ts index 627c812895f..f6dc08544a5 100644 --- a/apps/hash-api/src/shared/user-has-access-to-hash.ts +++ b/apps/hash-api/src/shared/user-has-access-to-hash.ts @@ -1,11 +1,11 @@ -import type { AuthenticationContext } from "@local/hash-graph-sdk/authentication-context"; - -import type { ImpureGraphContext } from "../graph/context-types"; import { getUserPendingInvitations, type User, } from "../graph/knowledge/system-types/user"; +import type { ImpureGraphContext } from "../graph/context-types"; +import type { AuthenticationContext } from "@local/hash-graph-sdk/authentication-context"; + const isArrayOfStrings = (value: unknown): value is string[] => { return ( Array.isArray(value) && value.every((item) => typeof item === "string") diff --git a/apps/hash-api/src/storage/index.ts b/apps/hash-api/src/storage/index.ts index 6547613b443..785552b5305 100644 --- a/apps/hash-api/src/storage/index.ts +++ b/apps/hash-api/src/storage/index.ts @@ -1,16 +1,10 @@ -import type { Entity, EntityId } from "@blockprotocol/type-system"; import { isEntityId, splitEntityId } from "@blockprotocol/type-system"; import { getAwsS3Config } from "@local/hash-backend-utils/aws-config"; -import type { - FileStorageProvider, - StorageType, -} from "@local/hash-backend-utils/file-storage"; import { isStorageType, storageProviderLookup, } from "@local/hash-backend-utils/file-storage"; import { AwsS3StorageProvider } from "@local/hash-backend-utils/file-storage/aws-s3-storage-provider"; -import type { AuthenticationContext } from "@local/hash-graph-sdk/authentication-context"; import { queryEntities } from "@local/hash-graph-sdk/entity"; import { apiOrigin } from "@local/hash-isomorphic-utils/environment"; import { fullDecisionTimeAxis } from "@local/hash-isomorphic-utils/graph-queries"; @@ -19,16 +13,23 @@ import { systemPropertyTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-properties"; -import type { File as FileEntity } from "@local/hash-isomorphic-utils/system-types/shared"; -import type { Express } from "express"; -import type Keyv from "keyv"; import { getActorIdFromRequest } from "../auth/get-actor-id"; -import type { ImpureGraphContext } from "../graph/context-types"; import { LOCAL_FILE_UPLOAD_PATH } from "../lib/config"; import { logger } from "../logger"; import { LocalFileSystemStorageProvider } from "./local-file-storage"; +import type { ImpureGraphContext } from "../graph/context-types"; +import type { Entity, EntityId } from "@blockprotocol/type-system"; +import type { + FileStorageProvider, + StorageType, +} from "@local/hash-backend-utils/file-storage"; +import type { AuthenticationContext } from "@local/hash-graph-sdk/authentication-context"; +import type { File as FileEntity } from "@local/hash-isomorphic-utils/system-types/shared"; +import type { Express } from "express"; +import type Keyv from "keyv"; + // S3-like APIs have a upper bound. // 7 days. const DOWNLOAD_URL_EXPIRATION_SECONDS = 60 * 60 * 24 * 7; diff --git a/apps/hash-api/src/storage/local-file-storage.ts b/apps/hash-api/src/storage/local-file-storage.ts index a0751c19fe1..bd21447cdf1 100644 --- a/apps/hash-api/src/storage/local-file-storage.ts +++ b/apps/hash-api/src/storage/local-file-storage.ts @@ -2,6 +2,12 @@ import fs from "node:fs"; import path from "node:path"; import { URL } from "node:url"; +import appRoot from "app-root-path"; +import express from "express"; +import mime from "mime-types"; + +import { getSafeContentType } from "@local/hash-backend-utils/file-storage"; + import type { Url } from "@blockprotocol/type-system"; import type { FileStorageProvider, @@ -12,12 +18,8 @@ import type { PresignedStorageRequest, StorageType, } from "@local/hash-backend-utils/file-storage"; -import { getSafeContentType } from "@local/hash-backend-utils/file-storage"; import type { File } from "@local/hash-isomorphic-utils/system-types/shared"; -import appRoot from "app-root-path"; import type { Express } from "express"; -import express from "express"; -import mime from "mime-types"; export const UPLOAD_BASE_URL = "/local-file-storage-upload"; const DOWNLOAD_BASE_URL = "/uploads"; diff --git a/apps/hash-api/src/telemetry/rudderstack.ts b/apps/hash-api/src/telemetry/rudderstack.ts index 3dd88d42d21..363c788fa8f 100644 --- a/apps/hash-api/src/telemetry/rudderstack.ts +++ b/apps/hash-api/src/telemetry/rudderstack.ts @@ -1,6 +1,7 @@ -import { frontendDomain } from "@local/hash-isomorphic-utils/environment"; import RudderAnalytics from "@rudderstack/rudder-sdk-node"; +import { frontendDomain } from "@local/hash-isomorphic-utils/environment"; + const RUDDERSTACK_KEY = process.env.HASH_API_RUDDERSTACK_KEY || "2SKw8Q5jz5g08LNKpk0Ag82N7HL"; diff --git a/apps/hash-api/src/telemetry/snowplow-setup.ts b/apps/hash-api/src/telemetry/snowplow-setup.ts index f162d182e58..f1777ae1474 100644 --- a/apps/hash-api/src/telemetry/snowplow-setup.ts +++ b/apps/hash-api/src/telemetry/snowplow-setup.ts @@ -1,10 +1,11 @@ -import { getRequiredEnv } from "@local/hash-backend-utils/environment"; import { buildStructEvent, newTracker, type Tracker, } from "@snowplow/node-tracker"; +import { getRequiredEnv } from "@local/hash-backend-utils/environment"; + /** * Sets up snowplow telemetry for HASH usage. Disabled by default. * This tracking function simply sends an event when the platform starts to record usage metrics. diff --git a/apps/hash-frontend/codegen.config.ts b/apps/hash-frontend/codegen.config.ts index d845f05db7e..fa4dec83221 100644 --- a/apps/hash-frontend/codegen.config.ts +++ b/apps/hash-frontend/codegen.config.ts @@ -1,6 +1,7 @@ -import type { CodegenConfig } from "@graphql-codegen/cli"; import { baseGraphQlCodegenConfig } from "@local/hash-isomorphic-utils/graphql/base-codegen-config"; +import type { CodegenConfig } from "@graphql-codegen/cli"; + const config: CodegenConfig = { overwrite: true, schema: diff --git a/apps/hash-frontend/src/blocks/on-block-loaded.tsx b/apps/hash-frontend/src/blocks/on-block-loaded.tsx index 149e77080ed..6edf7f5770d 100644 --- a/apps/hash-frontend/src/blocks/on-block-loaded.tsx +++ b/apps/hash-frontend/src/blocks/on-block-loaded.tsx @@ -1,4 +1,3 @@ -import type { FunctionComponent, ReactNode } from "react"; import { createContext, useCallback, @@ -10,6 +9,8 @@ import { import { getBlockDomId } from "../shared/get-block-dom-id"; +import type { FunctionComponent, ReactNode } from "react"; + type OnBlockLoadedFunction = (blockEntityId: string) => void; /** @private enforces use of custom provider */ diff --git a/apps/hash-frontend/src/blocks/use-fetch-block-subgraph.ts b/apps/hash-frontend/src/blocks/use-fetch-block-subgraph.ts index 6b74f9e1223..c8df6f7ef41 100644 --- a/apps/hash-frontend/src/blocks/use-fetch-block-subgraph.ts +++ b/apps/hash-frontend/src/blocks/use-fetch-block-subgraph.ts @@ -1,16 +1,6 @@ import { useLazyQuery } from "@apollo/client"; -import type { - EntityRootType, - KnowledgeGraphVertices, - Subgraph, -} from "@blockprotocol/graph"; -import type { - ActorEntityUuid, - EntityEditionId, - EntityId, - PropertyObject, - VersionedUrl, -} from "@blockprotocol/type-system"; +import { useCallback } from "react"; + import { currentTimestamp, splitEntityId } from "@blockprotocol/type-system"; import { deserializeQueryEntitySubgraphResponse, @@ -21,13 +11,24 @@ import { currentTimeInstantTemporalAxes, } from "@local/hash-isomorphic-utils/graph-queries"; import { queryEntitySubgraphQuery } from "@local/hash-isomorphic-utils/graphql/queries/entity.queries"; -import { useCallback } from "react"; import type { QueryEntitySubgraphQuery, QueryEntitySubgraphQueryVariables, SubgraphAndPermissions as SubgraphAndPermissionsGQL, } from "../graphql/api-types.gen"; +import type { + EntityRootType, + KnowledgeGraphVertices, + Subgraph, +} from "@blockprotocol/graph"; +import type { + ActorEntityUuid, + EntityEditionId, + EntityId, + PropertyObject, + VersionedUrl, +} from "@blockprotocol/type-system"; type SubgraphAndPermissions = Omit & { subgraph: Subgraph; diff --git a/apps/hash-frontend/src/blocks/user-blocks.tsx b/apps/hash-frontend/src/blocks/user-blocks.tsx index 7f2e4a7d2c3..e00cd9a9b3b 100644 --- a/apps/hash-frontend/src/blocks/user-blocks.tsx +++ b/apps/hash-frontend/src/blocks/user-blocks.tsx @@ -1,12 +1,3 @@ -import type { EntityType } from "@blockprotocol/type-system"; -import type { ComponentIdHashBlockMap } from "@local/hash-isomorphic-utils/blocks"; -import { fetchBlock } from "@local/hash-isomorphic-utils/blocks"; -import type { - Dispatch, - FunctionComponent, - ReactNode, - SetStateAction, -} from "react"; import { createContext, useCallback, @@ -15,9 +6,20 @@ import { useMemo, } from "react"; +import { fetchBlock } from "@local/hash-isomorphic-utils/blocks"; + import { useCachedDefaultState } from "../components/hooks/use-default-state"; import { useGetBlockProtocolBlocks } from "../components/hooks/use-get-block-protocol-blocks"; +import type { EntityType } from "@blockprotocol/type-system"; +import type { ComponentIdHashBlockMap } from "@local/hash-isomorphic-utils/blocks"; +import type { + Dispatch, + FunctionComponent, + ReactNode, + SetStateAction, +} from "react"; + interface UserBlocksContextState { value: ComponentIdHashBlockMap; setValue: Dispatch>; diff --git a/apps/hash-frontend/src/components/block-loader/block-loader.tsx b/apps/hash-frontend/src/components/block-loader/block-loader.tsx index 31450ded447..a785b763946 100644 --- a/apps/hash-frontend/src/components/block-loader/block-loader.tsx +++ b/apps/hash-frontend/src/components/block-loader/block-loader.tsx @@ -1,63 +1,65 @@ -import type { - BlockGraphProperties, - EntityRevisionId, - EntityRootType, - EntityVertex, - GraphEmbedderMessageCallbacks, - Subgraph, -} from "@blockprotocol/graph"; -import type { KnowledgeGraphEditionMap } from "@blockprotocol/graph/types"; -import type { - EntityId, - EntityRecordId, - PropertyObject, - VersionedUrl, -} from "@blockprotocol/type-system"; +import { + useCallback, + useContext, + useEffect, + useLayoutEffect, + useMemo, + useRef, + useState, +} from "react"; + import { extractWebIdFromEntityId, isEntityId, } from "@blockprotocol/type-system"; import { typedEntries } from "@local/advanced-types/typed-entries"; -import type { EntityPermissionsMap } from "@local/hash-graph-sdk/entity"; import { HashEntity } from "@local/hash-graph-sdk/entity"; -import type { HashBlockMeta } from "@local/hash-isomorphic-utils/blocks"; -import type { EntityStore } from "@local/hash-isomorphic-utils/entity-store"; import { getDraftEntityByEntityId, textualContentPropertyTypeBaseUrl, } from "@local/hash-isomorphic-utils/entity-store"; -import type { TextualContentPropertyValue } from "@local/hash-isomorphic-utils/system-types/shared"; -import type { FunctionComponent } from "react"; -import { - useCallback, - useContext, - useEffect, - useLayoutEffect, - useMemo, - useRef, - useState, -} from "react"; import { useBlockLoadedContext } from "../../blocks/on-block-loaded"; import { useFetchBlockSubgraph } from "../../blocks/use-fetch-block-subgraph"; import { useBlockContext } from "../../pages/shared/block-collection/block-context"; import { WorkspaceContext } from "../../pages/shared/workspace-context"; -import type { - ArchiveEntityMessageCallback, - CreateEntityMessageCallback, - UpdateEntityMessageCallback, - UploadFileRequestCallback, -} from "../hooks/block-protocol-functions/knowledge/knowledge-shim"; import { useBlockProtocolArchiveEntity } from "../hooks/block-protocol-functions/knowledge/use-block-protocol-archive-entity"; import { useBlockProtocolCreateEntity } from "../hooks/block-protocol-functions/knowledge/use-block-protocol-create-entity"; import { useBlockProtocolFileUpload } from "../hooks/block-protocol-functions/knowledge/use-block-protocol-file-upload"; import { useBlockProtocolGetEntity } from "../hooks/block-protocol-functions/knowledge/use-block-protocol-get-entity"; import { useBlockProtocolQueryEntities } from "../hooks/block-protocol-functions/knowledge/use-block-protocol-query-entities"; import { useBlockProtocolUpdateEntity } from "../hooks/block-protocol-functions/knowledge/use-block-protocol-update-entity"; -import type { RemoteBlockProps } from "../remote-block/remote-block"; import { RemoteBlock } from "../remote-block/remote-block"; import { fetchEmbedCode } from "./fetch-embed-code"; +import type { + ArchiveEntityMessageCallback, + CreateEntityMessageCallback, + UpdateEntityMessageCallback, + UploadFileRequestCallback, +} from "../hooks/block-protocol-functions/knowledge/knowledge-shim"; +import type { RemoteBlockProps } from "../remote-block/remote-block"; +import type { + BlockGraphProperties, + EntityRevisionId, + EntityRootType, + EntityVertex, + GraphEmbedderMessageCallbacks, + Subgraph, +} from "@blockprotocol/graph"; +import type { KnowledgeGraphEditionMap } from "@blockprotocol/graph/types"; +import type { + EntityId, + EntityRecordId, + PropertyObject, + VersionedUrl, +} from "@blockprotocol/type-system"; +import type { EntityPermissionsMap } from "@local/hash-graph-sdk/entity"; +import type { HashBlockMeta } from "@local/hash-isomorphic-utils/blocks"; +import type { EntityStore } from "@local/hash-isomorphic-utils/entity-store"; +import type { TextualContentPropertyValue } from "@local/hash-isomorphic-utils/system-types/shared"; +import type { FunctionComponent } from "react"; + export type BlockLoaderProps = { blockCollectionSubgraph?: Subgraph>; blockEntityId?: EntityId; // @todo make this always defined diff --git a/apps/hash-frontend/src/components/block-loader/fetch-embed-code.ts b/apps/hash-frontend/src/components/block-loader/fetch-embed-code.ts index 02ed128460a..d776ff9fa83 100644 --- a/apps/hash-frontend/src/components/block-loader/fetch-embed-code.ts +++ b/apps/hash-frontend/src/components/block-loader/fetch-embed-code.ts @@ -1,6 +1,7 @@ -import type { JsonObject } from "@blockprotocol/core"; import { apiGraphQLEndpoint } from "@local/hash-isomorphic-utils/environment"; +import type { JsonObject } from "@blockprotocol/core"; + export type FetchEmbedCodeFn = ( url: string, type?: string, diff --git a/apps/hash-frontend/src/components/confirmation-alert.tsx b/apps/hash-frontend/src/components/confirmation-alert.tsx index 6f437e8354a..a563650c18e 100644 --- a/apps/hash-frontend/src/components/confirmation-alert.tsx +++ b/apps/hash-frontend/src/components/confirmation-alert.tsx @@ -5,10 +5,11 @@ import { DialogContentText, DialogTitle, } from "@mui/material"; -import type { FunctionComponent, ReactNode } from "react"; import { Button } from "../shared/ui"; +import type { FunctionComponent, ReactNode } from "react"; + type ConfirmationAlertProps = { children: ReactNode; open: boolean; diff --git a/apps/hash-frontend/src/components/dropdowns/version-dropdown.tsx b/apps/hash-frontend/src/components/dropdowns/version-dropdown.tsx index a70a70e5e76..38fc68159ae 100644 --- a/apps/hash-frontend/src/components/dropdowns/version-dropdown.tsx +++ b/apps/hash-frontend/src/components/dropdowns/version-dropdown.tsx @@ -1,5 +1,6 @@ import { Box } from "@mui/material"; import { formatDistance } from "date-fns"; + import type { ChangeEvent, FunctionComponent } from "react"; type VersionDropdownProps = { diff --git a/apps/hash-frontend/src/components/error-block/error-block.tsx b/apps/hash-frontend/src/components/error-block/error-block.tsx index 67fd2bbef18..4b8c7c4cc7c 100644 --- a/apps/hash-frontend/src/components/error-block/error-block.tsx +++ b/apps/hash-frontend/src/components/error-block/error-block.tsx @@ -1,8 +1,8 @@ +import { Button } from "../../shared/ui"; + import type { FallbackRender } from "@sentry/react"; import type { FunctionComponent } from "react"; -import { Button } from "../../shared/ui"; - type FallbackRenderProps = Parameters[0]; export interface ErrorBlockProps extends FallbackRenderProps { diff --git a/apps/hash-frontend/src/components/forms/select-input.tsx b/apps/hash-frontend/src/components/forms/select-input.tsx index 6298ae47c30..d5f75045e2c 100644 --- a/apps/hash-frontend/src/components/forms/select-input.tsx +++ b/apps/hash-frontend/src/components/forms/select-input.tsx @@ -1,8 +1,9 @@ import { Box } from "@mui/material"; import { uniqueId } from "lodash"; -import type { ChangeEvent, HTMLProps } from "react"; import { forwardRef, useCallback, useState } from "react"; +import type { ChangeEvent, HTMLProps } from "react"; + type SelectInputProps = { label?: string; labelClass?: string; diff --git a/apps/hash-frontend/src/components/forms/tags-input.tsx b/apps/hash-frontend/src/components/forms/tags-input.tsx index fa9f2af3bf5..32f5e70d044 100644 --- a/apps/hash-frontend/src/components/forms/tags-input.tsx +++ b/apps/hash-frontend/src/components/forms/tags-input.tsx @@ -1,7 +1,8 @@ import { Box } from "@mui/material"; -import type { FunctionComponent, KeyboardEvent } from "react"; import { useRef } from "react"; +import type { FunctionComponent, KeyboardEvent } from "react"; + type TagsInputProps = { minHeight?: number; tags: string[]; diff --git a/apps/hash-frontend/src/components/forms/text-input.tsx b/apps/hash-frontend/src/components/forms/text-input.tsx index ca04aa14f52..4f002487fd2 100644 --- a/apps/hash-frontend/src/components/forms/text-input.tsx +++ b/apps/hash-frontend/src/components/forms/text-input.tsx @@ -1,8 +1,9 @@ -import type { ChangeEvent, CSSProperties, HTMLProps } from "react"; import { forwardRef } from "react"; import { InputLabelWrapper } from "./input-label-wrapper"; +import type { ChangeEvent, CSSProperties, HTMLProps } from "react"; + type TextInputProps = { disallowRegExp?: RegExp; label?: string; diff --git a/apps/hash-frontend/src/components/grid/grid.tsx b/apps/hash-frontend/src/components/grid/grid.tsx index 77cebd5d4f7..07026c1e53c 100644 --- a/apps/hash-frontend/src/components/grid/grid.tsx +++ b/apps/hash-frontend/src/components/grid/grid.tsx @@ -1,33 +1,15 @@ import "@glideapps/glide-data-grid/dist/index.css"; -import type { BaseUrl, VersionedUrl } from "@blockprotocol/type-system"; -import type { - DataEditorProps, - DataEditorRef, - GridCell, - GridColumn as LibraryGridColumn, - GridSelection, - HeaderClickedEventArgs, - Item, - SizedGridColumn, - TextCell, - Theme, -} from "@glideapps/glide-data-grid"; import { CompactSelection, DataEditor, GridCellKind, } from "@glideapps/glide-data-grid"; -import { gridRowHeight } from "@local/hash-isomorphic-utils/data-grid"; -import type { PopperProps } from "@mui/material"; import { Box, useTheme } from "@mui/material"; -import type { - Instance as PopperInstance, - VirtualElement, -} from "@popperjs/core"; import { uniqueId } from "lodash"; -import type { MutableRefObject, Ref } from "react"; import { useCallback, useEffect, useMemo, useRef, useState } from "react"; +import { gridRowHeight } from "@local/hash-isomorphic-utils/data-grid"; + import { getCellHorizontalPadding } from "./utils"; import { ColumnFilterMenu } from "./utils/column-filter-menu"; import { @@ -35,15 +17,35 @@ import { type ConversionTargetsByColumnKey, } from "./utils/conversion-menu"; import { customGridIcons } from "./utils/custom-grid-icons"; -import type { ColumnFilter } from "./utils/filtering"; import { InteractableManager } from "./utils/interactable-manager"; -import type { ColumnHeaderPath } from "./utils/interactable-manager/types"; import { overrideCustomRenderers } from "./utils/override-custom-renderers"; -import type { ColumnSort } from "./utils/sorting"; import { defaultSortRows } from "./utils/sorting"; import { generateInteractableId, useDrawHeader } from "./utils/use-draw-header"; import { useRenderGridPortal } from "./utils/use-render-grid-portal"; +import type { ColumnFilter } from "./utils/filtering"; +import type { ColumnHeaderPath } from "./utils/interactable-manager/types"; +import type { ColumnSort } from "./utils/sorting"; +import type { BaseUrl, VersionedUrl } from "@blockprotocol/type-system"; +import type { + DataEditorProps, + DataEditorRef, + GridCell, + GridColumn as LibraryGridColumn, + GridSelection, + HeaderClickedEventArgs, + Item, + SizedGridColumn, + TextCell, + Theme, +} from "@glideapps/glide-data-grid"; +import type { PopperProps } from "@mui/material"; +import type { + Instance as PopperInstance, + VirtualElement, +} from "@popperjs/core"; +import type { MutableRefObject, Ref } from "react"; + export type { ConversionTargetsByColumnKey }; export type ColumnKey = C["id"]; diff --git a/apps/hash-frontend/src/components/grid/utils.ts b/apps/hash-frontend/src/components/grid/utils.ts index 62c241b77e5..c7ee639b82f 100644 --- a/apps/hash-frontend/src/components/grid/utils.ts +++ b/apps/hash-frontend/src/components/grid/utils.ts @@ -1,6 +1,7 @@ -import type { CustomCell, DrawArgs, Theme } from "@glideapps/glide-data-grid"; import { getMiddleCenterBias, GridCellKind } from "@glideapps/glide-data-grid"; +import type { CustomCell, DrawArgs, Theme } from "@glideapps/glide-data-grid"; + /** * @returns vertical center of a grid cell, relative to the visible grid area */ diff --git a/apps/hash-frontend/src/components/grid/utils/column-filter-menu.tsx b/apps/hash-frontend/src/components/grid/utils/column-filter-menu.tsx index 45f42f056d1..e724877f5c6 100644 --- a/apps/hash-frontend/src/components/grid/utils/column-filter-menu.tsx +++ b/apps/hash-frontend/src/components/grid/utils/column-filter-menu.tsx @@ -1,5 +1,3 @@ -import { TextField } from "@hashintel/design-system"; -import { formatNumber } from "@local/hash-isomorphic-utils/format-number"; import { Box, Checkbox, @@ -16,13 +14,17 @@ import { type Theme, Typography, } from "@mui/material"; -import type { CSSProperties } from "react"; import { memo, useMemo, useState } from "react"; import { FixedSizeList } from "react-window"; +import { TextField } from "@hashintel/design-system"; +import { formatNumber } from "@local/hash-isomorphic-utils/format-number"; + import { MenuItem } from "../../../shared/ui"; + import type { GridRow } from "../grid"; import type { ColumnFilter } from "./filtering"; +import type { CSSProperties } from "react"; const blueFilterButtonSx: SxProps = ({ palette, transitions }) => ({ background: "transparent", diff --git a/apps/hash-frontend/src/components/grid/utils/conversion-menu.tsx b/apps/hash-frontend/src/components/grid/utils/conversion-menu.tsx index 8ca8978af67..fc1a79eec51 100644 --- a/apps/hash-frontend/src/components/grid/utils/conversion-menu.tsx +++ b/apps/hash-frontend/src/components/grid/utils/conversion-menu.tsx @@ -1,5 +1,3 @@ -import type { VersionedUrl } from "@blockprotocol/type-system"; -import { Select } from "@hashintel/design-system"; import { Box, ClickAwayListener, @@ -12,8 +10,12 @@ import { } from "@mui/material"; import { useEffect, useRef, useState } from "react"; +import { Select } from "@hashintel/design-system"; + import { MenuItem } from "../../../shared/ui"; +import type { VersionedUrl } from "@blockprotocol/type-system"; + export type ConversionTargetsByColumnKey = Record< string, { diff --git a/apps/hash-frontend/src/components/grid/utils/custom-grid-icons.ts b/apps/hash-frontend/src/components/grid/utils/custom-grid-icons.ts index ffa904a147d..e1c4e707005 100644 --- a/apps/hash-frontend/src/components/grid/utils/custom-grid-icons.ts +++ b/apps/hash-frontend/src/components/grid/utils/custom-grid-icons.ts @@ -1,6 +1,7 @@ -import type { SpriteProps } from "@glideapps/glide-data-grid"; import { customColors } from "@hashintel/design-system/theme"; +import type { SpriteProps } from "@glideapps/glide-data-grid"; + export const customGridIcons = { bpAsteriskCircle: ({ fgColor }) => ``, diff --git a/apps/hash-frontend/src/components/grid/utils/draw-chip-with-icon.ts b/apps/hash-frontend/src/components/grid/utils/draw-chip-with-icon.ts index b160c6113bb..da3f988641b 100644 --- a/apps/hash-frontend/src/components/grid/utils/draw-chip-with-icon.ts +++ b/apps/hash-frontend/src/components/grid/utils/draw-chip-with-icon.ts @@ -1,14 +1,15 @@ -import type { CustomCell, DrawArgs } from "@glideapps/glide-data-grid"; import { customColors } from "@hashintel/design-system/theme"; +import { getChipColors } from "../../../pages/shared/chip-cell"; +import { getYCenter } from "../utils"; +import { drawChip } from "./draw-chip"; + import type { ChipCellColor, ChipCellVariant, } from "../../../pages/shared/chip-cell"; -import { getChipColors } from "../../../pages/shared/chip-cell"; -import { getYCenter } from "../utils"; import type { CustomIcon } from "./custom-grid-icons"; -import { drawChip } from "./draw-chip"; +import type { CustomCell, DrawArgs } from "@glideapps/glide-data-grid"; const filledIconCanvasCache: { [originalUrl: string]: { diff --git a/apps/hash-frontend/src/components/grid/utils/draw-chip-with-text.ts b/apps/hash-frontend/src/components/grid/utils/draw-chip-with-text.ts index cbaeae93e58..97eb155b4f2 100644 --- a/apps/hash-frontend/src/components/grid/utils/draw-chip-with-text.ts +++ b/apps/hash-frontend/src/components/grid/utils/draw-chip-with-text.ts @@ -1,8 +1,8 @@ -import type { CustomCell, DrawArgs } from "@glideapps/glide-data-grid"; - import { getYCenter } from "../utils"; import { drawChip } from "./draw-chip"; +import type { CustomCell, DrawArgs } from "@glideapps/glide-data-grid"; + /** * @param args draw args of cell * @param text text content of chip diff --git a/apps/hash-frontend/src/components/grid/utils/draw-chip.ts b/apps/hash-frontend/src/components/grid/utils/draw-chip.ts index 3f1f2b92146..da20365e12e 100644 --- a/apps/hash-frontend/src/components/grid/utils/draw-chip.ts +++ b/apps/hash-frontend/src/components/grid/utils/draw-chip.ts @@ -1,8 +1,8 @@ -import type { CustomCell, DrawArgs } from "@glideapps/glide-data-grid"; - import { getYCenter } from "../utils"; import { drawRoundRect } from "./draw-round-rect"; +import type { CustomCell, DrawArgs } from "@glideapps/glide-data-grid"; + export const drawChip = ( args: DrawArgs, left: number, diff --git a/apps/hash-frontend/src/components/grid/utils/draw-text-with-icon.ts b/apps/hash-frontend/src/components/grid/utils/draw-text-with-icon.ts index 32a6b700557..64c0f53e334 100644 --- a/apps/hash-frontend/src/components/grid/utils/draw-text-with-icon.ts +++ b/apps/hash-frontend/src/components/grid/utils/draw-text-with-icon.ts @@ -1,7 +1,7 @@ -import type { CustomCell, DrawArgs } from "@glideapps/glide-data-grid"; - import { getYCenter } from "../utils"; + import type { CustomIcon } from "./custom-grid-icons"; +import type { CustomCell, DrawArgs } from "@glideapps/glide-data-grid"; interface DrawTextWithIconParams { args: DrawArgs; diff --git a/apps/hash-frontend/src/components/grid/utils/draw-url-as-link.ts b/apps/hash-frontend/src/components/grid/utils/draw-url-as-link.ts index 027c25d37fa..07cd785a229 100644 --- a/apps/hash-frontend/src/components/grid/utils/draw-url-as-link.ts +++ b/apps/hash-frontend/src/components/grid/utils/draw-url-as-link.ts @@ -1,8 +1,9 @@ -import type { CustomCell, DrawArgs } from "@glideapps/glide-data-grid"; import { customColors } from "@hashintel/design-system/theme"; import { getYCenter } from "../utils"; +import type { CustomCell, DrawArgs } from "@glideapps/glide-data-grid"; + interface DrawUrlParams { args: DrawArgs; url: string; diff --git a/apps/hash-frontend/src/components/grid/utils/draw-vertical-indentation-line.ts b/apps/hash-frontend/src/components/grid/utils/draw-vertical-indentation-line.ts index 1ebb7ec2852..65c1cc51c89 100644 --- a/apps/hash-frontend/src/components/grid/utils/draw-vertical-indentation-line.ts +++ b/apps/hash-frontend/src/components/grid/utils/draw-vertical-indentation-line.ts @@ -1,7 +1,7 @@ -import type { CustomCell, DrawArgs } from "@glideapps/glide-data-grid"; - import { getYCenter } from "../utils"; +import type { CustomCell, DrawArgs } from "@glideapps/glide-data-grid"; + export type VerticalIndentationLineDir = "up" | "down" | "full"; /** diff --git a/apps/hash-frontend/src/components/grid/utils/interactable-manager.ts b/apps/hash-frontend/src/components/grid/utils/interactable-manager.ts index 3040330d32e..fe5719aa68a 100644 --- a/apps/hash-frontend/src/components/grid/utils/interactable-manager.ts +++ b/apps/hash-frontend/src/components/grid/utils/interactable-manager.ts @@ -1,13 +1,5 @@ -import type { CustomCell, DrawArgs } from "@glideapps/glide-data-grid"; import { typedKeys } from "@local/advanced-types/typed-entries"; -import type { - CellPath, - ColumnHeaderDrawArgs, - ColumnHeaderPath, - CursorPos, - Interactable, -} from "./interactable-manager/types"; import { drawArgsToCellPath, drawArgsToColumnHeaderPath, @@ -16,6 +8,15 @@ import { splitPath, } from "./interactable-manager/utils"; +import type { + CellPath, + ColumnHeaderDrawArgs, + ColumnHeaderPath, + CursorPos, + Interactable, +} from "./interactable-manager/types"; +import type { CustomCell, DrawArgs } from "@glideapps/glide-data-grid"; + class InteractableManagerClass { static instance: InteractableManagerClass | null = null; diff --git a/apps/hash-frontend/src/components/grid/utils/interactable-manager/utils.ts b/apps/hash-frontend/src/components/grid/utils/interactable-manager/utils.ts index 74e6b1d4473..23bdb95c7f5 100644 --- a/apps/hash-frontend/src/components/grid/utils/interactable-manager/utils.ts +++ b/apps/hash-frontend/src/components/grid/utils/interactable-manager/utils.ts @@ -1,9 +1,3 @@ -import type { - CustomCell, - DrawArgs, - Rectangle, -} from "@glideapps/glide-data-grid"; - import type { CellPath, ColumnHeaderDrawArgs, @@ -11,6 +5,11 @@ import type { CursorPos, InteractablePosition, } from "./types"; +import type { + CustomCell, + DrawArgs, + Rectangle, +} from "@glideapps/glide-data-grid"; export const isPathCellPath = ( path: CellPath | ColumnHeaderPath, diff --git a/apps/hash-frontend/src/components/grid/utils/override-custom-renderers.tsx b/apps/hash-frontend/src/components/grid/utils/override-custom-renderers.tsx index cb70ab9fd55..2589c9265ee 100644 --- a/apps/hash-frontend/src/components/grid/utils/override-custom-renderers.tsx +++ b/apps/hash-frontend/src/components/grid/utils/override-custom-renderers.tsx @@ -1,4 +1,3 @@ -import type { DataEditorProps } from "@glideapps/glide-data-grid"; import { isObjectEditorCallbackResult } from "@glideapps/glide-data-grid"; import { type ReactNode, type RefObject } from "react"; @@ -6,6 +5,8 @@ import { useSlideStack } from "../../../pages/shared/slide-stack"; import { useScrollLock } from "../../../shared/use-scroll-lock"; import { InteractableManager } from "./interactable-manager"; +import type { DataEditorProps } from "@glideapps/glide-data-grid"; + /** * Lock scrolling outside when a Grid editor overlay is open. * diff --git a/apps/hash-frontend/src/components/grid/utils/sorting.ts b/apps/hash-frontend/src/components/grid/utils/sorting.ts index 356b4e29eae..56b9e95e375 100644 --- a/apps/hash-frontend/src/components/grid/utils/sorting.ts +++ b/apps/hash-frontend/src/components/grid/utils/sorting.ts @@ -1,6 +1,5 @@ -import type { SizedGridColumn } from "@glideapps/glide-data-grid"; - import type { GridRow } from "../grid"; +import type { SizedGridColumn } from "@glideapps/glide-data-grid"; export type ColumnSortDirection = "asc" | "desc"; diff --git a/apps/hash-frontend/src/components/grid/utils/use-draw-header.ts b/apps/hash-frontend/src/components/grid/utils/use-draw-header.ts index 0503988b67c..0b88c67a37e 100644 --- a/apps/hash-frontend/src/components/grid/utils/use-draw-header.ts +++ b/apps/hash-frontend/src/components/grid/utils/use-draw-header.ts @@ -1,20 +1,21 @@ -import type { BaseUrl, VersionedUrl } from "@blockprotocol/type-system"; -import type { - DrawHeaderCallback, - SizedGridColumn, -} from "@glideapps/glide-data-grid"; import { useTheme } from "@mui/material"; import { useCallback } from "react"; -import type { ColumnKey, ConversionTargetsByColumnKey } from "../grid"; import { getCellHorizontalPadding, getYCenter } from "../utils"; -import type { ColumnFilter } from "./filtering"; import { InteractableManager } from "./interactable-manager"; + +import type { ColumnKey, ConversionTargetsByColumnKey } from "../grid"; +import type { ColumnFilter } from "./filtering"; import type { Interactable, InteractablePosition, } from "./interactable-manager/types"; import type { ColumnSort } from "./sorting"; +import type { BaseUrl, VersionedUrl } from "@blockprotocol/type-system"; +import type { + DrawHeaderCallback, + SizedGridColumn, +} from "@glideapps/glide-data-grid"; export const generateInteractableId = ( type: "filter" | "sort" | "convert", diff --git a/apps/hash-frontend/src/components/grid/utils/use-grid-tooltip.tsx b/apps/hash-frontend/src/components/grid/utils/use-grid-tooltip.tsx index fd73c7f5ec8..9439a364d63 100644 --- a/apps/hash-frontend/src/components/grid/utils/use-grid-tooltip.tsx +++ b/apps/hash-frontend/src/components/grid/utils/use-grid-tooltip.tsx @@ -1,11 +1,7 @@ -import type { DataEditorRef } from "@glideapps/glide-data-grid"; import { useWindowEvent } from "@mantine/hooks"; -import type { PopoverPosition } from "@mui/material"; import { Box, Popper, Typography } from "@mui/material"; -import type { VirtualElement } from "@popperjs/core"; import { isEqual } from "lodash"; import { usePopupState } from "material-ui-popup-state/hooks"; -import type { RefObject } from "react"; import { useCallback, useEffect, useMemo, useRef, useState } from "react"; import type { @@ -13,6 +9,10 @@ import type { TooltipCellProps, UseGridTooltipResponse, } from "./use-grid-tooltip/types"; +import type { DataEditorRef } from "@glideapps/glide-data-grid"; +import type { PopoverPosition } from "@mui/material"; +import type { VirtualElement } from "@popperjs/core"; +import type { RefObject } from "react"; export const useGridTooltip = ( gridRef: RefObject, diff --git a/apps/hash-frontend/src/components/grid/utils/use-grid-tooltip/draw-interactable-tooltip-icons.ts b/apps/hash-frontend/src/components/grid/utils/use-grid-tooltip/draw-interactable-tooltip-icons.ts index 4b152e8ae8e..e2c395f5422 100644 --- a/apps/hash-frontend/src/components/grid/utils/use-grid-tooltip/draw-interactable-tooltip-icons.ts +++ b/apps/hash-frontend/src/components/grid/utils/use-grid-tooltip/draw-interactable-tooltip-icons.ts @@ -1,10 +1,10 @@ -import type { DrawArgs } from "@glideapps/glide-data-grid"; - import { getCellHorizontalPadding, getYCenter } from "../../utils"; import { drawCellFadeOutGradient } from "../draw-cell-fade-out-gradient"; import { InteractableManager } from "../interactable-manager"; + import type { Interactable } from "../interactable-manager/types"; import type { TooltipCell } from "./types"; +import type { DrawArgs } from "@glideapps/glide-data-grid"; const iconSize = 16; const iconGap = 10; diff --git a/apps/hash-frontend/src/components/grid/utils/use-grid-tooltip/types.ts b/apps/hash-frontend/src/components/grid/utils/use-grid-tooltip/types.ts index c550cfb4a57..46d8c9f3a4c 100644 --- a/apps/hash-frontend/src/components/grid/utils/use-grid-tooltip/types.ts +++ b/apps/hash-frontend/src/components/grid/utils/use-grid-tooltip/types.ts @@ -1,8 +1,7 @@ +import type { CustomIcon } from "../custom-grid-icons"; import type { CustomCell } from "@glideapps/glide-data-grid"; import type { ReactElement } from "react"; -import type { CustomIcon } from "../custom-grid-icons"; - export type GridTooltip = { colIndex: number; rowIndex: number; diff --git a/apps/hash-frontend/src/components/hooks/block-protocol-functions/knowledge/knowledge-shim.ts b/apps/hash-frontend/src/components/hooks/block-protocol-functions/knowledge/knowledge-shim.ts index 1e0d7dc3f51..401b74ac450 100644 --- a/apps/hash-frontend/src/components/hooks/block-protocol-functions/knowledge/knowledge-shim.ts +++ b/apps/hash-frontend/src/components/hooks/block-protocol-functions/knowledge/knowledge-shim.ts @@ -6,6 +6,10 @@ * package and be removed from here. */ +import type { + FileEntityCreationInput, + FileEntityUpdateInput, +} from "../../../../graphql/api-types.gen"; import type { MessageCallback, MessageReturn } from "@blockprotocol/core"; import type { CreateResourceError, @@ -29,11 +33,6 @@ import type { TraversalPath, } from "@rust/hash-graph-store/types"; -import type { - FileEntityCreationInput, - FileEntityUpdateInput, -} from "../../../../graphql/api-types.gen"; - /* Entity CRU */ export type GetEntityData = { diff --git a/apps/hash-frontend/src/components/hooks/block-protocol-functions/knowledge/use-block-protocol-archive-entity.ts b/apps/hash-frontend/src/components/hooks/block-protocol-functions/knowledge/use-block-protocol-archive-entity.ts index bf6404734dc..0939a28acd3 100644 --- a/apps/hash-frontend/src/components/hooks/block-protocol-functions/knowledge/use-block-protocol-archive-entity.ts +++ b/apps/hash-frontend/src/components/hooks/block-protocol-functions/knowledge/use-block-protocol-archive-entity.ts @@ -1,11 +1,12 @@ import { useMutation } from "@apollo/client"; import { useCallback } from "react"; +import { archiveEntityMutation } from "../../../../graphql/queries/knowledge/entity.queries"; + import type { ArchiveEntityMutation, ArchiveEntityMutationVariables, } from "../../../../graphql/api-types.gen"; -import { archiveEntityMutation } from "../../../../graphql/queries/knowledge/entity.queries"; import type { ArchiveEntityMessageCallback } from "./knowledge-shim"; export const useBlockProtocolArchiveEntity = ( diff --git a/apps/hash-frontend/src/components/hooks/block-protocol-functions/knowledge/use-block-protocol-create-entity.ts b/apps/hash-frontend/src/components/hooks/block-protocol-functions/knowledge/use-block-protocol-create-entity.ts index 124c2078851..cdf1bd0a2fe 100644 --- a/apps/hash-frontend/src/components/hooks/block-protocol-functions/knowledge/use-block-protocol-create-entity.ts +++ b/apps/hash-frontend/src/components/hooks/block-protocol-functions/knowledge/use-block-protocol-create-entity.ts @@ -1,22 +1,24 @@ import { useMutation } from "@apollo/client"; -import type { WebId } from "@blockprotocol/type-system"; +import { useCallback } from "react"; + import { HashEntity, mergePropertyObjectAndMetadata, } from "@local/hash-graph-sdk/entity"; -import { useCallback } from "react"; -import type { - CreateEntityMutation, - CreateEntityMutationVariables, -} from "../../../../graphql/api-types.gen"; import { createEntityMutation, queryEntitySubgraphQuery, } from "../../../../graphql/queries/knowledge/entity.queries"; import { useActiveWorkspace } from "../../../../pages/shared/workspace-context"; import { generateSidebarEntityTypeEntitiesQueryVariables } from "../../../../shared/use-entity-type-entities"; + +import type { + CreateEntityMutation, + CreateEntityMutationVariables, +} from "../../../../graphql/api-types.gen"; import type { CreateEntityMessageCallback } from "./knowledge-shim"; +import type { WebId } from "@blockprotocol/type-system"; export const useBlockProtocolCreateEntity = ( webId: WebId | null, diff --git a/apps/hash-frontend/src/components/hooks/block-protocol-functions/knowledge/use-block-protocol-file-upload.ts b/apps/hash-frontend/src/components/hooks/block-protocol-functions/knowledge/use-block-protocol-file-upload.ts index c41c84a358e..4b5d654707e 100644 --- a/apps/hash-frontend/src/components/hooks/block-protocol-functions/knowledge/use-block-protocol-file-upload.ts +++ b/apps/hash-frontend/src/components/hooks/block-protocol-functions/knowledge/use-block-protocol-file-upload.ts @@ -1,21 +1,23 @@ import { useMutation } from "@apollo/client"; -import type { WebId } from "@blockprotocol/type-system"; -import { HashEntity } from "@local/hash-graph-sdk/entity"; -import type { File } from "@local/hash-isomorphic-utils/system-types/shared"; import { useCallback } from "react"; +import { HashEntity } from "@local/hash-graph-sdk/entity"; + +import { + createFileFromUrl, + requestFileUpload, +} from "../../../../graphql/queries/knowledge/file.queries"; +import { uploadFileToStorageProvider } from "../../../../shared/upload-to-storage-provider"; + import type { CreateFileFromUrlMutation, CreateFileFromUrlMutationVariables, RequestFileUploadMutation, RequestFileUploadMutationVariables, } from "../../../../graphql/api-types.gen"; -import { - createFileFromUrl, - requestFileUpload, -} from "../../../../graphql/queries/knowledge/file.queries"; -import { uploadFileToStorageProvider } from "../../../../shared/upload-to-storage-provider"; import type { UploadFileRequestCallback } from "./knowledge-shim"; +import type { WebId } from "@blockprotocol/type-system"; +import type { File } from "@local/hash-isomorphic-utils/system-types/shared"; export const useBlockProtocolFileUpload = ( webId?: WebId, diff --git a/apps/hash-frontend/src/components/hooks/block-protocol-functions/knowledge/use-block-protocol-get-entity.ts b/apps/hash-frontend/src/components/hooks/block-protocol-functions/knowledge/use-block-protocol-get-entity.ts index a8601606a37..d1bd7cf6fd1 100644 --- a/apps/hash-frontend/src/components/hooks/block-protocol-functions/knowledge/use-block-protocol-get-entity.ts +++ b/apps/hash-frontend/src/components/hooks/block-protocol-functions/knowledge/use-block-protocol-get-entity.ts @@ -1,9 +1,10 @@ import { useLazyQuery } from "@apollo/client"; +import { useCallback } from "react"; + import { splitEntityId } from "@blockprotocol/type-system"; import { deserializeQueryEntitySubgraphResponse } from "@local/hash-graph-sdk/entity"; import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; import { queryEntitySubgraphQuery } from "@local/hash-isomorphic-utils/graphql/queries/entity.queries"; -import { useCallback } from "react"; import type { QueryEntitySubgraphQuery, diff --git a/apps/hash-frontend/src/components/hooks/block-protocol-functions/knowledge/use-block-protocol-query-entities.ts b/apps/hash-frontend/src/components/hooks/block-protocol-functions/knowledge/use-block-protocol-query-entities.ts index 267e0fb3943..690e6357b78 100644 --- a/apps/hash-frontend/src/components/hooks/block-protocol-functions/knowledge/use-block-protocol-query-entities.ts +++ b/apps/hash-frontend/src/components/hooks/block-protocol-functions/knowledge/use-block-protocol-query-entities.ts @@ -1,14 +1,16 @@ import { useLazyQuery } from "@apollo/client"; +import { useCallback } from "react"; + import { deserializeQueryEntitySubgraphResponse } from "@local/hash-graph-sdk/entity"; import { convertBpFilterToGraphFilter } from "@local/hash-graph-sdk/filter"; import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; -import { useCallback } from "react"; + +import { queryEntitySubgraphQuery } from "../../../../graphql/queries/knowledge/entity.queries"; import type { QueryEntitySubgraphQuery, QueryEntitySubgraphQueryVariables, } from "../../../../graphql/api-types.gen"; -import { queryEntitySubgraphQuery } from "../../../../graphql/queries/knowledge/entity.queries"; import type { QueryEntitiesMessageCallback } from "./knowledge-shim"; export const useBlockProtocolQueryEntities = (): { diff --git a/apps/hash-frontend/src/components/hooks/block-protocol-functions/knowledge/use-block-protocol-update-entity.ts b/apps/hash-frontend/src/components/hooks/block-protocol-functions/knowledge/use-block-protocol-update-entity.ts index fdaf4f021b8..c7855cb92a6 100644 --- a/apps/hash-frontend/src/components/hooks/block-protocol-functions/knowledge/use-block-protocol-update-entity.ts +++ b/apps/hash-frontend/src/components/hooks/block-protocol-functions/knowledge/use-block-protocol-update-entity.ts @@ -1,16 +1,18 @@ import { useMutation } from "@apollo/client"; +import { useCallback } from "react"; + import { HashEntity, mergePropertyObjectAndMetadata, propertyObjectToPatches, } from "@local/hash-graph-sdk/entity"; -import { useCallback } from "react"; + +import { updateEntityMutation } from "../../../../graphql/queries/knowledge/entity.queries"; import type { UpdateEntityMutation, UpdateEntityMutationVariables, } from "../../../../graphql/api-types.gen"; -import { updateEntityMutation } from "../../../../graphql/queries/knowledge/entity.queries"; import type { UpdateEntityMessageCallback } from "./knowledge-shim"; export const useBlockProtocolUpdateEntity = ( diff --git a/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-create-entity-type.ts b/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-create-entity-type.ts index 2b8826d7cc4..a9f647e8ece 100644 --- a/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-create-entity-type.ts +++ b/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-create-entity-type.ts @@ -1,13 +1,14 @@ import { useMutation } from "@apollo/client"; -import type { WebId } from "@blockprotocol/type-system"; import { useCallback } from "react"; +import { createEntityTypeMutation } from "../../../../graphql/queries/ontology/entity-type.queries"; + import type { CreateEntityTypeMutation, CreateEntityTypeMutationVariables, } from "../../../../graphql/api-types.gen"; -import { createEntityTypeMutation } from "../../../../graphql/queries/ontology/entity-type.queries"; import type { CreateEntityTypeMessageCallback } from "./ontology-types-shim"; +import type { WebId } from "@blockprotocol/type-system"; export const useBlockProtocolCreateEntityType = ( webId: WebId | null, diff --git a/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-create-property-type.ts b/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-create-property-type.ts index 90f3bd142ee..801377d82d7 100644 --- a/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-create-property-type.ts +++ b/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-create-property-type.ts @@ -1,13 +1,14 @@ import { useMutation } from "@apollo/client"; -import type { WebId } from "@blockprotocol/type-system"; import { useCallback } from "react"; +import { createPropertyTypeMutation } from "../../../../graphql/queries/ontology/property-type.queries"; + import type { CreatePropertyTypeMutation, CreatePropertyTypeMutationVariables, } from "../../../../graphql/api-types.gen"; -import { createPropertyTypeMutation } from "../../../../graphql/queries/ontology/property-type.queries"; import type { CreatePropertyTypeMessageCallback } from "./ontology-types-shim"; +import type { WebId } from "@blockprotocol/type-system"; export const useBlockProtocolCreatePropertyType = ( webId: WebId | null, diff --git a/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-get-data-type.ts b/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-get-data-type.ts index 0c4f0fe302d..5de62f20c12 100644 --- a/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-get-data-type.ts +++ b/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-get-data-type.ts @@ -1,16 +1,18 @@ import { useLazyQuery } from "@apollo/client"; +import { useCallback } from "react"; + import { deserializeQueryDataTypeSubgraphResponse } from "@local/hash-graph-sdk/data-type"; import { almostFullOntologyResolveDepths, currentTimeInstantTemporalAxes, } from "@local/hash-isomorphic-utils/graph-queries"; -import { useCallback } from "react"; + +import { queryDataTypeSubgraphQuery } from "../../../../graphql/queries/ontology/data-type.queries"; import type { QueryDataTypeSubgraphQuery, QueryDataTypeSubgraphQueryVariables, } from "../../../../graphql/api-types.gen"; -import { queryDataTypeSubgraphQuery } from "../../../../graphql/queries/ontology/data-type.queries"; import type { GetDataTypeMessageCallback } from "./ontology-types-shim"; export const useBlockProtocolGetDataType = (): { diff --git a/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-get-entity-type.ts b/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-get-entity-type.ts index fa2dde7ef39..37d37a0d049 100644 --- a/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-get-entity-type.ts +++ b/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-get-entity-type.ts @@ -1,16 +1,18 @@ import { useLazyQuery } from "@apollo/client"; +import { useCallback } from "react"; + import { deserializeQueryEntityTypeSubgraphResponse } from "@local/hash-graph-sdk/entity-type"; import { almostFullOntologyResolveDepths, currentTimeInstantTemporalAxes, } from "@local/hash-isomorphic-utils/graph-queries"; -import { useCallback } from "react"; + +import { queryEntityTypeSubgraphQuery } from "../../../../graphql/queries/ontology/entity-type.queries"; import type { QueryEntityTypeSubgraphQuery, QueryEntityTypeSubgraphQueryVariables, } from "../../../../graphql/api-types.gen"; -import { queryEntityTypeSubgraphQuery } from "../../../../graphql/queries/ontology/entity-type.queries"; import type { GetEntityTypeMessageCallback } from "./ontology-types-shim"; export const useBlockProtocolGetEntityType = (): { diff --git a/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-get-property-type.ts b/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-get-property-type.ts index fa0711d3391..6d699ec278f 100644 --- a/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-get-property-type.ts +++ b/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-get-property-type.ts @@ -1,16 +1,18 @@ import { useLazyQuery } from "@apollo/client"; +import { useCallback } from "react"; + import { deserializeQueryPropertyTypeSubgraphResponse } from "@local/hash-graph-sdk/property-type"; import { almostFullOntologyResolveDepths, currentTimeInstantTemporalAxes, } from "@local/hash-isomorphic-utils/graph-queries"; -import { useCallback } from "react"; + +import { queryPropertyTypeSubgraphQuery } from "../../../../graphql/queries/ontology/property-type.queries"; import type { QueryPropertyTypeSubgraphQuery, QueryPropertyTypeSubgraphQueryVariables, } from "../../../../graphql/api-types.gen"; -import { queryPropertyTypeSubgraphQuery } from "../../../../graphql/queries/ontology/property-type.queries"; import type { GetPropertyTypeMessageCallback } from "./ontology-types-shim"; export const useBlockProtocolGetPropertyType = (): { diff --git a/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-query-data-types.ts b/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-query-data-types.ts index 8fa06730c5b..7471ae7a576 100644 --- a/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-query-data-types.ts +++ b/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-query-data-types.ts @@ -1,16 +1,18 @@ import { useLazyQuery } from "@apollo/client"; +import { useCallback } from "react"; + import { deserializeQueryDataTypeSubgraphResponse } from "@local/hash-graph-sdk/data-type"; import { almostFullOntologyResolveDepths, currentTimeInstantTemporalAxes, } from "@local/hash-isomorphic-utils/graph-queries"; -import { useCallback } from "react"; + +import { queryDataTypeSubgraphQuery } from "../../../../graphql/queries/ontology/data-type.queries"; import type { QueryDataTypeSubgraphQuery, QueryDataTypeSubgraphQueryVariables, } from "../../../../graphql/api-types.gen"; -import { queryDataTypeSubgraphQuery } from "../../../../graphql/queries/ontology/data-type.queries"; import type { QueryDataTypesMessageCallback } from "./ontology-types-shim"; export const useBlockProtocolQueryDataTypes = (): { diff --git a/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-query-entity-types.ts b/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-query-entity-types.ts index 30b87b6468e..76415034fde 100644 --- a/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-query-entity-types.ts +++ b/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-query-entity-types.ts @@ -1,17 +1,19 @@ import { useLazyQuery } from "@apollo/client"; +import { useCallback } from "react"; + import { deserializeQueryEntityTypeSubgraphResponse } from "@local/hash-graph-sdk/entity-type"; import { almostFullOntologyResolveDepths, currentTimeInstantTemporalAxes, fullTransactionTimeAxis, } from "@local/hash-isomorphic-utils/graph-queries"; -import { useCallback } from "react"; + +import { queryEntityTypeSubgraphQuery } from "../../../../graphql/queries/ontology/entity-type.queries"; import type { QueryEntityTypeSubgraphQuery, QueryEntityTypeSubgraphQueryVariables, } from "../../../../graphql/api-types.gen"; -import { queryEntityTypeSubgraphQuery } from "../../../../graphql/queries/ontology/entity-type.queries"; import type { QueryEntityTypesMessageCallback } from "./ontology-types-shim"; export const useBlockProtocolQueryEntityTypes = (): { diff --git a/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-query-property-types.ts b/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-query-property-types.ts index cb319b11974..b64fb2d3cdd 100644 --- a/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-query-property-types.ts +++ b/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-query-property-types.ts @@ -1,17 +1,19 @@ import { useLazyQuery } from "@apollo/client"; +import { useCallback } from "react"; + import { deserializeQueryPropertyTypeSubgraphResponse } from "@local/hash-graph-sdk/property-type"; import { almostFullOntologyResolveDepths, currentTimeInstantTemporalAxes, fullTransactionTimeAxis, } from "@local/hash-isomorphic-utils/graph-queries"; -import { useCallback } from "react"; + +import { queryPropertyTypeSubgraphQuery } from "../../../../graphql/queries/ontology/property-type.queries"; import type { QueryPropertyTypeSubgraphQuery, QueryPropertyTypeSubgraphQueryVariables, } from "../../../../graphql/api-types.gen"; -import { queryPropertyTypeSubgraphQuery } from "../../../../graphql/queries/ontology/property-type.queries"; import type { QueryPropertyTypesMessageCallback } from "./ontology-types-shim"; export const useBlockProtocolQueryPropertyTypes = (): { diff --git a/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-update-entity-type.ts b/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-update-entity-type.ts index 754019f6eaa..2e384a5c4cf 100644 --- a/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-update-entity-type.ts +++ b/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-update-entity-type.ts @@ -1,11 +1,12 @@ import { useMutation } from "@apollo/client"; import { useCallback } from "react"; +import { updateEntityTypeMutation } from "../../../../graphql/queries/ontology/entity-type.queries"; + import type { UpdateEntityTypeMutation, UpdateEntityTypeMutationVariables, } from "../../../../graphql/api-types.gen"; -import { updateEntityTypeMutation } from "../../../../graphql/queries/ontology/entity-type.queries"; import type { UpdateEntityTypeMessageCallback } from "./ontology-types-shim"; export const useBlockProtocolUpdateEntityType = ( diff --git a/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-update-property-type.ts b/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-update-property-type.ts index 48aaa2f24da..0cb2af91177 100644 --- a/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-update-property-type.ts +++ b/apps/hash-frontend/src/components/hooks/block-protocol-functions/ontology/use-block-protocol-update-property-type.ts @@ -1,11 +1,12 @@ import { useMutation } from "@apollo/client"; import { useCallback } from "react"; +import { updatePropertyTypeMutation } from "../../../../graphql/queries/ontology/property-type.queries"; + import type { UpdatePropertyTypeMutation, UpdatePropertyTypeMutationVariables, } from "../../../../graphql/api-types.gen"; -import { updatePropertyTypeMutation } from "../../../../graphql/queries/ontology/property-type.queries"; import type { UpdatePropertyTypeMessageCallback } from "./ontology-types-shim"; export const useBlockProtocolUpdatePropertyType = ( diff --git a/apps/hash-frontend/src/components/hooks/shared/get-page-refetch-queries.ts b/apps/hash-frontend/src/components/hooks/shared/get-page-refetch-queries.ts index 8c42a553e29..e784e42d431 100644 --- a/apps/hash-frontend/src/components/hooks/shared/get-page-refetch-queries.ts +++ b/apps/hash-frontend/src/components/hooks/shared/get-page-refetch-queries.ts @@ -1,14 +1,16 @@ -import type { EntityId } from "@blockprotocol/type-system"; +import { useCallback } from "react"; + import { extractEntityUuidFromEntityId, extractWebIdFromEntityId, } from "@blockprotocol/type-system"; -import { useCallback } from "react"; import { queryEntitySubgraphQuery } from "../../../graphql/queries/knowledge/entity.queries"; import { getBlockCollectionContentsStructuralQueryVariables } from "../../../pages/shared/block-collection-contents"; import { getAccountPagesVariables } from "../../../shared/account-pages-variables"; +import type { EntityId } from "@blockprotocol/type-system"; + /** * Some aspects of a page, e.g. the icon and title, are shown in multiple places: * 1. The header on the page's own page diff --git a/apps/hash-frontend/src/components/hooks/use-account-pages.ts b/apps/hash-frontend/src/components/hooks/use-account-pages.ts index 4579fa1e281..e261cc67334 100644 --- a/apps/hash-frontend/src/components/hooks/use-account-pages.ts +++ b/apps/hash-frontend/src/components/hooks/use-account-pages.ts @@ -1,27 +1,29 @@ -import type { ApolloQueryResult } from "@apollo/client"; import { useQuery } from "@apollo/client"; +import { useMemo } from "react"; + import { getOutgoingLinkAndTargetEntities, getRoots, } from "@blockprotocol/graph/stdlib"; -import type { EntityMetadata, WebId } from "@blockprotocol/type-system"; import { deserializeQueryEntitySubgraphResponse } from "@local/hash-graph-sdk/entity"; import { systemEntityTypes, systemLinkEntityTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { SimpleProperties } from "@local/hash-isomorphic-utils/simplify-properties"; import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-properties"; -import type { PageProperties } from "@local/hash-isomorphic-utils/system-types/shared"; -import { useMemo } from "react"; + +import { queryEntitySubgraphQuery } from "../../graphql/queries/knowledge/entity.queries"; +import { getAccountPagesVariables } from "../../shared/account-pages-variables"; +import { useHashInstance } from "./use-hash-instance"; import type { QueryEntitySubgraphQuery, QueryEntitySubgraphQueryVariables, } from "../../graphql/api-types.gen"; -import { queryEntitySubgraphQuery } from "../../graphql/queries/knowledge/entity.queries"; -import { getAccountPagesVariables } from "../../shared/account-pages-variables"; -import { useHashInstance } from "./use-hash-instance"; +import type { ApolloQueryResult } from "@apollo/client"; +import type { EntityMetadata, WebId } from "@blockprotocol/type-system"; +import type { SimpleProperties } from "@local/hash-isomorphic-utils/simplify-properties"; +import type { PageProperties } from "@local/hash-isomorphic-utils/system-types/shared"; export type SimplePage = SimpleProperties & { metadata: EntityMetadata; diff --git a/apps/hash-frontend/src/components/hooks/use-archive-page.ts b/apps/hash-frontend/src/components/hooks/use-archive-page.ts index 8139f11b4ad..64e263010f4 100644 --- a/apps/hash-frontend/src/components/hooks/use-archive-page.ts +++ b/apps/hash-frontend/src/components/hooks/use-archive-page.ts @@ -1,20 +1,22 @@ import { useMutation } from "@apollo/client"; -import type { EntityId } from "@blockprotocol/type-system"; +import { useCallback } from "react"; + import { extractEntityUuidFromEntityId, extractWebIdFromEntityId, } from "@blockprotocol/type-system"; -import { useCallback } from "react"; -import type { - UpdatePageMutation, - UpdatePageMutationVariables, -} from "../../graphql/api-types.gen"; import { queryEntitySubgraphQuery } from "../../graphql/queries/knowledge/entity.queries"; import { updatePage } from "../../graphql/queries/page.queries"; import { getBlockCollectionContentsStructuralQueryVariables } from "../../pages/shared/block-collection-contents"; import { getAccountPagesVariables } from "../../shared/account-pages-variables"; +import type { + UpdatePageMutation, + UpdatePageMutationVariables, +} from "../../graphql/api-types.gen"; +import type { EntityId } from "@blockprotocol/type-system"; + export const useArchivePage = () => { const [updatePageFn, { loading }] = useMutation< UpdatePageMutation, diff --git a/apps/hash-frontend/src/components/hooks/use-create-comment.ts b/apps/hash-frontend/src/components/hooks/use-create-comment.ts index 39095e87a49..fa916c7c66d 100644 --- a/apps/hash-frontend/src/components/hooks/use-create-comment.ts +++ b/apps/hash-frontend/src/components/hooks/use-create-comment.ts @@ -1,14 +1,15 @@ import { useMutation } from "@apollo/client"; -import type { EntityId } from "@blockprotocol/type-system"; -import type { TextToken } from "@local/hash-isomorphic-utils/types"; import { useCallback } from "react"; +import { createComment } from "../../graphql/queries/comment.queries"; +import { getPageComments } from "../../graphql/queries/page.queries"; + import type { CreateCommentMutation, CreateCommentMutationVariables, } from "../../graphql/api-types.gen"; -import { createComment } from "../../graphql/queries/comment.queries"; -import { getPageComments } from "../../graphql/queries/page.queries"; +import type { EntityId } from "@blockprotocol/type-system"; +import type { TextToken } from "@local/hash-isomorphic-utils/types"; export const useCreateComment = (pageId: EntityId) => { const [createCommentFn, { loading }] = useMutation< diff --git a/apps/hash-frontend/src/components/hooks/use-create-page.ts b/apps/hash-frontend/src/components/hooks/use-create-page.ts index 8020a62c860..ac1f214a34b 100644 --- a/apps/hash-frontend/src/components/hooks/use-create-page.ts +++ b/apps/hash-frontend/src/components/hooks/use-create-page.ts @@ -1,22 +1,24 @@ import { useMutation } from "@apollo/client"; -import type { WebId } from "@blockprotocol/type-system"; +import { useRouter } from "next/router"; +import { useCallback } from "react"; + import { extractEntityUuidFromEntityId, extractWebIdFromEntityId, } from "@blockprotocol/type-system"; -import { useRouter } from "next/router"; -import { useCallback } from "react"; -import type { - CreatePageMutation, - CreatePageMutationVariables, -} from "../../graphql/api-types.gen"; import { PageType } from "../../graphql/api-types.gen"; import { queryEntitySubgraphQuery } from "../../graphql/queries/knowledge/entity.queries"; import { createPage } from "../../graphql/queries/page.queries"; import { constructPageRelativeUrl } from "../../lib/routes"; import { getAccountPagesVariables } from "../../shared/account-pages-variables"; +import type { + CreatePageMutation, + CreatePageMutationVariables, +} from "../../graphql/api-types.gen"; +import type { WebId } from "@blockprotocol/type-system"; + export const useCreatePage = ({ shortname, webId, diff --git a/apps/hash-frontend/src/components/hooks/use-create-sub-page.ts b/apps/hash-frontend/src/components/hooks/use-create-sub-page.ts index 2663e09cc2d..a7dd7a4f7ee 100644 --- a/apps/hash-frontend/src/components/hooks/use-create-sub-page.ts +++ b/apps/hash-frontend/src/components/hooks/use-create-sub-page.ts @@ -1,20 +1,22 @@ import { useMutation } from "@apollo/client"; -import type { EntityId, WebId } from "@blockprotocol/type-system"; -import { extractEntityUuidFromEntityId } from "@blockprotocol/type-system"; import { useRouter } from "next/router"; import { useCallback } from "react"; +import { extractEntityUuidFromEntityId } from "@blockprotocol/type-system"; + +import { PageType } from "../../graphql/api-types.gen"; +import { queryEntitySubgraphQuery } from "../../graphql/queries/knowledge/entity.queries"; +import { createPage, setParentPage } from "../../graphql/queries/page.queries"; +import { constructPageRelativeUrl } from "../../lib/routes"; +import { getAccountPagesVariables } from "../../shared/account-pages-variables"; + import type { CreatePageMutation, CreatePageMutationVariables, SetParentPageMutation, SetParentPageMutationVariables, } from "../../graphql/api-types.gen"; -import { PageType } from "../../graphql/api-types.gen"; -import { queryEntitySubgraphQuery } from "../../graphql/queries/knowledge/entity.queries"; -import { createPage, setParentPage } from "../../graphql/queries/page.queries"; -import { constructPageRelativeUrl } from "../../lib/routes"; -import { getAccountPagesVariables } from "../../shared/account-pages-variables"; +import type { EntityId, WebId } from "@blockprotocol/type-system"; export const useCreateSubPage = ({ shortname, diff --git a/apps/hash-frontend/src/components/hooks/use-default-state.tsx b/apps/hash-frontend/src/components/hooks/use-default-state.tsx index 5e0f3d578b3..6f2385bee93 100644 --- a/apps/hash-frontend/src/components/hooks/use-default-state.tsx +++ b/apps/hash-frontend/src/components/hooks/use-default-state.tsx @@ -1,7 +1,8 @@ import { useLocalStorage } from "@mantine/hooks"; -import type { Dispatch, SetStateAction } from "react"; import { useCallback, useState } from "react"; +import type { Dispatch, SetStateAction } from "react"; + export const useDefaultState = < T extends object | number | string | boolean | null | undefined, >( diff --git a/apps/hash-frontend/src/components/hooks/use-delete-comment.ts b/apps/hash-frontend/src/components/hooks/use-delete-comment.ts index cf8adbb5959..ce0d2507985 100644 --- a/apps/hash-frontend/src/components/hooks/use-delete-comment.ts +++ b/apps/hash-frontend/src/components/hooks/use-delete-comment.ts @@ -1,13 +1,14 @@ import { useMutation } from "@apollo/client"; -import type { EntityId } from "@blockprotocol/type-system"; import { useCallback } from "react"; +import { deleteComment } from "../../graphql/queries/comment.queries"; +import { getPageComments } from "../../graphql/queries/page.queries"; + import type { DeleteCommentMutation, DeleteCommentMutationVariables, } from "../../graphql/api-types.gen"; -import { deleteComment } from "../../graphql/queries/comment.queries"; -import { getPageComments } from "../../graphql/queries/page.queries"; +import type { EntityId } from "@blockprotocol/type-system"; export const useDeleteComment = (pageId: EntityId) => { const [deleteCommentFn, { loading }] = useMutation< diff --git a/apps/hash-frontend/src/components/hooks/use-entity-by-id.ts b/apps/hash-frontend/src/components/hooks/use-entity-by-id.ts index 81e2dfd1609..d1205293023 100644 --- a/apps/hash-frontend/src/components/hooks/use-entity-by-id.ts +++ b/apps/hash-frontend/src/components/hooks/use-entity-by-id.ts @@ -1,5 +1,6 @@ import { useQuery } from "@apollo/client"; -import type { EntityRootType, Subgraph } from "@blockprotocol/graph"; +import { useMemo } from "react"; + import { type EntityId, splitEntityId } from "@blockprotocol/type-system"; import { deserializeQueryEntitySubgraphResponse, @@ -7,16 +8,16 @@ import { } from "@local/hash-graph-sdk/entity"; import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; import { queryEntitySubgraphQuery } from "@local/hash-isomorphic-utils/graphql/queries/entity.queries"; -import type { - EntityTraversalPath, - GraphResolveDepths, -} from "@rust/hash-graph-store/types"; -import { useMemo } from "react"; import type { QueryEntitySubgraphQuery, QueryEntitySubgraphQueryVariables, } from "../../graphql/api-types.gen"; +import type { EntityRootType, Subgraph } from "@blockprotocol/graph"; +import type { + EntityTraversalPath, + GraphResolveDepths, +} from "@rust/hash-graph-store/types"; export const useEntityById = ({ entityId, diff --git a/apps/hash-frontend/src/components/hooks/use-font-loaded-callback.ts b/apps/hash-frontend/src/components/hooks/use-font-loaded-callback.ts index 119000c9776..bd7a2bb47b8 100644 --- a/apps/hash-frontend/src/components/hooks/use-font-loaded-callback.ts +++ b/apps/hash-frontend/src/components/hooks/use-font-loaded-callback.ts @@ -1,7 +1,8 @@ import { useLayoutEffect } from "react"; -import type { FontFace } from "use-font-face-observer"; import useFontFaceObserver from "use-font-face-observer"; +import type { FontFace } from "use-font-face-observer"; + export const useFontLoadedCallback = ( fontList: FontFace[], callback?: () => void, diff --git a/apps/hash-frontend/src/components/hooks/use-get-account-id-for-shortname.ts b/apps/hash-frontend/src/components/hooks/use-get-account-id-for-shortname.ts index 65932652b55..8db52515b97 100644 --- a/apps/hash-frontend/src/components/hooks/use-get-account-id-for-shortname.ts +++ b/apps/hash-frontend/src/components/hooks/use-get-account-id-for-shortname.ts @@ -1,10 +1,12 @@ -import type { WebId } from "@blockprotocol/type-system"; -import { extractWebIdFromEntityId } from "@blockprotocol/type-system"; import { useMemo } from "react"; +import { extractWebIdFromEntityId } from "@blockprotocol/type-system"; + import { useOrgs } from "./use-orgs"; import { useUsers } from "./use-users"; +import type { WebId } from "@blockprotocol/type-system"; + export const useGetWebIdForShortname = ( shortname: string | undefined, ): { loading: boolean; webId: WebId | undefined } => { diff --git a/apps/hash-frontend/src/components/hooks/use-get-block-protocol-blocks.ts b/apps/hash-frontend/src/components/hooks/use-get-block-protocol-blocks.ts index 8b5f92430eb..289cfb485cd 100644 --- a/apps/hash-frontend/src/components/hooks/use-get-block-protocol-blocks.ts +++ b/apps/hash-frontend/src/components/hooks/use-get-block-protocol-blocks.ts @@ -1,8 +1,9 @@ import { useQuery } from "@apollo/client"; -import type { GetBlockProtocolBlocksQuery } from "../../graphql/api-types.gen"; import { getBlockProtocolBlocksQuery } from "../../graphql/queries/block.queries"; +import type { GetBlockProtocolBlocksQuery } from "../../graphql/api-types.gen"; + export const useGetBlockProtocolBlocks = () => { const { data, error } = useQuery( getBlockProtocolBlocksQuery, diff --git a/apps/hash-frontend/src/components/hooks/use-get-owner-for-entity.ts b/apps/hash-frontend/src/components/hooks/use-get-owner-for-entity.ts index a43dbeab9bb..aec86da3c59 100644 --- a/apps/hash-frontend/src/components/hooks/use-get-owner-for-entity.ts +++ b/apps/hash-frontend/src/components/hooks/use-get-owner-for-entity.ts @@ -1,11 +1,13 @@ -import type { EntityId, WebId } from "@blockprotocol/type-system"; -import { extractWebIdFromEntityId } from "@blockprotocol/type-system"; import * as Sentry from "@sentry/nextjs"; import { useCallback } from "react"; +import { extractWebIdFromEntityId } from "@blockprotocol/type-system"; + import { useOrgs } from "./use-orgs"; import { useUsers } from "./use-users"; +import type { EntityId, WebId } from "@blockprotocol/type-system"; + export const useGetOwnerForEntity = () => { /* * This is a simple way of getting all users and orgs to find an entity's owner's name diff --git a/apps/hash-frontend/src/components/hooks/use-hash-instance.ts b/apps/hash-frontend/src/components/hooks/use-hash-instance.ts index 9103abfcb0f..490389729f2 100644 --- a/apps/hash-frontend/src/components/hooks/use-hash-instance.ts +++ b/apps/hash-frontend/src/components/hooks/use-hash-instance.ts @@ -1,16 +1,18 @@ import { useQuery } from "@apollo/client"; +import { useMemo } from "react"; + import { HashEntity } from "@local/hash-graph-sdk/entity"; -import type { Simplified } from "@local/hash-isomorphic-utils/simplify-properties"; import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-properties"; -import type { HASHInstance } from "@local/hash-isomorphic-utils/system-types/hashinstance"; -import { useMemo } from "react"; + +import { getHashInstanceSettings } from "../../graphql/queries/knowledge/hash-instance.queries"; import type { EnabledIntegrations, GetHashInstanceSettingsQueryQuery, GetHashInstanceSettingsQueryQueryVariables, } from "../../graphql/api-types.gen"; -import { getHashInstanceSettings } from "../../graphql/queries/knowledge/hash-instance.queries"; +import type { Simplified } from "@local/hash-isomorphic-utils/simplify-properties"; +import type { HASHInstance } from "@local/hash-isomorphic-utils/system-types/hashinstance"; export const useHashInstance = (): { loading: boolean; diff --git a/apps/hash-frontend/src/components/hooks/use-orgs-with-links.ts b/apps/hash-frontend/src/components/hooks/use-orgs-with-links.ts index 58f0a7e35e3..e0b0fc8a92a 100644 --- a/apps/hash-frontend/src/components/hooks/use-orgs-with-links.ts +++ b/apps/hash-frontend/src/components/hooks/use-orgs-with-links.ts @@ -1,22 +1,24 @@ -import type { ApolloQueryResult } from "@apollo/client"; import { useQuery } from "@apollo/client"; +import { useMemo } from "react"; + import { getRoots } from "@blockprotocol/graph/stdlib"; -import type { ActorGroupEntityUuid } from "@blockprotocol/type-system"; import { deserializeQueryEntitySubgraphResponse } from "@local/hash-graph-sdk/entity"; import { currentTimeInstantTemporalAxes, generateVersionedUrlMatchingFilter, } from "@local/hash-isomorphic-utils/graph-queries"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import { useMemo } from "react"; + +import { queryEntitySubgraphQuery } from "../../graphql/queries/knowledge/entity.queries"; +import { constructOrg, isEntityOrgEntity } from "../../lib/user-and-org"; import type { QueryEntitySubgraphQuery, QueryEntitySubgraphQueryVariables, } from "../../graphql/api-types.gen"; -import { queryEntitySubgraphQuery } from "../../graphql/queries/knowledge/entity.queries"; import type { Org } from "../../lib/user-and-org"; -import { constructOrg, isEntityOrgEntity } from "../../lib/user-and-org"; +import type { ApolloQueryResult } from "@apollo/client"; +import type { ActorGroupEntityUuid } from "@blockprotocol/type-system"; const emptyOrgsArray: Org[] = []; diff --git a/apps/hash-frontend/src/components/hooks/use-orgs.ts b/apps/hash-frontend/src/components/hooks/use-orgs.ts index c8fdf3ae22f..b13dd7c970e 100644 --- a/apps/hash-frontend/src/components/hooks/use-orgs.ts +++ b/apps/hash-frontend/src/components/hooks/use-orgs.ts @@ -1,19 +1,21 @@ -import type { ApolloQueryResult } from "@apollo/client"; import { useQuery } from "@apollo/client"; + import { deserializeQueryEntitiesResponse } from "@local/hash-graph-sdk/entity"; import { convertBpFilterToGraphFilter } from "@local/hash-graph-sdk/filter"; import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; +import { queryEntitiesQuery } from "../../graphql/queries/knowledge/entity.queries"; +import { constructMinimalOrg, isEntityOrgEntity } from "../../lib/user-and-org"; +import { entityHasEntityTypeByVersionedUrlFilter } from "../../shared/filters"; +import { useMemoCompare } from "../../shared/use-memo-compare"; + import type { QueryEntitiesQuery, QueryEntitiesQueryVariables, } from "../../graphql/api-types.gen"; -import { queryEntitiesQuery } from "../../graphql/queries/knowledge/entity.queries"; import type { MinimalOrg } from "../../lib/user-and-org"; -import { constructMinimalOrg, isEntityOrgEntity } from "../../lib/user-and-org"; -import { entityHasEntityTypeByVersionedUrlFilter } from "../../shared/filters"; -import { useMemoCompare } from "../../shared/use-memo-compare"; +import type { ApolloQueryResult } from "@apollo/client"; /** * Retrieves a list of organizations diff --git a/apps/hash-frontend/src/components/hooks/use-page-comments.ts b/apps/hash-frontend/src/components/hooks/use-page-comments.ts index 8bfb287fdca..e329af1a249 100644 --- a/apps/hash-frontend/src/components/hooks/use-page-comments.ts +++ b/apps/hash-frontend/src/components/hooks/use-page-comments.ts @@ -1,17 +1,19 @@ import { useQuery } from "@apollo/client"; -import type { - EntityId, - EntityMetadata, - EntityTemporalMetadata, -} from "@blockprotocol/type-system"; + import { HashEntity } from "@local/hash-graph-sdk/entity"; -import type { TextToken } from "@local/hash-isomorphic-utils/types"; + +import { getPageComments } from "../../graphql/queries/page.queries"; import type { GetPageCommentsQuery, GetPageCommentsQueryVariables, } from "../../graphql/api-types.gen"; -import { getPageComments } from "../../graphql/queries/page.queries"; +import type { + EntityId, + EntityMetadata, + EntityTemporalMetadata, +} from "@blockprotocol/type-system"; +import type { TextToken } from "@local/hash-isomorphic-utils/types"; export type PageThread = PageComment & { replies: PageComment[]; diff --git a/apps/hash-frontend/src/components/hooks/use-reorder-page.ts b/apps/hash-frontend/src/components/hooks/use-reorder-page.ts index 8ec7d9c4322..528d6f5fb52 100644 --- a/apps/hash-frontend/src/components/hooks/use-reorder-page.ts +++ b/apps/hash-frontend/src/components/hooks/use-reorder-page.ts @@ -1,15 +1,17 @@ import { useMutation } from "@apollo/client"; -import type { EntityId } from "@blockprotocol/type-system"; -import { extractWebIdFromEntityId } from "@blockprotocol/type-system"; import { useCallback } from "react"; +import { extractWebIdFromEntityId } from "@blockprotocol/type-system"; + +import { queryEntitySubgraphQuery } from "../../graphql/queries/knowledge/entity.queries"; +import { setParentPage } from "../../graphql/queries/page.queries"; +import { getAccountPagesVariables } from "../../shared/account-pages-variables"; + import type { SetParentPageMutation, SetParentPageMutationVariables, } from "../../graphql/api-types.gen"; -import { queryEntitySubgraphQuery } from "../../graphql/queries/knowledge/entity.queries"; -import { setParentPage } from "../../graphql/queries/page.queries"; -import { getAccountPagesVariables } from "../../shared/account-pages-variables"; +import type { EntityId } from "@blockprotocol/type-system"; export const useReorderPage = () => { const [setParentPageFn, { loading }] = useMutation< diff --git a/apps/hash-frontend/src/components/hooks/use-resolve-comment.ts b/apps/hash-frontend/src/components/hooks/use-resolve-comment.ts index 4f7313bc198..84999a5e1f3 100644 --- a/apps/hash-frontend/src/components/hooks/use-resolve-comment.ts +++ b/apps/hash-frontend/src/components/hooks/use-resolve-comment.ts @@ -1,13 +1,14 @@ import { useMutation } from "@apollo/client"; -import type { EntityId } from "@blockprotocol/type-system"; import { useCallback } from "react"; +import { resolveComment } from "../../graphql/queries/comment.queries"; +import { getPageComments } from "../../graphql/queries/page.queries"; + import type { ResolveCommentMutation, ResolveCommentMutationVariables, } from "../../graphql/api-types.gen"; -import { resolveComment } from "../../graphql/queries/comment.queries"; -import { getPageComments } from "../../graphql/queries/page.queries"; +import type { EntityId } from "@blockprotocol/type-system"; export const useResolveComment = (pageId: EntityId) => { const [resolveCommentFn, { loading }] = useMutation< diff --git a/apps/hash-frontend/src/components/hooks/use-shortname-input.ts b/apps/hash-frontend/src/components/hooks/use-shortname-input.ts index 5a3f9e753d7..f16ff9d49e9 100644 --- a/apps/hash-frontend/src/components/hooks/use-shortname-input.ts +++ b/apps/hash-frontend/src/components/hooks/use-shortname-input.ts @@ -1,11 +1,12 @@ import { useApolloClient } from "@apollo/client"; import { useCallback, useState } from "react"; +import { isShortnameTaken as isShortnameTakenQuery } from "../../graphql/queries/user.queries"; + import type { IsShortnameTakenQuery, QueryIsShortnameTakenArgs, } from "../../graphql/api-types.gen"; -import { isShortnameTaken as isShortnameTakenQuery } from "../../graphql/queries/user.queries"; type ShortnameErrorCode = | "IS_EMPTY" diff --git a/apps/hash-frontend/src/components/hooks/use-snackbar.ts b/apps/hash-frontend/src/components/hooks/use-snackbar.ts index 3bdffff91bd..30475abda9a 100644 --- a/apps/hash-frontend/src/components/hooks/use-snackbar.ts +++ b/apps/hash-frontend/src/components/hooks/use-snackbar.ts @@ -1,3 +1,9 @@ +import { + // eslint-disable-next-line no-restricted-imports + useSnackbar as useLibSnackbar, +} from "notistack"; +import { useMemo } from "react"; + import type { OptionsObject, ProviderContext, @@ -5,11 +11,6 @@ import type { SnackbarMessage, VariantType, } from "notistack"; -import { - // eslint-disable-next-line no-restricted-imports - useSnackbar as useLibSnackbar, -} from "notistack"; -import { useMemo } from "react"; type EnqueueWithoutVariant = ( message: SnackbarMessage, diff --git a/apps/hash-frontend/src/components/hooks/use-update-authenticated-user.ts b/apps/hash-frontend/src/components/hooks/use-update-authenticated-user.ts index 282fff47212..6e1397596fe 100644 --- a/apps/hash-frontend/src/components/hooks/use-update-authenticated-user.ts +++ b/apps/hash-frontend/src/components/hooks/use-update-authenticated-user.ts @@ -1,27 +1,29 @@ import { useLazyQuery, useMutation } from "@apollo/client"; -import type { EntityRootType } from "@blockprotocol/graph"; +import { useCallback, useState } from "react"; + import { getRoots } from "@blockprotocol/graph/stdlib"; -import type { PropertyPatchOperation } from "@blockprotocol/type-system"; import { typedEntries } from "@local/advanced-types/typed-entries"; -import type { HashEntity } from "@local/hash-graph-sdk/entity"; import { mapGqlSubgraphFieldsFragmentToSubgraph } from "@local/hash-isomorphic-utils/graph-queries"; import { blockProtocolPropertyTypes, systemPropertyTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { GraphQLError } from "graphql"; -import { useCallback, useState } from "react"; + +import { updateEntityMutation } from "../../graphql/queries/knowledge/entity.queries"; +import { meQuery } from "../../graphql/queries/user.queries"; +import { useAuthInfo } from "../../pages/shared/auth-info-context"; import type { MeQuery, UpdateEntityMutation, UpdateEntityMutationVariables, } from "../../graphql/api-types.gen"; -import { updateEntityMutation } from "../../graphql/queries/knowledge/entity.queries"; -import { meQuery } from "../../graphql/queries/user.queries"; import type { User } from "../../lib/user-and-org"; -import { useAuthInfo } from "../../pages/shared/auth-info-context"; import type { UserPreferences } from "../../shared/use-user-preferences"; +import type { EntityRootType } from "@blockprotocol/graph"; +import type { PropertyPatchOperation } from "@blockprotocol/type-system"; +import type { HashEntity } from "@local/hash-graph-sdk/entity"; +import type { GraphQLError } from "graphql"; type UpdateAuthenticatedUserParams = { shortname?: string; diff --git a/apps/hash-frontend/src/components/hooks/use-update-comment-text.ts b/apps/hash-frontend/src/components/hooks/use-update-comment-text.ts index 7fdf504ec3e..40391a6ab1c 100644 --- a/apps/hash-frontend/src/components/hooks/use-update-comment-text.ts +++ b/apps/hash-frontend/src/components/hooks/use-update-comment-text.ts @@ -1,14 +1,15 @@ import { useMutation } from "@apollo/client"; -import type { EntityId } from "@blockprotocol/type-system"; -import type { TextToken } from "@local/hash-isomorphic-utils/types"; import { useCallback } from "react"; +import { updateCommentText } from "../../graphql/queries/comment.queries"; +import { getPageComments } from "../../graphql/queries/page.queries"; + import type { UpdateCommentTextMutation, UpdateCommentTextMutationVariables, } from "../../graphql/api-types.gen"; -import { updateCommentText } from "../../graphql/queries/comment.queries"; -import { getPageComments } from "../../graphql/queries/page.queries"; +import type { EntityId } from "@blockprotocol/type-system"; +import type { TextToken } from "@local/hash-isomorphic-utils/types"; export const useUpdateCommentText = (pageId: EntityId) => { const [updatePageCommentTextFn, { loading }] = useMutation< diff --git a/apps/hash-frontend/src/components/hooks/use-update-page-title.ts b/apps/hash-frontend/src/components/hooks/use-update-page-title.ts index 403ea707c38..b33899dcc6c 100644 --- a/apps/hash-frontend/src/components/hooks/use-update-page-title.ts +++ b/apps/hash-frontend/src/components/hooks/use-update-page-title.ts @@ -1,13 +1,14 @@ import { useMutation } from "@apollo/client"; -import type { EntityId } from "@blockprotocol/type-system"; import { useCallback } from "react"; +import { updatePage } from "../../graphql/queries/page.queries"; +import { useGetPageRefetchQueries } from "./shared/get-page-refetch-queries"; + import type { UpdatePageMutation, UpdatePageMutationVariables, } from "../../graphql/api-types.gen"; -import { updatePage } from "../../graphql/queries/page.queries"; -import { useGetPageRefetchQueries } from "./shared/get-page-refetch-queries"; +import type { EntityId } from "@blockprotocol/type-system"; export const useUpdatePageTitle = () => { const [updatePageFn, { loading: updatePageTitleLoading }] = useMutation< diff --git a/apps/hash-frontend/src/components/hooks/use-user-or-org-shortname-by-owned-by-id.ts b/apps/hash-frontend/src/components/hooks/use-user-or-org-shortname-by-owned-by-id.ts index 8b56778000e..36aa21f3824 100644 --- a/apps/hash-frontend/src/components/hooks/use-user-or-org-shortname-by-owned-by-id.ts +++ b/apps/hash-frontend/src/components/hooks/use-user-or-org-shortname-by-owned-by-id.ts @@ -1,9 +1,11 @@ -import type { WebId } from "@blockprotocol/type-system"; -import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-properties"; import { useMemo } from "react"; +import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-properties"; + import { useUserOrOrg } from "../../shared/use-user-or-org"; +import type { WebId } from "@blockprotocol/type-system"; + export const useUserOrOrgShortnameByWebId = (params: { webId: WebId | null; }) => { diff --git a/apps/hash-frontend/src/components/hooks/use-users-with-links.ts b/apps/hash-frontend/src/components/hooks/use-users-with-links.ts index 92ec17aca45..b24c71c2be4 100644 --- a/apps/hash-frontend/src/components/hooks/use-users-with-links.ts +++ b/apps/hash-frontend/src/components/hooks/use-users-with-links.ts @@ -1,22 +1,24 @@ -import type { ApolloQueryResult } from "@apollo/client"; import { useQuery } from "@apollo/client"; +import { useMemo } from "react"; + import { getRoots } from "@blockprotocol/graph/stdlib"; -import type { ActorEntityUuid } from "@blockprotocol/type-system"; import { deserializeQueryEntitySubgraphResponse } from "@local/hash-graph-sdk/entity"; import { currentTimeInstantTemporalAxes, generateVersionedUrlMatchingFilter, } from "@local/hash-isomorphic-utils/graph-queries"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import { useMemo } from "react"; + +import { queryEntitySubgraphQuery } from "../../graphql/queries/knowledge/entity.queries"; +import { constructUser, isEntityUserEntity } from "../../lib/user-and-org"; import type { QueryEntitySubgraphQuery, QueryEntitySubgraphQueryVariables, } from "../../graphql/api-types.gen"; -import { queryEntitySubgraphQuery } from "../../graphql/queries/knowledge/entity.queries"; import type { User } from "../../lib/user-and-org"; -import { constructUser, isEntityUserEntity } from "../../lib/user-and-org"; +import type { ApolloQueryResult } from "@apollo/client"; +import type { ActorEntityUuid } from "@blockprotocol/type-system"; /** * Retrieves a specific set of users, with their avatars populated diff --git a/apps/hash-frontend/src/components/hooks/use-users.ts b/apps/hash-frontend/src/components/hooks/use-users.ts index 3f49d60cb00..788a104b3c4 100644 --- a/apps/hash-frontend/src/components/hooks/use-users.ts +++ b/apps/hash-frontend/src/components/hooks/use-users.ts @@ -1,15 +1,11 @@ import { useQuery } from "@apollo/client"; + import { deserializeQueryEntitiesResponse } from "@local/hash-graph-sdk/entity"; import { convertBpFilterToGraphFilter } from "@local/hash-graph-sdk/filter"; import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/graph-queries"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { - QueryEntitiesQuery, - QueryEntitiesQueryVariables, -} from "../../graphql/api-types.gen"; import { queryEntitiesQuery } from "../../graphql/queries/knowledge/entity.queries"; -import type { MinimalUser } from "../../lib/user-and-org"; import { constructMinimalUser, isEntityUserEntity, @@ -17,6 +13,12 @@ import { import { entityHasEntityTypeByVersionedUrlFilter } from "../../shared/filters"; import { useMemoCompare } from "../../shared/use-memo-compare"; +import type { + QueryEntitiesQuery, + QueryEntitiesQueryVariables, +} from "../../graphql/api-types.gen"; +import type { MinimalUser } from "../../lib/user-and-org"; + export const useUsers = (): { loading: boolean; refetch: () => void; diff --git a/apps/hash-frontend/src/components/page-icon.tsx b/apps/hash-frontend/src/components/page-icon.tsx index 119b37e62f1..56d3e6eb7a0 100644 --- a/apps/hash-frontend/src/components/page-icon.tsx +++ b/apps/hash-frontend/src/components/page-icon.tsx @@ -1,12 +1,14 @@ import { faFile } from "@fortawesome/free-regular-svg-icons"; -import { FontAwesomeIcon } from "@hashintel/design-system"; -import type { BoxProps } from "@mui/material"; import { Box } from "@mui/material"; -import type { SizeVariant } from "../shared/edit-emoji-icon-button"; +import { FontAwesomeIcon } from "@hashintel/design-system"; + import { iconVariantSizes } from "../shared/edit-emoji-icon-button"; import { CanvasIcon } from "../shared/icons/canvas-icon"; +import type { SizeVariant } from "../shared/edit-emoji-icon-button"; +import type { BoxProps } from "@mui/material"; + interface PageIconProps { isCanvas?: boolean; icon?: string | null; diff --git a/apps/hash-frontend/src/components/remote-block/add-linked-query-prompt.tsx b/apps/hash-frontend/src/components/remote-block/add-linked-query-prompt.tsx index 29943f8fb56..6092e9e3a28 100644 --- a/apps/hash-frontend/src/components/remote-block/add-linked-query-prompt.tsx +++ b/apps/hash-frontend/src/components/remote-block/add-linked-query-prompt.tsx @@ -1,9 +1,10 @@ import { Box, Typography } from "@mui/material"; -import type { FunctionComponent } from "react"; import { useBlockContext } from "../../pages/shared/block-collection/block-context"; import { Button } from "../../shared/ui"; +import type { FunctionComponent } from "react"; + export const AddLinkedQueryPrompt: FunctionComponent<{ blockIconSrc?: string; blockName: string; diff --git a/apps/hash-frontend/src/components/remote-block/block-renderer.tsx b/apps/hash-frontend/src/components/remote-block/block-renderer.tsx index fd4263c43f3..5fc10433e23 100644 --- a/apps/hash-frontend/src/components/remote-block/block-renderer.tsx +++ b/apps/hash-frontend/src/components/remote-block/block-renderer.tsx @@ -1,9 +1,9 @@ -import type { BlockMetadata, UnknownRecord } from "@blockprotocol/core"; -import type { FunctionComponent, ReactElement } from "react"; - import { CustomElementLoader } from "./block-renderer/custom-element"; import { HtmlLoader } from "./block-renderer/html"; + import type { UnknownBlock } from "./load-remote-block"; +import type { BlockMetadata, UnknownRecord } from "@blockprotocol/core"; +import type { FunctionComponent, ReactElement } from "react"; type BlockRendererProps = { blockSource: UnknownBlock; diff --git a/apps/hash-frontend/src/components/remote-block/block-renderer/custom-element.tsx b/apps/hash-frontend/src/components/remote-block/block-renderer/custom-element.tsx index edad6c2fefe..465cd1c2a79 100644 --- a/apps/hash-frontend/src/components/remote-block/block-renderer/custom-element.tsx +++ b/apps/hash-frontend/src/components/remote-block/block-renderer/custom-element.tsx @@ -1,9 +1,9 @@ import { createComponent } from "@lit-labs/react"; -import type { FunctionComponent } from "react"; // eslint-disable-next-line unicorn/import-style import React, { useLayoutEffect, useRef, useState } from "react"; import type { CustomElementDefinition } from "../util"; +import type { FunctionComponent } from "react"; type CustomElementLoaderProps = { properties: Record; diff --git a/apps/hash-frontend/src/components/remote-block/block-renderer/html.tsx b/apps/hash-frontend/src/components/remote-block/block-renderer/html.tsx index beaff4bea54..a5817feb0c7 100644 --- a/apps/hash-frontend/src/components/remote-block/block-renderer/html.tsx +++ b/apps/hash-frontend/src/components/remote-block/block-renderer/html.tsx @@ -1,7 +1,9 @@ -import type { HtmlBlockDefinition } from "@blockprotocol/core/html"; +import { useEffect, useRef, useState } from "react"; + import { renderHtmlBlock } from "@blockprotocol/core/html"; + +import type { HtmlBlockDefinition } from "@blockprotocol/core/html"; import type { FunctionComponent } from "react"; -import { useEffect, useRef, useState } from "react"; type HtmlElementLoaderProps = { html: HtmlBlockDefinition; diff --git a/apps/hash-frontend/src/components/remote-block/construct-service-module-callbacks.ts b/apps/hash-frontend/src/components/remote-block/construct-service-module-callbacks.ts index 4dfa52d94b7..9fbbde35e05 100644 --- a/apps/hash-frontend/src/components/remote-block/construct-service-module-callbacks.ts +++ b/apps/hash-frontend/src/components/remote-block/construct-service-module-callbacks.ts @@ -1,6 +1,7 @@ -import type { ServiceEmbedderMessageCallbacks } from "@blockprotocol/service"; import { apiOrigin } from "@local/hash-isomorphic-utils/environment"; +import type { ServiceEmbedderMessageCallbacks } from "@blockprotocol/service"; + type ServiceFunction = ServiceEmbedderMessageCallbacks[keyof ServiceEmbedderMessageCallbacks]; diff --git a/apps/hash-frontend/src/components/remote-block/load-remote-block.ts b/apps/hash-frontend/src/components/remote-block/load-remote-block.ts index eb5b8bd4b00..983b567b711 100644 --- a/apps/hash-frontend/src/components/remote-block/load-remote-block.ts +++ b/apps/hash-frontend/src/components/remote-block/load-remote-block.ts @@ -1,9 +1,9 @@ -import type { ReactElement } from "react"; - import { blockDependencies } from "../../../block.dependencies"; import { memoizeFetchFunction } from "../../lib/memoize"; import { crossFrameFetchFn } from "../sandbox/framed-block/util"; +import type { ReactElement } from "react"; + export type UnknownBlock = | string | typeof HTMLElement diff --git a/apps/hash-frontend/src/components/remote-block/remote-block.tsx b/apps/hash-frontend/src/components/remote-block/remote-block.tsx index 5ca64746677..da288c150d5 100644 --- a/apps/hash-frontend/src/components/remote-block/remote-block.tsx +++ b/apps/hash-frontend/src/components/remote-block/remote-block.tsx @@ -1,9 +1,7 @@ -import type { BlockMetadata } from "@blockprotocol/core"; -import type { - BlockGraphProperties, - EntityRootType, - GraphEmbedderMessageCallbacks, -} from "@blockprotocol/graph"; +import { Skeleton } from "@mui/material"; +import { useEffect, useMemo, useRef } from "react"; +import { v4 as uuid } from "uuid"; + import { useGraphEmbedderModule } from "@blockprotocol/graph/react"; import { getOutgoingLinksForEntity, @@ -13,11 +11,6 @@ import { useHookEmbedderModule } from "@blockprotocol/hook/react"; import { useServiceEmbedderModule } from "@blockprotocol/service/react"; import { textualContentPropertyTypeBaseUrl } from "@local/hash-isomorphic-utils/entity-store"; import { blockProtocolLinkEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { SkeletonProps } from "@mui/material"; -import { Skeleton } from "@mui/material"; -import type { FunctionComponent } from "react"; -import { useEffect, useMemo, useRef } from "react"; -import { v4 as uuid } from "uuid"; import { useUserBlocks } from "../../blocks/user-blocks"; import { AddLinkedQueryPrompt } from "./add-linked-query-prompt"; @@ -25,6 +18,15 @@ import { BlockRenderer } from "./block-renderer"; import { serviceModuleCallbacks } from "./construct-service-module-callbacks"; import { useRemoteBlock } from "./use-remote-block"; +import type { BlockMetadata } from "@blockprotocol/core"; +import type { + BlockGraphProperties, + EntityRootType, + GraphEmbedderMessageCallbacks, +} from "@blockprotocol/graph"; +import type { SkeletonProps } from "@mui/material"; +import type { FunctionComponent } from "react"; + export type RemoteBlockProps = { graphCallbacks: Omit< /** @todo-0.3 - Add these back */ diff --git a/apps/hash-frontend/src/components/remote-block/use-remote-block.ts b/apps/hash-frontend/src/components/remote-block/use-remote-block.ts index 2e4255dc048..88373802e55 100644 --- a/apps/hash-frontend/src/components/remote-block/use-remote-block.ts +++ b/apps/hash-frontend/src/components/remote-block/use-remote-block.ts @@ -1,12 +1,13 @@ import { useEffect, useRef, useState } from "react"; -import type { UnknownBlock } from "./load-remote-block"; import { loadCrossFrameRemoteBlock, loadRemoteBlock, } from "./load-remote-block"; import { isTopWindow } from "./util"; +import type { UnknownBlock } from "./load-remote-block"; + type UseRemoteBlockHook = { ( url: string, diff --git a/apps/hash-frontend/src/components/sandbox/block-framer/block-framer.tsx b/apps/hash-frontend/src/components/sandbox/block-framer/block-framer.tsx index 3778f89b495..bbb38c2f355 100644 --- a/apps/hash-frontend/src/components/sandbox/block-framer/block-framer.tsx +++ b/apps/hash-frontend/src/components/sandbox/block-framer/block-framer.tsx @@ -1,13 +1,14 @@ -import type { GraphEmbedderMessageCallbacks } from "@blockprotocol/graph"; -import type { PropertyObject } from "@blockprotocol/type-system"; -import type { FunctionComponent } from "react"; import { useCallback, useEffect, useMemo, useRef } from "react"; import { v4 as uuid } from "uuid"; import { memoizeFetchFunction } from "../../../lib/memoize"; -import type { FetchEmbedCodeFn } from "../../block-loader/fetch-embed-code"; import { ResizingIFrame } from "../resizing-iframe/resizing-iframe"; + +import type { FetchEmbedCodeFn } from "../../block-loader/fetch-embed-code"; import type { MessageFromBlockFramer, MessageFromFramedBlock } from "../types"; +import type { GraphEmbedderMessageCallbacks } from "@blockprotocol/graph"; +import type { PropertyObject } from "@blockprotocol/type-system"; +import type { FunctionComponent } from "react"; export type CrossFrameProxyProps = GraphEmbedderMessageCallbacks & { blockProperties: PropertyObject; diff --git a/apps/hash-frontend/src/components/sandbox/framed-block/framed-block.tsx b/apps/hash-frontend/src/components/sandbox/framed-block/framed-block.tsx index 00ec48d969f..e7bfb851d83 100644 --- a/apps/hash-frontend/src/components/sandbox/framed-block/framed-block.tsx +++ b/apps/hash-frontend/src/components/sandbox/framed-block/framed-block.tsx @@ -1,19 +1,20 @@ import "iframe-resizer/js/iframeResizer.contentWindow"; -import type { GraphEmbedderMessageCallbacks } from "@blockprotocol/graph"; -import type { Entity } from "@blockprotocol/type-system"; -import type * as Sentry from "@sentry/react"; -import type { FunctionComponent } from "react"; import { useCallback, useEffect, useState } from "react"; -import type { FetchEmbedCodeFn } from "../../block-loader/fetch-embed-code"; // import { ErrorBlock } from "../../error-block/error-block"; import { BlockLoadingIndicator, // RemoteBlock, } from "../../remote-block/remote-block"; -import type { MessageFromBlockFramer } from "../types"; import { sendMessage, settlePromiseFromResponse } from "./util"; +import type { FetchEmbedCodeFn } from "../../block-loader/fetch-embed-code"; +import type { MessageFromBlockFramer } from "../types"; +import type { GraphEmbedderMessageCallbacks } from "@blockprotocol/graph"; +import type { Entity } from "@blockprotocol/type-system"; +import type * as Sentry from "@sentry/react"; +import type { FunctionComponent } from "react"; + const params = new URL(window.location.href).searchParams; export const FramedBlock: FunctionComponent = () => { diff --git a/apps/hash-frontend/src/components/sandbox/resizing-iframe/resizing-iframe.tsx b/apps/hash-frontend/src/components/sandbox/resizing-iframe/resizing-iframe.tsx index 9fdbeae8704..c9bff4cd4ac 100644 --- a/apps/hash-frontend/src/components/sandbox/resizing-iframe/resizing-iframe.tsx +++ b/apps/hash-frontend/src/components/sandbox/resizing-iframe/resizing-iframe.tsx @@ -1,7 +1,8 @@ import { iframeResizer as iFrameResizer } from "iframe-resizer"; -import type { DetailedHTMLProps, IframeHTMLAttributes } from "react"; import { forwardRef, useEffect } from "react"; +import type { DetailedHTMLProps, IframeHTMLAttributes } from "react"; + /** * @todo expose the unused functions to component consumers, or use them here, * or remove the properties from the type. diff --git a/apps/hash-frontend/src/components/sandbox/types.ts b/apps/hash-frontend/src/components/sandbox/types.ts index 559e9e2ff0c..ef53a9c2168 100644 --- a/apps/hash-frontend/src/components/sandbox/types.ts +++ b/apps/hash-frontend/src/components/sandbox/types.ts @@ -1,6 +1,5 @@ -import type { GraphEmbedderMessageCallbacks } from "@blockprotocol/graph"; - import type { FetchEmbedCodeFn } from "../block-loader/fetch-embed-code"; +import type { GraphEmbedderMessageCallbacks } from "@blockprotocol/graph"; export type MessageFromFramedBlock = { requestId: string; diff --git a/apps/hash-frontend/src/contexts/collab-position-context.tsx b/apps/hash-frontend/src/contexts/collab-position-context.tsx index ed962103c58..8565273f48c 100644 --- a/apps/hash-frontend/src/contexts/collab-position-context.tsx +++ b/apps/hash-frontend/src/contexts/collab-position-context.tsx @@ -1,6 +1,7 @@ -import type { CollabPosition } from "@local/hash-isomorphic-utils/collab"; import { createContext, useContext } from "react"; +import type { CollabPosition } from "@local/hash-isomorphic-utils/collab"; + const CollabPositionContext = createContext([]); const { Provider, Consumer } = CollabPositionContext; diff --git a/apps/hash-frontend/src/graphql/queries/user.queries.ts b/apps/hash-frontend/src/graphql/queries/user.queries.ts index cb47ed5f0b6..d266ad9ba84 100644 --- a/apps/hash-frontend/src/graphql/queries/user.queries.ts +++ b/apps/hash-frontend/src/graphql/queries/user.queries.ts @@ -1,4 +1,5 @@ import { gql } from "@apollo/client"; + import { subgraphFieldsFragment } from "@local/hash-isomorphic-utils/graphql/queries/subgraph"; export const isShortnameTaken = gql` diff --git a/apps/hash-frontend/src/lib/routes.ts b/apps/hash-frontend/src/lib/routes.ts index c0a34aed0d5..3831dce96ac 100644 --- a/apps/hash-frontend/src/lib/routes.ts +++ b/apps/hash-frontend/src/lib/routes.ts @@ -1,7 +1,7 @@ -import type { EntityId } from "@blockprotocol/type-system"; - import { getBlockDomId } from "../shared/get-block-dom-id"; +import type { EntityId } from "@blockprotocol/type-system"; + export const constructPageRelativeUrl = (params: { workspaceShortname: string; pageEntityUuid: string; diff --git a/apps/hash-frontend/src/lib/user-and-org.ts b/apps/hash-frontend/src/lib/user-and-org.ts index b5c48e061be..46ae09b8cfb 100644 --- a/apps/hash-frontend/src/lib/user-and-org.ts +++ b/apps/hash-frontend/src/lib/user-and-org.ts @@ -1,8 +1,3 @@ -import type { - EntityRootType, - LinkEntityAndRightEntity, - Subgraph, -} from "@blockprotocol/graph"; import { getIncomingLinkAndSourceEntities, getOutgoingLinkAndTargetEntities, @@ -11,21 +6,12 @@ import { intervalCompareWithInterval, intervalForTimestamp, } from "@blockprotocol/graph/stdlib"; -import type { - BaseUrl, - Entity, - LinkEntity, - UserId, - WebId, -} from "@blockprotocol/type-system"; import { currentTimestamp, extractBaseUrl, extractWebIdFromEntityId, } from "@blockprotocol/type-system"; -import type { HashEntity, HashLinkEntity } from "@local/hash-graph-sdk/entity"; import { getFirstEntityRevision } from "@local/hash-isomorphic-utils/entity"; -import type { FeatureFlag } from "@local/hash-isomorphic-utils/feature-flags"; import { systemEntityTypes, systemLinkEntityTypes, @@ -35,6 +21,22 @@ import { isInvitationByShortname, } from "@local/hash-isomorphic-utils/organization"; import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-properties"; + +import type { UserPreferences } from "../shared/use-user-preferences"; +import type { + EntityRootType, + LinkEntityAndRightEntity, + Subgraph, +} from "@blockprotocol/graph"; +import type { + BaseUrl, + Entity, + LinkEntity, + UserId, + WebId, +} from "@blockprotocol/type-system"; +import type { HashEntity, HashLinkEntity } from "@local/hash-graph-sdk/entity"; +import type { FeatureFlag } from "@local/hash-isomorphic-utils/feature-flags"; import type { ImageFile } from "@local/hash-isomorphic-utils/system-types/imagefile"; import type { HasBio, @@ -48,8 +50,6 @@ import type { import type { User as UserEntity } from "@local/hash-isomorphic-utils/system-types/user"; import type { VerifiableIdentityAddress } from "@ory/client"; -import type { UserPreferences } from "../shared/use-user-preferences"; - export const constructMinimalOrg = (params: { orgEntity: Entity; }): MinimalOrg => { diff --git a/apps/hash-frontend/src/middleware/return-types-as-json.ts b/apps/hash-frontend/src/middleware/return-types-as-json.ts index d68803afb87..bc39da0a2cf 100644 --- a/apps/hash-frontend/src/middleware/return-types-as-json.ts +++ b/apps/hash-frontend/src/middleware/return-types-as-json.ts @@ -1,9 +1,6 @@ -import type { - DataType, - EntityType, - PropertyType, - VersionedUrl, -} from "@blockprotocol/type-system"; +import { NextResponse } from "next/server"; +import stringify from "safe-stable-stringify"; + import { apiGraphQLEndpoint, frontendUrl, @@ -12,10 +9,8 @@ import { type SystemTypeWebShortname, systemTypeWebShortnames, } from "@local/hash-isomorphic-utils/ontology-types"; -import type { GraphQLError } from "graphql"; -import type { NextRequest } from "next/server"; -import { NextResponse } from "next/server"; -import stringify from "safe-stable-stringify"; + +import { generateQueryArgs } from "./return-types-as-json/generate-query-args"; import type { QueryDataTypesQuery, @@ -25,7 +20,14 @@ import type { QueryPropertyTypesQuery, QueryPropertyTypesQueryVariables, } from "../graphql/api-types.gen"; -import { generateQueryArgs } from "./return-types-as-json/generate-query-args"; +import type { + DataType, + EntityType, + PropertyType, + VersionedUrl, +} from "@blockprotocol/type-system"; +import type { GraphQLError } from "graphql"; +import type { NextRequest } from "next/server"; const generateErrorResponse = ( status: 400 | 401 | 404 | 500, diff --git a/apps/hash-frontend/src/middleware/return-types-as-json/generate-query-args.ts b/apps/hash-frontend/src/middleware/return-types-as-json/generate-query-args.ts index 2a6a0d23af0..a22aa0cc39a 100644 --- a/apps/hash-frontend/src/middleware/return-types-as-json/generate-query-args.ts +++ b/apps/hash-frontend/src/middleware/return-types-as-json/generate-query-args.ts @@ -1,15 +1,16 @@ -import type { VersionedUrl } from "@blockprotocol/type-system"; import { fullTransactionTimeAxis } from "@local/hash-isomorphic-utils/graph-queries"; -import type { DocumentNode } from "graphql"; + +import { queryDataTypesQuery } from "../../graphql/queries/ontology/data-type.queries"; +import { queryEntityTypesQuery } from "../../graphql/queries/ontology/entity-type.queries"; +import { queryPropertyTypesQuery } from "../../graphql/queries/ontology/property-type.queries"; import type { QueryDataTypesQueryVariables, QueryEntityTypesQueryVariables, QueryPropertyTypesQueryVariables, } from "../../graphql/api-types.gen"; -import { queryDataTypesQuery } from "../../graphql/queries/ontology/data-type.queries"; -import { queryEntityTypesQuery } from "../../graphql/queries/ontology/entity-type.queries"; -import { queryPropertyTypesQuery } from "../../graphql/queries/ontology/property-type.queries"; +import type { VersionedUrl } from "@blockprotocol/type-system"; +import type { DocumentNode } from "graphql"; /** * Return the internal query string from a gql-tagged query, i.e. gql`string` -> string diff --git a/apps/hash-frontend/src/pages/404.page.tsx b/apps/hash-frontend/src/pages/404.page.tsx index e2b058d25df..ed4c67b74a8 100644 --- a/apps/hash-frontend/src/pages/404.page.tsx +++ b/apps/hash-frontend/src/pages/404.page.tsx @@ -1,10 +1,11 @@ import { NextSeo } from "next-seo"; -import type { ErrorProps } from "next/error"; -import type { NextPageWithLayout } from "../shared/layout"; import { getLayoutWithHeader } from "../shared/layout"; import { NotFound } from "./shared/not-found"; +import type { NextPageWithLayout } from "../shared/layout"; +import type { ErrorProps } from "next/error"; + const NotFoundPage: NextPageWithLayout = () => { return ( <> diff --git a/apps/hash-frontend/src/pages/@/[shortname].page.tsx b/apps/hash-frontend/src/pages/@/[shortname].page.tsx index 88460b8d0c2..e02c9d418ac 100644 --- a/apps/hash-frontend/src/pages/@/[shortname].page.tsx +++ b/apps/hash-frontend/src/pages/@/[shortname].page.tsx @@ -1,14 +1,11 @@ import { useQuery } from "@apollo/client"; +import { useRouter } from "next/router"; +import { useCallback, useMemo, useState } from "react"; + import { getEntityTypeAndDescendantsById, getRoots, } from "@blockprotocol/graph/stdlib"; -import type { - BaseUrl, - DataTypeWithMetadata, - EntityTypeWithMetadata, - PropertyTypeWithMetadata, -} from "@blockprotocol/type-system"; import { extractBaseUrl } from "@blockprotocol/type-system"; import { deserializeQueryEntitySubgraphResponse } from "@local/hash-graph-sdk/entity"; import { @@ -18,19 +15,7 @@ import { } from "@local/hash-isomorphic-utils/graph-queries"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { pluralize } from "@local/hash-isomorphic-utils/pluralize"; -import { useRouter } from "next/router"; -import { useCallback, useMemo, useState } from "react"; -import type { - QueryDataTypesQuery, - QueryDataTypesQueryVariables, - QueryEntitySubgraphQuery, - QueryEntitySubgraphQueryVariables, - QueryEntityTypesQuery, - QueryEntityTypesQueryVariables, - QueryPropertyTypesQuery, - QueryPropertyTypesQueryVariables, -} from "../../graphql/api-types.gen"; import { queryEntitySubgraphQuery } from "../../graphql/queries/knowledge/entity.queries"; import { queryDataTypesQuery } from "../../graphql/queries/ontology/data-type.queries"; import { queryEntityTypesQuery } from "../../graphql/queries/ontology/entity-type.queries"; @@ -41,7 +26,6 @@ import { isEntityUserEntity, } from "../../lib/user-and-org"; import { useLatestEntityTypesOptional } from "../../shared/entity-types-context/hooks"; -import type { NextPageWithLayout } from "../../shared/layout"; import { getLayoutWithSidebar } from "../../shared/layout"; import { useUserOrOrg } from "../../shared/use-user-or-org"; import { NotFound } from "../shared/not-found"; @@ -49,9 +33,27 @@ import { useEnabledFeatureFlags } from "../shared/use-enabled-feature-flags"; import { EditUserProfileInfoModal } from "./[shortname].page/edit-user-profile-info-modal"; import { ProfilePageContent } from "./[shortname].page/profile-page-content"; import { ProfilePageHeader } from "./[shortname].page/profile-page-header"; -import type { ProfilePageTab } from "./[shortname].page/util"; import { parseProfilePageUrlQueryParams } from "./[shortname].page/util"; +import type { + QueryDataTypesQuery, + QueryDataTypesQueryVariables, + QueryEntitySubgraphQuery, + QueryEntitySubgraphQueryVariables, + QueryEntityTypesQuery, + QueryEntityTypesQueryVariables, + QueryPropertyTypesQuery, + QueryPropertyTypesQueryVariables, +} from "../../graphql/api-types.gen"; +import type { NextPageWithLayout } from "../../shared/layout"; +import type { ProfilePageTab } from "./[shortname].page/util"; +import type { + BaseUrl, + DataTypeWithMetadata, + EntityTypeWithMetadata, + PropertyTypeWithMetadata, +} from "@blockprotocol/type-system"; + const ProfilePage: NextPageWithLayout = () => { const router = useRouter(); const { latestEntityTypes } = useLatestEntityTypesOptional(); diff --git a/apps/hash-frontend/src/pages/@/[shortname].page/edit-pinned-entity-types-modal.tsx b/apps/hash-frontend/src/pages/@/[shortname].page/edit-pinned-entity-types-modal.tsx index c1c1bfbc887..31adb98b495 100644 --- a/apps/hash-frontend/src/pages/@/[shortname].page/edit-pinned-entity-types-modal.tsx +++ b/apps/hash-frontend/src/pages/@/[shortname].page/edit-pinned-entity-types-modal.tsx @@ -1,5 +1,10 @@ import { useMutation } from "@apollo/client"; -import type { EntityTypeWithMetadata, WebId } from "@blockprotocol/type-system"; +import { Box, Typography, typographyClasses } from "@mui/material"; +import { useCallback, useEffect, useRef, useState } from "react"; +import { DragDropContext, Draggable, Droppable } from "react-beautiful-dnd"; +import { createPortal } from "react-dom"; +import { useFieldArray, useForm } from "react-hook-form"; + import { AsteriskRegularIcon, IconButton, @@ -10,27 +15,9 @@ import { systemEntityTypes, systemPropertyTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { ModalProps } from "@mui/material"; -import { Box, Typography, typographyClasses } from "@mui/material"; -import type { FunctionComponent, ReactElement } from "react"; -import { useCallback, useEffect, useRef, useState } from "react"; -import type { - DraggableProvided, - DraggingStyle, - NotDraggingStyle, - OnDragEndResponder, -} from "react-beautiful-dnd"; -import { DragDropContext, Draggable, Droppable } from "react-beautiful-dnd"; -import { createPortal } from "react-dom"; -import { useFieldArray, useForm } from "react-hook-form"; import { useBlockProtocolCreateEntityType } from "../../../components/hooks/block-protocol-functions/ontology/use-block-protocol-create-entity-type"; -import type { - UpdateEntityMutation, - UpdateEntityMutationVariables, -} from "../../../graphql/api-types.gen"; import { updateEntityMutation } from "../../../graphql/queries/knowledge/entity.queries"; -import type { Org, User } from "../../../lib/user-and-org"; import { useLatestEntityTypesOptional } from "../../../shared/entity-types-context/hooks"; import { generateLinkParameters } from "../../../shared/generate-link-parameters"; import { ArrowUpRightRegularIcon } from "../../../shared/icons/arrow-up-right-regular-icon"; @@ -44,6 +31,21 @@ import { EntityTypeSelector } from "../../shared/entity-type-selector"; import { useActiveWorkspace } from "../../shared/workspace-context"; import { ProfileSectionHeading } from "../[shortname]/shared/profile-section-heading"; +import type { + UpdateEntityMutation, + UpdateEntityMutationVariables, +} from "../../../graphql/api-types.gen"; +import type { Org, User } from "../../../lib/user-and-org"; +import type { EntityTypeWithMetadata, WebId } from "@blockprotocol/type-system"; +import type { ModalProps } from "@mui/material"; +import type { FunctionComponent, ReactElement } from "react"; +import type { + DraggableProvided, + DraggingStyle, + NotDraggingStyle, + OnDragEndResponder, +} from "react-beautiful-dnd"; + /** @see https://github.com/atlassian/react-beautiful-dnd/issues/128#issuecomment-1010053365 */ const useDraggableInPortal = () => { const element = useRef(document.createElement("div")).current; diff --git a/apps/hash-frontend/src/pages/@/[shortname].page/edit-user-profile-info-modal.tsx b/apps/hash-frontend/src/pages/@/[shortname].page/edit-user-profile-info-modal.tsx index 7c5907c68f2..661476eece0 100644 --- a/apps/hash-frontend/src/pages/@/[shortname].page/edit-user-profile-info-modal.tsx +++ b/apps/hash-frontend/src/pages/@/[shortname].page/edit-user-profile-info-modal.tsx @@ -1,12 +1,14 @@ -import { Modal } from "@hashintel/design-system"; -import type { ModalProps } from "@mui/material"; import { Box } from "@mui/material"; -import type { FunctionComponent } from "react"; -import type { User } from "../../../lib/user-and-org"; +import { Modal } from "@hashintel/design-system"; + import { UserProfileInfoForm } from "./edit-user-profile-info-modal/user-profile-info-form"; import { UserProfileInfoModalHeader } from "./edit-user-profile-info-modal/user-profile-info-modal-header"; +import type { User } from "../../../lib/user-and-org"; +import type { ModalProps } from "@mui/material"; +import type { FunctionComponent } from "react"; + export const EditUserProfileInfoModal: FunctionComponent< Omit & { onClose: () => void; diff --git a/apps/hash-frontend/src/pages/@/[shortname].page/edit-user-profile-info-modal/service-accounts-input.tsx b/apps/hash-frontend/src/pages/@/[shortname].page/edit-user-profile-info-modal/service-accounts-input.tsx index 032f33a8332..1ad81a111ae 100644 --- a/apps/hash-frontend/src/pages/@/[shortname].page/edit-user-profile-info-modal/service-accounts-input.tsx +++ b/apps/hash-frontend/src/pages/@/[shortname].page/edit-user-profile-info-modal/service-accounts-input.tsx @@ -1,24 +1,26 @@ -import { - IconButton, - Select, - TextField, - XMarkRegularIcon, -} from "@hashintel/design-system"; import { Box, outlinedInputClasses, selectClasses, Typography, } from "@mui/material"; -import type { FunctionComponent } from "react"; import { Controller, useFieldArray, useFormContext } from "react-hook-form"; -import type { ServiceAccountKind } from "../../../../lib/user-and-org"; +import { + IconButton, + Select, + TextField, + XMarkRegularIcon, +} from "@hashintel/design-system"; + import { PlusRegularIcon } from "../../../../shared/icons/plus-regular"; import { Button, MenuItem } from "../../../../shared/ui"; -import type { UserProfileFormData } from "./user-profile-info-form"; import { urlRegex } from "./util"; +import type { ServiceAccountKind } from "../../../../lib/user-and-org"; +import type { UserProfileFormData } from "./user-profile-info-form"; +import type { FunctionComponent } from "react"; + const serviceAccountKindOptions: Record = { linkedinAccount: "LinkedIn", twitterAccount: "Twitter", diff --git a/apps/hash-frontend/src/pages/@/[shortname].page/edit-user-profile-info-modal/user-profile-info-form.tsx b/apps/hash-frontend/src/pages/@/[shortname].page/edit-user-profile-info-modal/user-profile-info-form.tsx index 81378904fb2..90567b7afcf 100644 --- a/apps/hash-frontend/src/pages/@/[shortname].page/edit-user-profile-info-modal/user-profile-info-form.tsx +++ b/apps/hash-frontend/src/pages/@/[shortname].page/edit-user-profile-info-modal/user-profile-info-form.tsx @@ -1,35 +1,37 @@ import { useMutation } from "@apollo/client"; -import type { WebId } from "@blockprotocol/type-system"; +import { Box, Typography } from "@mui/material"; +import { useCallback, useState } from "react"; +import { Controller, FormProvider, useForm } from "react-hook-form"; + import { Select, TextField } from "@hashintel/design-system"; -import type { HashEntity, HashLinkEntity } from "@local/hash-graph-sdk/entity"; import { validateDisplayName } from "@local/hash-graph-sdk/user-entity-restrictions"; import { systemEntityTypes, systemLinkEntityTypes, systemPropertyTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { ProfileURLPropertyValueWithMetadata } from "@local/hash-isomorphic-utils/system-types/shared"; -import { Box, Typography } from "@mui/material"; -import type { FunctionComponent } from "react"; -import { useCallback, useState } from "react"; -import { Controller, FormProvider, useForm } from "react-hook-form"; import { useBlockProtocolArchiveEntity } from "../../../../components/hooks/block-protocol-functions/knowledge/use-block-protocol-archive-entity"; import { useBlockProtocolCreateEntity } from "../../../../components/hooks/block-protocol-functions/knowledge/use-block-protocol-create-entity"; import { useUpdateAuthenticatedUser } from "../../../../components/hooks/use-update-authenticated-user"; +import { updateEntityMutation } from "../../../../graphql/queries/knowledge/entity.queries"; +import { Button, MenuItem } from "../../../../shared/ui"; +import { UrlInput } from "../../../shared/url-input"; +import { ServiceAccountsInput } from "./service-accounts-input"; + import type { UpdateEntityMutation, UpdateEntityMutationVariables, } from "../../../../graphql/api-types.gen"; -import { updateEntityMutation } from "../../../../graphql/queries/knowledge/entity.queries"; import type { ServiceAccountKind, User, UserServiceAccount, } from "../../../../lib/user-and-org"; -import { Button, MenuItem } from "../../../../shared/ui"; -import { UrlInput } from "../../../shared/url-input"; -import { ServiceAccountsInput } from "./service-accounts-input"; +import type { WebId } from "@blockprotocol/type-system"; +import type { HashEntity, HashLinkEntity } from "@local/hash-graph-sdk/entity"; +import type { ProfileURLPropertyValueWithMetadata } from "@local/hash-isomorphic-utils/system-types/shared"; +import type { FunctionComponent } from "react"; export type UserProfileFormServiceAccount = { existingLinkEntity?: HashLinkEntity; diff --git a/apps/hash-frontend/src/pages/@/[shortname].page/edit-user-profile-info-modal/user-profile-info-modal-header.tsx b/apps/hash-frontend/src/pages/@/[shortname].page/edit-user-profile-info-modal/user-profile-info-modal-header.tsx index 6aa932739b5..7fe90185e33 100644 --- a/apps/hash-frontend/src/pages/@/[shortname].page/edit-user-profile-info-modal/user-profile-info-modal-header.tsx +++ b/apps/hash-frontend/src/pages/@/[shortname].page/edit-user-profile-info-modal/user-profile-info-modal-header.tsx @@ -1,5 +1,8 @@ -import type { WebId } from "@blockprotocol/type-system"; import { faImage } from "@fortawesome/free-regular-svg-icons"; +import { Box, buttonClasses, styled } from "@mui/material"; +import Image from "next/image"; +import { useCallback, useRef, useState } from "react"; + import { Avatar, FontAwesomeIcon, @@ -11,22 +14,21 @@ import { systemEntityTypes, systemLinkEntityTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import { Box, buttonClasses, styled } from "@mui/material"; -import Image from "next/image"; -import type { ChangeEventHandler, FunctionComponent } from "react"; -import { useCallback, useRef, useState } from "react"; import { useBlockProtocolArchiveEntity } from "../../../../components/hooks/block-protocol-functions/knowledge/use-block-protocol-archive-entity"; -import type { User } from "../../../../lib/user-and-org"; import { useFileUploads } from "../../../../shared/file-upload-context"; import { TrashRegularIcon } from "../../../../shared/icons/trash-regular-icon"; -import type { ButtonProps } from "../../../../shared/ui"; import { Button } from "../../../../shared/ui"; import { useAuthInfo } from "../../../shared/auth-info-context"; import { getImageUrlFromEntityProperties } from "../../../shared/get-file-properties"; import { useUpdateProfileAvatar } from "../../[shortname]/shared/use-update-profile-avatar"; import { leftColumnWidth } from "../util"; +import type { User } from "../../../../lib/user-and-org"; +import type { ButtonProps } from "../../../../shared/ui"; +import type { WebId } from "@blockprotocol/type-system"; +import type { ChangeEventHandler, FunctionComponent } from "react"; + const AvatarButton = styled((props: ButtonProps) => (