Skip to content

Commit

Permalink
Merge branch 'main' into dw/hdev
Browse files Browse the repository at this point in the history
  • Loading branch information
vilkinsons authored Jun 3, 2024
2 parents 22003a5 + 1aeef59 commit 9dba201
Show file tree
Hide file tree
Showing 563 changed files with 7,365 additions and 2,491 deletions.
1 change: 1 addition & 0 deletions .clippy.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ allow-expect-in-tests = true
allow-print-in-tests = true
suppress-restriction-lint-in-const = true
doc-valid-idents = ["SpiceDB", "OpenAPI", ".."]
allow-renamed-params-for = ["core::fmt::Debug", "core::fmt::Display", "futures_sink::Sink", ".."]
2 changes: 1 addition & 1 deletion .github/actions/build-docker-images/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ runs:
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0

- name: Login to GitHub Container Registry
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/warm-up-repo/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ runs:
# cache: yarn ## Currently disabled because of frequent timeouts

- name: Install WASM tools
uses: taiki-e/install-action@689459d9ffef015a7fbaef7f3b6b9f053f80a64d # v2.33.26
uses: taiki-e/install-action@4e38715ddc7c4e1fd3e44ab4c124a2dcca7306fd # v2.34.0
with:
tool: wasm-pack@0.12.1

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- name: Install Rust tools
if: steps.benches.outputs.has-rust == 'true'
uses: taiki-e/install-action@689459d9ffef015a7fbaef7f3b6b9f053f80a64d # v2.33.26
uses: taiki-e/install-action@4e38715ddc7c4e1fd3e44ab4c124a2dcca7306fd # v2.34.0
with:
tool: just@1.13.0,critcmp@0.1.8

Expand Down Expand Up @@ -241,7 +241,7 @@ jobs:
- name: Install Rust tools
if: steps.benches.outputs.has-rust == 'true'
uses: taiki-e/install-action@689459d9ffef015a7fbaef7f3b6b9f053f80a64d # v2.33.26
uses: taiki-e/install-action@4e38715ddc7c4e1fd3e44ab4c124a2dcca7306fd # v2.34.0
with:
tool: just@1.13.0,critcmp@0.1.8

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6
uses: github/codeql-action/init@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -47,7 +47,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6
uses: github/codeql-action/autobuild@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -61,4 +61,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6
uses: github/codeql-action/analyze@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:

- name: Install Rust tools
if: always() && steps.lints.outputs.has-rust == 'true'
uses: taiki-e/install-action@689459d9ffef015a7fbaef7f3b6b9f053f80a64d # v2.33.26
uses: taiki-e/install-action@4e38715ddc7c4e1fd3e44ab4c124a2dcca7306fd # v2.34.0
with:
tool: just@1.13.0,cargo-hack@0.6.28,rust-script@0.23.0,clippy-sarif@0.3.7,sarif-fmt@0.3.7

Expand Down Expand Up @@ -175,7 +175,7 @@ jobs:
mv "$tmp" clippy.sarif
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6
uses: github/codeql-action/upload-sarif@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7
if: always() && steps.lints.outputs.has-clippy == 'true'
with:
sarif_file: ${{ matrix.directory }}/clippy.sarif
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
files: "semgrep.sarif"

- name: Upload SARIF file for GitHub Advanced Security Dashboard
uses: github/codeql-action/upload-sarif@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6
uses: github/codeql-action/upload-sarif@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7
if: steps.sarif_file_check.outputs.files_exists == 'true'
with:
sarif_file: semgrep.sarif
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ jobs:

- name: Install Rust tools
if: always() && steps.tests.outputs.has-rust == 'true'
uses: taiki-e/install-action@689459d9ffef015a7fbaef7f3b6b9f053f80a64d # v2.33.26
uses: taiki-e/install-action@4e38715ddc7c4e1fd3e44ab4c124a2dcca7306fd # v2.34.0
with:
tool: just@1.13.0,cargo-hack@0.6.28,cargo-nextest@0.9.68,cargo-llvm-cov@0.6.9

Expand Down Expand Up @@ -285,7 +285,7 @@ jobs:

- name: Install Rust tools
if: always() && steps.tests.outputs.has-rust == 'true'
uses: taiki-e/install-action@689459d9ffef015a7fbaef7f3b6b9f053f80a64d # v2.33.26
uses: taiki-e/install-action@4e38715ddc7c4e1fd3e44ab4c124a2dcca7306fd # v2.34.0
with:
tool: just@1.13.0,cargo-hack@0.6.28,cargo-nextest@0.9.68,cargo-llvm-cov@0.6.9

Expand Down Expand Up @@ -415,7 +415,7 @@ jobs:

- name: Install Rust tools
if: always() && steps.tests.outputs.has-rust == 'true'
uses: taiki-e/install-action@689459d9ffef015a7fbaef7f3b6b9f053f80a64d # v2.33.26
uses: taiki-e/install-action@4e38715ddc7c4e1fd3e44ab4c124a2dcca7306fd # v2.34.0
with:
tool: just@1.13.0,cargo-hack@0.6.28,cargo-nextest@0.9.68,cargo-llvm-cov@0.6.9

Expand Down Expand Up @@ -550,7 +550,7 @@ jobs:

