Showing preview only (869K chars total). Download the full file or copy to clipboard to get everything.
Repository: googleapis/nodejs-vertexai
Branch: main
Commit: 77d956444566
Files: 114
Total size: 828.1 KB
Directory structure:
gitextract_z_dw_qc9/
├── .eslintignore
├── .eslintrc.json
├── .github/
│ ├── CODEOWNERS
│ ├── release-please.yml
│ ├── release-trigger.yml
│ ├── sync-repo-settings.yaml
│ └── workflows/
│ └── presubmit.yaml
├── .gitignore
├── .jsdoc.js
├── .kokoro/
│ ├── docs.sh
│ ├── populate-secrets.sh
│ ├── presubmit/
│ │ ├── node18/
│ │ │ ├── common.cfg
│ │ │ ├── continuous-system-test.cfg
│ │ │ ├── docs.cfg
│ │ │ ├── docs.sh
│ │ │ └── system-test.cfg
│ │ └── node22/
│ │ ├── common.cfg
│ │ ├── docs.cfg
│ │ ├── docs.sh
│ │ └── system-test.cfg
│ ├── publish.sh
│ ├── system-test.sh
│ ├── test.sh
│ └── trampoline_v2.sh
├── .prettierignore
├── .prettierrc.js
├── .release-please-manifest.json
├── .repo-metadata.json
├── .trampolinerc
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── SECURITY.md
├── package.json
├── release-please-config.json
├── src/
│ ├── .prettierignore
│ ├── .prettierrc
│ ├── _internal_types.ts
│ ├── agentengines.ts
│ ├── client.ts
│ ├── converters/
│ │ ├── _agentengines_converters.ts
│ │ ├── _memories_converters.ts
│ │ ├── _memoryrevisions_converters.ts
│ │ ├── _sandboxes_converters.ts
│ │ ├── _sessionevents_converters.ts
│ │ ├── _sessions_converters.ts
│ │ └── _skills_converters.ts
│ ├── eslint.config.mjs
│ ├── index.ts
│ ├── memories.ts
│ ├── memoryrevisions.ts
│ ├── releases.txt
│ ├── sandboxes.ts
│ ├── sessionevents.ts
│ ├── sessions.ts
│ ├── skills.ts
│ ├── types/
│ │ └── common.ts
│ └── types.ts
├── system_test/
│ └── agent_engine_e2e_test.ts
├── test/
│ ├── replays/
│ │ ├── _replay_client.ts
│ │ ├── agentengines_memories_test.ts
│ │ ├── agentengines_sandboxes_test.ts
│ │ ├── agentengines_sessions_test.ts
│ │ ├── agentengines_test.ts
│ │ ├── run_replay_tests.sh
│ │ ├── sessionevents_test.ts
│ │ ├── skills_test.ts
│ │ └── test_env.js
│ ├── spec/
│ │ └── reporter.js
│ └── unit/
│ └── client_test.ts
├── tsconfig.json
└── vertexai/
├── .eslintrc.json
├── README.md
├── package.json
├── src/
│ ├── functions/
│ │ ├── count_tokens.ts
│ │ ├── generate_content.ts
│ │ ├── index.ts
│ │ ├── post_fetch_processing.ts
│ │ ├── post_request.ts
│ │ ├── pre_fetch_processing.ts
│ │ ├── test/
│ │ │ ├── functions_test.ts
│ │ │ ├── post_fetch_processing_test.ts
│ │ │ ├── post_request_test.ts
│ │ │ ├── pre_fetch_processing_test.ts
│ │ │ └── test_data.ts
│ │ └── util.ts
│ ├── index.ts
│ ├── models/
│ │ ├── chat_session.ts
│ │ ├── generative_models.ts
│ │ ├── index.ts
│ │ ├── test/
│ │ │ ├── chat_session_test.ts
│ │ │ ├── generative_models_test.ts
│ │ │ └── models_test.ts
│ │ └── util.ts
│ ├── resources/
│ │ ├── cached_contents.ts
│ │ ├── index.ts
│ │ └── shared/
│ │ └── api_client.ts
│ ├── testing/
│ │ ├── fake_google_auth.ts
│ │ └── fake_google_auth_test.ts
│ ├── types/
│ │ ├── common.ts
│ │ ├── content.ts
│ │ ├── errors.ts
│ │ ├── generate_content_response_handler.ts
│ │ ├── index.ts
│ │ └── tool.ts
│ ├── util/
│ │ ├── constants.ts
│ │ └── index.ts
│ └── vertex_ai.ts
├── system_test/
│ └── end_to_end_sample_test.ts
├── test/
│ ├── index_test.ts
│ └── vertex_ai_test.ts
└── tsconfig.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .eslintignore
================================================
**/node_modules
build/
docs/
src/genai/
test/
system_test/
sdk_schema_test/
src/**/test/
================================================
FILE: .eslintrc.json
================================================
{
"extends": "./node_modules/gts"
}
================================================
FILE: .github/CODEOWNERS
================================================
# Code owners file.
# This file controls who is tagged for review for any given pull request.
#
# For syntax help see:
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
# The Vertex AI SDK team is the default owner for approving PRs.
* @googleapis/vertexai-team
================================================
FILE: .github/release-please.yml
================================================
handleGHRelease: true
manifest: true
================================================
FILE: .github/release-trigger.yml
================================================
enabled: true
================================================
FILE: .github/sync-repo-settings.yaml
================================================
# https://github.com/googleapis/repo-automation-bots/tree/main/packages/sync-repo-settings
# We are disabling this bot until https://github.com/googleapis/repo-automation-bots/issues/4617
# is resolved
enabled: false
================================================
FILE: .github/workflows/presubmit.yaml
================================================
on:
pull_request:
name: presubmit
jobs:
units:
runs-on: ubuntu-latest
strategy:
matrix:
node: [20, 22, 24]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: ^6.24.1
- run: node --version
- run: npm install
- run: npm run test
name: Run unit tests
env:
BUILD_TYPE: presubmit
TEST_TYPE: units
================================================
FILE: .gitignore
================================================
# Ignore directories generated automatically.
node_modules/
build/
docs/
.nyc_output/
# Ignore files generated automatically.
test/spec/sponge_log.xml
# Ignore JetBrains IDE files
.idea/
================================================
FILE: .jsdoc.js
================================================
/**
* @license
* Copyright 2023 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
*
* https://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.
*/
'use strict';
module.exports = {
opts: {
readme: './README.md',
package: './package.json',
template: './node_modules/jsdoc-fresh',
recurse: true,
verbose: true,
destination: './docs/'
},
plugins: [
'plugins/markdown',
'jsdoc-region-tag'
],
source: {
excludePattern: '(^|\\/|\\\\)[._]',
include: [
'build/src',
],
includePattern: '\\.js$'
},
templates: {
copyright: 'Copyright 2023 Google LLC',
includeDate: false,
sourceFiles: false,
systemName: '@google-cloud/vertexai',
theme: 'lumen',
default: {
outputSourceFiles: false
}
},
markdown: {
idInHeadings: true
}
};
================================================
FILE: .kokoro/docs.sh
================================================
#!/bin/bash
# Copyright 2023 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
#
# https://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.
#
set -eo pipefail
export NPM_CONFIG_PREFIX=${HOME}/.npm-global
cd $(dirname $0)/..
npm install
npm run docs-test
================================================
FILE: .kokoro/populate-secrets.sh
================================================
#!/bin/bash
# Copyright 2020 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.
# This file is called in the early stage of `trampoline_v2.sh` to
# populate secrets needed for the CI builds.
set -eo pipefail
function now { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n' ;}
function msg { println "$*" >&2 ;}
function println { printf '%s\n' "$(now) $*" ;}
# Populates requested secrets set in SECRET_MANAGER_KEYS
# In Kokoro CI builds, we use the service account attached to the
# Kokoro VM. This means we need to setup auth on other CI systems.
# For local run, we just use the gcloud command for retrieving the
# secrets.
if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then
GCLOUD_COMMANDS=(
"docker"
"run"
"--entrypoint=gcloud"
"--volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR}"
"gcr.io/google.com/cloudsdktool/cloud-sdk"
)
if [[ "${TRAMPOLINE_CI:-}" == "kokoro" ]]; then
SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager"
else
echo "Authentication for this CI system is not implemented yet."
exit 2
# TODO: Determine appropriate SECRET_LOCATION and the GCLOUD_COMMANDS.
fi
else
# For local run, use /dev/shm or temporary directory for
# KOKORO_GFILE_DIR.
if [[ -d "/dev/shm" ]]; then
export KOKORO_GFILE_DIR=/dev/shm
else
export KOKORO_GFILE_DIR=$(mktemp -d -t ci-XXXXXXXX)
fi
SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager"
GCLOUD_COMMANDS=("gcloud")
fi
msg "Creating folder on disk for secrets: ${SECRET_LOCATION}"
mkdir -p ${SECRET_LOCATION}
for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g")
do
msg "Retrieving secret ${key}"
"${GCLOUD_COMMANDS[@]}" \
secrets versions access latest \
--project cloud-devrel-kokoro-resources \
--secret $key > \
"$SECRET_LOCATION/$key"
if [[ $? == 0 ]]; then
msg "Secret written to ${SECRET_LOCATION}/${key}"
else
msg "Error retrieving secret ${key}"
exit 2
fi
done
================================================
FILE: .kokoro/presubmit/node18/common.cfg
================================================
# Format: //devtools/kokoro/config/proto/build.proto
# Build logs will be here
action {
define_artifacts {
regex: "**/*sponge_log.xml"
}
}
# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
# Use the trampoline script to run in docker.
build_file: "nodejs-vertexai/.kokoro/trampoline_v2.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:18-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/nodejs-vertexai/.kokoro/test.sh"
}
================================================
FILE: .kokoro/presubmit/node18/continuous-system-test.cfg
================================================
# Download resources for system tests (service account key, etc.)
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs"
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/nodejs-vertexai/.kokoro/system-test.sh"
}
================================================
FILE: .kokoro/presubmit/node18/docs.cfg
================================================
# doc publications use a Python image.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:18-user"
}
# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
# Use the trampoline script to run in docker.
build_file: "nodejs-vertexai/.kokoro/trampoline_v2.sh"
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/nodejs-vertexai/.kokoro/presubmit/node18/docs.sh"
}
================================================
FILE: .kokoro/presubmit/node18/docs.sh
================================================
#!/bin/bash
# Copyright 2023 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
#
# https://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.
#
set -eo pipefail
if [[ -z "$CREDENTIALS" ]]; then
# if CREDENTIALS are explicitly set, assume we're testing locally
# and don't set NPM_CONFIG_PREFIX.
export NPM_CONFIG_PREFIX=${HOME}/.npm-global
export PATH="$PATH:${NPM_CONFIG_PREFIX}/bin"
cd $(dirname $0)/../..
fi
npm install
npm install --no-save @google-cloud/cloud-rad@^0.4.0
# Switch to 'fail at end' to allow tar command to complete before exiting.
set +e
# publish docs to devsite
NO_UPLOAD=1 npx @google-cloud/cloud-rad . cloud-rad
tar cvfz docs.tar.gz yaml
if [[ $EXIT -ne 0 ]]; then
echo -e "\n Generate docs failed: npx returned a non-zero exit code. \n"
exit $EXIT
fi
set -e
================================================
FILE: .kokoro/presubmit/node18/system-test.cfg
================================================
# Download resources for system tests (service account key, etc.)
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs"
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/nodejs-vertexai/.kokoro/system-test.sh"
}
================================================
FILE: .kokoro/presubmit/node22/common.cfg
================================================
# Format: //devtools/kokoro/config/proto/build.proto
# Build logs will be here
action {
define_artifacts {
regex: "**/*sponge_log.xml"
}
}
# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
# Use the trampoline script to run in docker.
build_file: "nodejs-vertexai/.kokoro/trampoline_v2.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/nodejs-vertexai/.kokoro/test.sh"
}
================================================
FILE: .kokoro/presubmit/node22/docs.cfg
================================================
# doc publications use a Python image.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}
# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
# Use the trampoline script to run in docker.
build_file: "nodejs-vertexai/.kokoro/trampoline_v2.sh"
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/nodejs-vertexai/.kokoro/presubmit/node22/docs.sh"
}
================================================
FILE: .kokoro/presubmit/node22/docs.sh
================================================
#!/bin/bash
# Copyright 2023 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
#
# https://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.
#
set -eo pipefail
if [[ -z "$CREDENTIALS" ]]; then
# if CREDENTIALS are explicitly set, assume we're testing locally
# and don't set NPM_CONFIG_PREFIX.
export NPM_CONFIG_PREFIX=${HOME}/.npm-global
export PATH="$PATH:${NPM_CONFIG_PREFIX}/bin"
cd $(dirname $0)/../..
fi
npm install
npm install --no-save @google-cloud/cloud-rad@^0.4.0
# Switch to 'fail at end' to allow tar command to complete before exiting.
set +e
# publish docs to devsite
NO_UPLOAD=1 npx @google-cloud/cloud-rad . cloud-rad
tar cvfz docs.tar.gz yaml
if [[ $EXIT -ne 0 ]]; then
echo -e "\n Generate docs failed: npx returned a non-zero exit code. \n"
exit $EXIT
fi
set -e
================================================
FILE: .kokoro/presubmit/node22/system-test.cfg
================================================
# Download resources for system tests (service account key, etc.)
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs"
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/nodejs-vertexai/.kokoro/system-test.sh"
}
================================================
FILE: .kokoro/publish.sh
================================================
#!/bin/bash
# Copyright 2018 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
#
# https://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.
set -eo pipefail
export NPM_CONFIG_PREFIX=${HOME}/.npm-global
# Start the releasetool reporter
python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script
cd $(dirname $0)/..
NPM_TOKEN=$(cat $KOKORO_KEYSTORE_DIR/73713_google-cloud-npm-token-1)
echo "//wombat-dressing-room.appspot.com/:_authToken=${NPM_TOKEN}" > ~/.npmrc
npm install
npm pack .
# npm provides no way to specify, observe, or predict the name of the tarball
# file it generates. We have to look in the current directory for the freshest
# .tgz file.
#
TARBALL=$(ls -1 -t *.tgz | head -1)
npm publish --access=public --registry=https://wombat-dressing-room.appspot.com "$TARBALL"
# Kokoro collects *.tgz and package-lock.json files and stores them in Placer
# so we can generate SBOMs and attestations.
# However, we *don't* want Kokoro to collect package-lock.json and *.tgz files
# that happened to be installed with dependencies.
find node_modules -name package-lock.json -o -name "*.tgz" | xargs rm -f
================================================
FILE: .kokoro/system-test.sh
================================================
#!/bin/bash
# Copyright 2018 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
#
# https://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.
set -eo pipefail
export NPM_CONFIG_PREFIX=${HOME}/.npm-global
# Setup service account credentials.
export GCLOUD_PROJECT=ucaip-sample-tests
cd $(dirname $0)/..
# Run a pre-test hook, if a pre-system-test.sh is in the project
#
if [ -f .kokoro/pre-system-test.sh ]; then
set +x
. .kokoro/pre-system-test.sh
set -x
fi
npm install
# If tests are running against main branch, configure flakybot
# to open issues on failures:
if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]] || [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"nightly"* ]]; then
export MOCHA_REPORTER_OUTPUT=test_output_sponge_log.xml
export MOCHA_REPORTER=xunit
cleanup() {
chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot
$KOKORO_GFILE_DIR/linux_amd64/flakybot
}
trap cleanup EXIT HUP
fi
# Switch to 'fail at end' to allow tar command to complete before exiting.
set +e
npm run cover:unit && npm run cover:integration
EXIT=$?
tar cvfz build.tar.gz build
npm run cover:report
if [ -d "coverage" ]; then
tar cvfz coverage.tar.gz coverage
fi
if [[ $EXIT -ne 0 ]]; then
echo -e "\n Testing failed: npm returned a non-zero exit code. \n"
exit $EXIT
fi
set -e
================================================
FILE: .kokoro/test.sh
================================================
#!/bin/bash
# Copyright 2018 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
#
# https://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.
set -eo pipefail
export NPM_CONFIG_PREFIX=${HOME}/.npm-global
cd $(dirname $0)/..
npm install
# If tests are running against main branch, configure flakybot
# to open issues on failures:
if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]] || [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"nightly"* ]]; then
export MOCHA_REPORTER_OUTPUT=test_output_sponge_log.xml
export MOCHA_REPORTER=xunit
cleanup() {
chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot
$KOKORO_GFILE_DIR/linux_amd64/flakybot
}
trap cleanup EXIT HUP
fi
# Unit tests exercise the entire API surface, which may include
# deprecation warnings:
export MOCHA_THROW_DEPRECATION=false
npm test
# codecov combines coverage across integration and unit tests. Include
# the logic below for any environment you wish to collect coverage for:
COVERAGE_NODE=22
if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then
NYC_BIN=./node_modules/nyc/bin/nyc.js
if [ -f "$NYC_BIN" ]; then
$NYC_BIN report || true
fi
bash $KOKORO_GFILE_DIR/codecov.sh
else
echo "coverage is only reported for Node $COVERAGE_NODE"
fi
================================================
FILE: .kokoro/trampoline_v2.sh
================================================
#!/usr/bin/env bash
# Copyright 2020 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.
# trampoline_v2.sh
#
# If you want to make a change to this file, consider doing so at:
# https://github.com/googlecloudplatform/docker-ci-helper
#
# This script is for running CI builds. For Kokoro builds, we
# set this script to `build_file` field in the Kokoro configuration.
# This script does 3 things.
#
# 1. Prepare the Docker image for the test
# 2. Run the Docker with appropriate flags to run the test
# 3. Upload the newly built Docker image
#
# in a way that is somewhat compatible with trampoline_v1.
#
# These environment variables are required:
# TRAMPOLINE_IMAGE: The docker image to use.
# TRAMPOLINE_DOCKERFILE: The location of the Dockerfile.
#
# You can optionally change these environment variables:
# TRAMPOLINE_IMAGE_UPLOAD:
# (true|false): Whether to upload the Docker image after the
# successful builds.
# TRAMPOLINE_BUILD_FILE: The script to run in the docker container.
# TRAMPOLINE_WORKSPACE: The workspace path in the docker container.
# Defaults to /workspace.
# Potentially there are some repo specific envvars in .trampolinerc in
# the project root.
#
# Here is an example for running this script.
# TRAMPOLINE_IMAGE=gcr.io/cloud-devrel-kokoro-resources/node:10-user \
# TRAMPOLINE_BUILD_FILE=.kokoro/system-test.sh \
# .kokoro/trampoline_v2.sh
set -euo pipefail
# x-release-please-start-version
TRAMPOLINE_VERSION="2.0.10"
# x-release-please-end
if command -v tput >/dev/null && [[ -n "${TERM:-}" ]]; then
readonly IO_COLOR_RED="$(tput setaf 1)"
readonly IO_COLOR_GREEN="$(tput setaf 2)"
readonly IO_COLOR_YELLOW="$(tput setaf 3)"
readonly IO_COLOR_RESET="$(tput sgr0)"
else
readonly IO_COLOR_RED=""
readonly IO_COLOR_GREEN=""
readonly IO_COLOR_YELLOW=""
readonly IO_COLOR_RESET=""
fi
function function_exists {
[[ "$(LC_ALL=C type -t "$1")" == "function" ]]
}
# Logs a message using the given color. The first argument must be one
# of the IO_COLOR_* variables defined above, such as
# "${IO_COLOR_YELLOW}". The remaining arguments will be logged in the
# given color. The log message will also have an RFC-3339 timestamp
# prepended (in UTC). You can disable the color output by setting
# TERM=vt100.
function log_impl() {
local color="$1"
shift
local timestamp
timestamp="$(date -u "+%Y-%m-%dT%H:%M:%SZ")"
echo "================================================================"
echo "${color}${timestamp}:" "$@" "${IO_COLOR_RESET}"
echo "================================================================"
}
# Logs the given message with normal coloring and a timestamp.
function log() {
log_impl "${IO_COLOR_RESET}" "$@"
}
# Logs the given message in green with a timestamp.
function log_green() {
log_impl "${IO_COLOR_GREEN}" "$@"
}
# Logs the given message in yellow with a timestamp.
function log_yellow() {
log_impl "${IO_COLOR_YELLOW}" "$@"
}
# Logs the given message in red with a timestamp.
function log_red() {
log_impl "${IO_COLOR_RED}" "$@"
}
readonly tmpdir=$(mktemp -d -t ci-XXXXXXXX)
readonly tmphome="${tmpdir}/h"
mkdir -p "${tmphome}"
function cleanup() {
rm -rf "${tmpdir}"
}
trap cleanup EXIT
RUNNING_IN_CI="${RUNNING_IN_CI:-false}"
# The workspace in the container, defaults to /workspace.
TRAMPOLINE_WORKSPACE="${TRAMPOLINE_WORKSPACE:-/workspace}"
pass_down_envvars=(
# TRAMPOLINE_V2 variables.
# Tells scripts whether they are running as part of CI or not.
"RUNNING_IN_CI"
# Indicates which CI system we're in.
"TRAMPOLINE_CI"
# Indicates the version of the script.
"TRAMPOLINE_VERSION"
)
log_yellow "Building with Trampoline ${TRAMPOLINE_VERSION}"
# Detect which CI systems we're in. If we're in any of the CI systems
# we support, `RUNNING_IN_CI` will be true and `TRAMPOLINE_CI` will be
# the name of the CI system. Both envvars will be passing down to the
# container for telling which CI system we're in.
if [[ -n "${KOKORO_BUILD_ID:-}" ]]; then
# descriptive env var for indicating it's on CI.
RUNNING_IN_CI="true"
TRAMPOLINE_CI="kokoro"
if [[ "${TRAMPOLINE_USE_LEGACY_SERVICE_ACCOUNT:-}" == "true" ]]; then
if [[ ! -f "${KOKORO_GFILE_DIR}/kokoro-trampoline.service-account.json" ]]; then
log_red "${KOKORO_GFILE_DIR}/kokoro-trampoline.service-account.json does not exist. Did you forget to mount cloud-devrel-kokoro-resources/trampoline? Aborting."
exit 1
fi
# This service account will be activated later.
TRAMPOLINE_SERVICE_ACCOUNT="${KOKORO_GFILE_DIR}/kokoro-trampoline.service-account.json"
else
if [[ "${TRAMPOLINE_VERBOSE:-}" == "true" ]]; then
gcloud auth list
fi
log_yellow "Configuring Container Registry access"
gcloud auth configure-docker --quiet
fi
pass_down_envvars+=(
# KOKORO dynamic variables.
"KOKORO_BUILD_NUMBER"
"KOKORO_BUILD_ID"
"KOKORO_JOB_NAME"
"KOKORO_GIT_COMMIT"
"KOKORO_GITHUB_COMMIT"
"KOKORO_GITHUB_PULL_REQUEST_NUMBER"
"KOKORO_GITHUB_PULL_REQUEST_COMMIT"
# For Flaky Bot
"KOKORO_GITHUB_COMMIT_URL"
"KOKORO_GITHUB_PULL_REQUEST_URL"
"KOKORO_BUILD_ARTIFACTS_SUBDIR"
)
elif [[ "${TRAVIS:-}" == "true" ]]; then
RUNNING_IN_CI="true"
TRAMPOLINE_CI="travis"
pass_down_envvars+=(
"TRAVIS_BRANCH"
"TRAVIS_BUILD_ID"
"TRAVIS_BUILD_NUMBER"
"TRAVIS_BUILD_WEB_URL"
"TRAVIS_COMMIT"
"TRAVIS_COMMIT_MESSAGE"
"TRAVIS_COMMIT_RANGE"
"TRAVIS_JOB_NAME"
"TRAVIS_JOB_NUMBER"
"TRAVIS_JOB_WEB_URL"
"TRAVIS_PULL_REQUEST"
"TRAVIS_PULL_REQUEST_BRANCH"
"TRAVIS_PULL_REQUEST_SHA"
"TRAVIS_PULL_REQUEST_SLUG"
"TRAVIS_REPO_SLUG"
"TRAVIS_SECURE_ENV_VARS"
"TRAVIS_TAG"
)
elif [[ -n "${GITHUB_RUN_ID:-}" ]]; then
RUNNING_IN_CI="true"
TRAMPOLINE_CI="github-workflow"
pass_down_envvars+=(
"GITHUB_WORKFLOW"
"GITHUB_RUN_ID"
"GITHUB_RUN_NUMBER"
"GITHUB_ACTION"
"GITHUB_ACTIONS"
"GITHUB_ACTOR"
"GITHUB_REPOSITORY"
"GITHUB_EVENT_NAME"
"GITHUB_EVENT_PATH"
"GITHUB_SHA"
"GITHUB_REF"
"GITHUB_HEAD_REF"
"GITHUB_BASE_REF"
)
elif [[ "${CIRCLECI:-}" == "true" ]]; then
RUNNING_IN_CI="true"
TRAMPOLINE_CI="circleci"
pass_down_envvars+=(
"CIRCLE_BRANCH"
"CIRCLE_BUILD_NUM"
"CIRCLE_BUILD_URL"
"CIRCLE_COMPARE_URL"
"CIRCLE_JOB"
"CIRCLE_NODE_INDEX"
"CIRCLE_NODE_TOTAL"
"CIRCLE_PREVIOUS_BUILD_NUM"
"CIRCLE_PROJECT_REPONAME"
"CIRCLE_PROJECT_USERNAME"
"CIRCLE_REPOSITORY_URL"
"CIRCLE_SHA1"
"CIRCLE_STAGE"
"CIRCLE_USERNAME"
"CIRCLE_WORKFLOW_ID"
"CIRCLE_WORKFLOW_JOB_ID"
"CIRCLE_WORKFLOW_UPSTREAM_JOB_IDS"
"CIRCLE_WORKFLOW_WORKSPACE_ID"
)
fi
# Configure the service account for pulling the docker image.
function repo_root() {
local dir="$1"
while [[ ! -d "${dir}/.git" ]]; do
dir="$(dirname "$dir")"
done
echo "${dir}"
}
# Detect the project root. In CI builds, we assume the script is in
# the git tree and traverse from there, otherwise, traverse from `pwd`
# to find `.git` directory.
if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then
PROGRAM_PATH="$(realpath "$0")"
PROGRAM_DIR="$(dirname "${PROGRAM_PATH}")"
PROJECT_ROOT="$(repo_root "${PROGRAM_DIR}")"
else
PROJECT_ROOT="$(repo_root "$(pwd)")"
fi
log_yellow "Changing to the project root: ${PROJECT_ROOT}."
cd "${PROJECT_ROOT}"
# To support relative path for `TRAMPOLINE_SERVICE_ACCOUNT`, we need
# to use this environment variable in `PROJECT_ROOT`.
if [[ -n "${TRAMPOLINE_SERVICE_ACCOUNT:-}" ]]; then
mkdir -p "${tmpdir}/gcloud"
gcloud_config_dir="${tmpdir}/gcloud"
log_yellow "Using isolated gcloud config: ${gcloud_config_dir}."
export CLOUDSDK_CONFIG="${gcloud_config_dir}"
log_yellow "Using ${TRAMPOLINE_SERVICE_ACCOUNT} for authentication."
gcloud auth activate-service-account \
--key-file "${TRAMPOLINE_SERVICE_ACCOUNT}"
log_yellow "Configuring Container Registry access"
gcloud auth configure-docker --quiet
fi
required_envvars=(
# The basic trampoline configurations.
"TRAMPOLINE_IMAGE"
"TRAMPOLINE_BUILD_FILE"
)
if [[ -f "${PROJECT_ROOT}/.trampolinerc" ]]; then
source "${PROJECT_ROOT}/.trampolinerc"
fi
log_yellow "Checking environment variables."
for e in "${required_envvars[@]}"
do
if [[ -z "${!e:-}" ]]; then
log "Missing ${e} env var. Aborting."
exit 1
fi
done
# We want to support legacy style TRAMPOLINE_BUILD_FILE used with V1
# script: e.g. "github/repo-name/.kokoro/run_tests.sh"
TRAMPOLINE_BUILD_FILE="${TRAMPOLINE_BUILD_FILE#github/*/}"
log_yellow "Using TRAMPOLINE_BUILD_FILE: ${TRAMPOLINE_BUILD_FILE}"
# ignore error on docker operations and test execution
set +e
log_yellow "Preparing Docker image."
# We only download the docker image in CI builds.
if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then
# Download the docker image specified by `TRAMPOLINE_IMAGE`
# We may want to add --max-concurrent-downloads flag.
log_yellow "Start pulling the Docker image: ${TRAMPOLINE_IMAGE}."
if docker pull "${TRAMPOLINE_IMAGE}"; then
log_green "Finished pulling the Docker image: ${TRAMPOLINE_IMAGE}."
has_image="true"
else
log_red "Failed pulling the Docker image: ${TRAMPOLINE_IMAGE}."
has_image="false"
fi
else
# For local run, check if we have the image.
if docker images "${TRAMPOLINE_IMAGE}" | grep "${TRAMPOLINE_IMAGE%:*}"; then
has_image="true"
else
has_image="false"
fi
fi
# The default user for a Docker container has uid 0 (root). To avoid
# creating root-owned files in the build directory we tell docker to
# use the current user ID.
user_uid="$(id -u)"
user_gid="$(id -g)"
user_name="$(id -un)"
# To allow docker in docker, we add the user to the docker group in
# the host os.
docker_gid=$(cut -d: -f3 < <(getent group docker))
update_cache="false"
if [[ "${TRAMPOLINE_DOCKERFILE:-none}" != "none" ]]; then
# Build the Docker image from the source.
context_dir=$(dirname "${TRAMPOLINE_DOCKERFILE}")
docker_build_flags=(
"-f" "${TRAMPOLINE_DOCKERFILE}"
"-t" "${TRAMPOLINE_IMAGE}"
"--build-arg" "UID=${user_uid}"
"--build-arg" "USERNAME=${user_name}"
)
if [[ "${has_image}" == "true" ]]; then
docker_build_flags+=("--cache-from" "${TRAMPOLINE_IMAGE}")
fi
log_yellow "Start building the docker image."
if [[ "${TRAMPOLINE_VERBOSE:-false}" == "true" ]]; then
echo "docker build" "${docker_build_flags[@]}" "${context_dir}"
fi
# ON CI systems, we want to suppress docker build logs, only
# output the logs when it fails.
if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then
if docker build "${docker_build_flags[@]}" "${context_dir}" \
> "${tmpdir}/docker_build.log" 2>&1; then
if [[ "${TRAMPOLINE_VERBOSE:-}" == "true" ]]; then
cat "${tmpdir}/docker_build.log"
fi
log_green "Finished building the docker image."
update_cache="true"
else
log_red "Failed to build the Docker image, aborting."
log_yellow "Dumping the build logs:"
cat "${tmpdir}/docker_build.log"
exit 1
fi
else
if docker build "${docker_build_flags[@]}" "${context_dir}"; then
log_green "Finished building the docker image."
update_cache="true"
else
log_red "Failed to build the Docker image, aborting."
exit 1
fi
fi
else
if [[ "${has_image}" != "true" ]]; then
log_red "We do not have ${TRAMPOLINE_IMAGE} locally, aborting."
exit 1
fi
fi
# We use an array for the flags so they are easier to document.
docker_flags=(
# Remove the container after it exists.
"--rm"
# Use the host network.
"--network=host"
# Run in privileged mode. We are not using docker for sandboxing or
# isolation, just for packaging our dev tools.
"--privileged"
# Run the docker script with the user id. Because the docker image gets to
# write in ${PWD} you typically want this to be your user id.
# To allow docker in docker, we need to use docker gid on the host.
"--user" "${user_uid}:${docker_gid}"
# Pass down the USER.
"--env" "USER=${user_name}"
# Mount the project directory inside the Docker container.
"--volume" "${PROJECT_ROOT}:${TRAMPOLINE_WORKSPACE}"
"--workdir" "${TRAMPOLINE_WORKSPACE}"
"--env" "PROJECT_ROOT=${TRAMPOLINE_WORKSPACE}"
# Mount the temporary home directory.
"--volume" "${tmphome}:/h"
"--env" "HOME=/h"
# Allow docker in docker.
"--volume" "/var/run/docker.sock:/var/run/docker.sock"
# Mount the /tmp so that docker in docker can mount the files
# there correctly.
"--volume" "/tmp:/tmp"
# Pass down the KOKORO_GFILE_DIR and KOKORO_KEYSTORE_DIR
# TODO(tmatsuo): This part is not portable.
"--env" "TRAMPOLINE_SECRET_DIR=/secrets"
"--volume" "${KOKORO_GFILE_DIR:-/dev/shm}:/secrets/gfile"
"--env" "KOKORO_GFILE_DIR=/secrets/gfile"
"--volume" "${KOKORO_KEYSTORE_DIR:-/dev/shm}:/secrets/keystore"
"--env" "KOKORO_KEYSTORE_DIR=/secrets/keystore"
)
# Add an option for nicer output if the build gets a tty.
if [[ -t 0 ]]; then
docker_flags+=("-it")
fi
# Passing down env vars
for e in "${pass_down_envvars[@]}"
do
if [[ -n "${!e:-}" ]]; then
docker_flags+=("--env" "${e}=${!e}")
fi
done
# If arguments are given, all arguments will become the commands run
# in the container, otherwise run TRAMPOLINE_BUILD_FILE.
if [[ $# -ge 1 ]]; then
log_yellow "Running the given commands '" "${@:1}" "' in the container."
readonly commands=("${@:1}")
if [[ "${TRAMPOLINE_VERBOSE:-}" == "true" ]]; then
echo docker run "${docker_flags[@]}" "${TRAMPOLINE_IMAGE}" "${commands[@]}"
fi
docker run "${docker_flags[@]}" "${TRAMPOLINE_IMAGE}" "${commands[@]}"
else
log_yellow "Running the tests in a Docker container."
docker_flags+=("--entrypoint=${TRAMPOLINE_BUILD_FILE}")
if [[ "${TRAMPOLINE_VERBOSE:-}" == "true" ]]; then
echo docker run "${docker_flags[@]}" "${TRAMPOLINE_IMAGE}"
fi
docker run "${docker_flags[@]}" "${TRAMPOLINE_IMAGE}"
fi
test_retval=$?
if [[ ${test_retval} -eq 0 ]]; then
log_green "Build finished with ${test_retval}"
else
log_red "Build finished with ${test_retval}"
fi
# Only upload it when the test passes.
if [[ "${update_cache}" == "true" ]] && \
[[ $test_retval == 0 ]] && \
[[ "${TRAMPOLINE_IMAGE_UPLOAD:-false}" == "true" ]]; then
log_yellow "Uploading the Docker image."
if docker push "${TRAMPOLINE_IMAGE}"; then
log_green "Finished uploading the Docker image."
else
log_red "Failed uploading the Docker image."
fi
# Call trampoline_after_upload_hook if it's defined.
if function_exists trampoline_after_upload_hook; then
trampoline_after_upload_hook
fi
fi
exit "${test_retval}"
================================================
FILE: .prettierignore
================================================
**/node_modules
build/
docs/
test/
system_test/
sdk_schema_test/
src/**/test/
================================================
FILE: .prettierrc.js
================================================
/**
* @license
* Copyright 2023 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
*
* https://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.
*/
module.exports = {
...require('gts/.prettierrc.json')
};
================================================
FILE: .release-please-manifest.json
================================================
{
".": "0.6.0"
}
================================================
FILE: .repo-metadata.json
================================================
{
"name": "vertexai",
"name_pretty": "Google Cloud Vertex AI",
"release_level": "preview",
"language": "nodejs",
"repo": "googleapis/nodejs-vertexai",
"distribution_name": "@google-cloud/vertexai",
"api_id": "aiplatform.googleapis.com",
"api_shortname": "aiplatform",
"library_type": "GAPIC_MANUAL",
"client_documentation": "https://cloud.google.com/nodejs/docs/reference/vertexai/latest"
}
================================================
FILE: .trampolinerc
================================================
# Copyright 2020 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.
# Template for .trampolinerc
# Add required env vars here.
required_envvars+=(
)
# Add env vars which are passed down into the container here.
pass_down_envvars+=(
"AUTORELEASE_PR"
"VERSION"
)
# Prevent unintentional override on the default image.
if [[ "${TRAMPOLINE_IMAGE_UPLOAD:-false}" == "true" ]] && \
[[ -z "${TRAMPOLINE_IMAGE:-}" ]]; then
echo "Please set TRAMPOLINE_IMAGE if you want to upload the Docker image."
exit 1
fi
# Define the default value if it makes sense.
if [[ -z "${TRAMPOLINE_IMAGE_UPLOAD:-}" ]]; then
TRAMPOLINE_IMAGE_UPLOAD=""
fi
if [[ -z "${TRAMPOLINE_IMAGE:-}" ]]; then
TRAMPOLINE_IMAGE=""
fi
if [[ -z "${TRAMPOLINE_DOCKERFILE:-}" ]]; then
TRAMPOLINE_DOCKERFILE=""
fi
if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then
TRAMPOLINE_BUILD_FILE=""
fi
# Secret Manager secrets.
source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh
================================================
FILE: CHANGELOG.md
================================================
# Changelog
## [0.6.0](https://github.com/googleapis/nodejs-vertexai/compare/v0.5.0...v0.6.0) (2026-05-13)
### Features
* Update minimum supported Node version to Node 20 ([e2a384e](https://github.com/googleapis/nodejs-vertexai/commit/e2a384e88744914fe8daab01d4ea1f5765cd8700))
* BREAKING CHANGE - Rename the package `@google-cloud/agentplatform` ([adf4388](https://github.com/googleapis/nodejs-vertexai/commit/adf438868e497a4b0118950bc6ed7ba467ec02f6))
## [1.12.0](https://github.com/googleapis/nodejs-vertexai/compare/v1.11.0...v1.12.0) (2026-04-14)
### Features
* Add Agent Engine-level configuration for generation_trigger_config. ([365a14a](https://github.com/googleapis/nodejs-vertexai/commit/365a14ae4b05f81df52fd9fbfe2d3ac3371a2b97))
* Add ingest_events method for Memory Bank. ([365a14a](https://github.com/googleapis/nodejs-vertexai/commit/365a14ae4b05f81df52fd9fbfe2d3ac3371a2b97))
* Add memory_types filter to RetrieveMemories ([90e3f69](https://github.com/googleapis/nodejs-vertexai/commit/90e3f6922caebb65535958081d18b200246cef60))
* Add RetrieveProfiles. ([90e3f69](https://github.com/googleapis/nodejs-vertexai/commit/90e3f6922caebb65535958081d18b200246cef60))
* Add structured data and context to MemoryRevision. ([90e3f69](https://github.com/googleapis/nodejs-vertexai/commit/90e3f6922caebb65535958081d18b200246cef60))
* Add structured data and memory type to Memory. ([90e3f69](https://github.com/googleapis/nodejs-vertexai/commit/90e3f6922caebb65535958081d18b200246cef60))
* Add subset_topics to Memory Bank GenerateMemories ([7932c2b](https://github.com/googleapis/nodejs-vertexai/commit/7932c2b49a05d26c5656bb996cd09709d60670c9))
* Add support for agent gateway in agent engine ([b3ea8e3](https://github.com/googleapis/nodejs-vertexai/commit/b3ea8e3a8fdb90e05c5531e01f4ec1284c105af6))
* add support for keep alive probe in agent engines ([088c5ad](https://github.com/googleapis/nodejs-vertexai/commit/088c5ad3edabb13e49dc520a945ac0f48b145704))
* Adds cancel_query_job to SDK for agent engine long running async tasks. ([bc19f31](https://github.com/googleapis/nodejs-vertexai/commit/bc19f31d0f86bdd9f42572a8d0a4ef94e82684e5))
## [1.11.0](https://github.com/googleapis/nodejs-vertexai/compare/v1.10.4...v1.11.0) (2026-04-07)
### Features
* Add consolidation customization to Memory Bank ([9df74eb](https://github.com/googleapis/nodejs-vertexai/commit/9df74eb4c128084d9746b8cf26570a7a04452178))
* Add session_id to Create Session to allow custom session id ([fed70af](https://github.com/googleapis/nodejs-vertexai/commit/fed70afa92c42331efa5633c80184d27b8d0a1c4))
* In run_query_job, rename gcs_bucket to gcs_uri and allow the case that user sets the filename for the output. ([4a1a387](https://github.com/googleapis/nodejs-vertexai/commit/4a1a3870cb368e574cb51ef7a284b82a3b09f935))
## [1.10.4](https://github.com/googleapis/nodejs-vertexai/compare/v1.10.3...v1.10.4) (2026-03-31)
### Features
* Add memory_id to Create Memory ([73207d3](https://github.com/googleapis/nodejs-vertexai/commit/73207d37f72df9475c8919bbace08e8d531daa7f))
* Add raw_event to Append Event ([73207d3](https://github.com/googleapis/nodejs-vertexai/commit/73207d37f72df9475c8919bbace08e8d531daa7f))
* add support for container_spec in AgentEngines ([274e0ff](https://github.com/googleapis/nodejs-vertexai/commit/274e0ff4861a5d7ec5a157300b4675ca6aa70695))
### Miscellaneous Chores
* release 1.10.4 ([15988b8](https://github.com/googleapis/nodejs-vertexai/commit/15988b8e5810d9faebebfaca2c0963b74dea5b90))
## [1.10.3](https://github.com/googleapis/nodejs-vertexai/compare/v1.10.2...v1.10.3) (2026-03-24)
### Miscellaneous Chores
* release 1.10.3 ([6a68cbe](https://github.com/googleapis/nodejs-vertexai/commit/6a68cbe24119a879f963587646fd9d69fecb9fc2))
## [1.10.2](https://github.com/googleapis/nodejs-vertexai/compare/v1.10.1...v1.10.2) (2026-03-19)
### Miscellaneous Chores
* release 1.10.2 ([431950d](https://github.com/googleapis/nodejs-vertexai/commit/431950d9a41db230b798bc01cfe4ba3d48254584))
## [1.10.1](https://github.com/googleapis/nodejs-vertexai/compare/v1.10.0...v1.10.1) (2026-03-18)
### Miscellaneous Chores
* release 1.10.1 ([3c7a6e6](https://github.com/googleapis/nodejs-vertexai/commit/3c7a6e67184eaf1d9b55058834afa519c7c1ecb4))
## [1.10.0](https://github.com/googleapis/nodejs-vertexai/compare/v1.9.3...v1.10.0) (2025-04-10)
### Features
* Allow labels in GenerateContentRequest ([d210d06](https://github.com/googleapis/nodejs-vertexai/commit/d210d06a2f389911850d6dc6a04b527a8cbdf68e))
* Allow labels in GenerateContentRequest ([#466](https://github.com/googleapis/nodejs-vertexai/issues/466)) ([#501](https://github.com/googleapis/nodejs-vertexai/issues/501)) ([0075baa](https://github.com/googleapis/nodejs-vertexai/commit/0075baae578e34341afdfe3e6ec0086cca98b298))
* enable turn off the safety filter in HarmBlockThreshold enum ([1737c66](https://github.com/googleapis/nodejs-vertexai/commit/1737c6626aed0ef8d9e1904be7a79b50b7da4676))
### Bug Fixes
* aggregate text & functionCall(s) correctly ([5a53266](https://github.com/googleapis/nodejs-vertexai/commit/5a53266835b74e6d165244a67a5cb9427220d7de))
* aggregate text & functionCall(s) correctly ([5a53266](https://github.com/googleapis/nodejs-vertexai/commit/5a53266835b74e6d165244a67a5cb9427220d7de))
* aggregate text & functionCall(s) correctly ([5a53266](https://github.com/googleapis/nodejs-vertexai/commit/5a53266835b74e6d165244a67a5cb9427220d7de))
* aggregate text & functionCall(s) correctly ([#497](https://github.com/googleapis/nodejs-vertexai/issues/497)) ([b62483a](https://github.com/googleapis/nodejs-vertexai/commit/b62483a4891159ac727687ef043f7923a8f7d71d))
## [1.9.3](https://github.com/googleapis/nodejs-vertexai/compare/v1.9.2...v1.9.3) (2025-01-31)
### Bug Fixes
* a typo in chat session and missed toolConfig on chat start ([b552fea](https://github.com/googleapis/nodejs-vertexai/commit/b552fea1aac80a6e471fd082dc35c40598d5d170))
## [1.9.2](https://github.com/googleapis/nodejs-vertexai/compare/v1.9.0...v1.9.2) (2024-12-13)
### Features
* add support for audioTimestamp in GenerationConfig ([#467](https://github.com/googleapis/nodejs-vertexai/issues/467)) ([598d955](https://github.com/googleapis/nodejs-vertexai/commit/598d95580fb8302bced40837b5c4bbebc84946cf))
* enable dynamic retrieval for Google Search Retrieval grounding ([3f9eee6](https://github.com/googleapis/nodejs-vertexai/commit/3f9eee6589967164b8c1b86481468eaa5347afbd))
### Bug Fixes
* a typo in chat session and missed toolConfig on chat start ([b552fea](https://github.com/googleapis/nodejs-vertexai/commit/b552fea1aac80a6e471fd082dc35c40598d5d170))
* Add Context Cache support for ChatSessionPreview class ([#433](https://github.com/googleapis/nodejs-vertexai/issues/433)) ([df6f040](https://github.com/googleapis/nodejs-vertexai/commit/df6f0406fbaa72cd64a8f51015e51fee88518db8))
* Add Context Cache support for ChatSessionPreview class ([#433](https://github.com/googleapis/nodejs-vertexai/issues/433)) ([a3beab1](https://github.com/googleapis/nodejs-vertexai/commit/a3beab1f30540749fbeba40a13327ea078dbed69))
* include cachedContent in generate request ([#469](https://github.com/googleapis/nodejs-vertexai/issues/469)) ([a16b9d4](https://github.com/googleapis/nodejs-vertexai/commit/a16b9d48df1e3d3b8784604de08f28167f3e85bf))
* remove restriction on gsc uri for file data part. ([e694c44](https://github.com/googleapis/nodejs-vertexai/commit/e694c441b456ea7bfb3d09f89c17d71641ef355c))
### Documentation
* update README ([e9705cb](https://github.com/googleapis/nodejs-vertexai/commit/e9705cbd44154435a6ad32979e80005a8eef137d))
* update README ([a052132](https://github.com/googleapis/nodejs-vertexai/commit/a052132b91bad5ee9a42c6fe2057afceab36b542))
### Miscellaneous Chores
* release as 1.9.2 ([d54a91b](https://github.com/googleapis/nodejs-vertexai/commit/d54a91bce84980ddfa90b38318a789787912833a))
## [1.9.0](https://github.com/googleapis/nodejs-vertexai/compare/v1.8.1...v1.9.0) (2024-10-14)
### Features
* Add Context Cache support for ChatSessionPreview class ([#433](https://github.com/googleapis/nodejs-vertexai/issues/433)) ([f8a3bdf](https://github.com/googleapis/nodejs-vertexai/commit/f8a3bdf55b6ee694a8fd41df29bdba54d7f8cdc2))
### Documentation
* update README ([a052132](https://github.com/googleapis/nodejs-vertexai/commit/a052132b91bad5ee9a42c6fe2057afceab36b542))
## [1.8.1](https://github.com/googleapis/nodejs-vertexai/compare/v1.8.0...v1.8.1) (2024-09-25)
### Bug Fixes
* Fix cached contents list url ([2c4b769](https://github.com/googleapis/nodejs-vertexai/commit/2c4b7692e369385e5cd82a9b753d037d31e4e8ce))
## [1.8.0](https://github.com/googleapis/nodejs-vertexai/compare/v1.7.0...v1.8.0) (2024-09-18)
### Features
* Add CachedContent resource to Vertex AI client library. ([8c8963e](https://github.com/googleapis/nodejs-vertexai/commit/8c8963e5c62bf491d5a47f7c5a0db64fafaea0cd))
* Implement cached_content with generateContent methods ([c604b8c](https://github.com/googleapis/nodejs-vertexai/commit/c604b8caf4138537b38bdf9f57e8086d55216981))
## [1.7.0](https://github.com/googleapis/nodejs-vertexai/compare/v1.6.0...v1.7.0) (2024-08-30)
### Features
* Add GoogleApi error in ClientError.cause ([d5c67bd](https://github.com/googleapis/nodejs-vertexai/commit/d5c67bdbb7d40f0c8eecca505c90bac21e4fe36d))
## [1.6.0](https://github.com/googleapis/nodejs-vertexai/compare/v1.5.0...v1.6.0) (2024-08-26)
### Features
* Add responseSchema to GenerateContentRequest. ([d3715da](https://github.com/googleapis/nodejs-vertexai/commit/d3715daa793fda8063b379d16a0bf844a90b4087))
* Add tool config ([f618132](https://github.com/googleapis/nodejs-vertexai/commit/f618132b7b5f9a05ba32b5968ccec14c9c18baaa))
## [1.5.0](https://github.com/googleapis/nodejs-vertexai/compare/v1.4.1...v1.5.0) (2024-08-21)
### Features
* missing property frequencyPenalty in type defintions ([#394](https://github.com/googleapis/nodejs-vertexai/issues/394)) ([7557a83](https://github.com/googleapis/nodejs-vertexai/commit/7557a839b96a9fddc17c6516dd9c8c12772b6c59))
## [1.4.1](https://github.com/googleapis/nodejs-vertexai/compare/v1.4.0...v1.4.1) (2024-08-09)
### Bug Fixes
* Fix docstring order and add node version badge in README ([d330fe3](https://github.com/googleapis/nodejs-vertexai/commit/d330fe3352713226794ac3e8c7a7a21474a32ec1))
## [1.4.0](https://github.com/googleapis/nodejs-vertexai/compare/v1.3.0...v1.4.0) (2024-07-15)
### Features
* support responseMimeType in GenerationConfig to allow users specify output response mimetype of the generated candidate text. ([93f6d70](https://github.com/googleapis/nodejs-vertexai/commit/93f6d70660dbee44f81766544047da7baf427e30))
### Bug Fixes
* handle case when content is undefined in candidate. ([f16f040](https://github.com/googleapis/nodejs-vertexai/commit/f16f0405c0419152119385780ba21b2d9c18dc9b))
## [1.3.0](https://github.com/googleapis/nodejs-vertexai/compare/v1.2.0...v1.3.0) (2024-06-26)
### Features
* infer project ID when user don't specify and throw if inference fails ([6b3e68e](https://github.com/googleapis/nodejs-vertexai/commit/6b3e68e3b869659d17ef584995de7d7bfc1b1f3b))
### Bug Fixes
* improve error message to help with debugging ([8a937d5](https://github.com/googleapis/nodejs-vertexai/commit/8a937d5f534f54867fd62a988dbd84ebafb5b76a))
## [1.2.0](https://github.com/googleapis/nodejs-vertexai/compare/v1.1.0...v1.2.0) (2024-05-22)
### Features
* allow users to pass string as system instruction ([a824162](https://github.com/googleapis/nodejs-vertexai/commit/a824162a29b8c6ba3ccae46c492dd28e9c2baf9c))
* enable inference request to tuned model. ([de9c4c2](https://github.com/googleapis/nodejs-vertexai/commit/de9c4c2f8c63a298bd28ab69dae9b6a5d72c20d7))
* infer location if user doesn't specifies it. ([b8d4af1](https://github.com/googleapis/nodejs-vertexai/commit/b8d4af1bb990e95093f446c808194bfc4fe53287))
* support RAG in public preview ([5ade755](https://github.com/googleapis/nodejs-vertexai/commit/5ade7551fe0dbab54bc56f251c32bf3b7802c2c5))
* update grounding metadata ([d3c0a64](https://github.com/googleapis/nodejs-vertexai/commit/d3c0a647248be6be49b6b93a18aad79c10bae6c4))
### Bug Fixes
* log instead of throw appendHistory errors to avoid unhandled rejection ([2ec9e7d](https://github.com/googleapis/nodejs-vertexai/commit/2ec9e7d5519af438eb03b9f21f90b86f2575ac47))
## [1.1.0](https://github.com/googleapis/nodejs-vertexai/compare/v1.0.0...v1.1.0) (2024-04-13)
### Features
* enable system instruction for GenerativeModel ([590ca5a](https://github.com/googleapis/nodejs-vertexai/commit/590ca5a055e65b493c7d20f3983173dc8a8cbc39))
* enable system instruction in chat experience ([7e71f75](https://github.com/googleapis/nodejs-vertexai/commit/7e71f750104cf14f465bb8091f851b5692f5aea9))
* exposing customHeader in requestOptions to allow users pass in customer headers. ([b47d733](https://github.com/googleapis/nodejs-vertexai/commit/b47d733680837233b4323f4113737421099df02b))
## [1.0.0](https://github.com/googleapis/nodejs-vertexai/compare/v0.5.0...v1.0.0) (2024-04-04)
### Features
* added userAgent option to RequestOptions to allow setting User-Agent header ([ca43e2f](https://github.com/googleapis/nodejs-vertexai/commit/ca43e2f0b4ebef60d3739b10a3707cdfe2e2a4ec))
* include grounding metadata to stream aggregated response. ([d32755e](https://github.com/googleapis/nodejs-vertexai/commit/d32755e41ca36a52bfd55dafd45bf5a1a8835b7b))
* Support functionCalls property in GenerationContentCandidate interface for non streaming mode ([89568a6](https://github.com/googleapis/nodejs-vertexai/commit/89568a654550f51ed7e280eb6108f6bdb13e7a92))
### Bug Fixes
* check optional field in aggregate response ([f7718ae](https://github.com/googleapis/nodejs-vertexai/commit/f7718aec22f2806bfda18cc75d2ba2c47c929efe))
* correct CitationMetadata interface. refactor nested function ([722b7fd](https://github.com/googleapis/nodejs-vertexai/commit/722b7fda23fd03e85b418e71cfacf2206596fc86))
* correct code snippets in README ([bdcc5fd](https://github.com/googleapis/nodejs-vertexai/commit/bdcc5fdda9325c37a2efcfc9c00e8cf90fae1f46))
* correct GenerateContentCandidate interface and GenerateContentResponse interface ([7a366ab](https://github.com/googleapis/nodejs-vertexai/commit/7a366abfc13b87e93bc233e045b8e173ae6357b5))
* correct sys test logic on stream endpoint for funcion calling ([1fd5b72](https://github.com/googleapis/nodejs-vertexai/commit/1fd5b725a6537ddca0b93c34be04a4ad8f9f50b6))
* Fix a bug in the Vertex AI client library. ([8ad7dfb](https://github.com/googleapis/nodejs-vertexai/commit/8ad7dfbd7090868ed89a155aa9519ed220c23451))
* fix bug in safetyRatings handling, fix incomplete content interfaces, and add unit test for stream response handling ([e573ce6](https://github.com/googleapis/nodejs-vertexai/commit/e573ce68bda3fabdc75ffbacc56421215cbe2f70))
* for function call, role should be model. ([3b80dc8](https://github.com/googleapis/nodejs-vertexai/commit/3b80dc86b8c5d1e4be0afe99bca35201fd812abb))
* functionResponse should be user role ([d092ab4](https://github.com/googleapis/nodejs-vertexai/commit/d092ab4bb0862fc8471e663a4fb7084b432baf74))
* Make appendHistory private. ([a1bedcd](https://github.com/googleapis/nodejs-vertexai/commit/a1bedcdb6fe71d73a7601c4fafda699b0b8d1698))
* pass tools from getGenerativeModel and startChat methods to top level functions ([bbaf78a](https://github.com/googleapis/nodejs-vertexai/commit/bbaf78a5286ca39074b72bcce7eb7856fe0bec70))
* pass tools from getGenerativeModel to chatSession. ([907ad74](https://github.com/googleapis/nodejs-vertexai/commit/907ad74aefe24082607431c34027df6ae6d46a08))
* remove any type in token signature ([add084c](https://github.com/googleapis/nodejs-vertexai/commit/add084c6c1657f92a43c102159abceb0b7121b0c))
* remove defaulting value of candidates in unary api. remove unused variables and imports. remove throwing GoogleAIError when candidates undefined or empty. ([6c0c31c](https://github.com/googleapis/nodejs-vertexai/commit/6c0c31c2d798f32739fb0d8b647d4289168cc446))
* replace any type with explicit types in post fetch processing functions ([4099129](https://github.com/googleapis/nodejs-vertexai/commit/4099129d8497ec39fd1410e3edfc7599f2a91db8))
* replace snake_case in docs to camelCase ([5893581](https://github.com/googleapis/nodejs-vertexai/commit/5893581b17b9f1df28410f1315c2fd760acc98b6))
* SDK should be released to 1.0.0 ([4cab5fd](https://github.com/googleapis/nodejs-vertexai/commit/4cab5fd814bb0c47c98b5be2ed250f5a3765cd6e))
* update finish reason enum list to be complete ([f16b2e7](https://github.com/googleapis/nodejs-vertexai/commit/f16b2e778f1c0d250404928d85f12e775fc0f720))
* update prompt feedback interface ([0d3754a](https://github.com/googleapis/nodejs-vertexai/commit/0d3754ac7c51b73281342cdb20b22af5918045fa))
## [0.5.0](https://github.com/googleapis/nodejs-vertexai/compare/v0.4.0...v0.5.0) (2024-02-29)
### Features
* Introduce Request Timeout Configuration ([1b37f40](https://github.com/googleapis/nodejs-vertexai/commit/1b37f4045f604dac10c91ba800b34c6beadd113a))
### Bug Fixes
* correct UsageMetadata schema ([10bc676](https://github.com/googleapis/nodejs-vertexai/commit/10bc67666a64d6ea7dd103c3dae678b8080735c1))
* include usageMetadata in stream aggregated response ([a1154c9](https://github.com/googleapis/nodejs-vertexai/commit/a1154c9a91bb5d9cd988a00be4b462ee013fa704))
## [0.4.0](https://github.com/googleapis/nodejs-vertexai/compare/v0.3.1...v0.4.0) (2024-02-15)
### Features
* Added support for Grounding ([929df39](https://github.com/googleapis/nodejs-vertexai/commit/929df39f19f423bcfaf35ef113ce04886345a6ab))
* enable both GA and preview namespaces. ([1c2aca6](https://github.com/googleapis/nodejs-vertexai/commit/1c2aca6b776784a5b51d1654ffa41dc36f600874))
### Bug Fixes
* throw more details on error message. ([5dba79c](https://github.com/googleapis/nodejs-vertexai/commit/5dba79c3648203b9a66b6098f9f1fa0280e6e67d))
* unary api should only need to `await` once. ([67a2e96](https://github.com/googleapis/nodejs-vertexai/commit/67a2e9649c69a2cf9868a074527efd93d2c800c9))
## [0.3.1](https://github.com/googleapis/nodejs-vertexai/compare/v0.3.0...v0.3.1) (2024-02-06)
### Bug Fixes
* decouple dependency between VertexAI_Preivew and GenerativeModel classes ([6762c99](https://github.com/googleapis/nodejs-vertexai/commit/6762c995bfa1bfdb740ed01a2eb4385126b0e36a))
* Switch NodeJS generateContent to call Unary API endpoint ([e4edb59](https://github.com/googleapis/nodejs-vertexai/commit/e4edb599863c23a896e263ba2639c80481a65543))
## [0.3.0](https://github.com/googleapis/nodejs-vertexai/compare/v0.2.1...v0.3.0) (2024-01-30)
### Features
* add function calling support ([1deb4e9](https://github.com/googleapis/nodejs-vertexai/commit/1deb4e920205d2fff6da780175de6045bd853885))
### Bug Fixes
* throw error when GoogleAuthOptions.scopes doesn't include required scope. ([558aee9](https://github.com/googleapis/nodejs-vertexai/commit/558aee98d76192b4a63b3d28abba3f3d4cda1762))
* throws instructive client side error message when bad request happens for function calling ([c90203d](https://github.com/googleapis/nodejs-vertexai/commit/c90203d153407daa08763c273a827a5e9db54a70))
## [0.2.1](https://github.com/googleapis/nodejs-vertexai/compare/v0.2.0...v0.2.1) (2024-01-05)
### Bug Fixes
* enable passing only a string to generateContent and generateContentStream ([c50811e](https://github.com/googleapis/nodejs-vertexai/commit/c50811e5443848edb8f9ce5d88ae4c6c8b59b65b))
## [0.2.0](https://github.com/googleapis/nodejs-vertexai/compare/v0.1.3...v0.2.0) (2024-01-03)
### Features
* allow user to pass "models/model-ID" to instantiate model ([e94b285](https://github.com/googleapis/nodejs-vertexai/commit/e94b285dac6aaf0c77c6b9c6220b29b8d4aced52))
* include all supported authentication options ([257355c](https://github.com/googleapis/nodejs-vertexai/commit/257355ca09ee298623198404a4f889f5cf7788ee))
### Bug Fixes
* processing of streams, including UTF ([63ce032](https://github.com/googleapis/nodejs-vertexai/commit/63ce032461a32e9e5fdf04d8ce2d4d8628d691b1))
* remove placeholder cache attribute of access token ([3ec92e7](https://github.com/googleapis/nodejs-vertexai/commit/3ec92e71a9f7ef4a55bf64037f363ec6be6a729d))
* update safety return types ([449c7a2](https://github.com/googleapis/nodejs-vertexai/commit/449c7a2af2272add956eb44d8e617878468af344))
* throw ClientError or GoogleGenerativeAIError according to response status so that users can catch them and handle them according to class name. ([ea0dcb7](https://github.com/googleapis/nodejs-vertexai/commit/ea0dcb717be8d22d98916252ccee352e9af4a09f))
## [0.1.3](https://github.com/googleapis/nodejs-vertexai/compare/v0.1.2...v0.1.3) (2023-12-13)
### Bug Fixes
* Add samples link to readme ([3a86e85](https://github.com/googleapis/nodejs-vertexai/commit/3a86e85de034479818813e563cef6badd68074ab))
* update header field ([eab8841](https://github.com/googleapis/nodejs-vertexai/commit/eab8841f42679e976d4b1eca8dc083330380daff))
## [0.1.2](https://github.com/googleapis/nodejs-vertexai/compare/v0.1.1...v0.1.2) (2023-12-13)
### Bug Fixes
* update readme ([b01bd39](https://github.com/googleapis/nodejs-vertexai/commit/b01bd391a34f7b7b65d8e267ca169f52f5a48217))
## [0.1.1](https://github.com/googleapis/nodejs-vertexai/compare/v0.1.0...v0.1.1) (2023-12-12)
### Bug Fixes
* fix stream send message content ([ad1e17e](https://github.com/googleapis/nodejs-vertexai/commit/ad1e17e81c72ce55d395bcae36326d48d595d175))
## 0.1.0 (2023-12-12)
### Features
* add streamGenerateContent method ([6263800](https://github.com/googleapis/nodejs-vertexai/commit/626380039d7bb2fb9af9219f70ad549950b5f490))
* add streamSendMessage method ([598b1dd](https://github.com/googleapis/nodejs-vertexai/commit/598b1dd7ca8d84c9b32e633a65634abea232f7de))
* add generateContent method ([d7f1f0f](https://github.com/googleapis/nodejs-vertexai/commit/d7f1f0f66b7bf22c2cb59a8ef698b426cf7e3b8b))
* add countTokens method ([e0265a3](https://github.com/googleapis/nodejs-vertexai/commit/e0265a36d73b460c66062a0b520b5556d0aa894b))
================================================
FILE: CODE_OF_CONDUCT.md
================================================
<!-- # Generated by synthtool. DO NOT EDIT! !-->
# Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of
experience, education, socio-economic status, nationality, personal appearance,
race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, or to ban temporarily or permanently any
contributor for other behaviors that they deem inappropriate, threatening,
offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
This Code of Conduct also applies outside the project spaces when the Project
Steward has a reasonable belief that an individual's behavior may have a
negative impact on the project or its community.
## Conflict Resolution
We do not believe that all conflict is bad; healthy debate and disagreement
often yield positive results. However, it is never okay to be disrespectful or
to engage in behavior that violates the project’s code of conduct.
If you see someone violating the code of conduct, you are encouraged to address
the behavior directly with those involved. Many issues can be resolved quickly
and easily, and this gives people more control over the outcome of their
dispute. If you are unable to resolve the matter for any reason, or if the
behavior is threatening or harassing, report it. We are dedicated to providing
an environment where participants feel welcome and safe.
Reports should be directed to *googleapis-stewards@google.com*, the
Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to
receive and address reported violations of the code of conduct. They will then
work with a committee consisting of representatives from the Open Source
Programs Office and the Google Open Source Strategy team. If for any reason you
are uncomfortable reaching out to the Project Steward, please email
opensource@google.com.
We will investigate every complaint, but you may not receive a direct response.
We will use our discretion in determining when and how to follow up on reported
incidents, which may range from not taking action to permanent expulsion from
the project and project-sponsored spaces. We will notify the accused of the
report and provide them an opportunity to discuss it before any action is taken.
The identity of the reporter will be omitted from the details of the report
supplied to the accused. In potentially harmful situations, such as ongoing
harassment or threats to anyone's safety, we may take action without notice.
## Attribution
This Code of Conduct is adapted from the Contributor Covenant, version 1.4,
available at
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
================================================
FILE: CONTRIBUTING.md
================================================
# How to Contribute
We'd love to accept your patches and contributions to this project. There are
just a few small guidelines you need to follow.
## Contributor License Agreement
Contributions to this project must be accompanied by a Contributor License
Agreement. You (or your employer) retain the copyright to your contribution;
this simply gives us permission to use and redistribute your contributions as
part of the project. Head over to <https://cla.developers.google.com/> to see
your current agreements on file or to sign a new one.
You generally only need to submit a CLA once, so if you've already submitted one
(even if it was for a different project), you probably don't need to do it
again.
## Code Reviews
All submissions, including submissions by project members, require review. We
use GitHub pull requests for this purpose. Consult
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
information on using pull requests.
## Community Guidelines
This project follows [Google's Open Source Community
Guidelines](https://opensource.google/conduct/).
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.
================================================
FILE: README.md
================================================
# Gemini Enterprise Agent Platform SDK for Node.js quickstart
The Agent Platform SDK for Node.js lets you use the Gemini API to build
AI-powered features and applications. Both TypeScript and JavaScript are
supported.
For the latest list of available Gemini models on Agent Platform, see the
[Model information](https://cloud.google.com/vertex-ai/docs/generative-ai/learn/models#gemini-models)
page in Agent Platform documentation.
## Before you begin
1. Make sure your node.js version is 20 or above.
1. [Select](https://console.cloud.google.com/project) or [create](https://cloud.google.com/resource-manager/docs/creating-managing-projects#creating_a_project) a Google Cloud project.
1. [Enable billing for your project](https://cloud.google.com/billing/docs/how-to/modify-project).
1. [Enable the Agent Platform API](https://console.cloud.google.com/flows/enableapi?apiid=aiplatform.googleapis.com).
1. [Install the gcloud CLI](https://cloud.google.com/sdk/docs/install).
1. [Initialize the gcloud CLI](https://cloud.google.com/sdk/docs/initializing).
1. Create local authentication credentials for your user account:
```sh
gcloud auth application-default login
```
A list of accepted authentication options are listed in [GoogleAuthOptions](https://github.com/googleapis/google-auth-library-nodejs/blob/3ae120d0a45c95e36c59c9ac8286483938781f30/src/auth/googleauth.ts#L87) interface of google-auth-library-node.js GitHub repo.
## Install the SDK
Install the Agent Platform SDK for Node.js by running the following command:
```shell
npm install @google-cloud/agentplatform
```
## Instantiate the Agent Platform client
First, import the `Client` class:
```typescript
import { Client } from '@google-cloud/agentplatform';
```
Then instantiate a client:
```typescript
const client: Client = new Client({
project: 'my-cloud-project',
location: 'my-cloud-location',
});
```
## License
The contents of this repository are licensed under the
[Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0).
================================================
FILE: SECURITY.md
================================================
# Security Policy
To report a security issue, please use [g.co/vulnz](https://g.co/vulnz).
The Google Security Team will respond within 5 working days of your report on g.co/vulnz.
We use g.co/vulnz for our intake, and do coordination and disclosure here using GitHub Security Advisory to privately discuss and fix the issue.
================================================
FILE: package.json
================================================
{
"name": "@google-cloud/agentplatform",
"description": "Vertex Generative AI client for Node.js",
"version": "0.6.0",
"license": "Apache-2.0",
"author": "Google LLC",
"engines": {
"node": ">=20.0.0"
},
"homepage": "https://github.com/googleapis/nodejs-vertexai",
"repository": "googleapis/nodejs-vertexai",
"main": "build/src/index.js",
"type": "commonjs",
"scripts": {
"clean": "gts clean",
"compile": "tsc -p .",
"docs": "jsdoc -c .jsdoc.js",
"predocs-test": "npm run docs",
"docs-test": "linkinator docs",
"compile:oss": "tsc -p tsconfig.json.oss",
"fix": "gts fix",
"test": "npm run test:unit",
"test:unit": "jasmine build/test/unit/*_test.js --reporter=test/spec/reporter.js",
"test:system": "jasmine build/system_test/*_test.js --reporter=test/spec/reporter.js",
"test:replays": "jasmine build/test/replays/*_test.js --reporter=test/spec/reporter.js",
"lint": "ESLINT_USE_FLAT_CONFIG=true eslint src --no-ignore --config src/eslint.config.mjs",
"format": "prettier 'src/**/*.ts' 'src/**/*.mjs' --write",
"clean-js-files": "find . -type f -name \"*.js\" -exec rm -f {} +",
"clean-js-map-files": "find . -type f -name \"*.js.map\" -exec rm -f {} +",
"postpack": "if [ \"${CLEAN}\" ]; then npm run clean-after-pack; fi",
"cover": "npm run cover:unit && npm run cover:integration && npm run cover:report",
"cover:unit": "nyc npm run test",
"cover:integration": "nyc --no-clean npm run test:system",
"cover:report": "nyc report --reporter=lcov",
"prepare": "npm run compile",
"pretest": "npm run compile",
"posttest": "npm run lint"
},
"dependencies": {
"@google/genai": "^1.45.0",
"google-auth-library": "^9.1.0"
},
"devDependencies": {
"@eslint/js": "9.20.0",
"@types/jasmine": "^5.1.2",
"@types/node": "^20.9.0",
"eslint": "8.57.0",
"gts": "^5.2.0",
"jasmine": "^5.1.0",
"jasmine-reporters": "^2.4.0",
"jsdoc": "^4.0.0",
"jsdoc-fresh": "^3.0.0",
"jsdoc-region-tag": "^3.0.0",
"linkinator": "^4.0.0",
"nyc": "^15.1.0",
"prettier": "3.3.3",
"prettier-plugin-organize-imports": "^4.1.0",
"typescript": "~5.4.0",
"typescript-eslint": "8.24.1"
},
"files": [
"build/src",
"!build/**/*.map"
]
}
================================================
FILE: release-please-config.json
================================================
{
"initial-version": "0.5.0",
"release-type": "node",
"include-component-in-tag": false,
"packages": {
".": {
"extra-files": [
"src/client.ts"
]
}
}
}
================================================
FILE: src/.prettierignore
================================================
# Ignore autogenerated files:
agentengines.ts
_internal_types.ts
sessionevents.ts
sessions.ts
types/**
types.ts
converters/**
# Ignore built files:
dist/**
================================================
FILE: src/.prettierrc
================================================
{
"printWidth" : 80,
"tabWidth" : 2,
"useTabs" : false,
"semi" : true,
"singleQuote" : true,
"quoteProps" : "preserve",
"bracketSpacing" : false,
"trailingComma" : "all",
"arrowParens" : "always",
"embeddedLanguageFormatting" : "off",
"bracketSameLine" : true,
"singleAttributePerLine" : false,
"htmlWhitespaceSensitivity" : "strict",
"plugins": ["prettier-plugin-organize-imports"],
}
================================================
FILE: src/_internal_types.ts
================================================
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
// Code generated by the Google Gen AI SDK generator DO NOT EDIT.
================================================
FILE: src/agentengines.ts
================================================
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
// Code generated by the Google Gen AI SDK generator DO NOT EDIT.
import * as common from '@google/genai/vertex_internal';
import {ApiClient, BaseModule} from '@google/genai/vertex_internal';
import * as converters from './converters/_agentengines_converters.js';
import {Memories} from './memories.js';
import {Sandboxes} from './sandboxes.js';
import {Sessions} from './sessions.js';
import * as types from './types.js';
export class AgentEngines extends BaseModule {
public readonly sessions: Sessions;
public readonly sandboxes: Sandboxes;
public readonly memories: Memories;
constructor(private readonly apiClient: ApiClient) {
super();
this.sessions = new Sessions(apiClient);
this.sandboxes = new Sandboxes(apiClient);
this.memories = new Memories(apiClient);
}
async createInternal(
params: types.CreateAgentEngineRequestParameters,
): Promise<types.AgentEngineOperation> {
let response: Promise<types.AgentEngineOperation>;
let path: string = '';
let queryParams: Record<string, string> = {};
if (this.apiClient.isVertexAI()) {
const body =
converters.createAgentEngineRequestParametersToVertex(params);
path = common.formatMap(
'reasoningEngines',
body['_url'] as Record<string, unknown>,
);
queryParams = body['_query'] as Record<string, string>;
delete body['_url'];
delete body['_query'];
delete body['config'];
response = this.apiClient
.request({
path: path,
queryParams: queryParams,
body: JSON.stringify(body),
httpMethod: 'POST',
httpOptions: params.config?.httpOptions,
abortSignal: params.config?.abortSignal,
})
.then((httpResponse) => {
return httpResponse.json();
}) as Promise<types.AgentEngineOperation>;
return response.then((apiResponse) => {
const resp = converters.agentEngineOperationFromVertex(apiResponse);
return resp as types.AgentEngineOperation;
});
} else {
throw new Error(
'This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).',
);
}
}
async deleteInternal(
params: types.DeleteAgentEngineRequestParameters,
): Promise<types.DeleteAgentEngineOperation> {
let response: Promise<types.DeleteAgentEngineOperation>;
let path: string = '';
let queryParams: Record<string, string> = {};
if (this.apiClient.isVertexAI()) {
const body =
converters.deleteAgentEngineRequestParametersToVertex(params);
path = common.formatMap(
'{name}',
body['_url'] as Record<string, unknown>,
);
queryParams = body['_query'] as Record<string, string>;
delete body['_url'];
delete body['_query'];
delete body['config'];
response = this.apiClient
.request({
path: path,
queryParams: queryParams,
body: JSON.stringify(body),
httpMethod: 'DELETE',
httpOptions: params.config?.httpOptions,
abortSignal: params.config?.abortSignal,
})
.then((httpResponse) => {
return httpResponse.json();
}) as Promise<types.DeleteAgentEngineOperation>;
return response.then((resp) => {
return resp as types.DeleteAgentEngineOperation;
});
} else {
throw new Error(
'This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).',
);
}
}
async getInternal(
params: types.GetAgentEngineRequestParameters,
): Promise<types.ReasoningEngine> {
let response: Promise<types.ReasoningEngine>;
let path: string = '';
let queryParams: Record<string, string> = {};
if (this.apiClient.isVertexAI()) {
const body = converters.getAgentEngineRequestParametersToVertex(params);
path = common.formatMap(
'{name}',
body['_url'] as Record<string, unknown>,
);
queryParams = body['_query'] as Record<string, string>;
delete body['_url'];
delete body['_query'];
delete body['config'];
response = this.apiClient
.request({
path: path,
queryParams: queryParams,
body: JSON.stringify(body),
httpMethod: 'GET',
httpOptions: params.config?.httpOptions,
abortSignal: params.config?.abortSignal,
})
.then((httpResponse) => {
return httpResponse.json();
}) as Promise<types.ReasoningEngine>;
return response.then((apiResponse) => {
const resp = converters.reasoningEngineFromVertex(apiResponse);
return resp as types.ReasoningEngine;
});
} else {
throw new Error(
'This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).',
);
}
}
async listInternal(
params: types.ListAgentEngineRequestParameters,
): Promise<types.ListReasoningEnginesResponse> {
let response: Promise<types.ListReasoningEnginesResponse>;
let path: string = '';
let queryParams: Record<string, string> = {};
if (this.apiClient.isVertexAI()) {
const body = converters.listAgentEngineRequestParametersToVertex(params);
path = common.formatMap(
'reasoningEngines',
body['_url'] as Record<string, unknown>,
);
queryParams = body['_query'] as Record<string, string>;
delete body['_url'];
delete body['_query'];
delete body['config'];
response = this.apiClient
.request({
path: path,
queryParams: queryParams,
body: JSON.stringify(body),
httpMethod: 'GET',
httpOptions: params.config?.httpOptions,
abortSignal: params.config?.abortSignal,
})
.then((httpResponse) => {
return httpResponse.json();
}) as Promise<types.ListReasoningEnginesResponse>;
return response.then((apiResponse) => {
const resp =
converters.listReasoningEnginesResponseFromVertex(apiResponse);
const typedResp = new types.ListReasoningEnginesResponse();
Object.assign(typedResp, resp);
return typedResp;
});
} else {
throw new Error(
'This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).',
);
}
}
async getAgentOperationInternal(
params: types.GetAgentEngineOperationParameters,
): Promise<types.AgentEngineOperation> {
let response: Promise<types.AgentEngineOperation>;
let path: string = '';
let queryParams: Record<string, string> = {};
if (this.apiClient.isVertexAI()) {
const body = converters.getAgentEngineOperationParametersToVertex(params);
path = common.formatMap(
'{operationName}',
body['_url'] as Record<string, unknown>,
);
queryParams = body['_query'] as Record<string, string>;
delete body['_url'];
delete body['_query'];
delete body['config'];
response = this.apiClient
.request({
path: path,
queryParams: queryParams,
body: JSON.stringify(body),
httpMethod: 'GET',
httpOptions: params.config?.httpOptions,
abortSignal: params.config?.abortSignal,
})
.then((httpResponse) => {
return httpResponse.json();
}) as Promise<types.AgentEngineOperation>;
return response.then((apiResponse) => {
const resp = converters.agentEngineOperationFromVertex(apiResponse);
return resp as types.AgentEngineOperation;
});
} else {
throw new Error(
'This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).',
);
}
}
async queryInternal(
params: types.QueryAgentEngineRequestParameters,
): Promise<types.QueryReasoningEngineResponse> {
let response: Promise<types.QueryReasoningEngineResponse>;
let path: string = '';
let queryParams: Record<string, string> = {};
if (this.apiClient.isVertexAI()) {
const body = converters.queryAgentEngineRequestParametersToVertex(params);
path = common.formatMap(
'{name}:query',
body['_url'] as Record<string, unknown>,
);
queryParams = body['_query'] as Record<string, string>;
delete body['_url'];
delete body['_query'];
delete body['config'];
response = this.apiClient
.request({
path: path,
queryParams: queryParams,
body: JSON.stringify(body),
httpMethod: 'POST',
httpOptions: params.config?.httpOptions,
abortSignal: params.config?.abortSignal,
})
.then((httpResponse) => {
return httpResponse.json();
}) as Promise<types.QueryReasoningEngineResponse>;
return response.then((resp) => {
const typedResp = new types.QueryReasoningEngineResponse();
Object.assign(typedResp, resp);
return typedResp;
});
} else {
throw new Error(
'This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).',
);
}
}
async updateInternal(
params: types.UpdateAgentEngineRequestParameters,
): Promise<types.AgentEngineOperation> {
let response: Promise<types.AgentEngineOperation>;
let path: string = '';
let queryParams: Record<string, string> = {};
if (this.apiClient.isVertexAI()) {
const body =
converters.updateAgentEngineRequestParametersToVertex(params);
path = common.formatMap(
'{name}',
body['_url'] as Record<string, unknown>,
);
queryParams = body['_query'] as Record<string, string>;
delete body['_url'];
delete body['_query'];
delete body['config'];
response = this.apiClient
.request({
path: path,
queryParams: queryParams,
body: JSON.stringify(body),
httpMethod: 'PATCH',
httpOptions: params.config?.httpOptions,
abortSignal: params.config?.abortSignal,
})
.then((httpResponse) => {
return httpResponse.json();
}) as Promise<types.AgentEngineOperation>;
return response.then((apiResponse) => {
const resp = converters.agentEngineOperationFromVertex(apiResponse);
return resp as types.AgentEngineOperation;
});
} else {
throw new Error(
'This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).',
);
}
}
}
================================================
FILE: src/client.ts
================================================
/**
* @license
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import {ApiClient, NodeAuth, NodeDownloader, NodeUploader,} from '@google/genai/vertex_internal';
import {AgentEngines} from './agentengines';
import {Skills} from './skills';
export const SDK_VERSION = '0.6.0'; // x-release-please-version
let agentEnginesInternalWarned = false;
export class Client {
protected readonly apiClient: ApiClient;
public readonly _agentEnginesInternal: AgentEngines;
public readonly skills: Skills;
constructor(
options: {project?: string; location?: string; apiEndpoint?: string;}) {
const auth = new NodeAuth({
googleAuthOptions: {
scopes: ['https://www.googleapis.com/auth/cloud-platform'],
},
});
const uploader = new NodeUploader();
const downloader = new NodeDownloader();
const nodeVersion =
typeof process !== 'undefined' ? process.version : 'unknown';
this.apiClient = new ApiClient({
auth,
uploader,
downloader,
project: options.project,
location: options.location,
vertexai: true,
httpOptions: options.apiEndpoint ? {baseUrl: options.apiEndpoint} :
undefined,
userAgentExtra: '',
});
const headers = this.apiClient.clientOptions.httpOptions?.headers as
Record<string, string>|
undefined;
if (headers) {
const telemetryStr =
`+vertex-genai-modules/${SDK_VERSION} gl-node/${nodeVersion}`;
if (headers['User-Agent']) {
headers['User-Agent'] = headers['User-Agent'].trim() + telemetryStr;
}
if (headers['x-goog-api-client']) {
headers['x-goog-api-client'] =
headers['x-goog-api-client'].trim() + telemetryStr;
}
}
this._agentEnginesInternal = new AgentEngines(this.apiClient);
this.skills = new Skills(this.apiClient);
}
/**
* Getter for agentEnginesInternal that logs a warning on first use.
*/
public get agentEnginesInternal(): AgentEngines {
if (!agentEnginesInternalWarned) {
console.warn(
'The agentEnginesInternal implementation is experimental, and may change in future versions.',
);
agentEnginesInternalWarned = true;
}
return this._agentEnginesInternal;
}
}
================================================
FILE: src/converters/_agentengines_converters.ts
================================================
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
// Code generated by the Google Gen AI SDK generator DO NOT EDIT.
import * as common from '@google/genai/vertex_internal';
import * as types from '../types.js';
export function agentEngineOperationFromVertex(
fromObject: types.AgentEngineOperation,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['name'], fromName);
}
const fromMetadata = common.getValueByPath(fromObject, ['metadata']);
if (fromMetadata != null) {
common.setValueByPath(toObject, ['metadata'], fromMetadata);
}
const fromDone = common.getValueByPath(fromObject, ['done']);
if (fromDone != null) {
common.setValueByPath(toObject, ['done'], fromDone);
}
const fromError = common.getValueByPath(fromObject, ['error']);
if (fromError != null) {
common.setValueByPath(toObject, ['error'], fromError);
}
const fromResponse = common.getValueByPath(fromObject, ['response']);
if (fromResponse != null) {
common.setValueByPath(
toObject,
['response'],
reasoningEngineFromVertex(fromResponse),
);
}
return toObject;
}
export function createAgentEngineConfigToVertex(
fromObject: types.CreateAgentEngineConfig,
parentObject: Record<string, unknown>,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);
if (parentObject !== undefined && fromDisplayName != null) {
common.setValueByPath(parentObject, ['displayName'], fromDisplayName);
}
const fromDescription = common.getValueByPath(fromObject, ['description']);
if (parentObject !== undefined && fromDescription != null) {
common.setValueByPath(parentObject, ['description'], fromDescription);
}
const fromSpec = common.getValueByPath(fromObject, ['spec']);
if (parentObject !== undefined && fromSpec != null) {
common.setValueByPath(parentObject, ['spec'], fromSpec);
}
const fromContextSpec = common.getValueByPath(fromObject, ['contextSpec']);
if (parentObject !== undefined && fromContextSpec != null) {
common.setValueByPath(
parentObject,
['contextSpec'],
reasoningEngineContextSpecToVertex(fromContextSpec),
);
}
const fromPscInterfaceConfig = common.getValueByPath(fromObject, [
'pscInterfaceConfig',
]);
if (parentObject !== undefined && fromPscInterfaceConfig != null) {
common.setValueByPath(
parentObject,
['pscInterfaceConfig'],
fromPscInterfaceConfig,
);
}
const fromEncryptionSpec = common.getValueByPath(fromObject, [
'encryptionSpec',
]);
if (parentObject !== undefined && fromEncryptionSpec != null) {
common.setValueByPath(parentObject, ['encryptionSpec'], fromEncryptionSpec);
}
const fromLabels = common.getValueByPath(fromObject, ['labels']);
if (parentObject !== undefined && fromLabels != null) {
common.setValueByPath(parentObject, ['labels'], fromLabels);
}
const fromSourcePackages = common.getValueByPath(fromObject, [
'sourcePackages',
]);
if (parentObject !== undefined && fromSourcePackages != null) {
common.setValueByPath(parentObject, ['sourcePackages'], fromSourcePackages);
}
const fromEntrypointModule = common.getValueByPath(fromObject, [
'entrypointModule',
]);
if (parentObject !== undefined && fromEntrypointModule != null) {
common.setValueByPath(
parentObject,
['entrypointModule'],
fromEntrypointModule,
);
}
const fromEntrypointObject = common.getValueByPath(fromObject, [
'entrypointObject',
]);
if (parentObject !== undefined && fromEntrypointObject != null) {
common.setValueByPath(
parentObject,
['entrypointObject'],
fromEntrypointObject,
);
}
const fromRequirementsFile = common.getValueByPath(fromObject, [
'requirementsFile',
]);
if (parentObject !== undefined && fromRequirementsFile != null) {
common.setValueByPath(
parentObject,
['requirementsFile'],
fromRequirementsFile,
);
}
const fromAgentFramework = common.getValueByPath(fromObject, [
'agentFramework',
]);
if (parentObject !== undefined && fromAgentFramework != null) {
common.setValueByPath(parentObject, ['agentFramework'], fromAgentFramework);
}
const fromPythonVersion = common.getValueByPath(fromObject, [
'pythonVersion',
]);
if (parentObject !== undefined && fromPythonVersion != null) {
common.setValueByPath(parentObject, ['pythonVersion'], fromPythonVersion);
}
const fromAgentGatewayConfig = common.getValueByPath(fromObject, [
'agentGatewayConfig',
]);
if (parentObject !== undefined && fromAgentGatewayConfig != null) {
common.setValueByPath(
parentObject,
['agentGatewayConfig'],
fromAgentGatewayConfig,
);
}
return toObject;
}
export function createAgentEngineRequestParametersToVertex(
fromObject: types.CreateAgentEngineRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromConfig = common.getValueByPath(fromObject, ['config']);
if (fromConfig != null) {
createAgentEngineConfigToVertex(fromConfig, toObject);
}
return toObject;
}
export function deleteAgentEngineRequestParametersToVertex(
fromObject: types.DeleteAgentEngineRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
const fromForce = common.getValueByPath(fromObject, ['force']);
if (fromForce != null) {
common.setValueByPath(toObject, ['force'], fromForce);
}
return toObject;
}
export function getAgentEngineOperationParametersToVertex(
fromObject: types.GetAgentEngineOperationParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromOperationName = common.getValueByPath(fromObject, [
'operationName',
]);
if (fromOperationName != null) {
common.setValueByPath(
toObject,
['_url', 'operationName'],
fromOperationName,
);
}
return toObject;
}
export function getAgentEngineRequestParametersToVertex(
fromObject: types.GetAgentEngineRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
return toObject;
}
export function listAgentEngineConfigToVertex(
fromObject: types.ListAgentEngineConfig,
parentObject: Record<string, unknown>,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);
if (parentObject !== undefined && fromPageSize != null) {
common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);
}
const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);
if (parentObject !== undefined && fromPageToken != null) {
common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);
}
const fromFilter = common.getValueByPath(fromObject, ['filter']);
if (parentObject !== undefined && fromFilter != null) {
common.setValueByPath(parentObject, ['_query', 'filter'], fromFilter);
}
return toObject;
}
export function listAgentEngineRequestParametersToVertex(
fromObject: types.ListAgentEngineRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromConfig = common.getValueByPath(fromObject, ['config']);
if (fromConfig != null) {
listAgentEngineConfigToVertex(fromConfig, toObject);
}
return toObject;
}
export function listReasoningEnginesResponseFromVertex(
fromObject: types.ListReasoningEnginesResponse,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromSdkHttpResponse = common.getValueByPath(fromObject, [
'sdkHttpResponse',
]);
if (fromSdkHttpResponse != null) {
common.setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
}
const fromNextPageToken = common.getValueByPath(fromObject, [
'nextPageToken',
]);
if (fromNextPageToken != null) {
common.setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);
}
const fromReasoningEngines = common.getValueByPath(fromObject, [
'reasoningEngines',
]);
if (fromReasoningEngines != null) {
let transformedList = fromReasoningEngines;
if (Array.isArray(transformedList)) {
transformedList = transformedList.map((item) => {
return reasoningEngineFromVertex(item);
});
}
common.setValueByPath(toObject, ['reasoningEngines'], transformedList);
}
return toObject;
}
export function queryAgentEngineConfigToVertex(
fromObject: types.QueryAgentEngineConfig,
parentObject: Record<string, unknown>,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromClassMethod = common.getValueByPath(fromObject, ['classMethod']);
if (parentObject !== undefined && fromClassMethod != null) {
common.setValueByPath(parentObject, ['classMethod'], fromClassMethod);
}
const fromInput = common.getValueByPath(fromObject, ['input']);
if (parentObject !== undefined && fromInput != null) {
common.setValueByPath(parentObject, ['input'], fromInput);
}
const fromIncludeAllFields = common.getValueByPath(fromObject, [
'includeAllFields',
]);
if (fromIncludeAllFields != null) {
common.setValueByPath(toObject, ['includeAllFields'], fromIncludeAllFields);
}
return toObject;
}
export function queryAgentEngineRequestParametersToVertex(
fromObject: types.QueryAgentEngineRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
const fromConfig = common.getValueByPath(fromObject, ['config']);
if (fromConfig != null) {
queryAgentEngineConfigToVertex(fromConfig, toObject);
}
return toObject;
}
export function reasoningEngineContextSpecFromVertex(
fromObject: types.ReasoningEngineContextSpec,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromMemoryBankConfig = common.getValueByPath(fromObject, [
'memoryBankConfig',
]);
if (fromMemoryBankConfig != null) {
common.setValueByPath(
toObject,
['memoryBankConfig'],
reasoningEngineContextSpecMemoryBankConfigFromVertex(
fromMemoryBankConfig,
),
);
}
return toObject;
}
export function reasoningEngineContextSpecMemoryBankConfigFromVertex(
fromObject: types.ReasoningEngineContextSpecMemoryBankConfig,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromCustomizationConfigs = common.getValueByPath(fromObject, [
'customizationConfigs',
]);
if (fromCustomizationConfigs != null) {
let transformedList = fromCustomizationConfigs;
if (Array.isArray(transformedList)) {
transformedList = transformedList.map((item) => {
return item;
});
}
common.setValueByPath(toObject, ['customizationConfigs'], transformedList);
}
const fromDisableMemoryRevisions = common.getValueByPath(fromObject, [
'disableMemoryRevisions',
]);
if (fromDisableMemoryRevisions != null) {
common.setValueByPath(
toObject,
['disableMemoryRevisions'],
fromDisableMemoryRevisions,
);
}
const fromGenerationConfig = common.getValueByPath(fromObject, [
'generationConfig',
]);
if (fromGenerationConfig != null) {
common.setValueByPath(toObject, ['generationConfig'], fromGenerationConfig);
}
const fromSimilaritySearchConfig = common.getValueByPath(fromObject, [
'similaritySearchConfig',
]);
if (fromSimilaritySearchConfig != null) {
common.setValueByPath(
toObject,
['similaritySearchConfig'],
fromSimilaritySearchConfig,
);
}
const fromTtlConfig = common.getValueByPath(fromObject, ['ttlConfig']);
if (fromTtlConfig != null) {
common.setValueByPath(toObject, ['ttlConfig'], fromTtlConfig);
}
const fromStructuredMemoryConfigs = common.getValueByPath(fromObject, [
'structuredMemoryConfigs',
]);
if (fromStructuredMemoryConfigs != null) {
let transformedList = fromStructuredMemoryConfigs;
if (Array.isArray(transformedList)) {
transformedList = transformedList.map((item) => {
return structuredMemoryConfigFromVertex(item);
});
}
common.setValueByPath(
toObject,
['structuredMemoryConfigs'],
transformedList,
);
}
return toObject;
}
export function reasoningEngineContextSpecMemoryBankConfigToVertex(
fromObject: types.ReasoningEngineContextSpecMemoryBankConfig,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromCustomizationConfigs = common.getValueByPath(fromObject, [
'customizationConfigs',
]);
if (fromCustomizationConfigs != null) {
let transformedList = fromCustomizationConfigs;
if (Array.isArray(transformedList)) {
transformedList = transformedList.map((item) => {
return item;
});
}
common.setValueByPath(toObject, ['customizationConfigs'], transformedList);
}
const fromDisableMemoryRevisions = common.getValueByPath(fromObject, [
'disableMemoryRevisions',
]);
if (fromDisableMemoryRevisions != null) {
common.setValueByPath(
toObject,
['disableMemoryRevisions'],
fromDisableMemoryRevisions,
);
}
const fromGenerationConfig = common.getValueByPath(fromObject, [
'generationConfig',
]);
if (fromGenerationConfig != null) {
common.setValueByPath(toObject, ['generationConfig'], fromGenerationConfig);
}
const fromSimilaritySearchConfig = common.getValueByPath(fromObject, [
'similaritySearchConfig',
]);
if (fromSimilaritySearchConfig != null) {
common.setValueByPath(
toObject,
['similaritySearchConfig'],
fromSimilaritySearchConfig,
);
}
const fromTtlConfig = common.getValueByPath(fromObject, ['ttlConfig']);
if (fromTtlConfig != null) {
common.setValueByPath(toObject, ['ttlConfig'], fromTtlConfig);
}
const fromStructuredMemoryConfigs = common.getValueByPath(fromObject, [
'structuredMemoryConfigs',
]);
if (fromStructuredMemoryConfigs != null) {
let transformedList = fromStructuredMemoryConfigs;
if (Array.isArray(transformedList)) {
transformedList = transformedList.map((item) => {
return structuredMemoryConfigToVertex(item);
});
}
common.setValueByPath(
toObject,
['structuredMemoryConfigs'],
transformedList,
);
}
return toObject;
}
export function reasoningEngineContextSpecToVertex(
fromObject: types.ReasoningEngineContextSpec,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromMemoryBankConfig = common.getValueByPath(fromObject, [
'memoryBankConfig',
]);
if (fromMemoryBankConfig != null) {
common.setValueByPath(
toObject,
['memoryBankConfig'],
reasoningEngineContextSpecMemoryBankConfigToVertex(fromMemoryBankConfig),
);
}
return toObject;
}
export function reasoningEngineFromVertex(
fromObject: types.ReasoningEngine,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromEncryptionSpec = common.getValueByPath(fromObject, [
'encryptionSpec',
]);
if (fromEncryptionSpec != null) {
common.setValueByPath(toObject, ['encryptionSpec'], fromEncryptionSpec);
}
const fromContextSpec = common.getValueByPath(fromObject, ['contextSpec']);
if (fromContextSpec != null) {
common.setValueByPath(
toObject,
['contextSpec'],
reasoningEngineContextSpecFromVertex(fromContextSpec),
);
}
const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);
if (fromCreateTime != null) {
common.setValueByPath(toObject, ['createTime'], fromCreateTime);
}
const fromDescription = common.getValueByPath(fromObject, ['description']);
if (fromDescription != null) {
common.setValueByPath(toObject, ['description'], fromDescription);
}
const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);
if (fromDisplayName != null) {
common.setValueByPath(toObject, ['displayName'], fromDisplayName);
}
const fromEtag = common.getValueByPath(fromObject, ['etag']);
if (fromEtag != null) {
common.setValueByPath(toObject, ['etag'], fromEtag);
}
const fromLabels = common.getValueByPath(fromObject, ['labels']);
if (fromLabels != null) {
common.setValueByPath(toObject, ['labels'], fromLabels);
}
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['name'], fromName);
}
const fromSpec = common.getValueByPath(fromObject, ['spec']);
if (fromSpec != null) {
common.setValueByPath(toObject, ['spec'], fromSpec);
}
const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);
if (fromUpdateTime != null) {
common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);
}
const fromTrafficConfig = common.getValueByPath(fromObject, [
'trafficConfig',
]);
if (fromTrafficConfig != null) {
common.setValueByPath(toObject, ['trafficConfig'], fromTrafficConfig);
}
return toObject;
}
export function structuredMemoryConfigFromVertex(
fromObject: types.StructuredMemoryConfig,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromSchemaConfigs = common.getValueByPath(fromObject, [
'schemaConfigs',
]);
if (fromSchemaConfigs != null) {
let transformedList = fromSchemaConfigs;
if (Array.isArray(transformedList)) {
transformedList = transformedList.map((item) => {
return structuredMemorySchemaConfigFromVertex(item);
});
}
common.setValueByPath(toObject, ['schemaConfigs'], transformedList);
}
const fromScopeKeys = common.getValueByPath(fromObject, ['scopeKeys']);
if (fromScopeKeys != null) {
common.setValueByPath(toObject, ['scopeKeys'], fromScopeKeys);
}
return toObject;
}
export function structuredMemoryConfigToVertex(
fromObject: types.StructuredMemoryConfig,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromSchemaConfigs = common.getValueByPath(fromObject, [
'schemaConfigs',
]);
if (fromSchemaConfigs != null) {
let transformedList = fromSchemaConfigs;
if (Array.isArray(transformedList)) {
transformedList = transformedList.map((item) => {
return structuredMemorySchemaConfigToVertex(item);
});
}
common.setValueByPath(toObject, ['schemaConfigs'], transformedList);
}
const fromScopeKeys = common.getValueByPath(fromObject, ['scopeKeys']);
if (fromScopeKeys != null) {
common.setValueByPath(toObject, ['scopeKeys'], fromScopeKeys);
}
return toObject;
}
export function structuredMemorySchemaConfigFromVertex(
fromObject: types.StructuredMemorySchemaConfig,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromMemorySchema = common.getValueByPath(fromObject, ['schema']);
if (fromMemorySchema != null) {
common.setValueByPath(toObject, ['memorySchema'], fromMemorySchema);
}
const fromId = common.getValueByPath(fromObject, ['id']);
if (fromId != null) {
common.setValueByPath(toObject, ['id'], fromId);
}
const fromMemoryType = common.getValueByPath(fromObject, ['memoryType']);
if (fromMemoryType != null) {
common.setValueByPath(toObject, ['memoryType'], fromMemoryType);
}
return toObject;
}
export function structuredMemorySchemaConfigToVertex(
fromObject: types.StructuredMemorySchemaConfig,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromMemorySchema = common.getValueByPath(fromObject, ['memorySchema']);
if (fromMemorySchema != null) {
common.setValueByPath(toObject, ['schema'], fromMemorySchema);
}
const fromId = common.getValueByPath(fromObject, ['id']);
if (fromId != null) {
common.setValueByPath(toObject, ['id'], fromId);
}
const fromMemoryType = common.getValueByPath(fromObject, ['memoryType']);
if (fromMemoryType != null) {
common.setValueByPath(toObject, ['memoryType'], fromMemoryType);
}
return toObject;
}
export function updateAgentEngineConfigToVertex(
fromObject: types.UpdateAgentEngineConfig,
parentObject: Record<string, unknown>,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);
if (parentObject !== undefined && fromDisplayName != null) {
common.setValueByPath(parentObject, ['displayName'], fromDisplayName);
}
const fromDescription = common.getValueByPath(fromObject, ['description']);
if (parentObject !== undefined && fromDescription != null) {
common.setValueByPath(parentObject, ['description'], fromDescription);
}
const fromSpec = common.getValueByPath(fromObject, ['spec']);
if (parentObject !== undefined && fromSpec != null) {
common.setValueByPath(parentObject, ['spec'], fromSpec);
}
const fromContextSpec = common.getValueByPath(fromObject, ['contextSpec']);
if (parentObject !== undefined && fromContextSpec != null) {
common.setValueByPath(
parentObject,
['contextSpec'],
reasoningEngineContextSpecToVertex(fromContextSpec),
);
}
const fromPscInterfaceConfig = common.getValueByPath(fromObject, [
'pscInterfaceConfig',
]);
if (parentObject !== undefined && fromPscInterfaceConfig != null) {
common.setValueByPath(
parentObject,
['pscInterfaceConfig'],
fromPscInterfaceConfig,
);
}
const fromEncryptionSpec = common.getValueByPath(fromObject, [
'encryptionSpec',
]);
if (parentObject !== undefined && fromEncryptionSpec != null) {
common.setValueByPath(parentObject, ['encryptionSpec'], fromEncryptionSpec);
}
const fromLabels = common.getValueByPath(fromObject, ['labels']);
if (parentObject !== undefined && fromLabels != null) {
common.setValueByPath(parentObject, ['labels'], fromLabels);
}
const fromSourcePackages = common.getValueByPath(fromObject, [
'sourcePackages',
]);
if (parentObject !== undefined && fromSourcePackages != null) {
common.setValueByPath(parentObject, ['sourcePackages'], fromSourcePackages);
}
const fromEntrypointModule = common.getValueByPath(fromObject, [
'entrypointModule',
]);
if (parentObject !== undefined && fromEntrypointModule != null) {
common.setValueByPath(
parentObject,
['entrypointModule'],
fromEntrypointModule,
);
}
const fromEntrypointObject = common.getValueByPath(fromObject, [
'entrypointObject',
]);
if (parentObject !== undefined && fromEntrypointObject != null) {
common.setValueByPath(
parentObject,
['entrypointObject'],
fromEntrypointObject,
);
}
const fromRequirementsFile = common.getValueByPath(fromObject, [
'requirementsFile',
]);
if (parentObject !== undefined && fromRequirementsFile != null) {
common.setValueByPath(
parentObject,
['requirementsFile'],
fromRequirementsFile,
);
}
const fromAgentFramework = common.getValueByPath(fromObject, [
'agentFramework',
]);
if (parentObject !== undefined && fromAgentFramework != null) {
common.setValueByPath(parentObject, ['agentFramework'], fromAgentFramework);
}
const fromPythonVersion = common.getValueByPath(fromObject, [
'pythonVersion',
]);
if (parentObject !== undefined && fromPythonVersion != null) {
common.setValueByPath(parentObject, ['pythonVersion'], fromPythonVersion);
}
const fromAgentGatewayConfig = common.getValueByPath(fromObject, [
'agentGatewayConfig',
]);
if (parentObject !== undefined && fromAgentGatewayConfig != null) {
common.setValueByPath(
parentObject,
['agentGatewayConfig'],
fromAgentGatewayConfig,
);
}
const fromUpdateMask = common.getValueByPath(fromObject, ['updateMask']);
if (parentObject !== undefined && fromUpdateMask != null) {
common.setValueByPath(
parentObject,
['_query', 'updateMask'],
fromUpdateMask,
);
}
return toObject;
}
export function updateAgentEngineRequestParametersToVertex(
fromObject: types.UpdateAgentEngineRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
const fromConfig = common.getValueByPath(fromObject, ['config']);
if (fromConfig != null) {
updateAgentEngineConfigToVertex(fromConfig, toObject);
}
return toObject;
}
================================================
FILE: src/converters/_memories_converters.ts
================================================
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
// Code generated by the Google Gen AI SDK generator DO NOT EDIT.
import * as common from '@google/genai/vertex_internal';
import * as types from '../types.js';
export function agentEngineMemoryConfigToVertex(
fromObject: types.AgentEngineMemoryConfig,
parentObject: Record<string, unknown>,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);
if (parentObject !== undefined && fromDisplayName != null) {
common.setValueByPath(parentObject, ['displayName'], fromDisplayName);
}
const fromDescription = common.getValueByPath(fromObject, ['description']);
if (parentObject !== undefined && fromDescription != null) {
common.setValueByPath(parentObject, ['description'], fromDescription);
}
const fromTtl = common.getValueByPath(fromObject, ['ttl']);
if (parentObject !== undefined && fromTtl != null) {
common.setValueByPath(parentObject, ['ttl'], fromTtl);
}
const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);
if (parentObject !== undefined && fromExpireTime != null) {
common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);
}
const fromRevisionExpireTime = common.getValueByPath(fromObject, [
'revisionExpireTime',
]);
if (parentObject !== undefined && fromRevisionExpireTime != null) {
common.setValueByPath(
parentObject,
['revisionExpireTime'],
fromRevisionExpireTime,
);
}
const fromRevisionTtl = common.getValueByPath(fromObject, ['revisionTtl']);
if (parentObject !== undefined && fromRevisionTtl != null) {
common.setValueByPath(parentObject, ['revisionTtl'], fromRevisionTtl);
}
const fromDisableMemoryRevisions = common.getValueByPath(fromObject, [
'disableMemoryRevisions',
]);
if (parentObject !== undefined && fromDisableMemoryRevisions != null) {
common.setValueByPath(
parentObject,
['disableMemoryRevisions'],
fromDisableMemoryRevisions,
);
}
const fromTopics = common.getValueByPath(fromObject, ['topics']);
if (parentObject !== undefined && fromTopics != null) {
let transformedList = fromTopics;
if (Array.isArray(transformedList)) {
transformedList = transformedList.map((item) => {
return item;
});
}
common.setValueByPath(parentObject, ['topics'], transformedList);
}
const fromMetadata = common.getValueByPath(fromObject, ['metadata']);
if (parentObject !== undefined && fromMetadata != null) {
common.setValueByPath(parentObject, ['metadata'], fromMetadata);
}
const fromMemoryId = common.getValueByPath(fromObject, ['memoryId']);
if (parentObject !== undefined && fromMemoryId != null) {
common.setValueByPath(parentObject, ['_query', 'memoryId'], fromMemoryId);
}
return toObject;
}
export function createAgentEngineMemoryRequestParametersToVertex(
fromObject: types.CreateAgentEngineMemoryRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
const fromFact = common.getValueByPath(fromObject, ['fact']);
if (fromFact != null) {
common.setValueByPath(toObject, ['fact'], fromFact);
}
const fromScope = common.getValueByPath(fromObject, ['scope']);
if (fromScope != null) {
common.setValueByPath(toObject, ['scope'], fromScope);
}
const fromConfig = common.getValueByPath(fromObject, ['config']);
if (fromConfig != null) {
agentEngineMemoryConfigToVertex(fromConfig, toObject);
}
return toObject;
}
export function deleteAgentEngineMemoryRequestParametersToVertex(
fromObject: types.DeleteAgentEngineMemoryRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
return toObject;
}
export function generateAgentEngineMemoriesConfigToVertex(
fromObject: types.GenerateAgentEngineMemoriesConfig,
parentObject: Record<string, unknown>,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromDisableConsolidation = common.getValueByPath(fromObject, [
'disableConsolidation',
]);
if (parentObject !== undefined && fromDisableConsolidation != null) {
common.setValueByPath(
parentObject,
['disableConsolidation'],
fromDisableConsolidation,
);
}
const fromRevisionLabels = common.getValueByPath(fromObject, [
'revisionLabels',
]);
if (parentObject !== undefined && fromRevisionLabels != null) {
common.setValueByPath(parentObject, ['revisionLabels'], fromRevisionLabels);
}
const fromRevisionExpireTime = common.getValueByPath(fromObject, [
'revisionExpireTime',
]);
if (parentObject !== undefined && fromRevisionExpireTime != null) {
common.setValueByPath(
parentObject,
['revisionExpireTime'],
fromRevisionExpireTime,
);
}
const fromRevisionTtl = common.getValueByPath(fromObject, ['revisionTtl']);
if (parentObject !== undefined && fromRevisionTtl != null) {
common.setValueByPath(parentObject, ['revisionTtl'], fromRevisionTtl);
}
const fromDisableMemoryRevisions = common.getValueByPath(fromObject, [
'disableMemoryRevisions',
]);
if (parentObject !== undefined && fromDisableMemoryRevisions != null) {
common.setValueByPath(
parentObject,
['disableMemoryRevisions'],
fromDisableMemoryRevisions,
);
}
const fromMetadata = common.getValueByPath(fromObject, ['metadata']);
if (parentObject !== undefined && fromMetadata != null) {
common.setValueByPath(parentObject, ['metadata'], fromMetadata);
}
const fromMetadataMergeStrategy = common.getValueByPath(fromObject, [
'metadataMergeStrategy',
]);
if (parentObject !== undefined && fromMetadataMergeStrategy != null) {
common.setValueByPath(
parentObject,
['metadataMergeStrategy'],
fromMetadataMergeStrategy,
);
}
const fromAllowedTopics = common.getValueByPath(fromObject, [
'allowedTopics',
]);
if (parentObject !== undefined && fromAllowedTopics != null) {
let transformedList = fromAllowedTopics;
if (Array.isArray(transformedList)) {
transformedList = transformedList.map((item) => {
return item;
});
}
common.setValueByPath(parentObject, ['allowedTopics'], transformedList);
}
return toObject;
}
export function generateAgentEngineMemoriesRequestParametersToVertex(
fromObject: types.GenerateAgentEngineMemoriesRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
const fromVertexSessionSource = common.getValueByPath(fromObject, [
'vertexSessionSource',
]);
if (fromVertexSessionSource != null) {
common.setValueByPath(
toObject,
['vertexSessionSource'],
fromVertexSessionSource,
);
}
const fromDirectContentsSource = common.getValueByPath(fromObject, [
'directContentsSource',
]);
if (fromDirectContentsSource != null) {
common.setValueByPath(
toObject,
['directContentsSource'],
fromDirectContentsSource,
);
}
const fromDirectMemoriesSource = common.getValueByPath(fromObject, [
'directMemoriesSource',
]);
if (fromDirectMemoriesSource != null) {
common.setValueByPath(
toObject,
['directMemoriesSource'],
fromDirectMemoriesSource,
);
}
const fromScope = common.getValueByPath(fromObject, ['scope']);
if (fromScope != null) {
common.setValueByPath(toObject, ['scope'], fromScope);
}
const fromConfig = common.getValueByPath(fromObject, ['config']);
if (fromConfig != null) {
generateAgentEngineMemoriesConfigToVertex(fromConfig, toObject);
}
return toObject;
}
export function getAgentEngineGenerateMemoriesOperationParametersToVertex(
fromObject: types.GetAgentEngineGenerateMemoriesOperationParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromOperationName = common.getValueByPath(fromObject, [
'operationName',
]);
if (fromOperationName != null) {
common.setValueByPath(
toObject,
['_url', 'operationName'],
fromOperationName,
);
}
return toObject;
}
export function getAgentEngineMemoryOperationParametersToVertex(
fromObject: types.GetAgentEngineMemoryOperationParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromOperationName = common.getValueByPath(fromObject, [
'operationName',
]);
if (fromOperationName != null) {
common.setValueByPath(
toObject,
['_url', 'operationName'],
fromOperationName,
);
}
return toObject;
}
export function getAgentEngineMemoryRequestParametersToVertex(
fromObject: types.GetAgentEngineMemoryRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
return toObject;
}
export function ingestEventsConfigToVertex(
fromObject: types.IngestEventsConfig,
parentObject: Record<string, unknown>,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromForceFlush = common.getValueByPath(fromObject, ['forceFlush']);
if (parentObject !== undefined && fromForceFlush != null) {
common.setValueByPath(parentObject, ['forceFlush'], fromForceFlush);
}
return toObject;
}
export function ingestEventsRequestParametersToVertex(
fromObject: types.IngestEventsRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
const fromStreamId = common.getValueByPath(fromObject, ['streamId']);
if (fromStreamId != null) {
common.setValueByPath(toObject, ['streamId'], fromStreamId);
}
const fromDirectContentsSource = common.getValueByPath(fromObject, [
'directContentsSource',
]);
if (fromDirectContentsSource != null) {
common.setValueByPath(
toObject,
['directContentsSource'],
fromDirectContentsSource,
);
}
const fromScope = common.getValueByPath(fromObject, ['scope']);
if (fromScope != null) {
common.setValueByPath(toObject, ['scope'], fromScope);
}
const fromGenerationTriggerConfig = common.getValueByPath(fromObject, [
'generationTriggerConfig',
]);
if (fromGenerationTriggerConfig != null) {
common.setValueByPath(
toObject,
['generationTriggerConfig'],
fromGenerationTriggerConfig,
);
}
const fromConfig = common.getValueByPath(fromObject, ['config']);
if (fromConfig != null) {
ingestEventsConfigToVertex(fromConfig, toObject);
}
return toObject;
}
export function listAgentEngineMemoryConfigToVertex(
fromObject: types.ListAgentEngineMemoryConfig,
parentObject: Record<string, unknown>,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);
if (parentObject !== undefined && fromPageSize != null) {
common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);
}
const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);
if (parentObject !== undefined && fromPageToken != null) {
common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);
}
const fromFilter = common.getValueByPath(fromObject, ['filter']);
if (parentObject !== undefined && fromFilter != null) {
common.setValueByPath(parentObject, ['_query', 'filter'], fromFilter);
}
const fromOrderBy = common.getValueByPath(fromObject, ['orderBy']);
if (parentObject !== undefined && fromOrderBy != null) {
common.setValueByPath(parentObject, ['_query', 'orderBy'], fromOrderBy);
}
return toObject;
}
export function listAgentEngineMemoryRequestParametersToVertex(
fromObject: types.ListAgentEngineMemoryRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
const fromConfig = common.getValueByPath(fromObject, ['config']);
if (fromConfig != null) {
listAgentEngineMemoryConfigToVertex(fromConfig, toObject);
}
return toObject;
}
export function purgeAgentEngineMemoriesRequestParametersToVertex(
fromObject: types.PurgeAgentEngineMemoriesRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
const fromFilter = common.getValueByPath(fromObject, ['filter']);
if (fromFilter != null) {
common.setValueByPath(toObject, ['filter'], fromFilter);
}
const fromFilterGroups = common.getValueByPath(fromObject, ['filterGroups']);
if (fromFilterGroups != null) {
let transformedList = fromFilterGroups;
if (Array.isArray(transformedList)) {
transformedList = transformedList.map((item) => {
return item;
});
}
common.setValueByPath(toObject, ['filterGroups'], transformedList);
}
const fromForce = common.getValueByPath(fromObject, ['force']);
if (fromForce != null) {
common.setValueByPath(toObject, ['force'], fromForce);
}
return toObject;
}
export function retrieveAgentEngineMemoriesConfigToVertex(
fromObject: types.RetrieveAgentEngineMemoriesConfig,
parentObject: Record<string, unknown>,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromFilter = common.getValueByPath(fromObject, ['filter']);
if (parentObject !== undefined && fromFilter != null) {
common.setValueByPath(parentObject, ['filter'], fromFilter);
}
const fromFilterGroups = common.getValueByPath(fromObject, ['filterGroups']);
if (parentObject !== undefined && fromFilterGroups != null) {
let transformedList = fromFilterGroups;
if (Array.isArray(transformedList)) {
transformedList = transformedList.map((item) => {
return item;
});
}
common.setValueByPath(parentObject, ['filterGroups'], transformedList);
}
const fromMemoryTypes = common.getValueByPath(fromObject, ['memoryTypes']);
if (parentObject !== undefined && fromMemoryTypes != null) {
common.setValueByPath(parentObject, ['memoryTypes'], fromMemoryTypes);
}
return toObject;
}
export function retrieveAgentEngineMemoriesRequestParametersToVertex(
fromObject: types.RetrieveAgentEngineMemoriesRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
const fromScope = common.getValueByPath(fromObject, ['scope']);
if (fromScope != null) {
common.setValueByPath(toObject, ['scope'], fromScope);
}
const fromSimilaritySearchParams = common.getValueByPath(fromObject, [
'similaritySearchParams',
]);
if (fromSimilaritySearchParams != null) {
common.setValueByPath(
toObject,
['similaritySearchParams'],
fromSimilaritySearchParams,
);
}
const fromSimpleRetrievalParams = common.getValueByPath(fromObject, [
'simpleRetrievalParams',
]);
if (fromSimpleRetrievalParams != null) {
common.setValueByPath(
toObject,
['simpleRetrievalParams'],
fromSimpleRetrievalParams,
);
}
const fromConfig = common.getValueByPath(fromObject, ['config']);
if (fromConfig != null) {
retrieveAgentEngineMemoriesConfigToVertex(fromConfig, toObject);
}
return toObject;
}
export function retrieveMemoryProfilesRequestParametersToVertex(
fromObject: types.RetrieveMemoryProfilesRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
const fromScope = common.getValueByPath(fromObject, ['scope']);
if (fromScope != null) {
common.setValueByPath(toObject, ['scope'], fromScope);
}
return toObject;
}
export function rollbackAgentEngineMemoryRequestParametersToVertex(
fromObject: types.RollbackAgentEngineMemoryRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
const fromTargetRevisionId = common.getValueByPath(fromObject, [
'targetRevisionId',
]);
if (fromTargetRevisionId != null) {
common.setValueByPath(toObject, ['targetRevisionId'], fromTargetRevisionId);
}
return toObject;
}
export function updateAgentEngineMemoryConfigToVertex(
fromObject: types.UpdateAgentEngineMemoryConfig,
parentObject: Record<string, unknown>,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);
if (parentObject !== undefined && fromDisplayName != null) {
common.setValueByPath(parentObject, ['displayName'], fromDisplayName);
}
const fromDescription = common.getValueByPath(fromObject, ['description']);
if (parentObject !== undefined && fromDescription != null) {
common.setValueByPath(parentObject, ['description'], fromDescription);
}
const fromTtl = common.getValueByPath(fromObject, ['ttl']);
if (parentObject !== undefined && fromTtl != null) {
common.setValueByPath(parentObject, ['ttl'], fromTtl);
}
const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);
if (parentObject !== undefined && fromExpireTime != null) {
common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);
}
const fromRevisionExpireTime = common.getValueByPath(fromObject, [
'revisionExpireTime',
]);
if (parentObject !== undefined && fromRevisionExpireTime != null) {
common.setValueByPath(
parentObject,
['revisionExpireTime'],
fromRevisionExpireTime,
);
}
const fromRevisionTtl = common.getValueByPath(fromObject, ['revisionTtl']);
if (parentObject !== undefined && fromRevisionTtl != null) {
common.setValueByPath(parentObject, ['revisionTtl'], fromRevisionTtl);
}
const fromDisableMemoryRevisions = common.getValueByPath(fromObject, [
'disableMemoryRevisions',
]);
if (parentObject !== undefined && fromDisableMemoryRevisions != null) {
common.setValueByPath(
parentObject,
['disableMemoryRevisions'],
fromDisableMemoryRevisions,
);
}
const fromTopics = common.getValueByPath(fromObject, ['topics']);
if (parentObject !== undefined && fromTopics != null) {
let transformedList = fromTopics;
if (Array.isArray(transformedList)) {
transformedList = transformedList.map((item) => {
return item;
});
}
common.setValueByPath(parentObject, ['topics'], transformedList);
}
const fromMetadata = common.getValueByPath(fromObject, ['metadata']);
if (parentObject !== undefined && fromMetadata != null) {
common.setValueByPath(parentObject, ['metadata'], fromMetadata);
}
const fromMemoryId = common.getValueByPath(fromObject, ['memoryId']);
if (parentObject !== undefined && fromMemoryId != null) {
common.setValueByPath(parentObject, ['_query', 'memoryId'], fromMemoryId);
}
const fromUpdateMask = common.getValueByPath(fromObject, ['updateMask']);
if (parentObject !== undefined && fromUpdateMask != null) {
common.setValueByPath(
parentObject,
['_query', 'updateMask'],
fromUpdateMask,
);
}
return toObject;
}
export function updateAgentEngineMemoryRequestParametersToVertex(
fromObject: types.UpdateAgentEngineMemoryRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
const fromFact = common.getValueByPath(fromObject, ['fact']);
if (fromFact != null) {
common.setValueByPath(toObject, ['fact'], fromFact);
}
const fromScope = common.getValueByPath(fromObject, ['scope']);
if (fromScope != null) {
common.setValueByPath(toObject, ['scope'], fromScope);
}
const fromConfig = common.getValueByPath(fromObject, ['config']);
if (fromConfig != null) {
updateAgentEngineMemoryConfigToVertex(fromConfig, toObject);
}
return toObject;
}
================================================
FILE: src/converters/_memoryrevisions_converters.ts
================================================
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
// Code generated by the Google Gen AI SDK generator DO NOT EDIT.
import * as common from '@google/genai/vertex_internal';
import * as types from '../types.js';
export function getAgentEngineMemoryRevisionRequestParametersToVertex(
fromObject: types.GetAgentEngineMemoryRevisionRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
return toObject;
}
export function listAgentEngineMemoryRevisionsConfigToVertex(
fromObject: types.ListAgentEngineMemoryRevisionsConfig,
parentObject: Record<string, unknown>,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);
if (parentObject !== undefined && fromPageSize != null) {
common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);
}
const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);
if (parentObject !== undefined && fromPageToken != null) {
common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);
}
const fromFilter = common.getValueByPath(fromObject, ['filter']);
if (parentObject !== undefined && fromFilter != null) {
common.setValueByPath(parentObject, ['_query', 'filter'], fromFilter);
}
return toObject;
}
export function listAgentEngineMemoryRevisionsRequestParametersToVertex(
fromObject: types.ListAgentEngineMemoryRevisionsRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
const fromConfig = common.getValueByPath(fromObject, ['config']);
if (fromConfig != null) {
listAgentEngineMemoryRevisionsConfigToVertex(fromConfig, toObject);
}
return toObject;
}
================================================
FILE: src/converters/_sandboxes_converters.ts
================================================
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
// Code generated by the Google Gen AI SDK generator DO NOT EDIT.
import * as common from '@google/genai/vertex_internal';
import * as types from '../types.js';
export function createAgentEngineSandboxConfigToVertex(
fromObject: types.CreateAgentEngineSandboxConfig,
parentObject: Record<string, unknown>,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);
if (parentObject !== undefined && fromDisplayName != null) {
common.setValueByPath(parentObject, ['displayName'], fromDisplayName);
}
const fromDescription = common.getValueByPath(fromObject, ['description']);
if (parentObject !== undefined && fromDescription != null) {
common.setValueByPath(parentObject, ['description'], fromDescription);
}
const fromTtl = common.getValueByPath(fromObject, ['ttl']);
if (parentObject !== undefined && fromTtl != null) {
common.setValueByPath(parentObject, ['ttl'], fromTtl);
}
const fromSandboxEnvironmentTemplate = common.getValueByPath(fromObject, [
'sandboxEnvironmentTemplate',
]);
if (parentObject !== undefined && fromSandboxEnvironmentTemplate != null) {
common.setValueByPath(
parentObject,
['sandboxEnvironmentTemplate'],
fromSandboxEnvironmentTemplate,
);
}
const fromSandboxEnvironmentSnapshot = common.getValueByPath(fromObject, [
'sandboxEnvironmentSnapshot',
]);
if (parentObject !== undefined && fromSandboxEnvironmentSnapshot != null) {
common.setValueByPath(
parentObject,
['sandboxEnvironmentSnapshot'],
fromSandboxEnvironmentSnapshot,
);
}
const fromOwner = common.getValueByPath(fromObject, ['owner']);
if (parentObject !== undefined && fromOwner != null) {
common.setValueByPath(parentObject, ['owner'], fromOwner);
}
return toObject;
}
export function createAgentEngineSandboxRequestParametersToVertex(
fromObject: types.CreateAgentEngineSandboxRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
const fromSpec = common.getValueByPath(fromObject, ['spec']);
if (fromSpec != null) {
common.setValueByPath(toObject, ['spec'], fromSpec);
}
const fromConfig = common.getValueByPath(fromObject, ['config']);
if (fromConfig != null) {
createAgentEngineSandboxConfigToVertex(fromConfig, toObject);
}
return toObject;
}
export function deleteAgentEngineSandboxRequestParametersToVertex(
fromObject: types.DeleteAgentEngineSandboxRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
return toObject;
}
export function executeCodeAgentEngineSandboxRequestParametersToVertex(
fromObject: types.ExecuteCodeAgentEngineSandboxRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
const fromInputs = common.getValueByPath(fromObject, ['inputs']);
if (fromInputs != null) {
let transformedList = fromInputs;
if (Array.isArray(transformedList)) {
transformedList = transformedList.map((item) => {
return item;
});
}
common.setValueByPath(toObject, ['inputs'], transformedList);
}
return toObject;
}
export function getAgentEngineSandboxOperationParametersToVertex(
fromObject: types.GetAgentEngineSandboxOperationParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromOperationName = common.getValueByPath(fromObject, [
'operationName',
]);
if (fromOperationName != null) {
common.setValueByPath(
toObject,
['_url', 'operationName'],
fromOperationName,
);
}
return toObject;
}
export function getAgentEngineSandboxRequestParametersToVertex(
fromObject: types.GetAgentEngineSandboxRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
return toObject;
}
export function listAgentEngineSandboxesConfigToVertex(
fromObject: types.ListAgentEngineSandboxesConfig,
parentObject: Record<string, unknown>,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);
if (parentObject !== undefined && fromPageSize != null) {
common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);
}
const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);
if (parentObject !== undefined && fromPageToken != null) {
common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);
}
const fromFilter = common.getValueByPath(fromObject, ['filter']);
if (parentObject !== undefined && fromFilter != null) {
common.setValueByPath(parentObject, ['_query', 'filter'], fromFilter);
}
return toObject;
}
export function listAgentEngineSandboxesRequestParametersToVertex(
fromObject: types.ListAgentEngineSandboxesRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
const fromConfig = common.getValueByPath(fromObject, ['config']);
if (fromConfig != null) {
listAgentEngineSandboxesConfigToVertex(fromConfig, toObject);
}
return toObject;
}
================================================
FILE: src/converters/_sessionevents_converters.ts
================================================
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
// Code generated by the Google Gen AI SDK generator DO NOT EDIT.
import * as common from '@google/genai/vertex_internal';
import * as types from '../types.js';
export function appendAgentEngineSessionEventConfigToVertex(
fromObject: types.AppendAgentEngineSessionEventConfig,
parentObject: Record<string, unknown>,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromContent = common.getValueByPath(fromObject, ['content']);
if (parentObject !== undefined && fromContent != null) {
common.setValueByPath(parentObject, ['content'], fromContent);
}
const fromActions = common.getValueByPath(fromObject, ['actions']);
if (parentObject !== undefined && fromActions != null) {
common.setValueByPath(parentObject, ['actions'], fromActions);
}
const fromErrorCode = common.getValueByPath(fromObject, ['errorCode']);
if (parentObject !== undefined && fromErrorCode != null) {
common.setValueByPath(parentObject, ['errorCode'], fromErrorCode);
}
const fromErrorMessage = common.getValueByPath(fromObject, ['errorMessage']);
if (parentObject !== undefined && fromErrorMessage != null) {
common.setValueByPath(parentObject, ['errorMessage'], fromErrorMessage);
}
const fromEventMetadata = common.getValueByPath(fromObject, [
'eventMetadata',
]);
if (parentObject !== undefined && fromEventMetadata != null) {
common.setValueByPath(parentObject, ['eventMetadata'], fromEventMetadata);
}
const fromRawEvent = common.getValueByPath(fromObject, ['rawEvent']);
if (parentObject !== undefined && fromRawEvent != null) {
common.setValueByPath(parentObject, ['rawEvent'], fromRawEvent);
}
return toObject;
}
export function appendAgentEngineSessionEventRequestParametersToVertex(
fromObject: types.AppendAgentEngineSessionEventRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
const fromAuthor = common.getValueByPath(fromObject, ['author']);
if (fromAuthor != null) {
common.setValueByPath(toObject, ['author'], fromAuthor);
}
const fromInvocationId = common.getValueByPath(fromObject, ['invocationId']);
if (fromInvocationId != null) {
common.setValueByPath(toObject, ['invocationId'], fromInvocationId);
}
const fromTimestamp = common.getValueByPath(fromObject, ['timestamp']);
if (fromTimestamp != null) {
common.setValueByPath(toObject, ['timestamp'], fromTimestamp);
}
const fromConfig = common.getValueByPath(fromObject, ['config']);
if (fromConfig != null) {
appendAgentEngineSessionEventConfigToVertex(fromConfig, toObject);
}
return toObject;
}
export function listAgentEngineSessionEventsConfigToVertex(
fromObject: types.ListAgentEngineSessionEventsConfig,
parentObject: Record<string, unknown>,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);
if (parentObject !== undefined && fromPageSize != null) {
common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);
}
const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);
if (parentObject !== undefined && fromPageToken != null) {
common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);
}
const fromFilter = common.getValueByPath(fromObject, ['filter']);
if (parentObject !== undefined && fromFilter != null) {
common.setValueByPath(parentObject, ['_query', 'filter'], fromFilter);
}
return toObject;
}
export function listAgentEngineSessionEventsRequestParametersToVertex(
fromObject: types.ListAgentEngineSessionEventsRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
const fromConfig = common.getValueByPath(fromObject, ['config']);
if (fromConfig != null) {
listAgentEngineSessionEventsConfigToVertex(fromConfig, toObject);
}
return toObject;
}
================================================
FILE: src/converters/_sessions_converters.ts
================================================
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
// Code generated by the Google Gen AI SDK generator DO NOT EDIT.
import * as common from '@google/genai/vertex_internal';
import * as types from '../types.js';
export function createAgentEngineSessionConfigToVertex(
fromObject: types.CreateAgentEngineSessionConfig,
parentObject: Record<string, unknown>,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);
if (parentObject !== undefined && fromDisplayName != null) {
common.setValueByPath(parentObject, ['displayName'], fromDisplayName);
}
const fromSessionState = common.getValueByPath(fromObject, ['sessionState']);
if (parentObject !== undefined && fromSessionState != null) {
common.setValueByPath(parentObject, ['sessionState'], fromSessionState);
}
const fromTtl = common.getValueByPath(fromObject, ['ttl']);
if (parentObject !== undefined && fromTtl != null) {
common.setValueByPath(parentObject, ['ttl'], fromTtl);
}
const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);
if (parentObject !== undefined && fromExpireTime != null) {
common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);
}
const fromLabels = common.getValueByPath(fromObject, ['labels']);
if (parentObject !== undefined && fromLabels != null) {
common.setValueByPath(parentObject, ['labels'], fromLabels);
}
const fromSessionId = common.getValueByPath(fromObject, ['sessionId']);
if (parentObject !== undefined && fromSessionId != null) {
common.setValueByPath(parentObject, ['_query', 'sessionId'], fromSessionId);
}
return toObject;
}
export function createAgentEngineSessionRequestParametersToVertex(
fromObject: types.CreateAgentEngineSessionRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
const fromUserId = common.getValueByPath(fromObject, ['userId']);
if (fromUserId != null) {
common.setValueByPath(toObject, ['userId'], fromUserId);
}
const fromConfig = common.getValueByPath(fromObject, ['config']);
if (fromConfig != null) {
createAgentEngineSessionConfigToVertex(fromConfig, toObject);
}
return toObject;
}
export function deleteAgentEngineSessionRequestParametersToVertex(
fromObject: types.DeleteAgentEngineSessionRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
return toObject;
}
export function getAgentEngineSessionOperationParametersToVertex(
fromObject: types.GetAgentEngineSessionOperationParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromOperationName = common.getValueByPath(fromObject, [
'operationName',
]);
if (fromOperationName != null) {
common.setValueByPath(
toObject,
['_url', 'operationName'],
fromOperationName,
);
}
return toObject;
}
export function getAgentEngineSessionRequestParametersToVertex(
fromObject: types.GetAgentEngineSessionRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
return toObject;
}
export function listAgentEngineSessionsConfigToVertex(
fromObject: types.ListAgentEngineSessionsConfig,
parentObject: Record<string, unknown>,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);
if (parentObject !== undefined && fromPageSize != null) {
common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);
}
const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);
if (parentObject !== undefined && fromPageToken != null) {
common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);
}
const fromFilter = common.getValueByPath(fromObject, ['filter']);
if (parentObject !== undefined && fromFilter != null) {
common.setValueByPath(parentObject, ['_query', 'filter'], fromFilter);
}
return toObject;
}
export function listAgentEngineSessionsRequestParametersToVertex(
fromObject: types.ListAgentEngineSessionsRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
const fromConfig = common.getValueByPath(fromObject, ['config']);
if (fromConfig != null) {
listAgentEngineSessionsConfigToVertex(fromConfig, toObject);
}
return toObject;
}
export function updateAgentEngineSessionConfigToVertex(
fromObject: types.UpdateAgentEngineSessionConfig,
parentObject: Record<string, unknown>,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);
if (parentObject !== undefined && fromDisplayName != null) {
common.setValueByPath(parentObject, ['displayName'], fromDisplayName);
}
const fromSessionState = common.getValueByPath(fromObject, ['sessionState']);
if (parentObject !== undefined && fromSessionState != null) {
common.setValueByPath(parentObject, ['sessionState'], fromSessionState);
}
const fromTtl = common.getValueByPath(fromObject, ['ttl']);
if (parentObject !== undefined && fromTtl != null) {
common.setValueByPath(parentObject, ['ttl'], fromTtl);
}
const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);
if (parentObject !== undefined && fromExpireTime != null) {
common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);
}
const fromLabels = common.getValueByPath(fromObject, ['labels']);
if (parentObject !== undefined && fromLabels != null) {
common.setValueByPath(parentObject, ['labels'], fromLabels);
}
const fromSessionId = common.getValueByPath(fromObject, ['sessionId']);
if (parentObject !== undefined && fromSessionId != null) {
common.setValueByPath(parentObject, ['_query', 'sessionId'], fromSessionId);
}
const fromUpdateMask = common.getValueByPath(fromObject, ['updateMask']);
if (parentObject !== undefined && fromUpdateMask != null) {
common.setValueByPath(
parentObject,
['_query', 'updateMask'],
fromUpdateMask,
);
}
const fromUserId = common.getValueByPath(fromObject, ['userId']);
if (parentObject !== undefined && fromUserId != null) {
common.setValueByPath(parentObject, ['userId'], fromUserId);
}
return toObject;
}
export function updateAgentEngineSessionRequestParametersToVertex(
fromObject: types.UpdateAgentEngineSessionRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
const fromConfig = common.getValueByPath(fromObject, ['config']);
if (fromConfig != null) {
updateAgentEngineSessionConfigToVertex(fromConfig, toObject);
}
return toObject;
}
================================================
FILE: src/converters/_skills_converters.ts
================================================
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
// Code generated by the Google Gen AI SDK generator DO NOT EDIT.
import * as common from '@google/genai/vertex_internal';
import * as types from '../types.js';
export function getSkillRequestParametersToVertex(
fromObject: types.GetSkillRequestParameters,
): Record<string, unknown> {
const toObject: Record<string, unknown> = {};
const fromName = common.getValueByPath(fromObject, ['name']);
if (fromName != null) {
common.setValueByPath(toObject, ['_url', 'name'], fromName);
}
const fromConfig = common.getValueByPath(fromObject, ['config']);
if (fromConfig != null) {
common.setValueByPath(toObject, ['config'], fromConfig);
}
return toObject;
}
================================================
FILE: src/eslint.config.mjs
================================================
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
export default [
eslint.configs.recommended,
...tseslint.configs.recommended,
{
ignores: [
// Ignore built files.
'dist/**',
],
},
{
rules: {
'@typescript-eslint/no-unused-vars': [
'error',
{
'argsIgnorePattern': '^_',
'varsIgnorePattern': '^_',
},
],
'@typescript-eslint/no-empty-object-type': [
'error',
{
'allowInterfaces': 'always',
},
],
},
},
];
================================================
FILE: src/index.ts
================================================
/**
* @license
* Copyright 2024 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
*
* https://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.
*/
export {Client} from './client';
export * from './types';
================================================
FILE: src/memories.ts
================================================
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
// Code generated by the Google Gen AI SDK generator DO NOT EDIT.
import * as common from '@google/genai/vertex_internal';
import {ApiClient, BaseModule} from '@google/genai/vertex_internal';
import * as converters from './converters/_memories_converters.js';
import {MemoryRevisions} from './memoryrevisions.js';
import * as types from './types.js';
export class Memories extends BaseModule {
public readonly revisions: MemoryRevisions;
constructor(private readonly apiClient: ApiClient) {
super();
this.revisions = new MemoryRevisions(apiClient);
}
async createInternal(
params: types.CreateAgentEngineMemoryRequestParameters,
): Promise<types.AgentEngineMemoryOperation> {
let response: Promise<types.AgentEngineMemoryOperation>;
let path: string = '';
let queryParams: Record<string, string> = {};
if (this.apiClient.isVertexAI()) {
const body =
converters.createAgentEngineMemoryRequestParametersToVertex(params);
path = common.formatMap(
'{name}/memories',
body['_url'] as Record<string, unknown>,
);
queryParams = body['_query'] as Record<string, string>;
delete body['_url'];
delete body['_query'];
delete body['config'];
response = this.apiClient
.request({
path: path,
queryParams: queryParams,
body: JSON.stringify(body),
httpMethod: 'POST',
httpOptions: params.config?.httpOptions,
abortSignal: params.config?.abortSignal,
})
.then((httpResponse) => {
return httpResponse.json();
}) as Promise<types.AgentEngineMemoryOperation>;
return response.then((resp) => {
return resp as types.AgentEngineMemoryOperation;
});
} else {
throw new Error(
'This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).',
);
}
}
async delete(
params: types.DeleteAgentEngineMemoryRequestParameters,
): Promise<types.DeleteAgentEngineMemoryOperation> {
let response: Promise<types.DeleteAgentEngineMemoryOperation>;
let path: string = '';
let queryParams: Record<string, string> = {};
if (this.apiClient.isVertexAI()) {
const body =
converters.deleteAgentEngineMemoryRequestParametersToVertex(params);
path = common.formatMap(
'{name}',
body['_url'] as Record<string, unknown>,
);
queryParams = body['_query'] as Record<string, string>;
delete body['_url'];
delete body['_query'];
delete body['config'];
response = this.apiClient
.request({
path: path,
queryParams: queryParams,
body: JSON.stringify(body),
httpMethod: 'DELETE',
httpOptions: params.config?.httpOptions,
abortSignal: params.config?.abortSignal,
})
.then((httpResponse) => {
return httpResponse.json();
}) as Promise<types.DeleteAgentEngineMemoryOperation>;
return response.then((resp) => {
return resp as types.DeleteAgentEngineMemoryOperation;
});
} else {
throw new Error(
'This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).',
);
}
}
async generateInternal(
params: types.GenerateAgentEngineMemoriesRequestParameters,
): Promise<types.AgentEngineGenerateMemoriesOperation> {
let response: Promise<types.AgentEngineGenerateMemoriesOperation>;
let path: string = '';
let queryParams: Record<string, string> = {};
if (this.apiClient.isVertexAI()) {
const body =
converters.generateAgentEngineMemoriesRequestParametersToVertex(params);
path = common.formatMap(
'{name}/memories:generate',
body['_url'] as Record<string, unknown>,
);
queryParams = body['_query'] as Record<string, string>;
delete body['_url'];
delete body['_query'];
delete body['config'];
response = this.apiClient
.request({
path: path,
queryParams: queryParams,
body: JSON.stringify(body),
httpMethod: 'POST',
httpOptions: params.config?.httpOptions,
abortSignal: params.config?.abortSignal,
})
.then((httpResponse) => {
return httpResponse.json();
}) as Promise<types.AgentEngineGenerateMemoriesOperation>;
return response.then((resp) => {
return resp as types.AgentEngineGenerateMemoriesOperation;
});
} else {
throw new Error(
'This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).',
);
}
}
async get(
params: types.GetAgentEngineMemoryRequestParameters,
): Promise<types.Memory> {
let response: Promise<types.Memory>;
let path: string = '';
let queryParams: Record<string, string> = {};
if (this.apiClient.isVertexAI()) {
const body =
converters.getAgentEngineMemoryRequestParametersToVertex(params);
path = common.formatMap(
'{name}',
body['_url'] as Record<string, unknown>,
);
queryParams = body['_query'] as Record<string, string>;
delete body['_url'];
delete body['_query'];
delete body['config'];
response = this.apiClient
.request({
path: path,
queryParams: queryParams,
body: JSON.stringify(body),
httpMethod: 'GET',
httpOptions: params.config?.httpOptions,
abortSignal: params.config?.abortSignal,
})
.then((httpResponse) => {
return httpResponse.json();
}) as Promise<types.Memory>;
return response.then((resp) => {
return resp as types.Memory;
});
} else {
throw new Error(
'This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).',
);
}
}
async ingestEventsInternal(
params: types.IngestEventsRequestParameters,
): Promise<types.MemoryBankIngestEventsOperation> {
let response: Promise<types.MemoryBankIngestEventsOperation>;
let path: string = '';
let queryParams: Record<string, string> = {};
if (this.apiClient.isVertexAI()) {
const body = converters.ingestEventsRequestParametersToVertex(params);
path = common.formatMap(
'{name}/memories:ingestEvents',
body['_url'] as Record<string, unknown>,
);
queryParams = body['_query'] as Record<string, string>;
delete body['_url'];
delete body['_query'];
delete body['config'];
response = this.apiClient
.request({
path: path,
queryParams: queryParams,
body: JSON.stringify(body),
httpMethod: 'POST',
httpOptions: params.config?.httpOptions,
abortSignal: params.config?.abortSignal,
})
.then((httpResponse) => {
return httpResponse.json();
}) as Promise<types.MemoryBankIngestEventsOperation>;
return response.then((resp) => {
return resp as types.MemoryBankIngestEventsOperation;
});
} else {
throw new Error(
'This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).',
);
}
}
async listInternal(
params: types.ListAgentEngineMemoryRequestParameters,
): Promise<types.ListReasoningEnginesMemoriesResponse> {
let response: Promise<types.ListReasoningEnginesMemoriesResponse>;
let path: string = '';
let queryParams: Record<string, string> = {};
if (this.apiClient.isVertexAI()) {
const body =
converters.listAgentEngineMemoryRequestParametersToVertex(params);
path = common.formatMap(
'{name}/memories',
body['_url'] as Record<string, unknown>,
);
queryParams = body['_query'] as Record<string, string>;
delete body['_url'];
delete body['_query'];
delete body['config'];
response = this.apiClient
.request({
path: path,
queryParams: queryParams,
body: JSON.stringify(body),
httpMethod: 'GET',
httpOptions: params.config?.httpOptions,
abortSignal: params.config?.abortSignal,
})
.then((httpResponse) => {
return httpResponse.json();
}) as Promise<types.ListReasoningEnginesMemoriesResponse>;
return response.then((resp) => {
const typedResp = new types.ListReasoningEnginesMemoriesResponse();
Object.assign(typedResp, resp);
return typedResp;
});
} else {
throw new Error(
'This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).',
);
}
}
async getMemoryOperationInternal(
params: types.GetAgentEngineMemoryOperationParameters,
): Promise<types.AgentEngineMemoryOperation> {
let response: Promise<types.AgentEngineMemoryOperation>;
let path: string = '';
let queryParams: Record<string, string> = {};
if (this.apiClient.isVertexAI()) {
const body =
converters.getAgentEngineMemoryOperationParametersToVertex(params);
path = common.formatMap(
'{operationName}',
body['_url'] as Record<string, unknown>,
);
queryParams = body['_query'] as Record<string, string>;
delete body['_url'];
delete body['_query'];
delete body['config'];
response = this.apiClient
.request({
path: path,
queryParams: queryParams,
body: JSON.stringify(body),
httpMethod: 'GET',
httpOptions: params.config?.httpOptions,
abortSignal: params.config?.abortSignal,
})
.then((httpResponse) => {
return httpResponse.json();
}) as Promise<types.AgentEngineMemoryOperation>;
return response.then((resp) => {
return resp as types.AgentEngineMemoryOperation;
});
} else {
throw new Error(
'This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).',
);
}
}
async getGenerateMemoriesOperationInternal(
params: types.GetAgentEngineGenerateMemoriesOperationParameters,
): Promise<types.AgentEngineGenerateMemoriesOperation> {
let response: Promise<types.AgentEngineGenerateMemoriesOperation>;
let path: string = '';
let queryParams: Record<string, string> = {};
if (this.apiClient.isVertexAI()) {
const body =
converters.getAgentEngineGenerateMemoriesOperationParametersToVertex(
params,
);
path = common.formatMap(
'{operationName}',
body['_url'] as Record<string, unknown>,
);
queryParams = body['_query'] as Record<string, string>;
delete body['_url'];
delete body['_query'];
delete body['config'];
response = this.apiClient
.request({
path: path,
queryParams: queryParams,
body: JSON.stringify(body),
httpMethod: 'GET',
httpOptions: params.config?.httpOptions,
abortSignal: params.config?.abortSignal,
})
.then((httpResponse) => {
return httpResponse.json();
}) as Promise<types.AgentEngineGenerateMemoriesOperation>;
return response.then((resp) => {
return resp as types.AgentEngineGenerateMemoriesOperation;
});
} else {
throw new Error(
'This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).',
);
}
}
async retrieveInternal(
params: types.RetrieveAgentEngineMemoriesRequestParameters,
): Promise<types.RetrieveMemoriesResponse> {
let response: Promise<types.RetrieveMemoriesResponse>;
let path: string = '';
let queryParams: Record<string, string> = {};
if (this.apiClient.isVertexAI()) {
const body =
converters.retrieveAgentEngineMemoriesRequestParametersToVertex(params);
path = common.formatMap(
'{name}/memories:retrieve',
body['_url'] as Record<string, unknown>,
);
queryParams = body['_query'] as Record<string, string>;
delete body['_url'];
delete body['_query'];
delete body['config'];
response = this.apiClient
.request({
path: path,
queryParams: queryParams,
body: JSON.stringify(body),
httpMethod: 'POST',
httpOptions: params.config?.httpOptions,
abortSignal: params.config?.abortSignal,
})
.then((httpResponse) => {
return httpResponse.json();
}) as Promise<types.RetrieveMemoriesResponse>;
return response.then((resp) => {
const typedResp = new types.RetrieveMemoriesResponse();
Object.assign(typedResp, resp);
return typedResp;
});
} else {
throw new Error(
'This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).',
);
}
}
async retrieveProfiles(
params: types.RetrieveMemoryProfilesRequestParameters,
): Promise<types.RetrieveProfilesResponse> {
let response: Promise<types.RetrieveProfilesResponse>;
let path: string = '';
let queryParams: Record<string, string> = {};
if (this.apiClient.isVertexAI()) {
const body =
converters.retrieveMemoryProfilesRequestParametersToVertex(params);
path = common.formatMap(
'{name}/memories:retrieveProfiles',
body['_url'] as Record<string, unknown>,
);
queryParams = body['_query'] as Record<string, string>;
delete body['_url'];
delete body['_query'];
delete body['config'];
response = this.apiClient
.request({
path: path,
queryParams: queryParams,
body: JSON.stringify(body),
httpMethod: 'POST',
httpOptions: params.config?.httpOptions,
abortSignal: params.config?.abortSignal,
})
.then((httpResponse) => {
return httpResponse.json();
}) as Promise<types.RetrieveProfilesResponse>;
return response.then((resp) => {
const typedResp = new types.RetrieveProfilesResponse();
Object.assign(typedResp, resp);
return typedResp;
});
} else {
throw new Error(
'This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).',
);
}
}
async rollbackInternal(
params: types.RollbackAgentEngineMemoryRequestParameters,
): Promise<types.AgentEngineRollbackMemoryOperation> {
let response: Promise<types.AgentEngineRollbackMemoryOperation>;
let path: string = '';
let queryParams: Record<string, string> = {};
if (this.apiClient.isVertexAI()) {
const body =
converters.rollbackAgentEngineMemoryRequestParametersToVertex(params);
path = common.formatMap(
'{name}:rollback',
body['_url'] as Record<string, unknown>,
);
queryParams = body['_query'] as Record<string, string>;
delete body['_url'];
delete body['_query'];
delete body['config'];
response = this.apiClient
.request({
path: path,
queryParams: queryParams,
body: JSON.stringify(body),
httpMethod: 'POST',
httpOptions: params.config?.httpOptions,
abortSignal: params.config?.abortSignal,
})
.then((httpResponse) => {
return httpResponse.json();
}) as Promise<types.AgentEngineRollbackMemoryOperation>;
return response.then((resp) => {
return resp as types.AgentEngineRollbackMemoryOperation;
});
} else {
throw new Error(
'This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).',
);
}
}
async updateInternal(
params: types.UpdateAgentEngineMemoryRequestParameters,
): Promise<types.AgentEngineMemoryOperation> {
let response: Promise<types.AgentEngineMemoryOperation>;
let path: string = '';
let queryParams: Record<string, string> = {};
if (this.apiClient.isVertexAI()) {
const body =
converters.updateAgentEngineMemoryRequestParametersToVertex(params);
path = common.formatMap(
'{name}',
body['_url'] as Record<string, unknown>,
);
queryParams = body['_query'] as Record<string, string>;
delete body['_url'];
delete body['_query'];
delete body['config'];
response = this.apiClient
.request({
path: path,
queryParams: queryParams,
body: JSON.stringify(body),
httpMethod: 'PATCH',
httpOptions: params.config?.httpOptions,
abortSignal: params.config?.abortSignal,
})
.then((httpResponse) => {
return httpResponse.json();
}) as Promise<types.AgentEngineMemoryOperation>;
return response.then((resp) => {
return resp as types.AgentEngineMemoryOperation;
});
} else {
throw new Error(
'This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).',
);
}
}
async purgeInternal(
params: types.PurgeAgentEngineMemoriesRequestParameters,
): Promise<types.AgentEnginePurgeMemoriesOperation> {
let response: Promise<types.AgentEnginePurgeMemoriesOperation>;
let path: string = '';
let queryParams: Record<string, string> = {};
if (this.apiClient.isVertexAI()) {
const body =
converters.purgeAgentEngineMemoriesRequestParametersToVertex(params);
path = common.formatMap(
'{name}/memories:purge',
body['_url'] as Record<string, unknown>,
);
queryParams = body['_query'] as Record<string, string>;
delete body['_url'];
delete body['_query'];
delete body['config'];
response = this.apiClient
.request({
path: path,
queryParams: queryParams,
body: JSON.stringify(body),
httpMethod: 'POST',
httpOptions: params.config?.httpOptions,
abortSignal: params.config?.abortSignal,
})
.then((httpResponse) => {
return httpResponse.json();
}) as Promise<types.AgentEnginePurgeMemoriesOperation>;
return response.then((resp) => {
return resp as types.AgentEnginePurgeMemoriesOperation;
});
} else {
throw new Error(
'This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).',
);
}
}
}
================================================
FILE: src/memoryrevisions.ts
================================================
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
// Code generated by the Google Gen AI SDK generator DO NOT EDIT.
import * as common from '@google/genai/vertex_internal';
import {ApiClient, BaseModule} from '@google/genai/vertex_internal';
import * as converters from './converters/_memoryrevisions_converters.js';
import * as types from './types.js';
export class MemoryRevisions extends BaseModule {
constructor(private readonly apiClient: ApiClient) {
super();
}
async get(
params: types.GetAgentEngineMemoryRevisionRequestParameters,
): Promise<types.MemoryRevision> {
let response: Promise<types.MemoryRevision>;
let path: string = '';
let queryParams: Record<string, string> = {};
if (this.apiClient.isVertexAI()) {
const body =
converters.getAgentEngineMemoryRevisionRequestParametersToVertex(
params,
);
path = common.formatMap(
'{name}',
body['_url'] as Record<string, unknown>,
);
queryParams = body['_query'] as Record<string, string>;
delete body['_url'];
delete body['_query'];
delete body['config'];
response = this.apiClient
.request({
path: path,
queryParams: queryParams,
body: JSON.stringify(body),
httpMethod: 'GET',
httpOptions: params.config?.httpOptions,
abortSignal: params.config?.abortSignal,
})
.then((httpResponse) => {
return httpResponse.json();
}) as Promise<types.MemoryRevision>;
return response.then((resp) => {
return resp as types.MemoryRevision;
});
} else {
throw new Error(
'This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).',
);
}
}
async listInternal(
params: types.ListAgentEngineMemoryRevisionsRequestParameters,
): Promise<types.ListAgentEngineMemoryRevisionsResponse> {
let response: Promise<types.ListAgentEngineMemoryRevisionsResponse>;
let path: string = '';
let queryParams: Record<string, string> = {};
if (this.apiClient.isVertexAI()) {
const body =
converters.listAgentEngineMemoryRevisionsRequestParametersToVertex(
params,
);
path = common.formatMap(
'{name}/revisions',
body['_url'] as Record<string, unknown>,
);
queryParams = body['_query'] as Record<string, string>;
delete body['_url'];
delete body['_query'];
delete body['config'];
response = this.apiClient
.request({
path: path,
queryParams: queryParams,
body: JSON.stringify(body),
httpMethod: 'GET',
httpOptions: params.config?.httpOptions,
abortSignal: params.config?.abortSignal,
})
.then((httpResponse) => {
return httpResponse.json();
}) as Promise<types.ListAgentEngineMemoryRevisionsResponse>;
return response.then((resp) => {
const typedResp = new types.ListAgentEngineMemoryRevisionsResponse();
Object.assign(typedResp, resp);
return typedResp;
});
} else {
throw new Error(
'This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).',
);
}
}
}
================================================
FILE: src/releases.txt
================================================
Use this file when you need to force a patch release with release-please.
Edit line 4 below with the version for the release.
0.6.0
================================================
FILE: src/sandboxes.ts
================================================
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
// Code generated by the Google Gen AI SDK generator DO NOT EDIT.
import * as common from '@google/genai/vertex_internal';
import {ApiClient, BaseModule} from '@google/genai/vertex_internal';
import * as converters from './converters/_sandboxes_converters.js';
import * as types from './types.js';
export class Sandboxes extends BaseModule {
constructor(private readonly apiClient: ApiClient) {
super();
}
async createInternal(
params: types.CreateAgentEngineSandboxRequestParameters,
): Promise<types.AgentEngineSandboxOperation> {
let response: Promise<types.AgentEngineSandboxOperation>;
let path: string = '';
let queryParams: Record<string, string> = {};
if (this.apiClient.isVertexAI()) {
const body =
converters.createAgentEngineSandboxRequestParametersToVertex(params);
path = common.formatMap(
'{name}/sandboxEnvironments',
body['_url'] as Record<string, unknown>,
);
queryParams = body['_query'] as Record<string, string>;
delete body['_url'];
delete body['_query'];
delete body['config'];
response = this.apiClient
.request({
path: path,
queryParams: queryParams,
body: JSON.stringify(body),
httpMethod: 'POST',
httpOptions: params.config?.httpOptions,
abortSignal: params.config?.abortSignal,
})
.then((httpResponse) => {
return httpResponse.json();
}) as Promise<types.AgentEngineSandboxOperation>;
return response.then((resp) => {
return resp as types.AgentEngineSandboxOperation;
});
} else {
throw new Error(
'This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).',
);
}
}
async deleteInternal(
params: types.DeleteAgentEngineSandboxRequestParameters,
): Promise<types.DeleteAgentEngineSandboxOperation> {
let response: Promise<types.DeleteAgentEngineSandboxOperation>;
let path: string = '';
let queryParams: Record<string, string> = {};
if (this.apiClient.isVertexAI()) {
const body =
converters.deleteAgentEngineSandboxRequestParametersToVertex(params);
path = common.formatMap(
'{name}',
body['_url'] as Record<string, unknown>,
);
queryParams = body['_query'] as Record<string, string>;
delete body['_url'];
delete body['_query'];
delete body['config'];
response = this.apiClient
.request({
path: path,
queryParams: queryParams,
body: JSON.stringify(body),
httpMethod: 'DELETE',
httpOptions: params.config?.httpOptions,
abortSignal: params.config?.abortSignal,
})
.then((httpResponse) => {
return httpResponse.json();
}) as Promise<types.DeleteAgentEngineSandboxOperation>;
return response.then((resp) => {
return resp as types.DeleteAgentEngineSandboxOperation;
});
} else {
throw new Error(
'This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).',
);
}
}
async executeCodeInternal(
params: types.ExecuteCodeAgentEngineSandboxRequestParameters,
): Promise<types.ExecuteSandboxEnvironmentResponse> {
let response: Promise<types.ExecuteSandboxEnvironmentResponse>;
let path: string = '';
let queryParams: Record<string, string> = {};
if (this.apiClient.isVertexAI()) {
const body =
converters.executeCodeAgentEngineSandboxRequestParametersToVertex(
params,
);
path = common.formatMap(
'{name}/:execute',
body['_url'] as Record<string, unknown>,
);
queryParams = body['_query'] as Record<string, string>;
delete body['_url'];
delete body['_query'];
delete body['config'];
response = this.apiClient
.request({
path: path,
queryParams: queryParams,
body: JSON.stringify(body),
httpMethod: 'POST',
httpOptions: params.config?.httpOptions,
abortSignal: params.config?.abortSignal,
})
.then((httpResponse) => {
return httpResponse.json();
}) as Promise<types.ExecuteSandboxEnvironmentResponse>;
return response.then((resp) => {
const typedResp = new types.ExecuteSandboxEnvironmentResponse();
Object.assign(typedResp, resp);
return typedResp;
});
} else {
throw new Error(
'This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).',
);
}
}
async getInternal(
params: types.GetAgentEngineSandboxRequestParameters,
): Promise<types.SandboxEnvironment> {
let response: Promise<types.SandboxEnvironment>;
let path: string = '';
let queryParams: Record<string, string> = {};
if (this.apiClient.isVertexAI()) {
const body =
converters.getAgentEngineSandboxRequestParametersToVertex(params);
path = common.formatMap(
'{name}',
body['_url'] as Record<string, unknown>,
);
queryParams = body['_query'] as Record<string, string>;
delete body['_url'];
delete body['_query'];
delete body['config'];
response = this.apiClient
.request({
path: path,
queryParams: queryParams,
body: JSON.stringify(body),
httpMethod: 'GET',
httpOptions: params.config?.httpOptions,
abortSignal: params.config?.abortSignal,
})
.then((httpResponse) => {
return httpResponse.json();
}) as Promise<types.SandboxEnvironment>;
return response.then((resp) => {
return resp as types.SandboxEnvironment;
});
} else {
throw new Error(
'This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).',
);
}
}
async listInternal(
params: types.ListAgentEngineSandboxesRequestParameters,
): Promise<types.ListAgentEngineSandboxesResponse> {
let response: Promise<types.ListAgentEngineSandboxesResponse>;
let path: string = '';
let queryParams: Record<string, string> = {};
if (this.apiClient.isVertexAI()) {
const body =
converters.listAgentEngineSandboxesRequestParametersToVertex(params);
path = common.formatMap(
'{name}/sandboxEnvironments',
body['_url'] as Record<string, unknown>,
);
queryParams = body['_query'] as Record<string, string>;
delete body['_url'];
delete body['_query'];
delete body['config'];
response = this.apiClient
.request({
path: path,
queryParams: queryParams,
body: JSON.stringify(body),
httpMethod: 'GET',
httpOptions: params.config?.httpOptions,
abortSignal: params.config?.abortSignal,
})
.then((httpResponse) => {
return httpResponse.json();
}) as Promise<types.ListAgentEngineSandboxesResponse>;
return response.then((resp) => {
const typedResp = new types.ListAgentEngineSandboxesResponse();
Object.assign(typedResp, resp);
return typedResp;
});
} else {
throw new Error(
'This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).',
);
}
}
async getSandboxOperationInternal(
params: types.GetAgentEngineSandboxOperationParameters,
): Promise<types.AgentEngineSandboxOperation> {
let response: Promise<types.AgentEngineSandboxOperation>;
let path: string = '';
let queryParams: Record<string, string> = {};
if (this.apiClient.isVertexAI()) {
const body =
converters.getAgentEngineSandboxOperationParametersToVertex(params);
path = common.formatMap(
'{operationName}',
body['_url'] as Record<string, unknown>,
);
queryParams = body['_query'] as Record<string, string>;
delete body['_url'];
delete body['_query'];
delete body['config'];
response = this.apiClient
.request({
path: path,
queryParams: queryParams,
body: JSON.stringify(body),
httpMethod: 'GET',
httpOptions: params.config?.httpOptions,
abortSignal: params.config?.abortSignal,
})
.then((httpResponse) => {
return httpResponse.json();
}) as Promise<types.AgentEngineSandboxOperation>;
return response.then((resp) => {
return resp as types.AgentEngineSandboxOperation;
});
} else {
throw new Error(
'This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).',
);
}
}
}
================================================
FILE: src/sessionevents.ts
================================================
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
// Code generated by the Google Gen AI SDK generator DO NOT EDIT.
import * as common from '@google/genai/vertex_internal';
import {ApiClient, BaseModule} from '@google/genai/vertex_interna
gitextract_z_dw_qc9/
├── .eslintignore
├── .eslintrc.json
├── .github/
│ ├── CODEOWNERS
│ ├── release-please.yml
│ ├── release-trigger.yml
│ ├── sync-repo-settings.yaml
│ └── workflows/
│ └── presubmit.yaml
├── .gitignore
├── .jsdoc.js
├── .kokoro/
│ ├── docs.sh
│ ├── populate-secrets.sh
│ ├── presubmit/
│ │ ├── node18/
│ │ │ ├── common.cfg
│ │ │ ├── continuous-system-test.cfg
│ │ │ ├── docs.cfg
│ │ │ ├── docs.sh
│ │ │ └── system-test.cfg
│ │ └── node22/
│ │ ├── common.cfg
│ │ ├── docs.cfg
│ │ ├── docs.sh
│ │ └── system-test.cfg
│ ├── publish.sh
│ ├── system-test.sh
│ ├── test.sh
│ └── trampoline_v2.sh
├── .prettierignore
├── .prettierrc.js
├── .release-please-manifest.json
├── .repo-metadata.json
├── .trampolinerc
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── SECURITY.md
├── package.json
├── release-please-config.json
├── src/
│ ├── .prettierignore
│ ├── .prettierrc
│ ├── _internal_types.ts
│ ├── agentengines.ts
│ ├── client.ts
│ ├── converters/
│ │ ├── _agentengines_converters.ts
│ │ ├── _memories_converters.ts
│ │ ├── _memoryrevisions_converters.ts
│ │ ├── _sandboxes_converters.ts
│ │ ├── _sessionevents_converters.ts
│ │ ├── _sessions_converters.ts
│ │ └── _skills_converters.ts
│ ├── eslint.config.mjs
│ ├── index.ts
│ ├── memories.ts
│ ├── memoryrevisions.ts
│ ├── releases.txt
│ ├── sandboxes.ts
│ ├── sessionevents.ts
│ ├── sessions.ts
│ ├── skills.ts
│ ├── types/
│ │ └── common.ts
│ └── types.ts
├── system_test/
│ └── agent_engine_e2e_test.ts
├── test/
│ ├── replays/
│ │ ├── _replay_client.ts
│ │ ├── agentengines_memories_test.ts
│ │ ├── agentengines_sandboxes_test.ts
│ │ ├── agentengines_sessions_test.ts
│ │ ├── agentengines_test.ts
│ │ ├── run_replay_tests.sh
│ │ ├── sessionevents_test.ts
│ │ ├── skills_test.ts
│ │ └── test_env.js
│ ├── spec/
│ │ └── reporter.js
│ └── unit/
│ └── client_test.ts
├── tsconfig.json
└── vertexai/
├── .eslintrc.json
├── README.md
├── package.json
├── src/
│ ├── functions/
│ │ ├── count_tokens.ts
│ │ ├── generate_content.ts
│ │ ├── index.ts
│ │ ├── post_fetch_processing.ts
│ │ ├── post_request.ts
│ │ ├── pre_fetch_processing.ts
│ │ ├── test/
│ │ │ ├── functions_test.ts
│ │ │ ├── post_fetch_processing_test.ts
│ │ │ ├── post_request_test.ts
│ │ │ ├── pre_fetch_processing_test.ts
│ │ │ └── test_data.ts
│ │ └── util.ts
│ ├── index.ts
│ ├── models/
│ │ ├── chat_session.ts
│ │ ├── generative_models.ts
│ │ ├── index.ts
│ │ ├── test/
│ │ │ ├── chat_session_test.ts
│ │ │ ├── generative_models_test.ts
│ │ │ └── models_test.ts
│ │ └── util.ts
│ ├── resources/
│ │ ├── cached_contents.ts
│ │ ├── index.ts
│ │ └── shared/
│ │ └── api_client.ts
│ ├── testing/
│ │ ├── fake_google_auth.ts
│ │ └── fake_google_auth_test.ts
│ ├── types/
│ │ ├── common.ts
│ │ ├── content.ts
│ │ ├── errors.ts
│ │ ├── generate_content_response_handler.ts
│ │ ├── index.ts
│ │ └── tool.ts
│ ├── util/
│ │ ├── constants.ts
│ │ └── index.ts
│ └── vertex_ai.ts
├── system_test/
│ └── end_to_end_sample_test.ts
├── test/
│ ├── index_test.ts
│ └── vertex_ai_test.ts
└── tsconfig.json
SYMBOL INDEX (705 symbols across 47 files)
FILE: src/agentengines.ts
class AgentEngines (line 17) | class AgentEngines extends BaseModule {
method constructor (line 22) | constructor(private readonly apiClient: ApiClient) {
method createInternal (line 29) | async createInternal(
method deleteInternal (line 73) | async deleteInternal(
method getInternal (line 115) | async getInternal(
method listInternal (line 158) | async listInternal(
method getAgentOperationInternal (line 203) | async getAgentOperationInternal(
method queryInternal (line 246) | async queryInternal(
method updateInternal (line 289) | async updateInternal(
FILE: src/client.ts
constant SDK_VERSION (line 11) | const SDK_VERSION = '0.6.0';
class Client (line 15) | class Client {
method constructor (line 20) | constructor(
method agentEnginesInternal (line 69) | public get agentEnginesInternal(): AgentEngines {
FILE: src/converters/_agentengines_converters.ts
function agentEngineOperationFromVertex (line 12) | function agentEngineOperationFromVertex(
function createAgentEngineConfigToVertex (line 49) | function createAgentEngineConfigToVertex(
function createAgentEngineRequestParametersToVertex (line 170) | function createAgentEngineRequestParametersToVertex(
function deleteAgentEngineRequestParametersToVertex (line 183) | function deleteAgentEngineRequestParametersToVertex(
function getAgentEngineOperationParametersToVertex (line 201) | function getAgentEngineOperationParametersToVertex(
function getAgentEngineRequestParametersToVertex (line 220) | function getAgentEngineRequestParametersToVertex(
function listAgentEngineConfigToVertex (line 233) | function listAgentEngineConfigToVertex(
function listAgentEngineRequestParametersToVertex (line 257) | function listAgentEngineRequestParametersToVertex(
function listReasoningEnginesResponseFromVertex (line 270) | function listReasoningEnginesResponseFromVertex(
function queryAgentEngineConfigToVertex (line 305) | function queryAgentEngineConfigToVertex(
function queryAgentEngineRequestParametersToVertex (line 331) | function queryAgentEngineRequestParametersToVertex(
function reasoningEngineContextSpecFromVertex (line 349) | function reasoningEngineContextSpecFromVertex(
function reasoningEngineContextSpecMemoryBankConfigFromVertex (line 370) | function reasoningEngineContextSpecMemoryBankConfigFromVertex(
function reasoningEngineContextSpecMemoryBankConfigToVertex (line 442) | function reasoningEngineContextSpecMemoryBankConfigToVertex(
function reasoningEngineContextSpecToVertex (line 514) | function reasoningEngineContextSpecToVertex(
function reasoningEngineFromVertex (line 533) | function reasoningEngineFromVertex(
function structuredMemoryConfigFromVertex (line 604) | function structuredMemoryConfigFromVertex(
function structuredMemoryConfigToVertex (line 630) | function structuredMemoryConfigToVertex(
function structuredMemorySchemaConfigFromVertex (line 656) | function structuredMemorySchemaConfigFromVertex(
function structuredMemorySchemaConfigToVertex (line 679) | function structuredMemorySchemaConfigToVertex(
function updateAgentEngineConfigToVertex (line 702) | function updateAgentEngineConfigToVertex(
function updateAgentEngineRequestParametersToVertex (line 832) | function updateAgentEngineRequestParametersToVertex(
FILE: src/converters/_memories_converters.ts
function agentEngineMemoryConfigToVertex (line 12) | function agentEngineMemoryConfigToVertex(
function createAgentEngineMemoryRequestParametersToVertex (line 89) | function createAgentEngineMemoryRequestParametersToVertex(
function deleteAgentEngineMemoryRequestParametersToVertex (line 117) | function deleteAgentEngineMemoryRequestParametersToVertex(
function generateAgentEngineMemoriesConfigToVertex (line 130) | function generateAgentEngineMemoriesConfigToVertex(
function generateAgentEngineMemoriesRequestParametersToVertex (line 213) | function generateAgentEngineMemoriesRequestParametersToVertex(
function getAgentEngineGenerateMemoriesOperationParametersToVertex (line 269) | function getAgentEngineGenerateMemoriesOperationParametersToVertex(
function getAgentEngineMemoryOperationParametersToVertex (line 288) | function getAgentEngineMemoryOperationParametersToVertex(
function getAgentEngineMemoryRequestParametersToVertex (line 307) | function getAgentEngineMemoryRequestParametersToVertex(
function ingestEventsConfigToVertex (line 320) | function ingestEventsConfigToVertex(
function ingestEventsRequestParametersToVertex (line 334) | function ingestEventsRequestParametersToVertex(
function listAgentEngineMemoryConfigToVertex (line 384) | function listAgentEngineMemoryConfigToVertex(
function listAgentEngineMemoryRequestParametersToVertex (line 413) | function listAgentEngineMemoryRequestParametersToVertex(
function purgeAgentEngineMemoriesRequestParametersToVertex (line 431) | function purgeAgentEngineMemoriesRequestParametersToVertex(
function retrieveAgentEngineMemoriesConfigToVertex (line 465) | function retrieveAgentEngineMemoriesConfigToVertex(
function retrieveAgentEngineMemoriesRequestParametersToVertex (line 495) | function retrieveAgentEngineMemoriesRequestParametersToVertex(
function retrieveMemoryProfilesRequestParametersToVertex (line 540) | function retrieveMemoryProfilesRequestParametersToVertex(
function rollbackAgentEngineMemoryRequestParametersToVertex (line 558) | function rollbackAgentEngineMemoryRequestParametersToVertex(
function updateAgentEngineMemoryConfigToVertex (line 578) | function updateAgentEngineMemoryConfigToVertex(
function updateAgentEngineMemoryRequestParametersToVertex (line 664) | function updateAgentEngineMemoryRequestParametersToVertex(
FILE: src/converters/_memoryrevisions_converters.ts
function getAgentEngineMemoryRevisionRequestParametersToVertex (line 12) | function getAgentEngineMemoryRevisionRequestParametersToVertex(
function listAgentEngineMemoryRevisionsConfigToVertex (line 25) | function listAgentEngineMemoryRevisionsConfigToVertex(
function listAgentEngineMemoryRevisionsRequestParametersToVertex (line 49) | function listAgentEngineMemoryRevisionsRequestParametersToVertex(
FILE: src/converters/_sandboxes_converters.ts
function createAgentEngineSandboxConfigToVertex (line 12) | function createAgentEngineSandboxConfigToVertex(
function createAgentEngineSandboxRequestParametersToVertex (line 63) | function createAgentEngineSandboxRequestParametersToVertex(
function deleteAgentEngineSandboxRequestParametersToVertex (line 86) | function deleteAgentEngineSandboxRequestParametersToVertex(
function executeCodeAgentEngineSandboxRequestParametersToVertex (line 99) | function executeCodeAgentEngineSandboxRequestParametersToVertex(
function getAgentEngineSandboxOperationParametersToVertex (line 123) | function getAgentEngineSandboxOperationParametersToVertex(
function getAgentEngineSandboxRequestParametersToVertex (line 142) | function getAgentEngineSandboxRequestParametersToVertex(
function listAgentEngineSandboxesConfigToVertex (line 155) | function listAgentEngineSandboxesConfigToVertex(
function listAgentEngineSandboxesRequestParametersToVertex (line 179) | function listAgentEngineSandboxesRequestParametersToVertex(
FILE: src/converters/_sessionevents_converters.ts
function appendAgentEngineSessionEventConfigToVertex (line 12) | function appendAgentEngineSessionEventConfigToVertex(
function appendAgentEngineSessionEventRequestParametersToVertex (line 53) | function appendAgentEngineSessionEventRequestParametersToVertex(
function listAgentEngineSessionEventsConfigToVertex (line 86) | function listAgentEngineSessionEventsConfigToVertex(
function listAgentEngineSessionEventsRequestParametersToVertex (line 110) | function listAgentEngineSessionEventsRequestParametersToVertex(
FILE: src/converters/_sessions_converters.ts
function createAgentEngineSessionConfigToVertex (line 12) | function createAgentEngineSessionConfigToVertex(
function createAgentEngineSessionRequestParametersToVertex (line 51) | function createAgentEngineSessionRequestParametersToVertex(
function deleteAgentEngineSessionRequestParametersToVertex (line 74) | function deleteAgentEngineSessionRequestParametersToVertex(
function getAgentEngineSessionOperationParametersToVertex (line 87) | function getAgentEngineSessionOperationParametersToVertex(
function getAgentEngineSessionRequestParametersToVertex (line 106) | function getAgentEngineSessionRequestParametersToVertex(
function listAgentEngineSessionsConfigToVertex (line 119) | function listAgentEngineSessionsConfigToVertex(
function listAgentEngineSessionsRequestParametersToVertex (line 143) | function listAgentEngineSessionsRequestParametersToVertex(
function updateAgentEngineSessionConfigToVertex (line 161) | function updateAgentEngineSessionConfigToVertex(
function updateAgentEngineSessionRequestParametersToVertex (line 214) | function updateAgentEngineSessionRequestParametersToVertex(
FILE: src/converters/_skills_converters.ts
function getSkillRequestParametersToVertex (line 12) | function getSkillRequestParametersToVertex(
FILE: src/memories.ts
class Memories (line 15) | class Memories extends BaseModule {
method constructor (line 18) | constructor(private readonly apiClient: ApiClient) {
method createInternal (line 23) | async createInternal(
method delete (line 65) | async delete(
method generateInternal (line 107) | async generateInternal(
method get (line 149) | async get(
method ingestEventsInternal (line 191) | async ingestEventsInternal(
method listInternal (line 232) | async listInternal(
method getMemoryOperationInternal (line 276) | async getMemoryOperationInternal(
method getGenerateMemoriesOperationInternal (line 318) | async getGenerateMemoriesOperationInternal(
method retrieveInternal (line 362) | async retrieveInternal(
method retrieveProfiles (line 406) | async retrieveProfiles(
method rollbackInternal (line 450) | async rollbackInternal(
method updateInternal (line 492) | async updateInternal(
method purgeInternal (line 534) | async purgeInternal(
FILE: src/memoryrevisions.ts
class MemoryRevisions (line 14) | class MemoryRevisions extends BaseModule {
method constructor (line 15) | constructor(private readonly apiClient: ApiClient) {
method get (line 19) | async get(
method listInternal (line 63) | async listInternal(
FILE: src/sandboxes.ts
class Sandboxes (line 14) | class Sandboxes extends BaseModule {
method constructor (line 15) | constructor(private readonly apiClient: ApiClient) {
method createInternal (line 19) | async createInternal(
method deleteInternal (line 61) | async deleteInternal(
method executeCodeInternal (line 103) | async executeCodeInternal(
method getInternal (line 149) | async getInternal(
method listInternal (line 191) | async listInternal(
method getSandboxOperationInternal (line 235) | async getSandboxOperationInternal(
FILE: src/sessionevents.ts
class SessionEvents (line 14) | class SessionEvents extends BaseModule {
method constructor (line 15) | constructor(private readonly apiClient: ApiClient) {
method append (line 19) | async append(
method listInternal (line 65) | async listInternal(
FILE: src/sessions.ts
class Sessions (line 15) | class Sessions extends BaseModule {
method constructor (line 18) | constructor(private readonly apiClient: ApiClient) {
method createInternal (line 23) | async createInternal(
method delete (line 65) | async delete(
method get (line 107) | async get(
method listInternal (line 149) | async listInternal(
method getSessionOperationInternal (line 193) | async getSessionOperationInternal(
method updateInternal (line 235) | async updateInternal(
FILE: src/skills.ts
class Skills (line 14) | class Skills extends BaseModule {
method constructor (line 15) | constructor(private readonly apiClient: ApiClient) {
method get (line 19) | async get(params: types.GetSkillRequestParameters): Promise<types.Skil...
FILE: src/types/common.ts
type IdentityType (line 12) | enum IdentityType {
type AgentServerMode (line 28) | enum AgentServerMode {
type ManagedTopicEnum (line 44) | enum ManagedTopicEnum {
type MemoryType (line 68) | enum MemoryType {
type Operator (line 84) | enum Operator {
type Language (line 104) | enum Language {
type MachineConfig (line 120) | enum MachineConfig {
type SandboxState (line 132) | enum SandboxState {
type SkillState (line 160) | enum SkillState {
type Framework (line 184) | enum Framework {
type State (line 200) | enum State {
type MemoryMetadataMergeStrategy (line 216) | enum MemoryMetadataMergeStrategy {
type GenerateMemoriesResponseGeneratedMemoryAction (line 236) | enum GenerateMemoriesResponseGeneratedMemoryAction {
type EnvVar (line 256) | interface EnvVar {
type DnsPeeringConfig (line 264) | interface DnsPeeringConfig {
type PscInterfaceConfig (line 274) | interface PscInterfaceConfig {
type SecretRef (line 282) | interface SecretRef {
type SecretEnvVar (line 290) | interface SecretEnvVar {
type ReasoningEngineSpecDeploymentSpecAgentGatewayConfigAgentToAnywhereConfig (line 298) | interface ReasoningEngineSpecDeploymentSpecAgentGatewayConfigAgentToAnyw...
type ReasoningEngineSpecDeploymentSpecAgentGatewayConfigClientToAgentConfig (line 304) | interface ReasoningEngineSpecDeploymentSpecAgentGatewayConfigClientToAge...
type ReasoningEngineSpecDeploymentSpecAgentGatewayConfig (line 310) | interface ReasoningEngineSpecDeploymentSpecAgentGatewayConfig {
type KeepAliveProbeHttpGet (line 318) | interface KeepAliveProbeHttpGet {
type KeepAliveProbe (line 326) | interface KeepAliveProbe {
type ReasoningEngineSpecDeploymentSpec (line 334) | interface ReasoningEngineSpecDeploymentSpec {
type ReasoningEngineSpecPackageSpec (line 358) | interface ReasoningEngineSpecPackageSpec {
type ReasoningEngineSpecSourceCodeSpecAgentConfigSourceAdkConfig (line 370) | interface ReasoningEngineSpecSourceCodeSpecAgentConfigSourceAdkConfig {
type ReasoningEngineSpecSourceCodeSpecInlineSource (line 376) | interface ReasoningEngineSpecSourceCodeSpecInlineSource {
type ReasoningEngineSpecSourceCodeSpecAgentConfigSource (line 383) | interface ReasoningEngineSpecSourceCodeSpecAgentConfigSource {
type ReasoningEngineSpecSourceCodeSpecDeveloperConnectConfig (line 393) | interface ReasoningEngineSpecSourceCodeSpecDeveloperConnectConfig {
type ReasoningEngineSpecSourceCodeSpecDeveloperConnectSource (line 403) | interface ReasoningEngineSpecSourceCodeSpecDeveloperConnectSource {
type ReasoningEngineSpecSourceCodeSpecImageSpec (line 409) | interface ReasoningEngineSpecSourceCodeSpecImageSpec {
type ReasoningEngineSpecSourceCodeSpecPythonSpec (line 415) | interface ReasoningEngineSpecSourceCodeSpecPythonSpec {
type ReasoningEngineSpecSourceCodeSpec (line 427) | interface ReasoningEngineSpecSourceCodeSpec {
type ReasoningEngineSpecContainerSpec (line 441) | interface ReasoningEngineSpecContainerSpec {
type ReasoningEngineSpec (line 447) | interface ReasoningEngineSpec {
type MemoryBankCustomizationConfigGenerateMemoriesExampleConversationSourceEvent (line 471) | interface MemoryBankCustomizationConfigGenerateMemoriesExampleConversati...
type MemoryBankCustomizationConfigGenerateMemoriesExampleConversationSource (line 477) | interface MemoryBankCustomizationConfigGenerateMemoriesExampleConversati...
type MemoryTopicId (line 483) | interface MemoryTopicId {
type MemoryBankCustomizationConfigGenerateMemoriesExampleGeneratedMemory (line 491) | interface MemoryBankCustomizationConfigGenerateMemoriesExampleGeneratedM...
type MemoryBankCustomizationConfigGenerateMemoriesExample (line 499) | interface MemoryBankCustomizationConfigGenerateMemoriesExample {
type MemoryBankCustomizationConfigMemoryTopicCustomMemoryTopic (line 507) | interface MemoryBankCustomizationConfigMemoryTopicCustomMemoryTopic {
type MemoryBankCustomizationConfigMemoryTopicManagedMemoryTopic (line 515) | interface MemoryBankCustomizationConfigMemoryTopicManagedMemoryTopic {
type MemoryBankCustomizationConfigMemoryTopic (line 521) | interface MemoryBankCustomizationConfigMemoryTopic {
type MemoryBankCustomizationConfigConsolidationConfig (line 529) | interface MemoryBankCustomizationConfigConsolidationConfig {
type MemoryBankCustomizationConfig (line 535) | interface MemoryBankCustomizationConfig {
type MemoryGenerationTriggerConfigGenerationTriggerRule (line 551) | interface MemoryGenerationTriggerConfigGenerationTriggerRule {
type MemoryGenerationTriggerConfig (line 561) | interface MemoryGenerationTriggerConfig {
type ReasoningEngineContextSpecMemoryBankConfigGenerationConfig (line 567) | interface ReasoningEngineContextSpecMemoryBankConfigGenerationConfig {
type ReasoningEngineContextSpecMemoryBankConfigSimilaritySearchConfig (line 575) | interface ReasoningEngineContextSpecMemoryBankConfigSimilaritySearchConf...
type ReasoningEngineContextSpecMemoryBankConfigTtlConfigGranularTtlConfig (line 581) | interface ReasoningEngineContextSpecMemoryBankConfigTtlConfigGranularTtl...
type ReasoningEngineContextSpecMemoryBankConfigTtlConfig (line 591) | interface ReasoningEngineContextSpecMemoryBankConfigTtlConfig {
type StructuredMemorySchemaConfig (line 601) | interface StructuredMemorySchemaConfig {
type StructuredMemoryConfig (line 611) | interface StructuredMemoryConfig {
type ReasoningEngineContextSpecMemoryBankConfig (line 619) | interface ReasoningEngineContextSpecMemoryBankConfig {
type ReasoningEngineContextSpec (line 635) | interface ReasoningEngineContextSpec {
type CreateAgentEngineConfig (line 641) | interface CreateAgentEngineConfig {
type CreateAgentEngineRequestParameters (line 765) | interface CreateAgentEngineRequestParameters {
type ReasoningEngineTrafficConfigTrafficSplitAlwaysLatest (line 770) | interface ReasoningEngineTrafficConfigTrafficSplitAlwaysLatest {}
type ReasoningEngineTrafficConfigTrafficSplitManualTarget (line 773) | interface ReasoningEngineTrafficConfigTrafficSplitManualTarget {
type ReasoningEngineTrafficConfigTrafficSplitManual (line 781) | interface ReasoningEngineTrafficConfigTrafficSplitManual {
type ReasoningEngineTrafficConfig (line 787) | interface ReasoningEngineTrafficConfig {
type ReasoningEngine (line 795) | interface ReasoningEngine {
type AgentEngineOperation (line 821) | interface AgentEngineOperation {
type DeleteAgentEngineConfig (line 835) | interface DeleteAgentEngineConfig {
type DeleteAgentEngineRequestParameters (line 848) | interface DeleteAgentEngineRequestParameters {
type DeleteAgentEngineOperation (line 857) | interface DeleteAgentEngineOperation {
type GetAgentEngineConfig (line 869) | interface GetAgentEngineConfig {
type GetAgentEngineRequestParameters (line 882) | interface GetAgentEngineRequestParameters {
type ListAgentEngineConfig (line 889) | interface ListAgentEngineConfig {
type ListAgentEngineRequestParameters (line 907) | interface ListAgentEngineRequestParameters {
class ListReasoningEnginesResponse (line 912) | class ListReasoningEnginesResponse {
type GetAgentEngineOperationConfig (line 921) | interface GetAgentEngineOperationConfig {
type GetAgentEngineOperationParameters (line 934) | interface GetAgentEngineOperationParameters {
type QueryAgentEngineConfig (line 942) | interface QueryAgentEngineConfig {
type QueryAgentEngineRequestParameters (line 960) | interface QueryAgentEngineRequestParameters {
class QueryReasoningEngineResponse (line 967) | class QueryReasoningEngineResponse {
type UpdateAgentEngineConfig (line 973) | interface UpdateAgentEngineConfig {
type UpdateAgentEngineRequestParameters (line 1100) | interface UpdateAgentEngineRequestParameters {
type MemoryMetadataValue (line 1107) | interface MemoryMetadataValue {
type AgentEngineMemoryConfig (line 1119) | interface AgentEngineMemoryConfig {
type CreateAgentEngineMemoryRequestParameters (line 1156) | interface CreateAgentEngineMemoryRequestParameters {
type MemoryStructuredContent (line 1173) | interface MemoryStructuredContent {
type Memory (line 1181) | interface Memory {
type AgentEngineMemoryOperation (line 1219) | interface AgentEngineMemoryOperation {
type DeleteAgentEngineMemoryConfig (line 1233) | interface DeleteAgentEngineMemoryConfig {
type DeleteAgentEngineMemoryRequestParameters (line 1246) | interface DeleteAgentEngineMemoryRequestParameters {
type DeleteAgentEngineMemoryOperation (line 1253) | interface DeleteAgentEngineMemoryOperation {
type GenerateMemoriesRequestVertexSessionSource (line 1265) | interface GenerateMemoriesRequestVertexSessionSource {
type GenerateMemoriesRequestDirectContentsSourceEvent (line 1274) | interface GenerateMemoriesRequestDirectContentsSourceEvent {
type GenerateMemoriesRequestDirectContentsSource (line 1280) | interface GenerateMemoriesRequestDirectContentsSource {
type GenerateMemoriesRequestDirectMemoriesSourceDirectMemory (line 1286) | interface GenerateMemoriesRequestDirectMemoriesSourceDirectMemory {
type GenerateMemoriesRequestDirectMemoriesSource (line 1294) | interface GenerateMemoriesRequestDirectMemoriesSource {
type GenerateAgentEngineMemoriesConfig (line 1300) | interface GenerateAgentEngineMemoriesConfig {
type GenerateAgentEngineMemoriesRequestParameters (line 1336) | interface GenerateAgentEngineMemoriesRequestParameters {
class GenerateMemoriesResponseGeneratedMemory (line 1356) | class GenerateMemoriesResponseGeneratedMemory {
class GenerateMemoriesResponse (line 1370) | class GenerateMemoriesResponse {
type AgentEngineGenerateMemoriesOperation (line 1376) | interface AgentEngineGenerateMemoriesOperation {
type GetAgentEngineMemoryConfig (line 1390) | interface GetAgentEngineMemoryConfig {
type GetAgentEngineMemoryRequestParameters (line 1403) | interface GetAgentEngineMemoryRequestParameters {
type IngestionDirectContentsSourceEvent (line 1410) | interface IngestionDirectContentsSourceEvent {
type IngestionDirectContentsSource (line 1420) | interface IngestionDirectContentsSource {
type IngestEventsConfig (line 1426) | interface IngestEventsConfig {
type IngestEventsRequestParameters (line 1444) | interface IngestEventsRequestParameters {
type MemoryBankIngestEventsOperation (line 1462) | interface MemoryBankIngestEventsOperation {
type ListAgentEngineMemoryConfig (line 1474) | interface ListAgentEngineMemoryConfig {
type ListAgentEngineMemoryRequestParameters (line 1501) | interface ListAgentEngineMemoryRequestParameters {
class ListReasoningEnginesMemoriesResponse (line 1508) | class ListReasoningEnginesMemoriesResponse {
type GetAgentEngineMemoryOperationParameters (line 1517) | interface GetAgentEngineMemoryOperationParameters {
type GetAgentEngineGenerateMemoriesOperationParameters (line 1525) | interface GetAgentEngineGenerateMemoriesOperationParameters {
type RetrieveMemoriesRequestSimilaritySearchParams (line 1533) | interface RetrieveMemoriesRequestSimilaritySearchParams {
type RetrieveMemoriesRequestSimpleRetrievalParams (line 1541) | interface RetrieveMemoriesRequestSimpleRetrievalParams {
type MemoryFilter (line 1549) | interface MemoryFilter {
type MemoryConjunctionFilter (line 1561) | interface MemoryConjunctionFilter {
type RetrieveAgentEngineMemoriesConfig (line 1567) | interface RetrieveAgentEngineMemoriesConfig {
type RetrieveAgentEngineMemoriesRequestParameters (line 1609) | interface RetrieveAgentEngineMemoriesRequestParameters {
class RetrieveMemoriesResponseRetrievedMemory (line 1626) | class RetrieveMemoriesResponseRetrievedMemory {
class RetrieveMemoriesResponse (line 1634) | class RetrieveMemoriesResponse {
type RetrieveMemoryProfilesConfig (line 1642) | interface RetrieveMemoryProfilesConfig {
type RetrieveMemoryProfilesRequestParameters (line 1655) | interface RetrieveMemoryProfilesRequestParameters {
type MemoryProfile (line 1668) | interface MemoryProfile {
class RetrieveProfilesResponse (line 1676) | class RetrieveProfilesResponse {
type RollbackAgentEngineMemoryConfig (line 1685) | interface RollbackAgentEngineMemoryConfig {
type RollbackAgentEngineMemoryRequestParameters (line 1700) | interface RollbackAgentEngineMemoryRequestParameters {
type AgentEngineRollbackMemoryOperation (line 1709) | interface AgentEngineRollbackMemoryOperation {
type UpdateAgentEngineMemoryConfig (line 1721) | interface UpdateAgentEngineMemoryConfig {
type UpdateAgentEngineMemoryRequestParameters (line 1761) | interface UpdateAgentEngineMemoryRequestParameters {
type PurgeAgentEngineMemoriesConfig (line 1778) | interface PurgeAgentEngineMemoriesConfig {
type PurgeAgentEngineMemoriesRequestParameters (line 1793) | interface PurgeAgentEngineMemoriesRequestParameters {
class PurgeMemoriesResponse (line 1820) | class PurgeMemoriesResponse {
type AgentEnginePurgeMemoriesOperation (line 1826) | interface AgentEnginePurgeMemoriesOperation {
type GetAgentEngineMemoryRevisionConfig (line 1840) | interface GetAgentEngineMemoryRevisionConfig {
type GetAgentEngineMemoryRevisionRequestParameters (line 1853) | interface GetAgentEngineMemoryRevisionRequestParameters {
type IntermediateExtractedMemory (line 1860) | interface IntermediateExtractedMemory {
type MemoryRevision (line 1870) | interface MemoryRevision {
type ListAgentEngineMemoryRevisionsConfig (line 1888) | interface ListAgentEngineMemoryRevisionsConfig {
type ListAgentEngineMemoryRevisionsRequestParameters (line 1906) | interface ListAgentEngineMemoryRevisionsRequestParameters {
class ListAgentEngineMemoryRevisionsResponse (line 1913) | class ListAgentEngineMemoryRevisionsResponse {
type SandboxEnvironmentSpecCodeExecutionEnvironment (line 1922) | interface SandboxEnvironmentSpecCodeExecutionEnvironment {
type SandboxEnvironmentSpecComputerUseEnvironment (line 1930) | interface SandboxEnvironmentSpecComputerUseEnvironment {}
type SandboxEnvironmentSpec (line 1933) | interface SandboxEnvironmentSpec {
type CreateAgentEngineSandboxConfig (line 1941) | interface CreateAgentEngineSandboxConfig {
type CreateAgentEngineSandboxRequestParameters (line 1970) | interface CreateAgentEngineSandboxRequestParameters {
type SandboxEnvironmentConnectionInfo (line 1979) | interface SandboxEnvironmentConnectionInfo {
type SandboxEnvironment (line 1993) | interface SandboxEnvironment {
type AgentEngineSandboxOperation (line 2024) | interface AgentEngineSandboxOperation {
type DeleteAgentEngineSandboxConfig (line 2038) | interface DeleteAgentEngineSandboxConfig {
type DeleteAgentEngineSandboxRequestParameters (line 2051) | interface DeleteAgentEngineSandboxRequestParameters {
type DeleteAgentEngineSandboxOperation (line 2058) | interface DeleteAgentEngineSandboxOperation {
type Metadata (line 2070) | interface Metadata {
type Chunk (line 2076) | interface Chunk {
type ExecuteCodeAgentEngineSandboxConfig (line 2087) | interface ExecuteCodeAgentEngineSandboxConfig {
type ExecuteCodeAgentEngineSandboxRequestParameters (line 2100) | interface ExecuteCodeAgentEngineSandboxRequestParameters {
class ExecuteSandboxEnvironmentResponse (line 2109) | class ExecuteSandboxEnvironmentResponse {
type GetAgentEngineSandboxConfig (line 2115) | interface GetAgentEngineSandboxConfig {
type GetAgentEngineSandboxRequestParameters (line 2128) | interface GetAgentEngineSandboxRequestParameters {
type ListAgentEngineSandboxesConfig (line 2135) | interface ListAgentEngineSandboxesConfig {
type ListAgentEngineSandboxesRequestParameters (line 2153) | interface ListAgentEngineSandboxesRequestParameters {
class ListAgentEngineSandboxesResponse (line 2160) | class ListAgentEngineSandboxesResponse {
type GetAgentEngineSandboxOperationParameters (line 2169) | interface GetAgentEngineSandboxOperationParameters {
type CreateAgentEngineSessionConfig (line 2177) | interface CreateAgentEngineSessionConfig {
type CreateAgentEngineSessionRequestParameters (line 2206) | interface CreateAgentEngineSessionRequestParameters {
type Session (line 2215) | interface Session {
type AgentEngineSessionOperation (line 2237) | interface AgentEngineSessionOperation {
type DeleteAgentEngineSessionConfig (line 2251) | interface DeleteAgentEngineSessionConfig {
type DeleteAgentEngineSessionRequestParameters (line 2264) | interface DeleteAgentEngineSessionRequestParameters {
type DeleteAgentEngineSessionOperation (line 2271) | interface DeleteAgentEngineSessionOperation {
type GetAgentEngineSessionConfig (line 2283) | interface GetAgentEngineSessionConfig {
type GetAgentEngineSessionRequestParameters (line 2296) | interface GetAgentEngineSessionRequestParameters {
type ListAgentEngineSessionsConfig (line 2303) | interface ListAgentEngineSessionsConfig {
type ListAgentEngineSessionsRequestParameters (line 2321) | interface ListAgentEngineSessionsRequestParameters {
class ListReasoningEnginesSessionsResponse (line 2328) | class ListReasoningEnginesSessionsResponse {
type GetAgentEngineSessionOperationParameters (line 2337) | interface GetAgentEngineSessionOperationParameters {
type UpdateAgentEngineSessionConfig (line 2345) | interface UpdateAgentEngineSessionConfig {
type UpdateAgentEngineSessionRequestParameters (line 2379) | interface UpdateAgentEngineSessionRequestParameters {
type EventActions (line 2386) | interface EventActions {
type EventMetadata (line 2402) | interface EventMetadata {
type AppendAgentEngineSessionEventConfig (line 2424) | interface AppendAgentEngineSessionEventConfig {
type AppendAgentEngineSessionEventRequestParameters (line 2449) | interface AppendAgentEngineSessionEventRequestParameters {
class AppendAgentEngineSessionEventResponse (line 2462) | class AppendAgentEngineSessionEventResponse {}
type ListAgentEngineSessionEventsConfig (line 2465) | interface ListAgentEngineSessionEventsConfig {
type ListAgentEngineSessionEventsRequestParameters (line 2483) | interface ListAgentEngineSessionEventsRequestParameters {
type SessionEvent (line 2490) | interface SessionEvent {
class ListAgentEngineSessionEventsResponse (line 2514) | class ListAgentEngineSessionEventsResponse {
type GetSkillConfig (line 2523) | interface GetSkillConfig {
type GetSkillRequestParameters (line 2536) | interface GetSkillRequestParameters {
type Skill (line 2545) | interface Skill {
type AgentEngine (line 2567) | interface AgentEngine {
type AgentEngineConfig (line 2577) | interface AgentEngineConfig {
type RunQueryJobAgentEngineConfig (line 2730) | interface RunQueryJobAgentEngineConfig {
type RunQueryJobResult (line 2752) | interface RunQueryJobResult {
type CancelQueryJobAgentEngineConfig (line 2771) | interface CancelQueryJobAgentEngineConfig {
type CancelQueryJobResult (line 2786) | interface CancelQueryJobResult {
type CheckQueryJobAgentEngineConfig (line 2799) | interface CheckQueryJobAgentEngineConfig {
type CheckQueryJobResult (line 2814) | interface CheckQueryJobResult {
class CheckQueryJobResponse (line 2835) | class CheckQueryJobResponse {
type SchemaPromptSpecAppBuilderDataLinkedResource (line 2850) | interface SchemaPromptSpecAppBuilderDataLinkedResource {
type SchemaPromptSpecAppBuilderData (line 2860) | interface SchemaPromptSpecAppBuilderData {
FILE: system_test/agent_engine_e2e_test.ts
constant PROJECT (line 10) | const PROJECT = process.env['GCLOUD_PROJECT'];
constant LOCATION (line 11) | const LOCATION = 'us-central1';
function pollOperation (line 13) | async function pollOperation(client: Client, operationName: string) {
FILE: test/replays/_replay_client.ts
class FakeAuth (line 16) | class FakeAuth {
method addAuthHeaders (line 17) | async addAuthHeaders(headers: Headers): Promise<void> {
class ReplayClient (line 27) | class ReplayClient extends Client {
method constructor (line 31) | constructor(options: {project: string; location: string}) {
method setupReplay (line 38) | setupReplay(replayFileName: string): jasmine.Spy {
method verifyInteraction (line 78) | verifyInteraction(index: number, actualArgs: any[]) {
method verifyResponse (line 108) | verifyResponse(index: number, actualResponse: any) {
method verifyAllInteractions (line 122) | verifyAllInteractions() {
function extractResponseFromPager (line 131) | function extractResponseFromPager(sdkResponse: any): any {
function snakeToCamel (line 138) | function snakeToCamel(str: string): string {
function normalizeRequest (line 142) | function normalizeRequest(request: RequestInit, url: string) {
function redactUrl (line 151) | function redactUrl(url: string) {
function normalizeHeaderName (line 159) | function normalizeHeaderName(headerName: string): string {
function normalizeHeaders (line 166) | function normalizeHeaders(headers: any) {
function normalizeBody (line 185) | function normalizeBody(body: string) {
function isObjectEmpty (line 195) | function isObjectEmpty(obj: unknown): boolean {
function assertMessagesEqual (line 212) | function assertMessagesEqual(actual: unknown, expected: unknown) {
FILE: test/spec/reporter.js
function TSJUnitXmlReporter (line 20) | function TSJUnitXmlReporter() {
FILE: vertexai/src/functions/count_tokens.ts
function countTokens (line 36) | async function countTokens(
FILE: vertexai/src/functions/generate_content.ts
function generateContent (line 50) | async function generateContent(
function generateContentStream (line 107) | async function generateContentStream(
FILE: vertexai/src/functions/post_fetch_processing.ts
function throwErrorIfNotOK (line 35) | async function throwErrorIfNotOK(response: Response | undefined) {
function processStream (line 86) | async function processStream(
function getResponsePromise (line 112) | async function getResponsePromise(
function getResponseStream (line 133) | function getResponseStream(
function aggregateResponses (line 188) | function aggregateResponses(
function aggregateCitationMetadataForCandidate (line 288) | function aggregateCitationMetadataForCandidate(
function aggregateGroundingMetadataForCandidate (line 311) | function aggregateGroundingMetadataForCandidate(
function addMissingIndexAndRole (line 359) | function addMissingIndexAndRole(
function processUnary (line 390) | async function processUnary(
function processCountTokenResponse (line 411) | async function processCountTokenResponse(
FILE: vertexai/src/functions/post_request.ts
constant API_BASE_PATH (line 18) | const API_BASE_PATH = 'aiplatform.googleapis.com';
constant GOOGLE_INTERNAL_ENDPOINT (line 19) | const GOOGLE_INTERNAL_ENDPOINT = 'googleapis.com';
constant AUTHORIZATION_HEADER (line 21) | const AUTHORIZATION_HEADER = 'Authorization';
constant CONTENT_TYPE_HEADER (line 22) | const CONTENT_TYPE_HEADER = 'Content-Type';
constant USER_AGENT_HEADER (line 23) | const USER_AGENT_HEADER = 'User-Agent';
constant X_GOOG_API_CLIENT_HEADER (line 24) | const X_GOOG_API_CLIENT_HEADER = 'X-Goog-Api-Client';
constant SERVER_RESERVED_HEADERS (line 25) | const SERVER_RESERVED_HEADERS = [AUTHORIZATION_HEADER, CONTENT_TYPE_HEAD...
function postRequest (line 39) | async function postRequest({
function getFetchOptions (line 84) | function getFetchOptions(requestOptions?: RequestOptions): RequestInit {
function stringHasLineBreak (line 100) | function stringHasLineBreak(header?: string | null): boolean {
function headersHasLineBreak (line 106) | function headersHasLineBreak(customHeaders?: Headers): boolean {
function getExtraHeaders (line 118) | function getExtraHeaders(
FILE: vertexai/src/functions/pre_fetch_processing.ts
function formatContentRequest (line 28) | function formatContentRequest(
function validateGenerateContentRequest (line 44) | function validateGenerateContentRequest(
function validateGenerationConfig (line 54) | function validateGenerationConfig(
function getApiVersion (line 65) | function getApiVersion(
function hasVertexRagStore (line 73) | function hasVertexRagStore(request: GenerateContentRequest): boolean {
function hasCachedContent (line 84) | function hasCachedContent(request: GenerateContentRequest): boolean {
function hasVertexAISearch (line 88) | function hasVertexAISearch(request: GenerateContentRequest): boolean {
FILE: vertexai/src/functions/test/functions_test.ts
constant TEST_LOCATION (line 43) | const TEST_LOCATION = 'test-location';
constant TEST_RESOURCE_PATH (line 44) | const TEST_RESOURCE_PATH = 'test-resource-path';
constant TEST_TOKEN (line 45) | const TEST_TOKEN = 'testtoken';
constant TEST_TOKEN_PROMISE (line 46) | const TEST_TOKEN_PROMISE = Promise.resolve(TEST_TOKEN);
constant TEST_API_ENDPOINT (line 47) | const TEST_API_ENDPOINT = 'test-api-endpoint';
constant TEST_CHAT_MESSAGE_TEXT (line 48) | const TEST_CHAT_MESSAGE_TEXT = 'How are you doing today?';
constant TEST_USER_CHAT_MESSAGE (line 49) | const TEST_USER_CHAT_MESSAGE = [
constant CONTENTS (line 53) | const CONTENTS = [
constant TEST_USER_CHAT_MESSAGE_WITH_GCS_FILE (line 60) | const TEST_USER_CHAT_MESSAGE_WITH_GCS_FILE = [
constant TEST_USER_CHAT_MESSAGE_WITH_INVALID_GCS_FILE (line 75) | const TEST_USER_CHAT_MESSAGE_WITH_INVALID_GCS_FILE = [
constant TEST_SAFETY_SETTINGS (line 85) | const TEST_SAFETY_SETTINGS: SafetySetting[] = [
constant TEST_REQUEST_OPTIONS (line 92) | const TEST_REQUEST_OPTIONS: RequestOptions = {
constant TEST_SAFETY_RATINGS (line 95) | const TEST_SAFETY_RATINGS: SafetyRating[] = [
constant TEST_GENERATION_CONFIG (line 101) | const TEST_GENERATION_CONFIG = {
constant TEST_CANDIDATES (line 105) | const TEST_CANDIDATES = [
constant TEST_MODEL_RESPONSE (line 126) | const TEST_MODEL_RESPONSE = {
constant TEST_CANDIDATE_WITH_INVALID_DATA (line 130) | const TEST_CANDIDATE_WITH_INVALID_DATA = [
constant TEST_MODEL_RESPONSE_WITH_INVALID_DATA (line 139) | const TEST_MODEL_RESPONSE_WITH_INVALID_DATA = {
constant TEST_FUNCTION_CALL_RESPONSE (line 142) | const TEST_FUNCTION_CALL_RESPONSE = {
constant TEST_CANDIDATES_WITH_FUNCTION_CALL (line 152) | const TEST_CANDIDATES_WITH_FUNCTION_CALL = [
constant TEST_MODEL_RESPONSE_WITH_FUNCTION_CALL (line 164) | const TEST_MODEL_RESPONSE_WITH_FUNCTION_CALL = {
constant TEST_ENDPOINT_BASE_PATH (line 168) | const TEST_ENDPOINT_BASE_PATH = 'test.googleapis.com';
constant TEST_GCS_FILENAME (line 169) | const TEST_GCS_FILENAME = 'gs://test_bucket/test_image.jpeg';
constant TEST_MULTIPART_MESSAGE (line 171) | const TEST_MULTIPART_MESSAGE = [
constant BASE_64_IMAGE (line 181) | const BASE_64_IMAGE =
constant INLINE_DATA_FILE_PART (line 183) | const INLINE_DATA_FILE_PART = {
constant TEST_MULTIPART_MESSAGE_BASE64 (line 190) | const TEST_MULTIPART_MESSAGE_BASE64 = [
constant TEST_EMPTY_TOOLS (line 197) | const TEST_EMPTY_TOOLS: Tool[] = [];
constant TEST_EMPTY_TOOL_CONFIG (line 199) | const TEST_EMPTY_TOOL_CONFIG: ToolConfig = {};
constant TEST_TOOLS_WITH_FUNCTION_DECLARATION (line 201) | const TEST_TOOLS_WITH_FUNCTION_DECLARATION: Tool[] = [
constant TEST_TOOLS_WITH_RAG (line 223) | const TEST_TOOLS_WITH_RAG: Tool[] = [
constant TEST_LABELS (line 229) | const TEST_LABELS: Record<string, string> = {
function buildFetchResponse (line 251) | function buildFetchResponse(body: any): Response {
FILE: vertexai/src/functions/test/post_fetch_processing_test.ts
constant LOCATION (line 48) | const LOCATION = 'location';
constant RESOURCE_PATH (line 49) | const RESOURCE_PATH = 'RESOURCE_PATH';
constant TOKEN (line 50) | const TOKEN = Promise.resolve('token');
constant GENERATE_CONTENT_REQUEST (line 51) | const GENERATE_CONTENT_REQUEST = 'generate_content_request';
constant COUNT_TOKEN_REQUEST (line 52) | const COUNT_TOKEN_REQUEST = {
FILE: vertexai/src/functions/test/pre_fetch_processing_test.ts
constant TOOL1 (line 24) | const TOOL1 = {retrieval: {vertexAiSearch: {datastore: 'datastore'}}} as...
constant TOOL2 (line 25) | const TOOL2 = {
constant TOOL3 (line 28) | const TOOL3 = {
constant VALID_TOOL_ERROR_MESSAGE (line 35) | const VALID_TOOL_ERROR_MESSAGE =
FILE: vertexai/src/functions/test/test_data.ts
constant STREAM_RESPONSE_CHUNKS_1 (line 22) | const STREAM_RESPONSE_CHUNKS_1: GenerateContentResponse[] = [
constant AGGREGATED_RESPONSE_STREAM_RESPONSE_CHUNKS_1 (line 386) | const AGGREGATED_RESPONSE_STREAM_RESPONSE_CHUNKS_1: GenerateContentRespo...
constant STREAM_RESPONSE_CHUNKS_2 (line 555) | const STREAM_RESPONSE_CHUNKS_2: GenerateContentResponse[] = [
constant AGGREGATED_RESPONSE_STREAM_RESPONSE_CHUNKS_2 (line 739) | const AGGREGATED_RESPONSE_STREAM_RESPONSE_CHUNKS_2: GenerateContentRespo...
constant STREAM_RESPONSE_CHUNKS_3 (line 854) | const STREAM_RESPONSE_CHUNKS_3: GenerateContentResponse[] = [
constant AGGREGATED_RESPONSE_STREAM_RESPONSE_CHUNKS_3 (line 869) | const AGGREGATED_RESPONSE_STREAM_RESPONSE_CHUNKS_3: GenerateContentRespo...
constant STREAM_RESPONSE_CHUNKS_4 (line 889) | const STREAM_RESPONSE_CHUNKS_4: GenerateContentResponse[] = [
constant AGGREGATED_RESPONSE_STREAM_RESPONSE_CHUNKS_4 (line 895) | const AGGREGATED_RESPONSE_STREAM_RESPONSE_CHUNKS_4: GenerateContentRespo...
constant STREAM_RESPONSE_CHUNKS_5 (line 908) | const STREAM_RESPONSE_CHUNKS_5: GenerateContentResponse[] = [
constant AGGREGATED_RESPONSE_STREAM_RESPONSE_CHUNKS_5 (line 932) | const AGGREGATED_RESPONSE_STREAM_RESPONSE_CHUNKS_5: GenerateContentRespo...
constant STREAM_RESPONSE_CHUNKS_6 (line 948) | const STREAM_RESPONSE_CHUNKS_6: GenerateContentResponse[] = [
constant AGGREGATED_RESPONSE_STREAM_RESPONSE_CHUNKS_6 (line 960) | const AGGREGATED_RESPONSE_STREAM_RESPONSE_CHUNKS_6: GenerateContentRespo...
constant UNARY_RESPONSE_1 (line 973) | const UNARY_RESPONSE_1: GenerateContentResponse = {
constant UNARY_RESPONSE_MISSING_ROLE_INDEX (line 1078) | const UNARY_RESPONSE_MISSING_ROLE_INDEX: GenerateContentResponse = {
constant COUNT_TOKENS_RESPONSE_1 (line 1180) | const COUNT_TOKENS_RESPONSE_1: CountTokensResponse = {
FILE: vertexai/src/functions/util.ts
function formulateSystemInstructionIntoContent (line 21) | function formulateSystemInstructionIntoContent(
FILE: vertexai/src/models/chat_session.ts
class ChatSession (line 50) | class ChatSession {
method getHistory (line 65) | async getHistory(): Promise<Content[]> {
method constructor (line 73) | constructor(
method fetchToken (line 100) | private fetchToken(): Promise<string | null | undefined> {
method sendMessage (line 126) | async sendMessage(
method appendHistory (line 168) | private async appendHistory(
method sendMessageStream (line 211) | async sendMessageStream(
class ChatSessionPreview (line 260) | class ChatSessionPreview {
method getHistory (line 276) | async getHistory(): Promise<Content[]> {
method constructor (line 284) | constructor(
method fetchToken (line 311) | private fetchToken(): Promise<string | null | undefined> {
method sendMessage (line 337) | async sendMessage(
method appendHistory (line 381) | private async appendHistory(
method sendMessageStream (line 424) | async sendMessageStream(
function formulateNewContentFromSendMessageRequest (line 466) | function formulateNewContentFromSendMessageRequest(
function assignRoleToPartsAndValidateSendMessageRequest (line 494) | function assignRoleToPartsAndValidateSendMessageRequest(
FILE: vertexai/src/models/generative_models.ts
class GenerativeModel (line 55) | class GenerativeModel {
method constructor (line 74) | constructor(getGenerativeModelParams: GetGenerativeModelParams) {
method fetchToken (line 104) | private fetchToken(): Promise<string | null | undefined> {
method generateContent (line 129) | async generateContent(
method generateContentStream (line 176) | async generateContentStream(
method countTokens (line 217) | async countTokens(request: CountTokensRequest): Promise<CountTokensRes...
method startChat (line 252) | startChat(request?: StartChatParams): ChatSession {
class GenerativeModelPreview (line 286) | class GenerativeModelPreview {
method constructor (line 306) | constructor(getGenerativeModelParams: GetGenerativeModelParams) {
method fetchToken (line 337) | private fetchToken(): Promise<string | null | undefined> {
method generateContent (line 361) | async generateContent(
method generateContentStream (line 410) | async generateContentStream(
method countTokens (line 453) | async countTokens(request: CountTokensRequest): Promise<CountTokensRes...
method startChat (line 488) | startChat(request?: StartChatParams): ChatSessionPreview {
method getModelName (line 517) | getModelName(): string {
method getCachedContent (line 521) | getCachedContent(): CachedContent | undefined {
method getSystemInstruction (line 525) | getSystemInstruction(): Content | undefined {
function formulateResourcePathFromModel (line 530) | function formulateResourcePathFromModel(
function formulateRequestToGenerateContentRequest (line 557) | function formulateRequestToGenerateContentRequest(
function formulateSystemInstructionIntoGenerateContentRequest (line 568) | function formulateSystemInstructionIntoGenerateContentRequest(
FILE: vertexai/src/models/test/chat_session_test.ts
constant PROJECT (line 36) | const PROJECT = 'test_project';
constant LOCATION (line 37) | const LOCATION = 'test_location';
constant TEST_TOKEN (line 38) | const TEST_TOKEN = 'testtoken';
constant FAKE_GOOGLE_AUTH (line 39) | const FAKE_GOOGLE_AUTH = createFakeGoogleAuth({
constant TEST_SAFETY_SETTINGS (line 43) | const TEST_SAFETY_SETTINGS: SafetySetting[] = [
constant TEST_GENERATION_CONFIG (line 49) | const TEST_GENERATION_CONFIG = {
constant TEST_ENDPOINT_BASE_PATH (line 53) | const TEST_ENDPOINT_BASE_PATH = 'test.googleapis.com';
constant TEST_TOOLS_WITH_FUNCTION_DECLARATION (line 54) | const TEST_TOOLS_WITH_FUNCTION_DECLARATION: Tool[] = [
constant TEST_REQUEST_OPTIONS (line 75) | const TEST_REQUEST_OPTIONS = {
constant TEST_SYSTEM_INSTRUCTION_TEXT (line 78) | const TEST_SYSTEM_INSTRUCTION_TEXT = 'system instruction';
constant TEST_SYSTEM_INSTRUCTION (line 79) | const TEST_SYSTEM_INSTRUCTION = {
constant MODEL_NAME (line 84) | const MODEL_NAME = 'test_model';
constant RESOURCE_PATH (line 85) | const RESOURCE_PATH = `projects/${PROJECT}/locations/${LOCATION}/publish...
constant TEST_CHAT_MESSSAGE_TEXT_ROUND_1 (line 86) | const TEST_CHAT_MESSSAGE_TEXT_ROUND_1 = "what's the weather today?";
constant TEST_CHAT_MESSSAGE_TEXT_ROUND_2 (line 87) | const TEST_CHAT_MESSSAGE_TEXT_ROUND_2 = [
constant TEST_CHAT_MESSSAGE_CONTENT_ROUND_1 (line 91) | const TEST_CHAT_MESSSAGE_CONTENT_ROUND_1 = {
constant TEST_CHAT_MESSSAGE_CONTENT_ROUND_2 (line 95) | const TEST_CHAT_MESSSAGE_CONTENT_ROUND_2 = {
constant TEST_MODEL_RESPONSE_ROUND_1 (line 102) | const TEST_MODEL_RESPONSE_ROUND_1 = {
constant TEST_MODEL_RESPONSE_ROUND_2 (line 112) | const TEST_MODEL_RESPONSE_ROUND_2 = {
FILE: vertexai/src/models/test/generative_models_test.ts
constant PROJECT (line 39) | const PROJECT = 'test_project';
constant LOCATION (line 40) | const LOCATION = 'test_location';
constant MODEL_NAME (line 41) | const MODEL_NAME = 'model-name';
constant RESOURCE_PATH (line 42) | const RESOURCE_PATH = `projects/${PROJECT}/locations/${LOCATION}/publish...
constant TEST_TOKEN (line 43) | const TEST_TOKEN = 'testtoken';
constant FAKE_GOOGLE_AUTH (line 44) | const FAKE_GOOGLE_AUTH = createFakeGoogleAuth({
constant TEST_CHAT_MESSSAGE_TEXT (line 48) | const TEST_CHAT_MESSSAGE_TEXT = 'How are you doing today?';
constant TEST_USER_CONTENT_MESSAGE (line 49) | const TEST_USER_CONTENT_MESSAGE: GenerateContentRequest = {
constant TEST_SAFETY_SETTINGS (line 54) | const TEST_SAFETY_SETTINGS: SafetySetting[] = [
constant TEST_GENERATION_CONFIG (line 60) | const TEST_GENERATION_CONFIG = {
constant TEST_ENDPOINT_BASE_PATH (line 64) | const TEST_ENDPOINT_BASE_PATH = 'test.googleapis.com';
constant TEST_TOOLS_WITH_FUNCTION_DECLARATION (line 65) | const TEST_TOOLS_WITH_FUNCTION_DECLARATION: Tool[] = [
constant TEST_TOOLS_CONFIG (line 86) | const TEST_TOOLS_CONFIG: ToolConfig = {
constant TEST_REQUEST_OPTIONS (line 92) | const TEST_REQUEST_OPTIONS = {
constant TEST_SYSTEM_INSTRUCTION (line 95) | const TEST_SYSTEM_INSTRUCTION = {
constant TEST_SYSTEM_INSTRUCTION_WRONG_ROLE (line 99) | const TEST_SYSTEM_INSTRUCTION_WRONG_ROLE = {
constant BASE_MODEL_PARAMS (line 104) | const BASE_MODEL_PARAMS = {
FILE: vertexai/src/models/test/models_test.ts
constant PROJECT (line 44) | const PROJECT = 'test_project';
constant LOCATION (line 45) | const LOCATION = 'test_location';
constant TEST_TOKEN (line 46) | const TEST_TOKEN = 'testtoken';
constant FAKE_GOOGLE_AUTH (line 47) | const FAKE_GOOGLE_AUTH = createFakeGoogleAuth({
constant TEST_CHAT_MESSSAGE_TEXT (line 51) | const TEST_CHAT_MESSSAGE_TEXT = 'How are you doing today?';
constant TEST_USER_CHAT_MESSAGE (line 52) | const TEST_USER_CHAT_MESSAGE = [
constant TEST_SAFETY_RATINGS (line 55) | const TEST_SAFETY_RATINGS: SafetyRating[] = [
constant TEST_CANDIDATES (line 61) | const TEST_CANDIDATES = [
constant TEST_CANDIDATES2 (line 82) | const TEST_CANDIDATES2 = [
constant TEST_MODEL_RESPONSE (line 91) | const TEST_MODEL_RESPONSE = {
constant TEST_USER_CHAT_MESSAGE_WITH_GCS_FILE (line 95) | const TEST_USER_CHAT_MESSAGE_WITH_GCS_FILE = [
constant TEST_USER_CHAT_MESSAGE_WITH_INVALID_GCS_FILE (line 109) | const TEST_USER_CHAT_MESSAGE_WITH_INVALID_GCS_FILE = [
constant TEST_SAFETY_SETTINGS (line 118) | const TEST_SAFETY_SETTINGS: SafetySetting[] = [
constant TEST_GENERATION_CONFIG (line 124) | const TEST_GENERATION_CONFIG = {
constant TEST_ENDPOINT_BASE_PATH (line 128) | const TEST_ENDPOINT_BASE_PATH = 'test.googleapis.com';
constant TEST_FUNCTION_CALL_RESPONSE (line 129) | const TEST_FUNCTION_CALL_RESPONSE = {
constant TEST_CANDIDATES_WITH_FUNCTION_CALL (line 138) | const TEST_CANDIDATES_WITH_FUNCTION_CALL = [
constant TEST_MODEL_RESPONSE_WITH_FUNCTION_CALL (line 150) | const TEST_MODEL_RESPONSE_WITH_FUNCTION_CALL = {
constant TEST_FUNCTION_RESPONSE_PART (line 153) | const TEST_FUNCTION_RESPONSE_PART = [
constant TEST_TOOLS_WITH_FUNCTION_DECLARATION (line 161) | const TEST_TOOLS_WITH_FUNCTION_DECLARATION: Tool[] = [
constant TOOLS_WITH_GOOGLE_SEARCH_RETRIEVAL (line 182) | const TOOLS_WITH_GOOGLE_SEARCH_RETRIEVAL: GoogleSearchRetrievalTool[] = [
constant TEST_GCS_FILENAME (line 192) | const TEST_GCS_FILENAME = 'gs://test_bucket/test_image.jpeg';
constant TEST_MULTIPART_MESSAGE (line 193) | const TEST_MULTIPART_MESSAGE = [
constant BASE_64_IMAGE (line 202) | const BASE_64_IMAGE =
constant INLINE_DATA_FILE_PART (line 204) | const INLINE_DATA_FILE_PART = {
constant TEST_MULTIPART_MESSAGE_BASE64 (line 210) | const TEST_MULTIPART_MESSAGE_BASE64 = [
constant TEST_REQUEST_OPTIONS (line 223) | const TEST_REQUEST_OPTIONS = {
constant TEST_SYSTEM_INSTRUCTION (line 226) | const TEST_SYSTEM_INSTRUCTION = {
constant TEST_SYSTEM_INSTRUCTION_1 (line 230) | const TEST_SYSTEM_INSTRUCTION_1 = {
constant TEST_SYSTEM_INSTRUCTION_WRONG_ROLE (line 234) | const TEST_SYSTEM_INSTRUCTION_WRONG_ROLE = {
constant DATE_NOW_PRECISION_MILLIS (line 243) | const DATE_NOW_PRECISION_MILLIS = 2;
class ChatSessionForTest (line 254) | class ChatSessionForTest extends ChatSession {
class ChatSessionPreviewForTest (line 258) | class ChatSessionPreviewForTest extends ChatSessionPreview {
FILE: vertexai/src/models/util.ts
function formulateSystemInstructionIntoContent (line 21) | function formulateSystemInstructionIntoContent(
FILE: vertexai/src/resources/cached_contents.ts
function camelToSnake (line 23) | function camelToSnake(str: string): string {
class CachedContentsClient (line 27) | class CachedContentsClient {
method constructor (line 28) | constructor(readonly apiClient: ApiClient) {}
method create (line 30) | create(cachedContent: CachedContent): Promise<CachedContent> {
method update (line 45) | update(
method delete (line 63) | delete(name: string): Promise<void> {
method list (line 71) | list(
method get (line 86) | get(name: string): Promise<CachedContent> {
function inferFullResourceName (line 95) | function inferFullResourceName(
function inferModelName (line 122) | function inferModelName(
class CachedContents (line 143) | class CachedContents {
method constructor (line 145) | constructor(client: ApiClient) {
method create (line 154) | create(cachedContent: CachedContent): Promise<CachedContent> {
method update (line 175) | update(
method delete (line 206) | delete(name: string): Promise<void> {
method list (line 222) | list(
method get (line 234) | get(name: string): Promise<CachedContent> {
FILE: vertexai/src/resources/shared/api_client.ts
constant AUTHORIZATION_HEADER (line 27) | const AUTHORIZATION_HEADER = 'Authorization';
constant CONTENT_TYPE_HEADER (line 28) | const CONTENT_TYPE_HEADER = 'Content-Type';
constant USER_AGENT_HEADER (line 29) | const USER_AGENT_HEADER = 'User-Agent';
class ApiClient (line 31) | class ApiClient {
method constructor (line 32) | constructor(
method fetchToken (line 44) | private fetchToken(): Promise<string | null | undefined> {
method getBaseUrl (line 51) | getBaseUrl() {
method getBaseResourePath (line 55) | getBaseResourePath() {
method unaryApiCall (line 59) | async unaryApiCall(
method apiCall (line 72) | private async apiCall(
method getHeaders (line 92) | private async getHeaders(): Promise<Headers> {
function throwErrorIfNotOK (line 102) | async function throwErrorIfNotOK(
FILE: vertexai/src/testing/fake_google_auth.ts
type FakeGoogleAuthParams (line 20) | interface FakeGoogleAuthParams {
class FakeGoogleAuth (line 29) | class FakeGoogleAuth extends GoogleAuth {
method constructor (line 30) | constructor(private readonly params: FakeGoogleAuthParams) {
method getAccessToken (line 34) | override getAccessToken(): Promise<string | null | undefined> {
function createFakeGoogleAuth (line 42) | function createFakeGoogleAuth(
FILE: vertexai/src/types/common.ts
type SchemaType (line 24) | enum SchemaType {
type Schema (line 44) | interface Schema {
FILE: vertexai/src/types/content.ts
type VertexInit (line 26) | interface VertexInit {
type GenerateContentRequest (line 57) | interface GenerateContentRequest extends BaseModelParams {
type CountTokensRequest (line 82) | interface CountTokensRequest {
type CountTokensResponse (line 90) | interface CountTokensResponse {
type GetGenerativeModelParams (line 105) | interface GetGenerativeModelParams extends ModelParams {
type ModelParams (line 145) | interface ModelParams extends BaseModelParams {
type BaseModelParams (line 163) | interface BaseModelParams {
type SafetySetting (line 182) | interface SafetySetting {
type ResponseSchema (line 194) | interface ResponseSchema extends Schema {}
type GenerationConfig (line 199) | interface GenerationConfig {
type HarmCategory (line 241) | enum HarmCategory {
type HarmBlockThreshold (line 257) | enum HarmBlockThreshold {
type HarmProbability (line 275) | enum HarmProbability {
type HarmSeverity (line 290) | enum HarmSeverity {
type SafetyRating (line 305) | interface SafetyRating {
type Content (line 321) | interface Content {
type BasePart (line 339) | interface BasePart {}
type TextPart (line 344) | interface TextPart extends BasePart {
type InlineDataPart (line 360) | interface InlineDataPart extends BasePart {
type FileData (line 376) | interface FileData {
type FileDataPart (line 386) | interface FileDataPart extends BasePart {
type FunctionResponsePart (line 402) | interface FunctionResponsePart extends BasePart {
type FunctionCallPart (line 418) | interface FunctionCallPart extends BasePart {
type Part (line 441) | type Part =
type GenerativeContentBlob (line 452) | interface GenerativeContentBlob {
type UsageMetadata (line 465) | interface UsageMetadata {
type PromptFeedback (line 479) | interface PromptFeedback {
type BlockedReason (line 491) | enum BlockedReason {
type FinishReason (line 508) | enum FinishReason {
type GenerateContentResult (line 547) | interface GenerateContentResult {
type StreamGenerateContentResult (line 558) | interface StreamGenerateContentResult {
type GenerateContentResponse (line 571) | interface GenerateContentResponse {
type GenerateContentCandidate (line 586) | interface GenerateContentCandidate {
type CitationMetadata (line 615) | interface CitationMetadata {
type GoogleDate (line 632) | interface GoogleDate {
type Citation (line 654) | interface Citation {
type SearchEntryPoint (line 672) | interface SearchEntryPoint {
type GroundingChunkWeb (line 685) | interface GroundingChunkWeb {
type GroundingChunkRetrievedContext (line 695) | interface GroundingChunkRetrievedContext {
type GroundingChunk (line 705) | interface GroundingChunk {
type GroundingSupportSegment (line 717) | interface GroundingSupportSegment {
type GroundingSupport (line 737) | interface GroundingSupport {
type GroundingMetadata (line 758) | interface GroundingMetadata {
type GroundingAttributionSegment (line 778) | interface GroundingAttributionSegment {
type GroundingAttributionWeb (line 797) | interface GroundingAttributionWeb {
type GroundingAttributionRetrievedContext (line 808) | interface GroundingAttributionRetrievedContext {
type FunctionCall (line 820) | interface FunctionCall {
type FunctionResponse (line 832) | interface FunctionResponse {
type FunctionDeclaration (line 846) | interface FunctionDeclaration {
type FunctionDeclarationsTool (line 886) | interface FunctionDeclarationsTool {
type RetrievalTool (line 903) | interface RetrievalTool {
type VertexRagStore (line 908) | interface VertexRagStore {
type RagResource (line 929) | interface RagResource {
type GoogleSearchRetrievalTool (line 948) | interface GoogleSearchRetrievalTool {
type Tool (line 954) | type Tool =
type Retrieval (line 962) | interface Retrieval {
type Mode (line 980) | enum Mode {
type DynamicRetrievalConfig (line 986) | interface DynamicRetrievalConfig {
type GoogleSearchRetrieval (line 996) | interface GoogleSearchRetrieval {
type VertexAISearch (line 1004) | interface VertexAISearch {
type FunctionDeclarationSchemaType (line 1019) | type FunctionDeclarationSchemaType = SchemaType;
type FunctionDeclarationSchema (line 1025) | interface FunctionDeclarationSchema {
type FunctionDeclarationSchemaProperty (line 1041) | type FunctionDeclarationSchemaProperty = Schema;
type StartChatParams (line 1046) | interface StartChatParams {
type StartChatSessionRequest (line 1074) | interface StartChatSessionRequest extends StartChatParams {
type RequestOptions (line 1095) | interface RequestOptions {
type CachedContent (line 1114) | interface CachedContent {
type CachedContentUsageMetadata (line 1172) | interface CachedContentUsageMetadata {
type ListCachedContentsResponse (line 1190) | interface ListCachedContentsResponse {
FILE: vertexai/src/types/errors.ts
class GoogleAuthError (line 21) | class GoogleAuthError extends Error {
method constructor (line 23) | constructor(message: string, stackTrace?: Error) {
class ClientError (line 35) | class ClientError extends Error {
method constructor (line 37) | constructor(message: string, stackTrace?: Error) {
type ErrorDetails (line 50) | interface ErrorDetails {
class GoogleApiError (line 62) | class GoogleApiError extends Error {
method constructor (line 63) | constructor(
class GoogleGenerativeAIError (line 77) | class GoogleGenerativeAIError extends Error {
method constructor (line 79) | constructor(message: string, stackTrace?: Error) {
class IllegalArgumentError (line 90) | class IllegalArgumentError extends Error {
method constructor (line 92) | constructor(message: string, stackTrace?: Error) {
function constructErrorMessage (line 100) | function constructErrorMessage(
FILE: vertexai/src/types/generate_content_response_handler.ts
class GenerateContentResponseHandler (line 23) | class GenerateContentResponseHandler {
method getFunctionCallsFromCandidate (line 30) | static getFunctionCallsFromCandidate(
FILE: vertexai/src/types/tool.ts
type ToolConfig (line 19) | interface ToolConfig {
type FunctionCallingMode (line 25) | enum FunctionCallingMode {
type FunctionCallingConfig (line 47) | interface FunctionCallingConfig {
FILE: vertexai/src/util/constants.ts
constant GENERATE_CONTENT_METHOD (line 17) | const GENERATE_CONTENT_METHOD = 'generateContent';
constant STREAMING_GENERATE_CONTENT_METHOD (line 18) | const STREAMING_GENERATE_CONTENT_METHOD = 'streamGenerateContent';
constant COUNT_TOKENS_METHOD (line 19) | const COUNT_TOKENS_METHOD = 'countTokens';
constant USER_ROLE (line 20) | const USER_ROLE = 'user';
constant MODEL_ROLE (line 21) | const MODEL_ROLE = 'model';
constant SYSTEM_ROLE (line 22) | const SYSTEM_ROLE = 'system';
constant USER_AGENT_PRODUCT (line 23) | const USER_AGENT_PRODUCT = 'model-builder';
constant CLIENT_LIBRARY_VERSION (line 24) | const CLIENT_LIBRARY_VERSION = '1.12.0';
constant CLIENT_LIBRARY_LANGUAGE (line 25) | const CLIENT_LIBRARY_LANGUAGE = `grpc-node/${CLIENT_LIBRARY_VERSION}`;
constant USER_AGENT (line 26) | const USER_AGENT = `${USER_AGENT_PRODUCT}/${CLIENT_LIBRARY_VERSION} ${CL...
constant CREDENTIAL_ERROR_MESSAGE (line 27) | const CREDENTIAL_ERROR_MESSAGE =
FILE: vertexai/src/vertex_ai.ts
class VertexAI (line 43) | class VertexAI {
method constructor (line 58) | constructor(init: VertexInit) {
method getGenerativeModel (line 127) | getGenerativeModel(
method getProject (line 147) | protected getProject(): string {
method getLocation (line 151) | protected getLocation(): string {
class VertexAIPreview (line 160) | class VertexAIPreview {
method constructor (line 184) | constructor(
method getGenerativeModel (line 209) | getGenerativeModel(
method getGenerativeModelFromCachedContent (line 229) | getGenerativeModelFromCachedContent(
function validateCachedContentModel (line 291) | function validateCachedContentModel(modelName: string) {
function parseModelName (line 305) | function parseModelName(modelName: string): string {
function validateGoogleAuthOptions (line 312) | function validateGoogleAuthOptions(
function resolveProject (line 345) | function resolveProject(projectFromInput?: string): string {
function resolveLocation (line 361) | function resolveLocation(locationFromInput?: string): string {
FILE: vertexai/system_test/end_to_end_sample_test.ts
constant PROJECT (line 32) | const PROJECT = process.env['GCLOUD_PROJECT'];
constant LOCATION (line 33) | const LOCATION = 'us-central1';
constant TEXT_REQUEST (line 34) | const TEXT_REQUEST = {
constant TEXT_PART (line 38) | const TEXT_PART = {
constant GCS_FILE_PART (line 42) | const GCS_FILE_PART = {
constant BASE_64_IMAGE (line 48) | const BASE_64_IMAGE =
constant INLINE_DATA_FILE_PART (line 50) | const INLINE_DATA_FILE_PART = {
constant MULTI_PART_GCS_REQUEST (line 57) | const MULTI_PART_GCS_REQUEST = {
constant MULTI_PART_BASE64_REQUEST (line 60) | const MULTI_PART_BASE64_REQUEST = {
constant FUNCTION_CALL_NAME (line 64) | const FUNCTION_CALL_NAME = 'get_current_weather';
constant TOOLS_WITH_FUNCTION_DECLARATION (line 66) | const TOOLS_WITH_FUNCTION_DECLARATION: FunctionDeclarationsTool[] = [
constant TOOLS_WITH_GOOGLE_SEARCH_RETRIEVAL (line 88) | const TOOLS_WITH_GOOGLE_SEARCH_RETRIEVAL: GoogleSearchRetrievalTool[] = [
constant TOOLS_WITH_RAG (line 99) | const TOOLS_WITH_RAG = [
constant WEATHER_FORECAST (line 114) | const WEATHER_FORECAST = 'super nice';
constant FUNCTION_RESPONSE_PART (line 115) | const FUNCTION_RESPONSE_PART = [
constant FUNCTION_CALL (line 127) | const FUNCTION_CALL = [
constant TEXT_MODEL_NAME (line 137) | const TEXT_MODEL_NAME = 'gemini-2.0-flash';
FILE: vertexai/test/vertex_ai_test.ts
constant PROJECT (line 22) | const PROJECT = 'test_project';
constant LOCATION (line 23) | const LOCATION = 'test_location';
class VertexAIForTest (line 25) | class VertexAIForTest extends VertexAI {
method getProject (line 26) | public override getProject(): string {
method getLocation (line 29) | public override getLocation(): string {
function cleanupEnvironmentVariable (line 212) | function cleanupEnvironmentVariable() {
Condensed preview — 114 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (881K chars).
[
{
"path": ".eslintignore",
"chars": 88,
"preview": "**/node_modules\nbuild/\ndocs/\nsrc/genai/\ntest/\nsystem_test/\nsdk_schema_test/\nsrc/**/test/"
},
{
"path": ".eslintrc.json",
"chars": 37,
"preview": "{\n \"extends\": \"./node_modules/gts\"\n}"
},
{
"path": ".github/CODEOWNERS",
"chars": 365,
"preview": "# Code owners file.\n# This file controls who is tagged for review for any given pull request.\n#\n# For syntax help see:\n#"
},
{
"path": ".github/release-please.yml",
"chars": 36,
"preview": "handleGHRelease: true\nmanifest: true"
},
{
"path": ".github/release-trigger.yml",
"chars": 13,
"preview": "enabled: true"
},
{
"path": ".github/sync-repo-settings.yaml",
"chars": 217,
"preview": "# https://github.com/googleapis/repo-automation-bots/tree/main/packages/sync-repo-settings\n\n# We are disabling this bot "
},
{
"path": ".github/workflows/presubmit.yaml",
"chars": 433,
"preview": "on:\n pull_request:\nname: presubmit\njobs:\n units:\n runs-on: ubuntu-latest\n strategy:\n matrix:\n node: "
},
{
"path": ".gitignore",
"chars": 189,
"preview": "# Ignore directories generated automatically.\nnode_modules/\nbuild/\ndocs/\n.nyc_output/\n\n# Ignore files generated automati"
},
{
"path": ".jsdoc.js",
"chars": 1286,
"preview": "/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": ".kokoro/docs.sh",
"chars": 706,
"preview": "#!/bin/bash\n\n# Copyright 2023 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may n"
},
{
"path": ".kokoro/populate-secrets.sh",
"chars": 2408,
"preview": "#!/bin/bash\n# Copyright 2020 Google LLC.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may n"
},
{
"path": ".kokoro/presubmit/node18/common.cfg",
"chars": 610,
"preview": "# Format: //devtools/kokoro/config/proto/build.proto\n\n# Build logs will be here\naction {\n define_artifacts {\n regex:"
},
{
"path": ".kokoro/presubmit/node18/continuous-system-test.cfg",
"chars": 252,
"preview": "# Download resources for system tests (service account key, etc.)\ngfile_resources: \"/bigstore/cloud-devrel-kokoro-resour"
},
{
"path": ".kokoro/presubmit/node18/docs.cfg",
"chars": 466,
"preview": "# doc publications use a Python image.\nenv_vars: {\n key: \"TRAMPOLINE_IMAGE\"\n value: \"gcr.io/cloud-devrel-kokoro-re"
},
{
"path": ".kokoro/presubmit/node18/docs.sh",
"chars": 1250,
"preview": "#!/bin/bash\n\n# Copyright 2023 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may n"
},
{
"path": ".kokoro/presubmit/node18/system-test.cfg",
"chars": 252,
"preview": "# Download resources for system tests (service account key, etc.)\ngfile_resources: \"/bigstore/cloud-devrel-kokoro-resour"
},
{
"path": ".kokoro/presubmit/node22/common.cfg",
"chars": 611,
"preview": "# Format: //devtools/kokoro/config/proto/build.proto\n\n# Build logs will be here\naction {\n define_artifacts {\n regex:"
},
{
"path": ".kokoro/presubmit/node22/docs.cfg",
"chars": 466,
"preview": "# doc publications use a Python image.\nenv_vars: {\n key: \"TRAMPOLINE_IMAGE\"\n value: \"gcr.io/cloud-devrel-kokoro-re"
},
{
"path": ".kokoro/presubmit/node22/docs.sh",
"chars": 1250,
"preview": "#!/bin/bash\n\n# Copyright 2023 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may n"
},
{
"path": ".kokoro/presubmit/node22/system-test.cfg",
"chars": 252,
"preview": "# Download resources for system tests (service account key, etc.)\ngfile_resources: \"/bigstore/cloud-devrel-kokoro-resour"
},
{
"path": ".kokoro/publish.sh",
"chars": 1607,
"preview": "#!/bin/bash\n\n# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may n"
},
{
"path": ".kokoro/system-test.sh",
"chars": 1752,
"preview": "#!/bin/bash\n\n# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may n"
},
{
"path": ".kokoro/test.sh",
"chars": 1692,
"preview": "#!/bin/bash\n\n# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may n"
},
{
"path": ".kokoro/trampoline_v2.sh",
"chars": 15169,
"preview": "#!/usr/bin/env bash\n# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# yo"
},
{
"path": ".prettierignore",
"chars": 77,
"preview": "**/node_modules\nbuild/\ndocs/\ntest/\nsystem_test/\nsdk_schema_test/\nsrc/**/test/"
},
{
"path": ".prettierrc.js",
"chars": 667,
"preview": "/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": ".release-please-manifest.json",
"chars": 18,
"preview": "{\n \".\": \"0.6.0\"\n}"
},
{
"path": ".repo-metadata.json",
"chars": 410,
"preview": "{\n \"name\": \"vertexai\",\n \"name_pretty\": \"Google Cloud Vertex AI\",\n \"release_level\": \"preview\",\n \"language\": \"nodejs\","
},
{
"path": ".trampolinerc",
"chars": 1465,
"preview": "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f"
},
{
"path": "CHANGELOG.md",
"chars": 22149,
"preview": "# Changelog\n\n## [0.6.0](https://github.com/googleapis/nodejs-vertexai/compare/v0.5.0...v0.6.0) (2026-05-13)\n\n\n### Featur"
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 4555,
"preview": "<!-- # Generated by synthtool. DO NOT EDIT! !-->\n# Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open "
},
{
"path": "CONTRIBUTING.md",
"chars": 1096,
"preview": "# How to Contribute\n\nWe'd love to accept your patches and contributions to this project. There are\njust a few small guid"
},
{
"path": "LICENSE",
"chars": 11357,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "README.md",
"chars": 2049,
"preview": "# Gemini Enterprise Agent Platform SDK for Node.js quickstart\n\nThe Agent Platform SDK for Node.js lets you use the Gemin"
},
{
"path": "SECURITY.md",
"chars": 328,
"preview": "# Security Policy\n\nTo report a security issue, please use [g.co/vulnz](https://g.co/vulnz).\n\nThe Google Security Team wi"
},
{
"path": "package.json",
"chars": 2307,
"preview": "{\n \"name\": \"@google-cloud/agentplatform\",\n \"description\": \"Vertex Generative AI client for Node.js\",\n \"version\": \"0.6"
},
{
"path": "release-please-config.json",
"chars": 188,
"preview": "{\n \"initial-version\": \"0.5.0\",\n \"release-type\": \"node\",\n \"include-component-in-tag\": false,\n \"packages\": {\n \".\": "
},
{
"path": "src/.prettierignore",
"chars": 156,
"preview": "# Ignore autogenerated files:\nagentengines.ts\n_internal_types.ts\nsessionevents.ts\nsessions.ts\ntypes/**\ntypes.ts\nconverte"
},
{
"path": "src/.prettierrc",
"chars": 414,
"preview": "{\n \"printWidth\" : 80,\n \"tabWidth\" : 2,\n \"useTabs\" : false,\n \"semi\" : true,\n \"singleQuote\" : true,\n \"quoteProps\" : "
},
{
"path": "src/_internal_types.ts",
"chars": 155,
"preview": "/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google"
},
{
"path": "src/agentengines.ts",
"chars": 10792,
"preview": "/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google"
},
{
"path": "src/client.ts",
"chars": 2327,
"preview": "/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {ApiClient, NodeAuth, Nod"
},
{
"path": "src/converters/_agentengines_converters.ts",
"chars": 25410,
"preview": "/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google"
},
{
"path": "src/converters/_memories_converters.ts",
"chars": 21466,
"preview": "/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google"
},
{
"path": "src/converters/_memoryrevisions_converters.ts",
"chars": 2128,
"preview": "/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google"
},
{
"path": "src/converters/_sandboxes_converters.ts",
"chars": 6113,
"preview": "/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google"
},
{
"path": "src/converters/_sessionevents_converters.ts",
"chars": 4367,
"preview": "/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google"
},
{
"path": "src/converters/_sessions_converters.ts",
"chars": 7679,
"preview": "/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google"
},
{
"path": "src/converters/_skills_converters.ts",
"chars": 771,
"preview": "/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google"
},
{
"path": "src/eslint.config.mjs",
"chars": 570,
"preview": "import eslint from '@eslint/js';\nimport tseslint from 'typescript-eslint';\n\nexport default [\n eslint.configs.recommende"
},
{
"path": "src/index.ts",
"chars": 667,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "src/memories.ts",
"chars": 18852,
"preview": "/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google"
},
{
"path": "src/memoryrevisions.ts",
"chars": 3371,
"preview": "/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google"
},
{
"path": "src/releases.txt",
"chars": 132,
"preview": "Use this file when you need to force a patch release with release-please.\nEdit line 4 below with the version for the rel"
},
{
"path": "src/sandboxes.ts",
"chars": 8966,
"preview": "/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google"
},
{
"path": "src/sessionevents.ts",
"chars": 3537,
"preview": "/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google"
},
{
"path": "src/sessions.ts",
"chars": 8893,
"preview": "/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google"
},
{
"path": "src/skills.ts",
"chars": 1716,
"preview": "/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google"
},
{
"path": "src/types/common.ts",
"chars": 139940,
"preview": "/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google"
},
{
"path": "src/types.ts",
"chars": 191,
"preview": "/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google"
},
{
"path": "system_test/agent_engine_e2e_test.ts",
"chars": 3538,
"preview": "/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {Client} from '../src/cl"
},
{
"path": "test/replays/_replay_client.ts",
"chars": 8153,
"preview": "/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {Pager} from '@google/ge"
},
{
"path": "test/replays/agentengines_memories_test.ts",
"chars": 8875,
"preview": "/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport 'jasmine';\n\nimport {Node"
},
{
"path": "test/replays/agentengines_sandboxes_test.ts",
"chars": 4810,
"preview": "/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport 'jasmine';\n\nimport {Node"
},
{
"path": "test/replays/agentengines_sessions_test.ts",
"chars": 2740,
"preview": "/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport 'jasmine';\n\nimport {Node"
},
{
"path": "test/replays/agentengines_test.ts",
"chars": 2881,
"preview": "/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport 'jasmine';\n\nimport {Node"
},
{
"path": "test/replays/run_replay_tests.sh",
"chars": 1704,
"preview": "#!/bin/bash\n\n# This script runs replay tests for the Vertex SDK JS GenAI modules.\n# It is intended to be used from the g"
},
{
"path": "test/replays/sessionevents_test.ts",
"chars": 1780,
"preview": "/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport 'jasmine';\n\nimport {Node"
},
{
"path": "test/replays/skills_test.ts",
"chars": 757,
"preview": "/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport 'jasmine';\nimport {Replay"
},
{
"path": "test/replays/test_env.js",
"chars": 632,
"preview": "/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nconst path = require('path');\n\n"
},
{
"path": "test/spec/reporter.js",
"chars": 907,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "test/unit/client_test.ts",
"chars": 982,
"preview": "import {AgentEngines} from '../../src/agentengines';\nimport {Client} from '../../src/client';\n\ndescribe('GenAI Client In"
},
{
"path": "tsconfig.json",
"chars": 775,
"preview": "{\n \"extends\": \"./node_modules/gts/tsconfig-google.json\",\n \"compilerOptions\": {\n \"module\": \"commonjs\",\n \"moduleRe"
},
{
"path": "vertexai/.eslintrc.json",
"chars": 37,
"preview": "{\n \"extends\": \"./node_modules/gts\"\n}"
},
{
"path": "vertexai/README.md",
"chars": 17469,
"preview": "[](https://www.npmjs.com/package/@google-cloud"
},
{
"path": "vertexai/package.json",
"chars": 2329,
"preview": "{\n \"name\": \"@google-cloud/vertexai\",\n \"description\": \"Vertex Generative AI client for Node.js\",\n \"version\": \"1.12.0\","
},
{
"path": "vertexai/src/functions/count_tokens.ts",
"chars": 1871,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/functions/generate_content.ts",
"chars": 4870,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/functions/index.ts",
"chars": 772,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/functions/post_fetch_processing.ts",
"chars": 13042,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/functions/post_request.ts",
"chars": 4723,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/functions/pre_fetch_processing.ts",
"chars": 2739,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/functions/test/functions_test.ts",
"chars": 25122,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/functions/test/post_fetch_processing_test.ts",
"chars": 6527,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/functions/test/post_request_test.ts",
"chars": 7175,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/functions/test/pre_fetch_processing_test.ts",
"chars": 2446,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/functions/test/test_data.ts",
"chars": 33151,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/functions/util.ts",
"chars": 1032,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/index.ts",
"chars": 698,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/models/chat_session.ts",
"chars": 17753,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/models/generative_models.ts",
"chars": 19745,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/models/index.ts",
"chars": 750,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/models/test/chat_session_test.ts",
"chars": 13071,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/models/test/generative_models_test.ts",
"chars": 16695,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/models/test/models_test.ts",
"chars": 132857,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/models/util.ts",
"chars": 1032,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/resources/cached_contents.ts",
"chars": 7693,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/resources/index.ts",
"chars": 706,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/resources/shared/api_client.ts",
"chars": 4080,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/testing/fake_google_auth.ts",
"chars": 1461,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/testing/fake_google_auth_test.ts",
"chars": 1610,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/types/common.ts",
"chars": 1985,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/types/content.ts",
"chars": 37553,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/types/errors.ts",
"chars": 3333,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/types/generate_content_response_handler.ts",
"chars": 1423,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/types/index.ts",
"chars": 796,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/types/tool.ts",
"chars": 1984,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/util/constants.ts",
"chars": 1623,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/util/index.ts",
"chars": 651,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/src/vertex_ai.ts",
"chars": 12467,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/system_test/end_to_end_sample_test.ts",
"chars": 49886,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/test/index_test.ts",
"chars": 937,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/test/vertex_ai_test.ts",
"chars": 7933,
"preview": "/**\n * @license\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * yo"
},
{
"path": "vertexai/tsconfig.json",
"chars": 682,
"preview": "{\n \"extends\": \"./node_modules/gts/tsconfig-google.json\",\n \"compilerOptions\": {\n \"module\": \"commonjs\",\n \"moduleRe"
}
]
About this extraction
This page contains the full source code of the googleapis/nodejs-vertexai GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 114 files (828.1 KB), approximately 196.7k tokens, and a symbol index with 705 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.