chore: import upstream snapshot with attribution
CI / Shell Format Check (push) Has been cancelled
CI / Check Ruby (3.4) (push) Has been cancelled
CI / CI Config (push) Has been cancelled
CI / Test on Node ${{ matrix.node }} and ${{ matrix.os }}${{ matrix.shard && format(' (shard {0}/3)', matrix.shard) || '' }} (push) Has been cancelled
CI / Build on Node ${{ matrix.node }} (push) Has been cancelled
CI / Style Check (push) Has been cancelled
CI / Generate Assets (push) Has been cancelled
CI / Check Python (3.14) (push) Has been cancelled
CI / Check Python (3.9) (push) Has been cancelled
CI / Build Docs (push) Has been cancelled
CI / Code Scan Action (push) Has been cancelled
CI / Site tests (push) Has been cancelled
CI / webui tests (push) Has been cancelled
CI / Run Integration Tests (push) Has been cancelled
CI / Run Smoke Tests (push) Has been cancelled
CI / Go Tests (push) Has been cancelled
CI / Share Test (push) Has been cancelled
CI / Redteam (Production API) (push) Has been cancelled
CI / Redteam (Staging API) (push) Has been cancelled
CI / GitHub Actions Lint (push) Has been cancelled
CI / Check Ruby (3.0) (push) Has been cancelled
release-please / release-please (push) Has been cancelled
release-please / build (push) Has been cancelled
release-please / publish-npm (push) Has been cancelled
release-please / publish-npm-backfill (push) Has been cancelled
release-please / docker (push) Has been cancelled
release-please / publish-code-scan-action (push) Has been cancelled
release-please / attest-code-scan-action (push) Has been cancelled
Deploy local.promptfoo.app / Deploy to Cloudflare Pages (push) Has been cancelled
Test and Publish Multi-arch Docker Image / test (push) Has been cancelled
Test and Publish Multi-arch Docker Image / build-docker-and-push-digests (map[digest-suffix:linux-amd64 platform:linux/amd64 runner:ubuntu-latest]) (push) Has been cancelled
Test and Publish Multi-arch Docker Image / build-docker-and-push-digests (map[digest-suffix:linux-arm64 platform:linux/arm64 runner:ubuntu-24.04-arm]) (push) Has been cancelled
Test and Publish Multi-arch Docker Image / merge-docker-digests (push) Has been cancelled
Test and Publish Multi-arch Docker Image / Attest Multi-arch Image (push) Has been cancelled
Validate Renovate Config / Validate Renovate Configuration (push) Has been cancelled
CI / Shell Format Check (push) Has been cancelled
CI / Check Ruby (3.4) (push) Has been cancelled
CI / CI Config (push) Has been cancelled
CI / Test on Node ${{ matrix.node }} and ${{ matrix.os }}${{ matrix.shard && format(' (shard {0}/3)', matrix.shard) || '' }} (push) Has been cancelled
CI / Build on Node ${{ matrix.node }} (push) Has been cancelled
CI / Style Check (push) Has been cancelled
CI / Generate Assets (push) Has been cancelled
CI / Check Python (3.14) (push) Has been cancelled
CI / Check Python (3.9) (push) Has been cancelled
CI / Build Docs (push) Has been cancelled
CI / Code Scan Action (push) Has been cancelled
CI / Site tests (push) Has been cancelled
CI / webui tests (push) Has been cancelled
CI / Run Integration Tests (push) Has been cancelled
CI / Run Smoke Tests (push) Has been cancelled
CI / Go Tests (push) Has been cancelled
CI / Share Test (push) Has been cancelled
CI / Redteam (Production API) (push) Has been cancelled
CI / Redteam (Staging API) (push) Has been cancelled
CI / GitHub Actions Lint (push) Has been cancelled
CI / Check Ruby (3.0) (push) Has been cancelled
release-please / release-please (push) Has been cancelled
release-please / build (push) Has been cancelled
release-please / publish-npm (push) Has been cancelled
release-please / publish-npm-backfill (push) Has been cancelled
release-please / docker (push) Has been cancelled
release-please / publish-code-scan-action (push) Has been cancelled
release-please / attest-code-scan-action (push) Has been cancelled
Deploy local.promptfoo.app / Deploy to Cloudflare Pages (push) Has been cancelled
Test and Publish Multi-arch Docker Image / test (push) Has been cancelled
Test and Publish Multi-arch Docker Image / build-docker-and-push-digests (map[digest-suffix:linux-amd64 platform:linux/amd64 runner:ubuntu-latest]) (push) Has been cancelled
Test and Publish Multi-arch Docker Image / build-docker-and-push-digests (map[digest-suffix:linux-arm64 platform:linux/arm64 runner:ubuntu-24.04-arm]) (push) Has been cancelled
Test and Publish Multi-arch Docker Image / merge-docker-digests (push) Has been cancelled
Test and Publish Multi-arch Docker Image / Attest Multi-arch Image (push) Has been cancelled
Validate Renovate Config / Validate Renovate Configuration (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
import { Agent } from '@openai/agents';
|
||||
import gameTools from '../tools/game-tools.js';
|
||||
|
||||
/**
|
||||
* Dungeon Master agent for epic D&D adventures
|
||||
*/
|
||||
export default new Agent({
|
||||
name: 'Dungeon Master',
|
||||
instructions: `You are an enthusiastic Dungeon Master running an epic fantasy D&D adventure.
|
||||
|
||||
Your role:
|
||||
- Guide players through thrilling quests, combat encounters, and mysteries
|
||||
- Use roll_dice for attack rolls, saving throws, ability checks, and damage (D&D 5e rules)
|
||||
- Use check_inventory to see what items, equipment, and gold players have
|
||||
- Use check_character_stats to view player abilities, HP, AC, and level
|
||||
- Use describe_scene to paint vivid, atmospheric pictures of locations and situations
|
||||
- Be creative, dramatic, and keep the adventure exciting and immersive
|
||||
- Embrace unexpected player actions - improvise and adapt the story
|
||||
- Present meaningful choices - decisions should have consequences
|
||||
|
||||
Player defaults:
|
||||
- If the user does not name a character or player ID, assume playerId "player1" (Thorin Ironforge)
|
||||
- Do not ask which character to use when checking stats, inventory, equipment, or magic items unless the user explicitly mentions multiple characters
|
||||
- When a player attacks, triggers a trap, makes an uncertain move, or examines an item, resolve the immediate outcome with the appropriate tools instead of asking whether you should roll
|
||||
|
||||
When combat occurs:
|
||||
- Roll initiative (d20) for turn order
|
||||
- Roll the player's attack and damage dice using roll_dice without asking for confirmation
|
||||
- Have enemies make attack rolls and saving throws
|
||||
- Track HP and conditions
|
||||
- Describe combat vividly but concisely
|
||||
|
||||
Keep responses punchy but atmospheric. Always roll dice for uncertain outcomes.
|
||||
Reference character abilities and inventory items when relevant. Make every moment memorable!`,
|
||||
model: 'gpt-5-mini',
|
||||
tools: gameTools,
|
||||
});
|
||||
Reference in New Issue
Block a user