diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 7a908ca1c6..bcb5b420bd 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -6,7 +6,7 @@ jobs: python-checks: runs-on: ubuntu-latest env: - PATH: ${{ github.workspace }}/go/bin:${{ github.workspace }}/.cargo/bin:${{ github.workspace }}/.local/share/pnpm:${{ github.workspace }}/.local/bin:${{ env.PATH }} + PATH: ${{ github.workspace }}/go/bin:${{ github.workspace }}/.cargo/bin:${{ github.workspace }}/.local/share/pnpm:${{ github.workspace }}/.local/bin:/usr/local/bin:/usr/bin:/bin strategy: matrix: python-version: diff --git a/go/ai/document.go b/go/ai/document.go index e2dec4580c..a26d2b1839 100644 --- a/go/ai/document.go +++ b/go/ai/document.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package ai diff --git a/go/ai/document_test.go b/go/ai/document_test.go index 49345c4a40..d1ae434b41 100644 --- a/go/ai/document_test.go +++ b/go/ai/document_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package ai diff --git a/go/ai/embedder.go b/go/ai/embedder.go index da3dae5077..8cf8a24e5e 100644 --- a/go/ai/embedder.go +++ b/go/ai/embedder.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package ai diff --git a/go/ai/gen.go b/go/ai/gen.go index 409e4f0966..7e7219a120 100644 --- a/go/ai/gen.go +++ b/go/ai/gen.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // This file was generated by jsonschemagen. DO NOT EDIT. diff --git a/go/ai/generate.go b/go/ai/generate.go index 5a02b03ca7..e5337dcadb 100644 --- a/go/ai/generate.go +++ b/go/ai/generate.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package ai diff --git a/go/ai/generator_test.go b/go/ai/generator_test.go index 0c5796b924..55d0ba8193 100644 --- a/go/ai/generator_test.go +++ b/go/ai/generator_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package ai diff --git a/go/ai/prompt.go b/go/ai/prompt.go index 7643997e30..a9f1ddd17f 100644 --- a/go/ai/prompt.go +++ b/go/ai/prompt.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package ai diff --git a/go/ai/request_helpers.go b/go/ai/request_helpers.go index 3632e5c6a7..224de3aec8 100644 --- a/go/ai/request_helpers.go +++ b/go/ai/request_helpers.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package ai diff --git a/go/ai/retriever.go b/go/ai/retriever.go index a239eb755f..93983ce232 100644 --- a/go/ai/retriever.go +++ b/go/ai/retriever.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package ai diff --git a/go/ai/tools.go b/go/ai/tools.go index 2cae9db658..abfc56d933 100644 --- a/go/ai/tools.go +++ b/go/ai/tools.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package ai diff --git a/go/core/action.go b/go/core/action.go index b6900f27e7..93d9ec4f7c 100644 --- a/go/core/action.go +++ b/go/core/action.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package core diff --git a/go/core/action_test.go b/go/core/action_test.go index bdb64db0ca..c528acb3cf 100644 --- a/go/core/action_test.go +++ b/go/core/action_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package core diff --git a/go/core/core.go b/go/core/core.go index 5895b8e928..e03ad7a180 100644 --- a/go/core/core.go +++ b/go/core/core.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // Run the npm script that generates JSON Schemas from the zod types // in the *.ts files. It writes the result to genkit-tools/genkit-schema.json diff --git a/go/core/file_flow_state_store.go b/go/core/file_flow_state_store.go index d01993cd34..7cd7cf83ba 100644 --- a/go/core/file_flow_state_store.go +++ b/go/core/file_flow_state_store.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package core diff --git a/go/core/flow_state_store.go b/go/core/flow_state_store.go index b5a2abc4cc..646dc66dbd 100644 --- a/go/core/flow_state_store.go +++ b/go/core/flow_state_store.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package core diff --git a/go/core/logger/logger.go b/go/core/logger/logger.go index 11f37014ee..c0188031f1 100644 --- a/go/core/logger/logger.go +++ b/go/core/logger/logger.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // Package logger provides a context-scoped slog.Logger. package logger diff --git a/go/core/tracing/milliseconds.go b/go/core/tracing/milliseconds.go index 79315cf134..d5a087ac7c 100644 --- a/go/core/tracing/milliseconds.go +++ b/go/core/tracing/milliseconds.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // Package gtime provides time functionality for Go Genkit. package tracing diff --git a/go/core/tracing/milliseconds_test.go b/go/core/tracing/milliseconds_test.go index 49694ef3fa..5cc1376f48 100644 --- a/go/core/tracing/milliseconds_test.go +++ b/go/core/tracing/milliseconds_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package tracing diff --git a/go/core/tracing/store.go b/go/core/tracing/store.go index fbbab092bd..cd1c211166 100644 --- a/go/core/tracing/store.go +++ b/go/core/tracing/store.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package tracing diff --git a/go/core/tracing/store_test.go b/go/core/tracing/store_test.go index 44ab232966..4f8bcd18d4 100644 --- a/go/core/tracing/store_test.go +++ b/go/core/tracing/store_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package tracing diff --git a/go/core/tracing/telemetry.go b/go/core/tracing/telemetry.go index 6025a54a2a..eeda29db27 100644 --- a/go/core/tracing/telemetry.go +++ b/go/core/tracing/telemetry.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package tracing diff --git a/go/core/tracing/trace_server_exporter.go b/go/core/tracing/trace_server_exporter.go index e33e4a504d..3ba5c90e1f 100644 --- a/go/core/tracing/trace_server_exporter.go +++ b/go/core/tracing/trace_server_exporter.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package tracing diff --git a/go/core/tracing/trace_server_exporter_test.go b/go/core/tracing/trace_server_exporter_test.go index 487b00f929..9c2f0de7f0 100644 --- a/go/core/tracing/trace_server_exporter_test.go +++ b/go/core/tracing/trace_server_exporter_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package tracing diff --git a/go/core/tracing/tracing.go b/go/core/tracing/tracing.go index cae0bf1616..75dfcac178 100644 --- a/go/core/tracing/tracing.go +++ b/go/core/tracing/tracing.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // The tracing package provides support for execution traces. package tracing diff --git a/go/core/tracing/tracing_test.go b/go/core/tracing/tracing_test.go index 87577b195a..6ad71dffc5 100644 --- a/go/core/tracing/tracing_test.go +++ b/go/core/tracing/tracing_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package tracing diff --git a/go/genkit/conformance_test.go b/go/genkit/conformance_test.go index c7c1c3c5a9..de401030e1 100644 --- a/go/genkit/conformance_test.go +++ b/go/genkit/conformance_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package genkit diff --git a/go/genkit/flow.go b/go/genkit/flow.go index 52ede66c80..ee29e6d59c 100644 --- a/go/genkit/flow.go +++ b/go/genkit/flow.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package genkit diff --git a/go/genkit/flow_test.go b/go/genkit/flow_test.go index 5899182296..b50832bb0a 100644 --- a/go/genkit/flow_test.go +++ b/go/genkit/flow_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package genkit diff --git a/go/genkit/gen.go b/go/genkit/gen.go index 325b101ee6..3f64eb549e 100644 --- a/go/genkit/gen.go +++ b/go/genkit/gen.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // This file was generated by jsonschemagen. DO NOT EDIT. diff --git a/go/genkit/genkit.go b/go/genkit/genkit.go index 122edd3768..8b9a77a1cb 100644 --- a/go/genkit/genkit.go +++ b/go/genkit/genkit.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // Package genkit provides Genkit functionality for application developers. package genkit diff --git a/go/genkit/genkit_test.go b/go/genkit/genkit_test.go index 104ab2fe19..48989f6a0c 100644 --- a/go/genkit/genkit_test.go +++ b/go/genkit/genkit_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package genkit diff --git a/go/genkit/servers.go b/go/genkit/servers.go index 9dd1753282..9cb09e73c4 100644 --- a/go/genkit/servers.go +++ b/go/genkit/servers.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // This file implements production and development servers. // diff --git a/go/genkit/servers_test.go b/go/genkit/servers_test.go index 09378a9311..5be583d4b1 100644 --- a/go/genkit/servers_test.go +++ b/go/genkit/servers_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package genkit diff --git a/go/internal/action/action.go b/go/internal/action/action.go index ddd0119b5b..633b5cf1ff 100644 --- a/go/internal/action/action.go +++ b/go/internal/action/action.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package action diff --git a/go/internal/atype/atype.go b/go/internal/atype/atype.go index f5b48c207e..3656e6bd47 100644 --- a/go/internal/atype/atype.go +++ b/go/internal/atype/atype.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // Package atype provides types for Genkit actions. package atype diff --git a/go/internal/base/context_key.go b/go/internal/base/context_key.go index 38f476f77e..b0458452b2 100644 --- a/go/internal/base/context_key.go +++ b/go/internal/base/context_key.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package base diff --git a/go/internal/base/json.go b/go/internal/base/json.go index 168f34effd..5771823bad 100644 --- a/go/internal/base/json.go +++ b/go/internal/base/json.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package base diff --git a/go/internal/base/json_test.go b/go/internal/base/json_test.go index 6387acb505..eadae6c6ce 100644 --- a/go/internal/base/json_test.go +++ b/go/internal/base/json_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package base diff --git a/go/internal/base/misc.go b/go/internal/base/misc.go index 01b0fa8404..2e062f872c 100644 --- a/go/internal/base/misc.go +++ b/go/internal/base/misc.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package base diff --git a/go/internal/base/validation.go b/go/internal/base/validation.go index 9510fd68eb..baa77dd0de 100644 --- a/go/internal/base/validation.go +++ b/go/internal/base/validation.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package base diff --git a/go/internal/cmd/copy/copy.go b/go/internal/cmd/copy/copy.go index f6192a3208..54330fc4ec 100644 --- a/go/internal/cmd/copy/copy.go +++ b/go/internal/cmd/copy/copy.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // copy is a tool for copying parts of files. // It reads a set of source files, collecting named sequences of lines to copy diff --git a/go/internal/cmd/copy/copy_test.go b/go/internal/cmd/copy/copy_test.go index 24cabaa0f0..06bfdd27aa 100644 --- a/go/internal/cmd/copy/copy_test.go +++ b/go/internal/cmd/copy/copy_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package main diff --git a/go/internal/cmd/jsonschemagen/jsonschema.go b/go/internal/cmd/jsonschemagen/jsonschema.go index 183c5e4cfa..8e913092ce 100644 --- a/go/internal/cmd/jsonschemagen/jsonschema.go +++ b/go/internal/cmd/jsonschemagen/jsonschema.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package main diff --git a/go/internal/cmd/jsonschemagen/jsonschema_test.go b/go/internal/cmd/jsonschemagen/jsonschema_test.go index 1fb4c5ec7e..be21b87335 100644 --- a/go/internal/cmd/jsonschemagen/jsonschema_test.go +++ b/go/internal/cmd/jsonschemagen/jsonschema_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package main diff --git a/go/internal/cmd/jsonschemagen/jsonschemagen.go b/go/internal/cmd/jsonschemagen/jsonschemagen.go index d5dd2cb0b3..17cda59766 100644 --- a/go/internal/cmd/jsonschemagen/jsonschemagen.go +++ b/go/internal/cmd/jsonschemagen/jsonschemagen.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // A simple, self-contained code generator for JSON Schema. // It converts a JSON Schema to equivalent Go types. @@ -246,6 +249,9 @@ const license = ` // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + ` type generator struct { diff --git a/go/internal/cmd/jsonschemagen/jsonschemagen_test.go b/go/internal/cmd/jsonschemagen/jsonschemagen_test.go index 7a0dabe4d5..a20ad59016 100644 --- a/go/internal/cmd/jsonschemagen/jsonschemagen_test.go +++ b/go/internal/cmd/jsonschemagen/jsonschemagen_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package main diff --git a/go/internal/cmd/jsonschemagen/testdata/golden b/go/internal/cmd/jsonschemagen/testdata/golden index 3491256981..23123a7970 100644 --- a/go/internal/cmd/jsonschemagen/testdata/golden +++ b/go/internal/cmd/jsonschemagen/testdata/golden @@ -11,6 +11,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 // This file was generated by jsonschemagen. DO NOT EDIT. diff --git a/go/internal/cmd/weave/weave.go b/go/internal/cmd/weave/weave.go index 9f69560e23..9b2e7938af 100644 --- a/go/internal/cmd/weave/weave.go +++ b/go/internal/cmd/weave/weave.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // The weave command is a simple preprocessor for markdown files. // It builds a table of contents and processes %include directives. diff --git a/go/internal/doc-snippets/doc.go b/go/internal/doc-snippets/doc.go index 9e9f9d1b90..a92fd8fd6c 100644 --- a/go/internal/doc-snippets/doc.go +++ b/go/internal/doc-snippets/doc.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // Package snippets contains snippets that are incorporated into // documentation (see the docs-go directory under the repo root). diff --git a/go/internal/doc-snippets/dotprompt.go b/go/internal/doc-snippets/dotprompt.go index 8c6cff48f2..65223b4572 100644 --- a/go/internal/doc-snippets/dotprompt.go +++ b/go/internal/doc-snippets/dotprompt.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package snippets diff --git a/go/internal/doc-snippets/flows.go b/go/internal/doc-snippets/flows.go index cfc45894f3..5a4140a783 100644 --- a/go/internal/doc-snippets/flows.go +++ b/go/internal/doc-snippets/flows.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package snippets diff --git a/go/internal/doc-snippets/gcp.go b/go/internal/doc-snippets/gcp.go index 1efee223cb..ee7e9ecad8 100644 --- a/go/internal/doc-snippets/gcp.go +++ b/go/internal/doc-snippets/gcp.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package snippets diff --git a/go/internal/doc-snippets/googleai.go b/go/internal/doc-snippets/googleai.go index ef9cee755c..d176a17741 100644 --- a/go/internal/doc-snippets/googleai.go +++ b/go/internal/doc-snippets/googleai.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package snippets diff --git a/go/internal/doc-snippets/init/main.go b/go/internal/doc-snippets/init/main.go index b68cf377e0..d38a4be177 100644 --- a/go/internal/doc-snippets/init/main.go +++ b/go/internal/doc-snippets/init/main.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // [START main] package main diff --git a/go/internal/doc-snippets/modelplugin/modelplugin.go b/go/internal/doc-snippets/modelplugin/modelplugin.go index cb14c02eba..3945a832d1 100644 --- a/go/internal/doc-snippets/modelplugin/modelplugin.go +++ b/go/internal/doc-snippets/modelplugin/modelplugin.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package modelplugin diff --git a/go/internal/doc-snippets/models.go b/go/internal/doc-snippets/models.go index 97709c89c1..462f8d1253 100644 --- a/go/internal/doc-snippets/models.go +++ b/go/internal/doc-snippets/models.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package snippets diff --git a/go/internal/doc-snippets/ollama.go b/go/internal/doc-snippets/ollama.go index 76afebc026..c3e8cc007f 100644 --- a/go/internal/doc-snippets/ollama.go +++ b/go/internal/doc-snippets/ollama.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package snippets diff --git a/go/internal/doc-snippets/pinecone.go b/go/internal/doc-snippets/pinecone.go index 9995c93c24..25d9d18fed 100644 --- a/go/internal/doc-snippets/pinecone.go +++ b/go/internal/doc-snippets/pinecone.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package snippets diff --git a/go/internal/doc-snippets/plugin/plugin.go b/go/internal/doc-snippets/plugin/plugin.go index 7a0fdbe7b8..b9db038ec2 100644 --- a/go/internal/doc-snippets/plugin/plugin.go +++ b/go/internal/doc-snippets/plugin/plugin.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package plugin diff --git a/go/internal/doc-snippets/prompts.go b/go/internal/doc-snippets/prompts.go index c8bb0e3a3d..a17e342d47 100644 --- a/go/internal/doc-snippets/prompts.go +++ b/go/internal/doc-snippets/prompts.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package snippets diff --git a/go/internal/doc-snippets/rag/main.go b/go/internal/doc-snippets/rag/main.go index 6381005715..7eded5f4cb 100644 --- a/go/internal/doc-snippets/rag/main.go +++ b/go/internal/doc-snippets/rag/main.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package rag diff --git a/go/internal/doc-snippets/rag/pdf/pdf.go b/go/internal/doc-snippets/rag/pdf/pdf.go index 3cb2c48d8f..39e476798a 100644 --- a/go/internal/doc-snippets/rag/pdf/pdf.go +++ b/go/internal/doc-snippets/rag/pdf/pdf.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package pdf diff --git a/go/internal/doc-snippets/rag/textsplitter/textsplitter.go b/go/internal/doc-snippets/rag/textsplitter/textsplitter.go index c827cd2e88..c3238f8ec4 100644 --- a/go/internal/doc-snippets/rag/textsplitter/textsplitter.go +++ b/go/internal/doc-snippets/rag/textsplitter/textsplitter.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package textsplitter diff --git a/go/internal/doc-snippets/telemetryplugin/exporters.go b/go/internal/doc-snippets/telemetryplugin/exporters.go index d0b0fca4b0..0f63126570 100644 --- a/go/internal/doc-snippets/telemetryplugin/exporters.go +++ b/go/internal/doc-snippets/telemetryplugin/exporters.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package telemetryplugin diff --git a/go/internal/doc-snippets/telemetryplugin/telemetryplugin.go b/go/internal/doc-snippets/telemetryplugin/telemetryplugin.go index 855ca7cc45..98f7e8e487 100644 --- a/go/internal/doc-snippets/telemetryplugin/telemetryplugin.go +++ b/go/internal/doc-snippets/telemetryplugin/telemetryplugin.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package telemetryplugin diff --git a/go/internal/doc-snippets/vertexai.go b/go/internal/doc-snippets/vertexai.go index d09f412e4a..29b825bd83 100644 --- a/go/internal/doc-snippets/vertexai.go +++ b/go/internal/doc-snippets/vertexai.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package snippets diff --git a/go/internal/fakeembedder/fakeembedder.go b/go/internal/fakeembedder/fakeembedder.go index 11fd2e259b..af4482c98a 100644 --- a/go/internal/fakeembedder/fakeembedder.go +++ b/go/internal/fakeembedder/fakeembedder.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // Package fakeembedder provides a fake implementation of // genkit.Embedder for testing purposes. diff --git a/go/internal/fakeembedder/fakeembedder_test.go b/go/internal/fakeembedder/fakeembedder_test.go index c01d037d4b..baa9f7209b 100644 --- a/go/internal/fakeembedder/fakeembedder_test.go +++ b/go/internal/fakeembedder/fakeembedder_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package fakeembedder diff --git a/go/internal/metrics/metrics.go b/go/internal/metrics/metrics.go index a37a547b30..e63033e8d4 100644 --- a/go/internal/metrics/metrics.go +++ b/go/internal/metrics/metrics.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package metrics diff --git a/go/internal/registry/registry.go b/go/internal/registry/registry.go index 804898a0fa..6b65c7ed2d 100644 --- a/go/internal/registry/registry.go +++ b/go/internal/registry/registry.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package registry diff --git a/go/internal/version.go b/go/internal/version.go index d1cc79ca58..5e1983356b 100644 --- a/go/internal/version.go +++ b/go/internal/version.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package internal diff --git a/go/plugins/dotprompt/dotprompt.go b/go/plugins/dotprompt/dotprompt.go index e667aa58db..3c16233dae 100644 --- a/go/plugins/dotprompt/dotprompt.go +++ b/go/plugins/dotprompt/dotprompt.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // Package dotprompt parses and renders dotprompt files. package dotprompt diff --git a/go/plugins/dotprompt/dotprompt_test.go b/go/plugins/dotprompt/dotprompt_test.go index f177409da5..14e9f30314 100644 --- a/go/plugins/dotprompt/dotprompt_test.go +++ b/go/plugins/dotprompt/dotprompt_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package dotprompt diff --git a/go/plugins/dotprompt/genkit.go b/go/plugins/dotprompt/genkit.go index 5208789346..694196f369 100644 --- a/go/plugins/dotprompt/genkit.go +++ b/go/plugins/dotprompt/genkit.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package dotprompt diff --git a/go/plugins/dotprompt/genkit_test.go b/go/plugins/dotprompt/genkit_test.go index 840e2e8718..d934e35a01 100644 --- a/go/plugins/dotprompt/genkit_test.go +++ b/go/plugins/dotprompt/genkit_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package dotprompt diff --git a/go/plugins/dotprompt/picoschema.go b/go/plugins/dotprompt/picoschema.go index ca5b7c00c3..95d8c833ce 100644 --- a/go/plugins/dotprompt/picoschema.go +++ b/go/plugins/dotprompt/picoschema.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package dotprompt diff --git a/go/plugins/dotprompt/picoschema_test.go b/go/plugins/dotprompt/picoschema_test.go index f25d5f6b17..beec9790b2 100644 --- a/go/plugins/dotprompt/picoschema_test.go +++ b/go/plugins/dotprompt/picoschema_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package dotprompt diff --git a/go/plugins/dotprompt/render.go b/go/plugins/dotprompt/render.go index 98e712e919..4ca07bf6ce 100644 --- a/go/plugins/dotprompt/render.go +++ b/go/plugins/dotprompt/render.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package dotprompt diff --git a/go/plugins/dotprompt/render_test.go b/go/plugins/dotprompt/render_test.go index f85b9c259b..c8b996b16c 100644 --- a/go/plugins/dotprompt/render_test.go +++ b/go/plugins/dotprompt/render_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package dotprompt diff --git a/go/plugins/firebase/auth.go b/go/plugins/firebase/auth.go index de27795a6f..a1446842ea 100644 --- a/go/plugins/firebase/auth.go +++ b/go/plugins/firebase/auth.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package firebase diff --git a/go/plugins/firebase/auth_test.go b/go/plugins/firebase/auth_test.go index 6bd566064d..081086a921 100644 --- a/go/plugins/firebase/auth_test.go +++ b/go/plugins/firebase/auth_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package firebase diff --git a/go/plugins/firebase/firebase.go b/go/plugins/firebase/firebase.go index e2f4a85b4d..8611a6a932 100644 --- a/go/plugins/firebase/firebase.go +++ b/go/plugins/firebase/firebase.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package firebase diff --git a/go/plugins/googleai/googleai.go b/go/plugins/googleai/googleai.go index f0e98fc50d..c8ae996fee 100644 --- a/go/plugins/googleai/googleai.go +++ b/go/plugins/googleai/googleai.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // Parts of this file are copied into vertexai, because the code is identical // except for the import path of the Gemini SDK. diff --git a/go/plugins/googleai/googleai_test.go b/go/plugins/googleai/googleai_test.go index 5ba1e12dcf..50c393ad3b 100644 --- a/go/plugins/googleai/googleai_test.go +++ b/go/plugins/googleai/googleai_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package googleai_test diff --git a/go/plugins/googlecloud/googlecloud.go b/go/plugins/googlecloud/googlecloud.go index a2ccadc8c4..1dfe55d0a0 100644 --- a/go/plugins/googlecloud/googlecloud.go +++ b/go/plugins/googlecloud/googlecloud.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // The googlecloud package supports telemetry (tracing, metrics and logging) using // Google Cloud services. diff --git a/go/plugins/googlecloud/googlecloud_test.go b/go/plugins/googlecloud/googlecloud_test.go index 22a46b28bb..9388029a87 100644 --- a/go/plugins/googlecloud/googlecloud_test.go +++ b/go/plugins/googlecloud/googlecloud_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // The googlecloud package supports telemetry (tracing , metrics and logging) using // Google Cloud services. diff --git a/go/plugins/googlecloud/slog_handler.go b/go/plugins/googlecloud/slog_handler.go index 7c644b0cde..9e1761aa32 100644 --- a/go/plugins/googlecloud/slog_handler.go +++ b/go/plugins/googlecloud/slog_handler.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // The googlecloud package supports telemetry (tracing, metrics and logging) using // Google Cloud services. diff --git a/go/plugins/googlecloud/slog_handler_test.go b/go/plugins/googlecloud/slog_handler_test.go index 7feb3eb014..9969761894 100644 --- a/go/plugins/googlecloud/slog_handler_test.go +++ b/go/plugins/googlecloud/slog_handler_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // The googlecloud package supports telemetry (tracing, metrics and logging) using // Google Cloud services. diff --git a/go/plugins/internal/gemini/gemini.go b/go/plugins/internal/gemini/gemini.go index 9ede1b8f07..6ef59eacb9 100644 --- a/go/plugins/internal/gemini/gemini.go +++ b/go/plugins/internal/gemini/gemini.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // Package gemini contains code that is common to both the googleai and vertexai plugins. // Most most cannot be shared in this way because the import paths are different. diff --git a/go/plugins/internal/uri/uri.go b/go/plugins/internal/uri/uri.go index 788e7d3463..de703efb2f 100644 --- a/go/plugins/internal/uri/uri.go +++ b/go/plugins/internal/uri/uri.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // Package uri extracts the content-type and data from a media part. // This is used by the googleai and vertexai plugins. diff --git a/go/plugins/internal/uri/uri_test.go b/go/plugins/internal/uri/uri_test.go index 8151f9a7aa..159f0b6aad 100644 --- a/go/plugins/internal/uri/uri_test.go +++ b/go/plugins/internal/uri/uri_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package uri diff --git a/go/plugins/localvec/localvec.go b/go/plugins/localvec/localvec.go index f0858f8924..a100060e0e 100644 --- a/go/plugins/localvec/localvec.go +++ b/go/plugins/localvec/localvec.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // Package localvec is a local vector database for development and testing. // The database is stored in a file in the local file system. diff --git a/go/plugins/localvec/localvec_test.go b/go/plugins/localvec/localvec_test.go index a479d27fe6..6646bb3ee1 100644 --- a/go/plugins/localvec/localvec_test.go +++ b/go/plugins/localvec/localvec_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package localvec diff --git a/go/plugins/ollama/embed.go b/go/plugins/ollama/embed.go index b6d3cf2ef9..095a6875a0 100644 --- a/go/plugins/ollama/embed.go +++ b/go/plugins/ollama/embed.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package ollama diff --git a/go/plugins/ollama/embed_test.go b/go/plugins/ollama/embed_test.go index d5c0190a49..320564958a 100644 --- a/go/plugins/ollama/embed_test.go +++ b/go/plugins/ollama/embed_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package ollama diff --git a/go/plugins/ollama/ollama.go b/go/plugins/ollama/ollama.go index 7d1bad962c..e683251e28 100644 --- a/go/plugins/ollama/ollama.go +++ b/go/plugins/ollama/ollama.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package ollama diff --git a/go/plugins/ollama/ollama_live_test.go b/go/plugins/ollama/ollama_live_test.go index ccce9c537a..c582ff89ad 100644 --- a/go/plugins/ollama/ollama_live_test.go +++ b/go/plugins/ollama/ollama_live_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package ollama_test diff --git a/go/plugins/ollama/ollama_test.go b/go/plugins/ollama/ollama_test.go index a3cc591e69..d3356a09f7 100644 --- a/go/plugins/ollama/ollama_test.go +++ b/go/plugins/ollama/ollama_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package ollama diff --git a/go/plugins/pinecone/genkit.go b/go/plugins/pinecone/genkit.go index ab946b3c4b..4281d08d4b 100644 --- a/go/plugins/pinecone/genkit.go +++ b/go/plugins/pinecone/genkit.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package pinecone diff --git a/go/plugins/pinecone/genkit_test.go b/go/plugins/pinecone/genkit_test.go index d032dc281b..2cd38df445 100644 --- a/go/plugins/pinecone/genkit_test.go +++ b/go/plugins/pinecone/genkit_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package pinecone diff --git a/go/plugins/pinecone/pinecone.go b/go/plugins/pinecone/pinecone.go index e5a68f4e1c..f9cca1f51c 100644 --- a/go/plugins/pinecone/pinecone.go +++ b/go/plugins/pinecone/pinecone.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // Package pinecone implements a genkit plugin for the Pinecone vector // database. This defines an indexer and a retriever. diff --git a/go/plugins/pinecone/pinecone_test.go b/go/plugins/pinecone/pinecone_test.go index 5f5f8fdc38..f2aacf3ca3 100644 --- a/go/plugins/pinecone/pinecone_test.go +++ b/go/plugins/pinecone/pinecone_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package pinecone diff --git a/go/plugins/vertexai/embed.go b/go/plugins/vertexai/embed.go index ae5bd5bedf..8e8542b616 100644 --- a/go/plugins/vertexai/embed.go +++ b/go/plugins/vertexai/embed.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package vertexai diff --git a/go/plugins/vertexai/vertexai.go b/go/plugins/vertexai/vertexai.go index 3cb95e2c41..a87d0f4dea 100644 --- a/go/plugins/vertexai/vertexai.go +++ b/go/plugins/vertexai/vertexai.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package vertexai diff --git a/go/plugins/vertexai/vertexai_test.go b/go/plugins/vertexai/vertexai_test.go index fd322ee9e9..c2ee0fffbf 100644 --- a/go/plugins/vertexai/vertexai_test.go +++ b/go/plugins/vertexai/vertexai_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package vertexai_test diff --git a/go/plugins/weaviate/weaviate.go b/go/plugins/weaviate/weaviate.go index 40df346ea8..f8fe6a25b5 100644 --- a/go/plugins/weaviate/weaviate.go +++ b/go/plugins/weaviate/weaviate.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package weaviate diff --git a/go/plugins/weaviate/weaviate_test.go b/go/plugins/weaviate/weaviate_test.go index c1f1ad5335..fb4d0fc9e5 100644 --- a/go/plugins/weaviate/weaviate_test.go +++ b/go/plugins/weaviate/weaviate_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package weaviate diff --git a/go/samples/coffee-shop/main.go b/go/samples/coffee-shop/main.go index 28e76ccf60..f98fd9c42d 100755 --- a/go/samples/coffee-shop/main.go +++ b/go/samples/coffee-shop/main.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // This program can be manually tested like so: // diff --git a/go/samples/firebase-auth/main.go b/go/samples/firebase-auth/main.go index 3b22dfb978..bbcb3ea6f8 100644 --- a/go/samples/firebase-auth/main.go +++ b/go/samples/firebase-auth/main.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package main diff --git a/go/samples/flow-sample1/main.go b/go/samples/flow-sample1/main.go index 1906889a77..c0be4a17d8 100644 --- a/go/samples/flow-sample1/main.go +++ b/go/samples/flow-sample1/main.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // This program can be manually tested like so: // Start the server listening on port 3100: diff --git a/go/samples/menu/main.go b/go/samples/menu/main.go index 369e93d648..0545c6bd94 100644 --- a/go/samples/menu/main.go +++ b/go/samples/menu/main.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package main diff --git a/go/samples/menu/s01.go b/go/samples/menu/s01.go index 565c3cbc75..deb0017de9 100644 --- a/go/samples/menu/s01.go +++ b/go/samples/menu/s01.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package main diff --git a/go/samples/menu/s02.go b/go/samples/menu/s02.go index 7c404bf621..4db53dc060 100644 --- a/go/samples/menu/s02.go +++ b/go/samples/menu/s02.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package main diff --git a/go/samples/menu/s03.go b/go/samples/menu/s03.go index a2ed32d7be..0efe501944 100644 --- a/go/samples/menu/s03.go +++ b/go/samples/menu/s03.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package main diff --git a/go/samples/menu/s04.go b/go/samples/menu/s04.go index a5c1e50b3d..5629701ad7 100644 --- a/go/samples/menu/s04.go +++ b/go/samples/menu/s04.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package main diff --git a/go/samples/menu/s05.go b/go/samples/menu/s05.go index 7ae82a5bdb..11bbb8316e 100644 --- a/go/samples/menu/s05.go +++ b/go/samples/menu/s05.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package main diff --git a/go/samples/pgvector/main.go b/go/samples/pgvector/main.go index aedee9a995..651f0fd418 100644 --- a/go/samples/pgvector/main.go +++ b/go/samples/pgvector/main.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // This program shows how to use Postgres's pgvector extension with Genkit. diff --git a/go/samples/rag/main.go b/go/samples/rag/main.go index fedcda02e2..80e2493587 100644 --- a/go/samples/rag/main.go +++ b/go/samples/rag/main.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // This program can be manually tested like so: // diff --git a/go/tests/api_test.go b/go/tests/api_test.go index b4def29455..ddcff17327 100644 --- a/go/tests/api_test.go +++ b/go/tests/api_test.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package api_test diff --git a/go/tests/test_app/main.go b/go/tests/test_app/main.go index 78821235be..35ccad1066 100644 --- a/go/tests/test_app/main.go +++ b/go/tests/test_app/main.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + // This program doesn't do anything interesting. // It is used by go/tests/api_test.go. diff --git a/go/tests/utils/utils.go b/go/tests/utils/utils.go index a6d3d172e9..1f4ead3b44 100644 --- a/go/tests/utils/utils.go +++ b/go/tests/utils/utils.go @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package test_utils diff --git a/py/bin/build_dists b/py/bin/build_dists index f0a3c2274c..77504bea4a 100755 --- a/py/bin/build_dists +++ b/py/bin/build_dists @@ -15,6 +15,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 set -euo pipefail diff --git a/py/bin/check-licenses b/py/bin/check-licenses index f1d5516d66..0e572af7b4 100755 --- a/py/bin/check-licenses +++ b/py/bin/check-licenses @@ -1,4 +1,20 @@ #!/usr/bin/env bash +# +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 set -euo pipefail diff --git a/py/bin/cleanup b/py/bin/cleanup index 19dfbf2480..7ff46ce964 100755 --- a/py/bin/cleanup +++ b/py/bin/cleanup @@ -1,4 +1,20 @@ #!/usr/bin/env bash +# +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 set -x set -euo pipefail diff --git a/py/bin/fmt b/py/bin/fmt index c05600141e..f50455f98d 100755 --- a/py/bin/fmt +++ b/py/bin/fmt @@ -15,6 +15,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 #set -x # Uncomment to enable tracing. set -euo pipefail diff --git a/py/bin/format_toml_files b/py/bin/format_toml_files index 3b5ed705cf..2297fbc214 100755 --- a/py/bin/format_toml_files +++ b/py/bin/format_toml_files @@ -15,6 +15,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 set -euo pipefail diff --git a/py/bin/setup b/py/bin/setup index b6168b73c5..b9539a2a93 100755 --- a/py/bin/setup +++ b/py/bin/setup @@ -15,6 +15,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 if ((EUID == 0)) && [[ -z ${DANGEROUSLY_RUN_AS_ROOT+x} ]]; then echo "Please do not run as root unless DANGEROUSLY_RUN_AS_ROOT is set." @@ -63,11 +65,6 @@ function genkit::update_path() { # Remove trailing slash if present. new_path="${new_path%/}" - if [ ! -d "$new_path" ]; then - echo "Error: Directory $new_path does not exist" - return 1 - fi - # Check if path is already in PATH if [[ ":$PATH:" != *":$new_path:"* ]]; then if [ -n "${ZSH_VERSION:-}" ]; then @@ -138,6 +135,8 @@ function genkit::install_prerequisites() { SHELL="$(which bash)" \ PNPM_VERSION=10.0.0 \ bash - + env SHELL="$(which bash)" \ + pnpm setup } # Install the Google Cloud SDK. @@ -154,7 +153,13 @@ function genkit::install_google_cloud_sdk() { } # Install all the required tools that have been written in Go. -function genkit::install_go_cli_tools() { +function genkit::install_go_cli_tools_ci() { + go install github.com/google/go-licenses@latest + go install golang.org/x/vuln/cmd/govulncheck@latest +} + +# Install all the required tools that have been written in Go. +function genkit::install_go_cli_tools_eng() { go install github.com/Gelio/go-global-update@latest go install github.com/captainhook-go/captainhook/cmd/captainhook@latest go install github.com/google/addlicense@latest @@ -165,7 +170,7 @@ function genkit::install_go_cli_tools() { # Install all the required tools that have been written in Rust. We're assuming # that the user has already installed rust and cargo. -function genkit::install_cargo_cli_tools() { +function genkit::install_cargo_cli_tools_eng() { cargo install --locked \ convco \ fd-find \ @@ -174,10 +179,23 @@ function genkit::install_cargo_cli_tools() { taplo-cli } +# Install all the required tools that have been written in Rust. We're assuming +# that the user has already installed rust and cargo. +function genkit::install_cargo_cli_tools_ci() { + cargo install --locked \ + fd-find \ + ripgrep \ + rust-parallel +} + + # Install NPM packages. function genkit::install_pnpm_cli_tools() { - # Install the Genkit CLI. See: https://firebase.google.com/docs/genkit/devtools - pnpm add -g genkit-cli + # Genkit CLI: https://firebase.google.com/docs/genkit/devtools + # Biome: https://biomejs.dev/ + pnpm add -g \ + @biomejs/biome \ + genkit-cli } # Install all the Python-related formatter and static analysis tools. @@ -218,8 +236,6 @@ function genkit::setup_genkit() { # Install all the common packages. function genkit::install_common_packages() { genkit::install_prerequisites - genkit::install_go_cli_tools - genkit::install_cargo_cli_tools genkit::install_python_cli_tools genkit::install_docs_cli_tools genkit::install_pnpm_cli_tools @@ -228,11 +244,15 @@ function genkit::install_common_packages() { # Install all the required tools for CI. function genkit::install_ci_packages() { genkit::install_common_packages + genkit::install_go_cli_tools_ci + genkit::install_cargo_cli_tools_ci } # Install all the required tools for engineering. function genkit::install_eng_packages() { genkit::install_common_packages + genkit::install_go_cli_tools_eng + genkit::install_cargo_cli_tools_eng genkit::install_google_cloud_sdk genkit::install_pre_commit_hooks genkit::setup_genkit diff --git a/py/packages/dotprompt/pyproject.toml b/py/packages/dotprompt/pyproject.toml index f469a201d8..5387b1d722 100644 --- a/py/packages/dotprompt/pyproject.toml +++ b/py/packages/dotprompt/pyproject.toml @@ -14,9 +14,7 @@ classifiers = [ "Topic :: Scientific/Engineering :: Artificial Intelligence", "Topic :: Software Development :: Libraries", ] -dependencies = [ - "handlebarz", -] +dependencies = ["handlebarz"] description = "Dotprompt is a language-neutral executable prompt template file format for Generative AI." license = { text = "Apache-2.0" } name = "dotprompt" diff --git a/py/packages/handlebarz/src/handlebarz/__init__.py b/py/packages/handlebarz/src/handlebarz/__init__.py index e6078e237a..7b5fdf8b21 100644 --- a/py/packages/handlebarz/src/handlebarz/__init__.py +++ b/py/packages/handlebarz/src/handlebarz/__init__.py @@ -1,2 +1,19 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + + def hello() -> str: return 'Hello from handlebarz!'