- name: Install tools
if: always() && steps.publish.outputs.has-rust == 'true' && github.event_name == 'pull_request' || github.event_name == 'merge_group'
uses: taiki-e/install-action@689459d9ffef015a7fbaef7f3b6b9f053f80a64d # v2.33.26
uses: taiki-e/install-action@4e38715ddc7c4e1fd3e44ab4c124a2dcca7306fd # v2.34.0
with:
tool: cargo-semver-checks

Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/iron
53 changes: 33 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ cargo-features = ["edition2024"]

[workspace]
members = [
"apps/hash-graph/bench",
"apps/hash-graph/bins/cli",
"apps/hash-graph/libs/*",
"libs/@blockprotocol/type-system/rust",
Expand All @@ -15,6 +14,7 @@ members = [
"libs/@local/repo-chores/rust",
"libs/@local/temporal-client",
"libs/@local/temporal-versioning",
"tests/hash-graph-benches",
"tests/hash-graph-integration",
"tests/hash-graph-test-data/rust",
"libs/@local/harpc/wire-protocol",
Expand Down Expand Up @@ -81,6 +81,3 @@ uuid = { version = "1.8.0", default-features = false }
inherits = "release"
lto = "fat"
strip = "none"

[patch.crates-io]
crc32c = { git = "https://github.com/zowens/crc32c", rev = "04eabbc6ef33e0afe529da729e65916c48f9d032" }
4 changes: 2 additions & 2 deletions apps/hash-ai-worker-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@
"@local/advanced-types": "0.0.0-private",
"@local/hash-backend-utils": "0.0.0-private",
"@local/hash-graph-client": "0.0.0-private",
"@local/hash-graph-types": "0.0.0-private",
"@local/hash-isomorphic-utils": "0.0.0-private",
"@local/hash-subgraph": "0.0.0-private",
"@local/internal-api-client": "0.0.0-private",
"@local/status": "0.0.0-private",
"@sentry/node": "7.109.0",
"@sentry/node": "7.116.0",
"@temporalio/activity": "1.8.1",
"@temporalio/common": "1.8.1",
"@temporalio/worker": "1.8.1",
Expand Down
2 changes: 1 addition & 1 deletion apps/hash-ai-worker-ts/scripts/compare-llm-response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { mkdirSync, writeFileSync } from "node:fs";
import { dirname } from "node:path";
import { fileURLToPath } from "node:url";

import { type OwnedById } from "@local/hash-subgraph";
import { type OwnedById } from "@local/hash-graph-types/web";

import { getLlmResponse } from "../src/activities/shared/get-llm-response";
import type {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { AccountId } from "@local/hash-subgraph";
import type { AccountId } from "@local/hash-graph-types/account";

import type {
AnthropicLlmParams,
Expand Down
12 changes: 6 additions & 6 deletions apps/hash-ai-worker-ts/src/activities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ import type {
EntityEmbedding,
GraphApi,
} from "@local/hash-graph-client";
import type {
DataTypeWithMetadata,
EntityTypeWithMetadata,
PropertyTypeWithMetadata,
} from "@local/hash-graph-types/ontology";
import type {
CreateEmbeddingsParams,
CreateEmbeddingsReturn,
} from "@local/hash-isomorphic-utils/ai-inference-types";
import type { ParseTextFromFileParams } from "@local/hash-isomorphic-utils/parse-text-from-file-types";
import type {
DataTypeWithMetadata,
EntityPropertiesObject,
EntityTypeWithMetadata,
PropertyTypeWithMetadata,
} from "@local/hash-subgraph";
import type { EntityPropertiesObject } from "@local/hash-subgraph";
import type { CreateEmbeddingResponse } from "openai/resources";

import { createInferenceUsageRecordActivity } from "./activities/create-inference-usage-record-activity";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createUsageRecord } from "@local/hash-backend-utils/service-usage";
import type { EntityMetadata, GraphApi } from "@local/hash-graph-client";
import type { AccountId } from "@local/hash-subgraph";
import type { AccountId } from "@local/hash-graph-types/account";

import type { LlmUsage } from "./shared/get-llm-response/types";
import type { PermittedOpenAiModel } from "./shared/openai-client";
Expand Down
2 changes: 2 additions & 0 deletions apps/hash-ai-worker-ts/src/activities/flow-activities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { VaultClient } from "@local/hash-backend-utils/vault";
import type { ActionDefinitionId } from "@local/hash-isomorphic-utils/flows/action-definitions";

import { answerQuestionAction } from "./flow-activities/answer-question-action";
import { generateFlowRunName } from "./flow-activities/generate-flow-run-name-activity";
import { generateWebQueriesAction } from "./flow-activities/generate-web-queries-action";
import { getFileFromUrlAction } from "./flow-activities/get-file-from-url-action";
import { getWebPageByUrlAction } from "./flow-activities/get-web-page-by-url-action";
Expand Down Expand Up @@ -46,6 +47,7 @@ export const createFlowActivities = ({
vaultClient: VaultClient;
}) => ({
...createFlowActionActivities({ vaultClient }),
generateFlowRunName,
persistFlowActivity,
userHasPermissionToRunFlowInWebActivity,
});
Loading

0 comments on commit 9dba201

Please sign in to comment.