agentv 0.2.11 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +141 -45
- package/dist/{chunk-7MGIZBZG.js → chunk-HPH4YWGU.js} +1927 -544
- package/dist/chunk-HPH4YWGU.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/templates/.env.template +35 -0
- package/dist/templates/agentv/.env.template +23 -0
- package/dist/templates/agentv/config.yaml +16 -0
- package/dist/templates/agentv/targets.yaml +74 -0
- package/dist/templates/{eval-build.prompt.md → github/prompts/eval-build.prompt.md} +1 -0
- package/package.json +2 -2
- package/dist/chunk-7MGIZBZG.js.map +0 -1
- package/dist/chunk-JT3E7T7V.js +0 -14744
- package/dist/chunk-JT3E7T7V.js.map +0 -1
- /package/dist/templates/{config-schema.json → github/contexts/config-schema.json} +0 -0
- /package/dist/templates/{eval-schema.json → github/contexts/eval-schema.json} +0 -0
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Example environment configuration for AgentV
|
|
2
|
+
# Copy this file to .env and fill in your credentials
|
|
3
|
+
|
|
4
|
+
# Model Provider Selection (Optional - can be configured via targets.yaml)
|
|
5
|
+
PROVIDER=azure
|
|
6
|
+
|
|
7
|
+
# Azure OpenAI Configuration
|
|
8
|
+
# These are the default environment variable names used in the provided targets.yaml
|
|
9
|
+
AZURE_OPENAI_ENDPOINT=https://your-endpoint.openai.azure.com/
|
|
10
|
+
AZURE_OPENAI_API_KEY=your-api-key-here
|
|
11
|
+
AZURE_DEPLOYMENT_NAME=gpt-4o
|
|
12
|
+
|
|
13
|
+
# Anthropic Configuration (if using Anthropic provider)
|
|
14
|
+
ANTHROPIC_API_KEY=your-anthropic-api-key-here
|
|
15
|
+
|
|
16
|
+
# VS Code Workspace Paths for Execution Targets
|
|
17
|
+
# Note: Using forward slashes is recommended for paths in .env files
|
|
18
|
+
# to avoid issues with escape characters.
|
|
19
|
+
PROJECTX_WORKSPACE_PATH=C:/Users/your-username/OneDrive - Company Pty Ltd/sample.code-workspace
|
|
20
|
+
|
|
21
|
+
# CLI provider sample (used by the local_cli target)
|
|
22
|
+
PROJECT_ROOT=D:/GitHub/your-username/agentv/docs/examples/simple
|
|
23
|
+
LOCAL_AGENT_TOKEN=your-cli-token
|
|
24
|
+
|
|
25
|
+
# Codex CLI Configuration
|
|
26
|
+
# Either OPENAI_API_KEY or CODEX_API_KEY must be set before running codex targets
|
|
27
|
+
OPENAI_API_KEY=your-openai-or-codex-key
|
|
28
|
+
CODEX_API_KEY=
|
|
29
|
+
CODEX_PROFILE=default
|
|
30
|
+
CODEX_MODEL=gpt-4o-mini
|
|
31
|
+
CODEX_APPROVAL_PRESET=auto
|
|
32
|
+
CODEX_CLI_PATH=C:/Program Files/Codex/bin/codex.exe
|
|
33
|
+
CODEX_WORKSPACE_DIR=C:/Temp/agentv-codex
|
|
34
|
+
# Optional override if your codex config lives outside the default ~/.codex/config
|
|
35
|
+
CODEX_CONFIG_PATH=
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Example environment configuration for AgentV
|
|
2
|
+
# Copy this file to .env and fill in your credentials
|
|
3
|
+
|
|
4
|
+
# Model Provider Selection (Optional - can be configured via targets.yaml)
|
|
5
|
+
PROVIDER=azure
|
|
6
|
+
|
|
7
|
+
# Azure OpenAI Configuration
|
|
8
|
+
# These are the default environment variable names used in the provided targets.yaml
|
|
9
|
+
AZURE_OPENAI_ENDPOINT=https://your-endpoint.openai.azure.com/
|
|
10
|
+
AZURE_OPENAI_API_KEY=your-api-key-here
|
|
11
|
+
AZURE_DEPLOYMENT_NAME=gpt-4o
|
|
12
|
+
|
|
13
|
+
# Anthropic Configuration (if using Anthropic provider)
|
|
14
|
+
ANTHROPIC_API_KEY=your-anthropic-api-key-here
|
|
15
|
+
|
|
16
|
+
# VS Code Workspace Paths for Execution Targets
|
|
17
|
+
# Note: Using forward slashes is recommended for paths in .env files
|
|
18
|
+
# to avoid issues with escape characters.
|
|
19
|
+
PROJECTX_WORKSPACE_PATH=C:/Users/your-username/OneDrive - Company Pty Ltd/sample.code-workspace
|
|
20
|
+
|
|
21
|
+
# CLI provider sample (used by the local_cli target)
|
|
22
|
+
PROJECT_ROOT=D:/GitHub/your-username/agentv/docs/examples/simple
|
|
23
|
+
LOCAL_AGENT_TOKEN=your-cli-token
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
$schema: agentv-config-v2
|
|
2
|
+
|
|
3
|
+
# Customize which files are treated as guidelines vs regular file content
|
|
4
|
+
|
|
5
|
+
# Custom guideline patterns:
|
|
6
|
+
guideline_patterns:
|
|
7
|
+
- "**/*.instructions.md"
|
|
8
|
+
- "**/instructions/**"
|
|
9
|
+
- "**/*.prompt.md"
|
|
10
|
+
- "**/prompts/**"
|
|
11
|
+
|
|
12
|
+
# Notes:
|
|
13
|
+
# - Patterns use standard glob syntax (via micromatch library)
|
|
14
|
+
# - Paths are normalized to forward slashes for cross-platform compatibility
|
|
15
|
+
# - Only files matching these patterns are loaded as guidelines
|
|
16
|
+
# - All other files referenced in eval cases are treated as regular file content
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
$schema: agentv-targets-v2
|
|
2
|
+
|
|
3
|
+
# A list of all supported evaluation targets for the project.
|
|
4
|
+
# Each target defines a provider and its specific configuration.
|
|
5
|
+
# Actual values for paths/keys are stored in the local .env file.
|
|
6
|
+
|
|
7
|
+
targets:
|
|
8
|
+
- name: vscode_projectx
|
|
9
|
+
provider: vscode
|
|
10
|
+
settings:
|
|
11
|
+
# VS Code provider requires a workspace template path.
|
|
12
|
+
workspace_template: PROJECTX_WORKSPACE_PATH
|
|
13
|
+
# This key makes the judge model configurable and is good practice
|
|
14
|
+
judge_target: azure_base
|
|
15
|
+
|
|
16
|
+
- name: vscode_insiders_projectx
|
|
17
|
+
provider: vscode-insiders
|
|
18
|
+
settings:
|
|
19
|
+
# VS Code Insiders provider (preview version) requires a workspace template path.
|
|
20
|
+
workspace_template: PROJECTX_WORKSPACE_PATH
|
|
21
|
+
# This key makes the judge model configurable and is good practice
|
|
22
|
+
judge_target: azure_base
|
|
23
|
+
|
|
24
|
+
- name: azure_base
|
|
25
|
+
provider: azure
|
|
26
|
+
# The base LLM provider needs no extra settings, as the model is
|
|
27
|
+
# defined in the .env file.
|
|
28
|
+
settings:
|
|
29
|
+
endpoint: AZURE_OPENAI_ENDPOINT
|
|
30
|
+
api_key: AZURE_OPENAI_API_KEY
|
|
31
|
+
model: AZURE_DEPLOYMENT_NAME
|
|
32
|
+
|
|
33
|
+
- name: default
|
|
34
|
+
provider: azure
|
|
35
|
+
# The base LLM provider needs no extra settings, as the model is
|
|
36
|
+
# defined in the .env file.
|
|
37
|
+
settings:
|
|
38
|
+
endpoint: AZURE_OPENAI_ENDPOINT
|
|
39
|
+
api_key: AZURE_OPENAI_API_KEY
|
|
40
|
+
model: AZURE_DEPLOYMENT_NAME
|
|
41
|
+
|
|
42
|
+
- name: local_cli
|
|
43
|
+
provider: cli
|
|
44
|
+
judge_target: azure_base
|
|
45
|
+
settings:
|
|
46
|
+
# Passes the fully rendered prompt and any attached files to a local Python script
|
|
47
|
+
# NOTE: Do not add quotes around {PROMPT} or {FILES} - they are already shell-escaped
|
|
48
|
+
command_template: uv run ./mock_cli.py --prompt {PROMPT} {FILES}
|
|
49
|
+
# Format for each file in {FILES}. {path} and {basename} are automatically shell-escaped, so no quotes needed
|
|
50
|
+
files_format: --file {path}
|
|
51
|
+
# Optional working directory and env overrides resolved from .env
|
|
52
|
+
cwd: CLI_EVALS_DIR
|
|
53
|
+
env:
|
|
54
|
+
API_TOKEN: LOCAL_AGENT_TOKEN
|
|
55
|
+
timeout_seconds: 30
|
|
56
|
+
healthcheck:
|
|
57
|
+
type: command
|
|
58
|
+
command_template: uv run ./mock_cli.py --healthcheck
|
|
59
|
+
|
|
60
|
+
- name: codex_cli
|
|
61
|
+
provider: codex
|
|
62
|
+
judge_target: azure_base
|
|
63
|
+
settings:
|
|
64
|
+
# Uses the Codex CLI (defaults to `codex` on PATH)
|
|
65
|
+
# executable: CODEX_CLI_PATH # Optional: override executable path
|
|
66
|
+
# args: # Optional additional CLI arguments
|
|
67
|
+
# - --profile
|
|
68
|
+
# - CODEX_PROFILE
|
|
69
|
+
# - --model
|
|
70
|
+
# - CODEX_MODEL
|
|
71
|
+
# - --ask-for-approval
|
|
72
|
+
# - CODEX_APPROVAL_PRESET
|
|
73
|
+
timeout_seconds: 180
|
|
74
|
+
cwd: CODEX_WORKSPACE_DIR # Where scratch workspaces are created
|
|
@@ -13,6 +13,7 @@ description: 'Apply when writing evals in YAML format'
|
|
|
13
13
|
- Message fields: `role` (required), `content` (required)
|
|
14
14
|
- Message roles: `system`, `user`, `assistant`, `tool`
|
|
15
15
|
- Content types: `text` (inline), `file` (relative or absolute path)
|
|
16
|
+
- Attachments (type: `file`) should default to the `user` role
|
|
16
17
|
- File paths must start with "/" for absolute paths (e.g., "/prompts/file.md")
|
|
17
18
|
|
|
18
19
|
## Example
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentv",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "CLI entry point for AgentV",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"log-update": "^7.0.1",
|
|
25
25
|
"micromatch": "^4.0.8",
|
|
26
26
|
"yaml": "^2.6.1",
|
|
27
|
-
"@agentv/core": "0.
|
|
27
|
+
"@agentv/core": "0.5.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"execa": "^9.3.0"
|