@alexkroman1/aai-cli 0.12.3 → 0.13.0
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 +69 -0
- package/bin.mjs +58 -0
- package/dist/_agent-BopNO5Bq.mjs +152 -0
- package/dist/_agent.d.ts +83 -0
- package/dist/_api-client.d.ts +92 -0
- package/dist/_artifacts-BJOYGQPp.mjs +21 -0
- package/dist/_artifacts.d.ts +16 -0
- package/dist/_build-target-C08aM-Es.mjs +1119 -0
- package/dist/_build-target.d.ts +276 -0
- package/dist/_bundler-CgBw5Bcu.mjs +102 -0
- package/dist/_bundler.d.ts +60 -0
- package/dist/_cli-common.d.ts +173 -0
- package/dist/_client-plugins.d.ts +57 -0
- package/dist/_config-mq1I5Cva.mjs +263 -0
- package/dist/_config.d.ts +122 -0
- package/dist/_console-audio.d.ts +17 -0
- package/dist/_console-session.d.ts +70 -0
- package/dist/_default-html.d.ts +33 -0
- package/dist/_deno-output.d.ts +23 -0
- package/dist/_deno-target.d.ts +74 -0
- package/dist/_deploy.d.ts +22 -0
- package/dist/_dev-agent-env.d.ts +27 -0
- package/dist/_dev-env-D9Uy5wNt.mjs +89 -0
- package/dist/_dev-env.d.ts +77 -0
- package/dist/_dev-restart.d.ts +64 -0
- package/dist/_dev-server-BNq5OnUJ.mjs +737 -0
- package/dist/_dev-server.d.ts +89 -0
- package/dist/_dev-session-ticket.d.ts +63 -0
- package/dist/_dev-source.d.ts +55 -0
- package/dist/_dev-tunnel.d.ts +90 -0
- package/dist/_dev-typecheck.d.ts +38 -0
- package/dist/_dev-vite-config.d.ts +100 -0
- package/dist/_dev-watch.d.ts +35 -0
- package/dist/_dotenv-file.d.ts +45 -0
- package/dist/_e2e-test-utils.d.ts +120 -0
- package/dist/_fault-mode.d.ts +194 -0
- package/dist/_help.d.ts +31 -0
- package/dist/_init.d.ts +66 -0
- package/dist/_mock-api.d.ts +22 -0
- package/dist/_mock-registry.d.ts +17 -0
- package/dist/_modal-app.d.ts +77 -0
- package/dist/_modal-output.d.ts +31 -0
- package/dist/_modal-target.d.ts +69 -0
- package/dist/_output-DBP9Op_d.mjs +120 -0
- package/dist/_output.d.ts +74 -0
- package/dist/_preflight-Bv6Ct4ss.mjs +149 -0
- package/dist/_preflight.d.ts +170 -0
- package/dist/_resource-commands.d.ts +22 -0
- package/dist/_run-code-deno-C0AtfHeH.mjs +268 -0
- package/dist/_run-code-deno.d.ts +130 -0
- package/dist/_server-common-CVXIeWrY.mjs +114 -0
- package/dist/_server-common.d.ts +75 -0
- package/dist/_slug-api-DJuwYZ6T.mjs +68 -0
- package/dist/_slug-api.d.ts +61 -0
- package/dist/_stop-server.d.ts +17 -0
- package/dist/_studio-BH05zugt.mjs +251 -0
- package/dist/_studio-commands.d.ts +73 -0
- package/dist/_studio.d.ts +80 -0
- package/dist/_target-bundle.d.ts +139 -0
- package/dist/_target-drain.d.ts +44 -0
- package/dist/_target-entry.d.ts +81 -0
- package/dist/_target-output.d.ts +63 -0
- package/dist/_templates-Bv-rd0SO.mjs +135 -0
- package/dist/_templates.d.ts +82 -0
- package/dist/_typecheck-gate-CcX2gLJZ.mjs +19 -0
- package/dist/_typecheck-gate.d.ts +11 -0
- package/dist/_ui-Coe0zwmm.mjs +102 -0
- package/dist/_ui.d.ts +90 -0
- package/dist/_utils-BVLdBvdT.mjs +186 -0
- package/dist/_utils.d.ts +126 -0
- package/dist/_vercel-output.d.ts +48 -0
- package/dist/_vercel-target.d.ts +169 -0
- package/dist/_vite-env-BiyJ0GQH.mjs +105 -0
- package/dist/_vite-env.d.ts +38 -0
- package/dist/_vitest-runner-CKI8_K1b.mjs +207 -0
- package/dist/_vitest-runner.d.ts +182 -0
- package/dist/_workflow-determinism-CLxFQ5ox.mjs +198 -0
- package/dist/_workflow-determinism.d.ts +118 -0
- package/dist/build-B37oBfEv.mjs +592 -0
- package/dist/build.d.ts +146 -0
- package/dist/cli-workflow.d.ts +10 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.mjs +1063 -198
- package/dist/client-bundler-D4SeZJ8E.mjs +240 -0
- package/dist/client-bundler.d.ts +32 -0
- package/dist/client-bundler.mjs +3 -0
- package/dist/console-D6OOjjeJ.mjs +443 -0
- package/dist/console.d.ts +70 -0
- package/dist/delete-Br0EOH0g.mjs +55 -0
- package/dist/delete.d.ts +25 -0
- package/dist/deploy-CLUH5cv2.mjs +97 -0
- package/dist/deploy.d.ts +25 -0
- package/dist/dev-ZVuyPLUk.mjs +274 -0
- package/dist/dev.d.ts +34 -0
- package/dist/eval-Dl8o91yC.mjs +74 -0
- package/dist/eval.d.ts +46 -0
- package/dist/init-x3FsKl2q.mjs +609 -0
- package/dist/init.d.ts +101 -0
- package/dist/login-oJdBWu2B.mjs +166 -0
- package/dist/login.d.ts +54 -0
- package/dist/logs-BfRq1HX9.mjs +80 -0
- package/dist/logs.d.ts +65 -0
- package/dist/project-config.d.ts +23 -0
- package/dist/project-config.mjs +3 -0
- package/dist/scaffold/.env.example +51 -0
- package/dist/scaffold/CLAUDE.md +390 -0
- package/dist/scaffold/agent-guide/AGENT-API.md +223 -0
- package/dist/scaffold/agent-guide/HOSTING.md +140 -0
- package/dist/scaffold/agent-guide/PIPELINE-TUNING.md +235 -0
- package/dist/scaffold/agent-guide/PROVIDERS.md +143 -0
- package/dist/scaffold/agent-guide/TESTING-EVALS.md +158 -0
- package/dist/scaffold/agent-guide/TOOLS.md +628 -0
- package/dist/scaffold/agent-guide/UI.md +291 -0
- package/dist/scaffold/agent-guide/WORKFLOWS.md +801 -0
- package/dist/scaffold/package.json +38 -0
- package/dist/scaffold/pnpm-workspace.yaml +45 -0
- package/dist/scaffold/tsconfig.json +3 -0
- package/dist/scaffold/vitest.config.ts +8 -0
- package/dist/secret-Db1UWLSZ.mjs +300 -0
- package/dist/secret.d.ts +70 -0
- package/dist/start.d.ts +112 -0
- package/dist/start.mjs +183 -0
- package/dist/studio-DAoJApzD.mjs +209 -0
- package/dist/studio.d.ts +55 -0
- package/dist/templates/applicant-screening-agent/agent.eval.test.ts +258 -0
- package/dist/templates/applicant-screening-agent/agent.test.ts +987 -0
- package/dist/templates/applicant-screening-agent/agent.ts +66 -0
- package/dist/templates/applicant-screening-agent/client.tsx +154 -0
- package/dist/templates/applicant-screening-agent/crews.ts +432 -0
- package/dist/templates/applicant-screening-agent/leads.json +86 -0
- package/dist/templates/applicant-screening-agent/screening-lock.test.ts +77 -0
- package/dist/templates/applicant-screening-agent/screening-lock.ts +51 -0
- package/dist/templates/applicant-screening-agent/shared.ts +483 -0
- package/dist/templates/applicant-screening-agent/system-prompt.md +21 -0
- package/dist/templates/applicant-screening-agent/tools/candidate_details.ts +49 -0
- package/dist/templates/applicant-screening-agent/tools/proceed_to_emails.ts +127 -0
- package/dist/templates/applicant-screening-agent/tools/read_email.ts +50 -0
- package/dist/templates/applicant-screening-agent/tools/rescore_with_feedback.ts +140 -0
- package/dist/templates/applicant-screening-agent/tools/screen_candidates.ts +128 -0
- package/dist/templates/applicant-screening-agent/tools/screening_status.ts +51 -0
- package/dist/templates/call-audit-workflow/agent.eval.test.ts +492 -0
- package/dist/templates/call-audit-workflow/agent.test.ts +1032 -0
- package/dist/templates/call-audit-workflow/agent.ts +161 -0
- package/dist/templates/call-audit-workflow/client.tsx +236 -0
- package/dist/templates/call-audit-workflow/guards.test.ts +233 -0
- package/dist/templates/call-audit-workflow/workflows/audit.ts +391 -0
- package/dist/templates/call-audit-workflow/workflows/ingest.ts +279 -0
- package/dist/templates/call-audit-workflow/workflows/media.ts +729 -0
- package/dist/templates/call-audit-workflow/workflows/summarize.ts +201 -0
- package/dist/templates/call-audit-workflow/workflows/sync-api.ts +54 -0
- package/dist/templates/code-interpreter-agent/agent.eval.test.ts +195 -0
- package/dist/templates/code-interpreter-agent/agent.test.ts +91 -0
- package/dist/templates/code-interpreter-agent/agent.ts +9 -0
- package/dist/templates/code-interpreter-agent/system-prompt.md +18 -0
- package/dist/templates/coding-agent/agent.eval.test.ts +135 -0
- package/dist/templates/coding-agent/agent.test.ts +109 -0
- package/dist/templates/coding-agent/agent.ts +45 -0
- package/dist/templates/coding-agent/chat.ts +63 -0
- package/dist/templates/coding-agent/shared.ts +46 -0
- package/dist/templates/coding-agent/system-prompt.md +32 -0
- package/dist/templates/coding-agent/tools/bash.ts +6 -0
- package/dist/templates/coding-agent/tools/delete_file.ts +6 -0
- package/dist/templates/coding-agent/tools/edit_file.ts +6 -0
- package/dist/templates/coding-agent/tools/glob.ts +6 -0
- package/dist/templates/coding-agent/tools/grep.ts +6 -0
- package/dist/templates/coding-agent/tools/list_files.ts +6 -0
- package/dist/templates/coding-agent/tools/read_file.ts +6 -0
- package/dist/templates/coding-agent/tools/todo_write.ts +6 -0
- package/dist/templates/coding-agent/tools/write_file.ts +6 -0
- package/dist/templates/custom-pipeline-agent/agent.eval.test.ts +79 -0
- package/dist/templates/custom-pipeline-agent/agent.test.ts +79 -0
- package/dist/templates/custom-pipeline-agent/agent.ts +13 -0
- package/dist/templates/custom-pipeline-agent/modes.test.ts +162 -0
- package/dist/templates/custom-pipeline-agent/stages.test.ts +330 -0
- package/dist/templates/document-redline-workflow/agent.eval.test.ts +254 -0
- package/dist/templates/document-redline-workflow/agent.test.ts +552 -0
- package/dist/templates/document-redline-workflow/agent.ts +112 -0
- package/dist/templates/document-redline-workflow/client.tsx +224 -0
- package/dist/templates/document-redline-workflow/form.ts +74 -0
- package/dist/templates/document-redline-workflow/workflows/prompts.ts +68 -0
- package/dist/templates/document-redline-workflow/workflows/redline.ts +317 -0
- package/dist/templates/emergency-dispatch-agent/agent.eval.test.ts +372 -0
- package/dist/templates/emergency-dispatch-agent/agent.test.ts +576 -0
- package/dist/templates/emergency-dispatch-agent/agent.ts +63 -0
- package/dist/templates/emergency-dispatch-agent/client.tsx +453 -0
- package/dist/templates/emergency-dispatch-agent/events.ts +48 -0
- package/dist/templates/emergency-dispatch-agent/guardrails.ts +105 -0
- package/dist/templates/emergency-dispatch-agent/shared.ts +768 -0
- package/dist/templates/emergency-dispatch-agent/system-prompt.md +42 -0
- package/dist/templates/emergency-dispatch-agent/tools/incident_add_note.ts +28 -0
- package/dist/templates/emergency-dispatch-agent/tools/incident_create.ts +95 -0
- package/dist/templates/emergency-dispatch-agent/tools/incident_escalate.ts +96 -0
- package/dist/templates/emergency-dispatch-agent/tools/incident_get.ts +40 -0
- package/dist/templates/emergency-dispatch-agent/tools/incident_triage.ts +90 -0
- package/dist/templates/emergency-dispatch-agent/tools/incident_update_status.ts +75 -0
- package/dist/templates/emergency-dispatch-agent/tools/ops_dashboard.ts +72 -0
- package/dist/templates/emergency-dispatch-agent/tools/ops_protocols.ts +27 -0
- package/dist/templates/emergency-dispatch-agent/tools/ops_run_scenario.ts +154 -0
- package/dist/templates/emergency-dispatch-agent/tools/resources_dispatch.ts +112 -0
- package/dist/templates/emergency-dispatch-agent/tools/resources_get_available.ts +34 -0
- package/dist/templates/emergency-dispatch-agent/tools/resources_update_status.ts +63 -0
- package/dist/templates/entertainment-picks-agent/agent.eval.test.ts +281 -0
- package/dist/templates/entertainment-picks-agent/agent.test.ts +260 -0
- package/dist/templates/entertainment-picks-agent/agent.ts +14 -0
- package/dist/templates/entertainment-picks-agent/client.tsx +169 -0
- package/dist/templates/entertainment-picks-agent/shared.ts +50 -0
- package/dist/templates/entertainment-picks-agent/system-prompt.md +19 -0
- package/dist/templates/entertainment-picks-agent/tools/recommend.ts +79 -0
- package/dist/templates/entertainment-picks-agent/tools/revisit.ts +56 -0
- package/dist/templates/executive-inbox-agent/agent.eval.test.ts +296 -0
- package/dist/templates/executive-inbox-agent/agent.test.ts +682 -0
- package/dist/templates/executive-inbox-agent/agent.ts +51 -0
- package/dist/templates/executive-inbox-agent/calendar.test.ts +203 -0
- package/dist/templates/executive-inbox-agent/client.tsx +195 -0
- package/dist/templates/executive-inbox-agent/inbox.ts +233 -0
- package/dist/templates/executive-inbox-agent/meeting.ts +138 -0
- package/dist/templates/executive-inbox-agent/nodes.ts +148 -0
- package/dist/templates/executive-inbox-agent/prompts.ts +333 -0
- package/dist/templates/executive-inbox-agent/review.ts +425 -0
- package/dist/templates/executive-inbox-agent/shared.ts +486 -0
- package/dist/templates/executive-inbox-agent/system-prompt.md +15 -0
- package/dist/templates/executive-inbox-agent/tools/accept.ts +10 -0
- package/dist/templates/executive-inbox-agent/tools/ask_question.ts +30 -0
- package/dist/templates/executive-inbox-agent/tools/draft_reply.ts +67 -0
- package/dist/templates/executive-inbox-agent/tools/edit.ts +10 -0
- package/dist/templates/executive-inbox-agent/tools/ignore.ts +10 -0
- package/dist/templates/executive-inbox-agent/tools/inbox_status.ts +27 -0
- package/dist/templates/executive-inbox-agent/tools/meeting_assistant.ts +52 -0
- package/dist/templates/executive-inbox-agent/tools/new_email.ts +50 -0
- package/dist/templates/executive-inbox-agent/tools/open_email.ts +157 -0
- package/dist/templates/executive-inbox-agent/tools/respond.ts +10 -0
- package/dist/templates/executive-inbox-agent/tools/review_memory.ts +22 -0
- package/dist/templates/executive-inbox-agent/tools/send_calendar_invite.ts +68 -0
- package/dist/templates/executive-inbox-agent/tools/triage_inbox.ts +75 -0
- package/dist/templates/front-desk-agent/agent.eval.test.ts +177 -0
- package/dist/templates/front-desk-agent/agent.test.ts +155 -0
- package/dist/templates/front-desk-agent/agent.ts +22 -0
- package/dist/templates/front-desk-agent/shared.ts +239 -0
- package/dist/templates/front-desk-agent/system-prompt.md +13 -0
- package/dist/templates/front-desk-agent/tools/verify_account.ts +41 -0
- package/dist/templates/home-assistant-agent/agent.eval.test.ts +176 -0
- package/dist/templates/home-assistant-agent/agent.test.ts +513 -0
- package/dist/templates/home-assistant-agent/agent.ts +37 -0
- package/dist/templates/home-assistant-agent/client.tsx +176 -0
- package/dist/templates/home-assistant-agent/ring.tsx +55 -0
- package/dist/templates/home-assistant-agent/shared.ts +130 -0
- package/dist/templates/home-assistant-agent/system-prompt.md +43 -0
- package/dist/templates/home-assistant-agent/tools/cancel_reminders.ts +16 -0
- package/dist/templates/home-assistant-agent/tools/deep_research.ts +55 -0
- package/dist/templates/home-assistant-agent/tools/remind_me.ts +53 -0
- package/dist/templates/home-assistant-agent/tools/stop.ts +25 -0
- package/dist/templates/home-assistant-agent/use-speaker.ts +98 -0
- package/dist/templates/home-assistant-agent/workflows/remind.ts +25 -0
- package/dist/templates/home-assistant-agent/workflows/research-prompts.ts +41 -0
- package/dist/templates/home-assistant-agent/workflows/research.ts +110 -0
- package/dist/templates/home-assistant-agent/workflows/text.ts +30 -0
- package/dist/templates/hotel-reception-agent/agent.eval.test.ts +241 -0
- package/dist/templates/hotel-reception-agent/agent.test.ts +1121 -0
- package/dist/templates/hotel-reception-agent/agent.ts +66 -0
- package/dist/templates/hotel-reception-agent/booking.ts +159 -0
- package/dist/templates/hotel-reception-agent/card.ts +92 -0
- package/dist/templates/hotel-reception-agent/catalogs.ts +219 -0
- package/dist/templates/hotel-reception-agent/client.tsx +150 -0
- package/dist/templates/hotel-reception-agent/concierge.ts +104 -0
- package/dist/templates/hotel-reception-agent/desk-seams.test.ts +339 -0
- package/dist/templates/hotel-reception-agent/desk.ts +220 -0
- package/dist/templates/hotel-reception-agent/disputes.ts +214 -0
- package/dist/templates/hotel-reception-agent/events.ts +80 -0
- package/dist/templates/hotel-reception-agent/hotel.ts +412 -0
- package/dist/templates/hotel-reception-agent/policies.ts +209 -0
- package/dist/templates/hotel-reception-agent/records.ts +384 -0
- package/dist/templates/hotel-reception-agent/restaurant.ts +147 -0
- package/dist/templates/hotel-reception-agent/seed.ts +955 -0
- package/dist/templates/hotel-reception-agent/session.ts +50 -0
- package/dist/templates/hotel-reception-agent/shared.ts +353 -0
- package/dist/templates/hotel-reception-agent/system-prompt.md +76 -0
- package/dist/templates/hotel-reception-agent/tools/abandon_booking.ts +31 -0
- package/dist/templates/hotel-reception-agent/tools/add_to_waitlist.ts +42 -0
- package/dist/templates/hotel-reception-agent/tools/book_airport_car.ts +58 -0
- package/dist/templates/hotel-reception-agent/tools/book_business_center.ts +44 -0
- package/dist/templates/hotel-reception-agent/tools/book_spa_appointment.ts +39 -0
- package/dist/templates/hotel-reception-agent/tools/book_tour.ts +35 -0
- package/dist/templates/hotel-reception-agent/tools/cancel_restaurant_reservation.ts +26 -0
- package/dist/templates/hotel-reception-agent/tools/cancel_room_booking.ts +64 -0
- package/dist/templates/hotel-reception-agent/tools/check_restaurant_availability.ts +24 -0
- package/dist/templates/hotel-reception-agent/tools/check_room_availability.ts +40 -0
- package/dist/templates/hotel-reception-agent/tools/choose_room.ts +93 -0
- package/dist/templates/hotel-reception-agent/tools/confirm_booking.ts +154 -0
- package/dist/templates/hotel-reception-agent/tools/dispatch_emergency.ts +62 -0
- package/dist/templates/hotel-reception-agent/tools/dispute_charge.ts +91 -0
- package/dist/templates/hotel-reception-agent/tools/flag_late_arrival.ts +27 -0
- package/dist/templates/hotel-reception-agent/tools/lookup_booking.ts +49 -0
- package/dist/templates/hotel-reception-agent/tools/lookup_guest_history.ts +28 -0
- package/dist/templates/hotel-reception-agent/tools/lookup_invoice.ts +27 -0
- package/dist/templates/hotel-reception-agent/tools/lookup_policy.ts +20 -0
- package/dist/templates/hotel-reception-agent/tools/lookup_restaurant_reservation.ts +27 -0
- package/dist/templates/hotel-reception-agent/tools/modify_restaurant_reservation.ts +75 -0
- package/dist/templates/hotel-reception-agent/tools/order_flowers.ts +40 -0
- package/dist/templates/hotel-reception-agent/tools/record_card.ts +46 -0
- package/dist/templates/hotel-reception-agent/tools/record_followup.ts +51 -0
- package/dist/templates/hotel-reception-agent/tools/record_group_inquiry.ts +45 -0
- package/dist/templates/hotel-reception-agent/tools/record_guest_details.ts +71 -0
- package/dist/templates/hotel-reception-agent/tools/reinstate_booking.ts +65 -0
- package/dist/templates/hotel-reception-agent/tools/request_flight_reconfirmation.ts +55 -0
- package/dist/templates/hotel-reception-agent/tools/resend_confirmation.ts +40 -0
- package/dist/templates/hotel-reception-agent/tools/reserve_table.ts +87 -0
- package/dist/templates/hotel-reception-agent/tools/resolve_room_conflict.ts +49 -0
- package/dist/templates/hotel-reception-agent/tools/schedule_wakeup_call.ts +49 -0
- package/dist/templates/hotel-reception-agent/tools/set_do_not_disturb.ts +29 -0
- package/dist/templates/hotel-reception-agent/tools/set_extras.ts +51 -0
- package/dist/templates/hotel-reception-agent/tools/set_stay.ts +98 -0
- package/dist/templates/hotel-reception-agent/tools/start_booking_modification.ts +58 -0
- package/dist/templates/hotel-reception-agent/tools/start_room_booking.ts +50 -0
- package/dist/templates/hotel-reception-agent/tools/take_guest_message.ts +72 -0
- package/dist/templates/hotel-reception-agent/tools/transfer_call.ts +48 -0
- package/dist/templates/hotel-reception-agent/tools/update_card.ts +46 -0
- package/dist/templates/hotel-reception-agent/tools/verify_booking.ts +96 -0
- package/dist/templates/link-digest-workflow/agent.eval.test.ts +231 -0
- package/dist/templates/link-digest-workflow/agent.test.ts +647 -0
- package/dist/templates/link-digest-workflow/agent.ts +100 -0
- package/dist/templates/link-digest-workflow/api-client.ts +144 -0
- package/dist/templates/link-digest-workflow/client.tsx +231 -0
- package/dist/templates/link-digest-workflow/workflows/digest.ts +334 -0
- package/dist/templates/medication-safety-agent/agent.eval.test.ts +182 -0
- package/dist/templates/medication-safety-agent/agent.test.ts +332 -0
- package/dist/templates/medication-safety-agent/agent.ts +62 -0
- package/dist/templates/medication-safety-agent/fda.test.ts +130 -0
- package/dist/templates/medication-safety-agent/fda.ts +159 -0
- package/dist/templates/medication-safety-agent/system-prompt.md +26 -0
- package/dist/templates/medication-safety-agent/tools/check_drug_interaction.ts +62 -0
- package/dist/templates/medication-safety-agent/tools/medication_lookup.ts +36 -0
- package/dist/templates/meeting-recap-agent/agent.eval.test.ts +446 -0
- package/dist/templates/meeting-recap-agent/agent.test.ts +1408 -0
- package/dist/templates/meeting-recap-agent/agent.ts +104 -0
- package/dist/templates/meeting-recap-agent/shared.ts +44 -0
- package/dist/templates/meeting-recap-agent/tools/cancel_recap.ts +23 -0
- package/dist/templates/meeting-recap-agent/tools/keep_transcript.ts +31 -0
- package/dist/templates/meeting-recap-agent/tools/recap_progress.ts +24 -0
- package/dist/templates/meeting-recap-agent/tools/recap_status.ts +45 -0
- package/dist/templates/meeting-recap-agent/tools/request_recap.ts +44 -0
- package/dist/templates/meeting-recap-agent/workflows/recap.ts +838 -0
- package/dist/templates/meeting-recap-agent/workflows/tokens.ts +47 -0
- package/dist/templates/pizza-ordering-agent/agent.eval.test.ts +228 -0
- package/dist/templates/pizza-ordering-agent/agent.test.ts +299 -0
- package/dist/templates/pizza-ordering-agent/agent.ts +24 -0
- package/dist/templates/pizza-ordering-agent/client.tsx +104 -0
- package/dist/templates/pizza-ordering-agent/shared.ts +225 -0
- package/dist/templates/pizza-ordering-agent/system-prompt.md +23 -0
- package/dist/templates/pizza-ordering-agent/tools/add_pizza.ts +27 -0
- package/dist/templates/pizza-ordering-agent/tools/place_order.ts +26 -0
- package/dist/templates/pizza-ordering-agent/tools/remove_pizza.ts +18 -0
- package/dist/templates/pizza-ordering-agent/tools/set_customer_name.ts +13 -0
- package/dist/templates/pizza-ordering-agent/tools/update_pizza.ts +28 -0
- package/dist/templates/pizza-ordering-agent/tools/view_order.ts +21 -0
- package/dist/templates/podcast-digest-workflow/agent.eval.test.ts +421 -0
- package/dist/templates/podcast-digest-workflow/agent.test.ts +1225 -0
- package/dist/templates/podcast-digest-workflow/agent.ts +143 -0
- package/dist/templates/podcast-digest-workflow/client.tsx +259 -0
- package/dist/templates/podcast-digest-workflow/workflows/digest.ts +499 -0
- package/dist/templates/podcast-digest-workflow/workflows/feeds.ts +575 -0
- package/dist/templates/podcast-digest-workflow/workflows/slack.ts +153 -0
- package/dist/templates/push-to-talk-agent/agent.eval.test.ts +78 -0
- package/dist/templates/push-to-talk-agent/agent.test.ts +63 -0
- package/dist/templates/push-to-talk-agent/agent.ts +22 -0
- package/dist/templates/push-to-talk-agent/client.tsx +124 -0
- package/dist/templates/push-to-talk-agent/shared.ts +28 -0
- package/dist/templates/push-to-talk-agent/system-prompt.md +11 -0
- package/dist/templates/push-to-talk-agent/tools/list_notes.ts +15 -0
- package/dist/templates/push-to-talk-agent/tools/save_note.ts +26 -0
- package/dist/templates/quickstart-agent/agent.eval.test.ts +148 -0
- package/dist/templates/quickstart-agent/agent.test.ts +96 -0
- package/dist/templates/quickstart-agent/agent.ts +25 -0
- package/dist/templates/quickstart-agent/system-prompt.md +8 -0
- package/dist/templates/quickstart-agent/tools/get_weather.ts +59 -0
- package/dist/templates/research-handoff-agent/agent.eval.test.ts +341 -0
- package/dist/templates/research-handoff-agent/agent.test.ts +831 -0
- package/dist/templates/research-handoff-agent/agent.ts +118 -0
- package/dist/templates/research-handoff-agent/shared.ts +41 -0
- package/dist/templates/research-handoff-agent/tools/file_it_now.ts +32 -0
- package/dist/templates/research-handoff-agent/tools/request_research.ts +33 -0
- package/dist/templates/research-handoff-agent/tools/research_progress.ts +23 -0
- package/dist/templates/research-handoff-agent/tools/research_status.ts +73 -0
- package/dist/templates/research-handoff-agent/workflows/filing.ts +164 -0
- package/dist/templates/research-handoff-agent/workflows/prompts.ts +46 -0
- package/dist/templates/research-handoff-agent/workflows/research.ts +100 -0
- package/dist/templates/research-handoff-agent/workflows/review.ts +43 -0
- package/dist/templates/research-planner-agent/agent.eval.test.ts +241 -0
- package/dist/templates/research-planner-agent/agent.test.ts +635 -0
- package/dist/templates/research-planner-agent/agent.ts +26 -0
- package/dist/templates/research-planner-agent/client.tsx +120 -0
- package/dist/templates/research-planner-agent/procedure.ts +287 -0
- package/dist/templates/research-planner-agent/prompts.ts +153 -0
- package/dist/templates/research-planner-agent/shared.ts +327 -0
- package/dist/templates/research-planner-agent/system-prompt.md +18 -0
- package/dist/templates/research-planner-agent/tools/plan_status.ts +41 -0
- package/dist/templates/research-planner-agent/tools/revise_plan.ts +71 -0
- package/dist/templates/research-planner-agent/tools/start_plan.ts +62 -0
- package/dist/templates/research-planner-agent/tools/work_next_step.ts +177 -0
- package/dist/templates/retail-orders-agent/address.ts +109 -0
- package/dist/templates/retail-orders-agent/agent.eval.test.ts +305 -0
- package/dist/templates/retail-orders-agent/agent.test.ts +1260 -0
- package/dist/templates/retail-orders-agent/agent.ts +103 -0
- package/dist/templates/retail-orders-agent/authenticate.ts +34 -0
- package/dist/templates/retail-orders-agent/cancel.ts +114 -0
- package/dist/templates/retail-orders-agent/client.tsx +579 -0
- package/dist/templates/retail-orders-agent/keyterms.ts +154 -0
- package/dist/templates/retail-orders-agent/payment.ts +103 -0
- package/dist/templates/retail-orders-agent/pending.test.ts +204 -0
- package/dist/templates/retail-orders-agent/pending.ts +137 -0
- package/dist/templates/retail-orders-agent/refund.ts +19 -0
- package/dist/templates/retail-orders-agent/registry.test.ts +446 -0
- package/dist/templates/retail-orders-agent/resolve.test.ts +100 -0
- package/dist/templates/retail-orders-agent/resolve.ts +114 -0
- package/dist/templates/retail-orders-agent/returns.ts +101 -0
- package/dist/templates/retail-orders-agent/seed.json +4260 -0
- package/dist/templates/retail-orders-agent/seed.test.ts +233 -0
- package/dist/templates/retail-orders-agent/shared.test.ts +240 -0
- package/dist/templates/retail-orders-agent/shared.ts +547 -0
- package/dist/templates/retail-orders-agent/store.test.ts +331 -0
- package/dist/templates/retail-orders-agent/store.ts +485 -0
- package/dist/templates/retail-orders-agent/swap.test.ts +189 -0
- package/dist/templates/retail-orders-agent/swap.ts +358 -0
- package/dist/templates/retail-orders-agent/system-prompt.md +152 -0
- package/dist/templates/retail-orders-agent/tools/cancel_change.ts +33 -0
- package/dist/templates/retail-orders-agent/tools/cancel_pending_order.ts +31 -0
- package/dist/templates/retail-orders-agent/tools/confirm_change.ts +42 -0
- package/dist/templates/retail-orders-agent/tools/exchange_delivered_order_items.ts +47 -0
- package/dist/templates/retail-orders-agent/tools/find_user_id_by_email.ts +31 -0
- package/dist/templates/retail-orders-agent/tools/find_user_id_by_name_zip.ts +36 -0
- package/dist/templates/retail-orders-agent/tools/get_item_details.ts +27 -0
- package/dist/templates/retail-orders-agent/tools/get_order_details.ts +37 -0
- package/dist/templates/retail-orders-agent/tools/get_product_details.ts +30 -0
- package/dist/templates/retail-orders-agent/tools/get_user_details.ts +37 -0
- package/dist/templates/retail-orders-agent/tools/list_all_product_types.ts +22 -0
- package/dist/templates/retail-orders-agent/tools/modify_pending_order_address.ts +27 -0
- package/dist/templates/retail-orders-agent/tools/modify_pending_order_items.ts +48 -0
- package/dist/templates/retail-orders-agent/tools/modify_pending_order_payment.ts +32 -0
- package/dist/templates/retail-orders-agent/tools/modify_user_address.ts +26 -0
- package/dist/templates/retail-orders-agent/tools/return_delivered_order_items.ts +37 -0
- package/dist/templates/retail-orders-agent/tools/transfer_to_human_agents.ts +28 -0
- package/dist/templates/roadside-assistance-agent/agent.eval.test.ts +283 -0
- package/dist/templates/roadside-assistance-agent/agent.test.ts +650 -0
- package/dist/templates/roadside-assistance-agent/agent.ts +89 -0
- package/dist/templates/roadside-assistance-agent/call.ts +232 -0
- package/dist/templates/roadside-assistance-agent/events.ts +92 -0
- package/dist/templates/roadside-assistance-agent/shared.ts +346 -0
- package/dist/templates/roadside-assistance-agent/system-prompt.md +37 -0
- package/dist/templates/roadside-assistance-agent/tools/acknowledge_disclosure.ts +61 -0
- package/dist/templates/roadside-assistance-agent/tools/dispatch_truck.ts +149 -0
- package/dist/templates/roadside-assistance-agent/tools/job_status.ts +38 -0
- package/dist/templates/roadside-assistance-agent/tools/lookup_coverage.ts +83 -0
- package/dist/templates/roadside-assistance-agent/tools/report_location.ts +79 -0
- package/dist/templates/roadside-assistance-agent/tools/service_disclosure.ts +51 -0
- package/dist/templates/roadside-assistance-agent/yard.test.ts +162 -0
- package/dist/templates/roadside-assistance-agent/yard.ts +183 -0
- package/dist/templates/spoken-summary-workflow/agent.eval.test.ts +354 -0
- package/dist/templates/spoken-summary-workflow/agent.test.ts +493 -0
- package/dist/templates/spoken-summary-workflow/agent.ts +164 -0
- package/dist/templates/spoken-summary-workflow/client.tsx +220 -0
- package/dist/templates/spoken-summary-workflow/workflows/summarize.ts +260 -0
- package/dist/templates/spoken-summary-workflow/workflows/transcribe.ts +137 -0
- package/dist/templates/tabletop-rpg-agent/agent.eval.test.ts +314 -0
- package/dist/templates/tabletop-rpg-agent/agent.test.ts +1000 -0
- package/dist/templates/tabletop-rpg-agent/agent.ts +58 -0
- package/dist/templates/tabletop-rpg-agent/client.tsx +814 -0
- package/dist/templates/tabletop-rpg-agent/shared.ts +1028 -0
- package/dist/templates/tabletop-rpg-agent/system-prompt.md +116 -0
- package/dist/templates/tabletop-rpg-agent/tools/action_roll.ts +119 -0
- package/dist/templates/tabletop-rpg-agent/tools/burn_momentum.ts +110 -0
- package/dist/templates/tabletop-rpg-agent/tools/check_state.ts +37 -0
- package/dist/templates/tabletop-rpg-agent/tools/oracle.ts +255 -0
- package/dist/templates/tabletop-rpg-agent/tools/setup_character.ts +228 -0
- package/dist/templates/tabletop-rpg-agent/tools/update_state.ts +194 -0
- package/dist/templates/technical-support-agent/agent.eval.test.ts +260 -0
- package/dist/templates/technical-support-agent/agent.test.ts +424 -0
- package/dist/templates/technical-support-agent/agent.ts +39 -0
- package/dist/templates/technical-support-agent/client.tsx +132 -0
- package/dist/templates/technical-support-agent/knowledge.json +65 -0
- package/dist/templates/technical-support-agent/knowledge.ts +165 -0
- package/dist/templates/technical-support-agent/nodes.ts +143 -0
- package/dist/templates/technical-support-agent/procedure.ts +453 -0
- package/dist/templates/technical-support-agent/prompts.ts +102 -0
- package/dist/templates/technical-support-agent/shared.ts +128 -0
- package/dist/templates/technical-support-agent/system-prompt.md +18 -0
- package/dist/templates/technical-support-agent/tools/answer_question.ts +134 -0
- package/dist/templates/technical-support-agent/tools/list_topics.ts +23 -0
- package/dist/templates/technical-support-agent/tools/log_ticket.ts +30 -0
- package/dist/templates/text-adventure-agent/agent.eval.test.ts +222 -0
- package/dist/templates/text-adventure-agent/agent.test.ts +429 -0
- package/dist/templates/text-adventure-agent/agent.ts +76 -0
- package/dist/templates/text-adventure-agent/client.tsx +359 -0
- package/dist/templates/text-adventure-agent/shared.ts +210 -0
- package/dist/templates/text-adventure-agent/system-prompt.md +50 -0
- package/dist/templates/text-adventure-agent/tools/game_state_drop.ts +29 -0
- package/dist/templates/text-adventure-agent/tools/game_state_flag.ts +13 -0
- package/dist/templates/text-adventure-agent/tools/game_state_get.ts +17 -0
- package/dist/templates/text-adventure-agent/tools/game_state_move.ts +15 -0
- package/dist/templates/text-adventure-agent/tools/game_state_restart.ts +13 -0
- package/dist/templates/text-adventure-agent/tools/game_state_score.ts +19 -0
- package/dist/templates/text-adventure-agent/tools/game_state_take.ts +13 -0
- package/dist/templates/topic-briefing-agent/agent.eval.test.ts +202 -0
- package/dist/templates/topic-briefing-agent/agent.test.ts +651 -0
- package/dist/templates/topic-briefing-agent/agent.ts +45 -0
- package/dist/templates/topic-briefing-agent/shared.ts +392 -0
- package/dist/templates/topic-briefing-agent/slack.ts +108 -0
- package/dist/templates/topic-briefing-agent/system-prompt.md +54 -0
- package/dist/templates/topic-briefing-agent/tools/briefing_so_far.ts +43 -0
- package/dist/templates/topic-briefing-agent/tools/research_topic.ts +80 -0
- package/dist/templates/topic-briefing-agent/tools/send_briefing.ts +115 -0
- package/dist/templates/topic-briefing-agent/tools/verify_claim.ts +123 -0
- package/dist/templates/transcription-workflow/agent.eval.test.ts +237 -0
- package/dist/templates/transcription-workflow/agent.test.ts +2032 -0
- package/dist/templates/transcription-workflow/agent.ts +188 -0
- package/dist/templates/transcription-workflow/client.tsx +511 -0
- package/dist/templates/transcription-workflow/recover.test.ts +222 -0
- package/dist/templates/transcription-workflow/recover.ts +154 -0
- package/dist/templates/transcription-workflow/run-panel.tsx +212 -0
- package/dist/templates/transcription-workflow/total-latency.tsx +170 -0
- package/dist/templates/transcription-workflow/workflows/batch.ts +189 -0
- package/dist/templates/transcription-workflow/workflows/downsample.ts +273 -0
- package/dist/templates/transcription-workflow/workflows/normalize.ts +385 -0
- package/dist/templates/transcription-workflow/workflows/stitch.ts +122 -0
- package/dist/templates/transcription-workflow/workflows/stream.ts +690 -0
- package/dist/templates/transcription-workflow/workflows/sync-api.ts +81 -0
- package/dist/templates/transcription-workflow/workflows/transcribe.ts +479 -0
- package/dist/templates/transcription-workflow/workflows/wav.ts +250 -0
- package/dist/templates/travel-concierge-agent/agent.eval.test.ts +300 -0
- package/dist/templates/travel-concierge-agent/agent.test.ts +601 -0
- package/dist/templates/travel-concierge-agent/agent.ts +62 -0
- package/dist/templates/travel-concierge-agent/call-events.ts +80 -0
- package/dist/templates/travel-concierge-agent/client.tsx +146 -0
- package/dist/templates/travel-concierge-agent/routing.ts +170 -0
- package/dist/templates/travel-concierge-agent/shared.ts +862 -0
- package/dist/templates/travel-concierge-agent/system-prompt.md +30 -0
- package/dist/templates/travel-concierge-agent/tools/book_car_rental.ts +21 -0
- package/dist/templates/travel-concierge-agent/tools/book_excursion.ts +19 -0
- package/dist/templates/travel-concierge-agent/tools/book_hotel.ts +21 -0
- package/dist/templates/travel-concierge-agent/tools/cancel_action.ts +9 -0
- package/dist/templates/travel-concierge-agent/tools/cancel_ticket.ts +21 -0
- package/dist/templates/travel-concierge-agent/tools/complete_or_escalate.ts +9 -0
- package/dist/templates/travel-concierge-agent/tools/confirm_action.ts +9 -0
- package/dist/templates/travel-concierge-agent/tools/lookup_booking.ts +36 -0
- package/dist/templates/travel-concierge-agent/tools/search_car_rentals.ts +36 -0
- package/dist/templates/travel-concierge-agent/tools/search_excursions.ts +40 -0
- package/dist/templates/travel-concierge-agent/tools/search_flights.ts +58 -0
- package/dist/templates/travel-concierge-agent/tools/search_hotels.ts +39 -0
- package/dist/templates/travel-concierge-agent/tools/to_car_rental_assistant.ts +11 -0
- package/dist/templates/travel-concierge-agent/tools/to_excursion_assistant.ts +11 -0
- package/dist/templates/travel-concierge-agent/tools/to_flight_assistant.ts +11 -0
- package/dist/templates/travel-concierge-agent/tools/to_hotel_assistant.ts +11 -0
- package/dist/templates/travel-concierge-agent/tools/update_ticket.ts +23 -0
- package/dist/templates/web-research-agent/agent.eval.test.ts +144 -0
- package/dist/templates/web-research-agent/agent.test.ts +181 -0
- package/dist/templates/web-research-agent/agent.ts +128 -0
- package/dist/templates/web-research-agent/system-prompt.md +33 -0
- package/dist/templates/word-game-agent/agent.eval.test.ts +222 -0
- package/dist/templates/word-game-agent/agent.test.ts +484 -0
- package/dist/templates/word-game-agent/agent.ts +55 -0
- package/dist/templates/word-game-agent/client.tsx +211 -0
- package/dist/templates/word-game-agent/game.ts +133 -0
- package/dist/templates/word-game-agent/guess.ts +63 -0
- package/dist/templates/word-game-agent/player.ts +67 -0
- package/dist/templates/word-game-agent/shared.ts +249 -0
- package/dist/templates/word-game-agent/system-prompt.md +15 -0
- package/dist/templates/word-game-agent/tools/final_score.ts +37 -0
- package/dist/templates/word-game-agent/tools/relay_description.ts +137 -0
- package/dist/templates/word-game-agent/tools/repeat_word.ts +19 -0
- package/dist/templates/word-game-agent/tools/skip_word.ts +31 -0
- package/dist/templates/word-game-agent/tools/start_game.ts +52 -0
- package/dist/templates/word-game-agent/words.ts +278 -0
- package/dist/test-XufelYGW.mjs +104 -0
- package/dist/test.d.ts +81 -0
- package/dist/typecheck.d.ts +44 -0
- package/dist/typecheck.mjs +185 -0
- package/dist/worker-bundler.d.ts +37 -0
- package/dist/worker-bundler.mjs +156 -0
- package/dist/workflow-CDUlTD5B.mjs +239 -0
- package/dist/workflow.d.ts +76 -0
- package/package.json +74 -28
- package/dist/_api-client-H4MFOr8j.mjs +0 -35
- package/dist/_bundler-DQtFVeww.mjs +0 -125
- package/dist/_discover-DzsMlg3G.mjs +0 -218
- package/dist/_init-CbMs9S2O.mjs +0 -56
- package/dist/_templates-BDkbj3TM.mjs +0 -72
- package/dist/_ui-DWGXImbO.mjs +0 -30
- package/dist/delete-CalIL6Pg.mjs +0 -34
- package/dist/deploy-CLs8gLHV.mjs +0 -53
- package/dist/dev-DEZKrw8v.mjs +0 -18
- package/dist/init-CNuntiij.mjs +0 -114
- package/dist/secret-xmLQ96Yz.mjs +0 -46
- package/dist/test-yqHGZPF3.mjs +0 -44
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
You are the Narrator of a solo tabletop RPG engine. You guide the player through a narrative adventure using proven game mechanics adapted from Ironsworn/Starforged, Mythic GME, and Blades in the Dark.
|
|
2
|
+
|
|
3
|
+
CHARACTER CREATION — ONE TURN SETUP:
|
|
4
|
+
The player only needs to give you ONE thing to start: a name, a genre, a character idea, or just say "go". That is enough. You fill in the rest.
|
|
5
|
+
|
|
6
|
+
From whatever the player gives you, infer the best genre, tone, and archetype. If they say "cyberpunk hacker named Kai", you have everything. If they just say "Luna", pick a genre and archetype that sounds interesting and go. If they say "surprise me", pick everything yourself.
|
|
7
|
+
|
|
8
|
+
Available genres: Dark Fantasy, High Fantasy, Sci-Fi, Horror / Mystery, Steampunk, Cyberpunk, Urban Fantasy, Victorian Crime, Historical / Roman, Fairy Tale World, Slice of Life 1990s, Outdoor Survival.
|
|
9
|
+
Available tones: Dark & Gritty, Serious but Fair, Melancholic, Absurd & Grotesque, Slow-Burn Horror, Cheerful & Fun, Romantic, Slapstick, Epic & Heroic, Tarantino-Style, Cozy & Comfy, Tragicomic.
|
|
10
|
+
Available archetypes: Outsider / Loner, Investigator / Curious, Trickster / Charmer, Protector / Warrior, Hardboiled / Veteran, Scholar / Mystic, Healer / Medic, Crafter / Inventor, Artist / Bard.
|
|
11
|
+
|
|
12
|
+
Once you have the player's input, immediately call setup_character with ALL fields filled in: genre, tone, archetype, playerName, characterConcept, settingDescription, startingLocation, locationDesc, timeOfDay, openingSituation, npc1Name, npc1Desc, npc1Disposition, npc1Agenda, threatClockName, threatClockDesc. You must generate all of these yourself based on the player's input. setup_character handles all state initialization — stats, NPCs, clocks, story blueprint, everything. After it returns, just narrate the opening scene. Do NOT call update_state after setup_character — it is already done.
|
|
13
|
+
|
|
14
|
+
Do all of this in ONE turn. Never ask follow-up questions before starting. The player can always change things later by telling you.
|
|
15
|
+
|
|
16
|
+
IMPORTANT FOR SPEECH: Never list more than three or four options. Keep all responses punchy and conversational. No long lists — they sound terrible spoken aloud.
|
|
17
|
+
|
|
18
|
+
CORE MECHANIC - ACTION ROLL (Ironsworn):
|
|
19
|
+
When the player attempts something risky, use the action_roll tool. You choose the move and stat:
|
|
20
|
+
- edge for speed, agility, precision, ranged combat
|
|
21
|
+
- heart for courage, willpower, empathy, leadership
|
|
22
|
+
- iron for strength, endurance, melee combat
|
|
23
|
+
- shadow for stealth, deception, cunning
|
|
24
|
+
- wits for expertise, knowledge, observation
|
|
25
|
+
|
|
26
|
+
The system rolls 2d6 + stat (capped at 10) vs 2d10.
|
|
27
|
+
- Strong Hit: beat both d10s. Clean success.
|
|
28
|
+
- Weak Hit: beat one d10. Success with a cost or complication.
|
|
29
|
+
- Miss: beat neither. Failure with consequences.
|
|
30
|
+
- Match (both d10s same): amplifies the result. Strong Hit + Match = exceptional. Miss + Match = dire escalation.
|
|
31
|
+
|
|
32
|
+
MOVES (12 mechanical actions):
|
|
33
|
+
- face_danger: overcome obstacles, act under pressure
|
|
34
|
+
- gather_information: search, investigate, observe
|
|
35
|
+
- secure_advantage: prepare, scout, gain edge
|
|
36
|
+
- world_shaping: player introduces new world elements
|
|
37
|
+
- compel: persuade, negotiate, manipulate
|
|
38
|
+
- make_connection: bond with someone, establish relationship
|
|
39
|
+
- test_bond: rely on relationship, call in favor
|
|
40
|
+
- clash: opposed combat (melee/range)
|
|
41
|
+
- strike: attack when opponent cannot react
|
|
42
|
+
- endure_harm: suffer physical damage
|
|
43
|
+
- endure_stress: suffer mental/emotional damage
|
|
44
|
+
- resupply: restore supply track
|
|
45
|
+
|
|
46
|
+
Pure conversation has no risk and no move — do NOT call action_roll for it. Just respond in character.
|
|
47
|
+
|
|
48
|
+
POSITION & EFFECT (Blades in the Dark):
|
|
49
|
+
Every risky action has a position and effect:
|
|
50
|
+
Position (how dangerous):
|
|
51
|
+
- Controlled: upper hand, failure is mild
|
|
52
|
+
- Risky: default, real consequences on failure
|
|
53
|
+
- Desperate: in trouble, failure hits hard
|
|
54
|
+
|
|
55
|
+
Effect (what can be achieved):
|
|
56
|
+
- Limited: partial success even on strong hit
|
|
57
|
+
- Standard: full success as described
|
|
58
|
+
- Great: exceeds expectations, bonus outcome
|
|
59
|
+
|
|
60
|
+
Position scales damage on miss. Effect scales momentum gain on strong hit.
|
|
61
|
+
|
|
62
|
+
MOMENTUM (Ironsworn):
|
|
63
|
+
- Starts at 2, range -6 to +10
|
|
64
|
+
- Weak Hit: +1. Strong Hit: +2 (or +3 with great effect)
|
|
65
|
+
- Miss: -2 (or -3 if desperate)
|
|
66
|
+
- Burn: the player can spend momentum to upgrade the most recent roll — call burn_momentum (no arguments; it validates against the stored roll). Momentum beating both challenge dice upgrades fully; beating one turns a Miss into a Weak Hit. Burning reverts the original result's consequences, applies the upgraded ones, and resets momentum to +2. The window is only open while a roll is standing: once you move the scene on with update_state, the roll is spent and burn_momentum refuses.
|
|
67
|
+
|
|
68
|
+
CHAOS FACTOR (Mythic GME):
|
|
69
|
+
- Range 3-9, starts at 5
|
|
70
|
+
- Miss: chaos +1 (max 9). Strong Hit: chaos -1 (min 3). Weak Hit: no change.
|
|
71
|
+
- Scene interrupt probability: (chaos - 3) x 10%. Chaos 5 = 20%, chaos 9 = 60%.
|
|
72
|
+
- When interrupt triggers, something unexpected disrupts the scene.
|
|
73
|
+
|
|
74
|
+
CLOCKS (Blades in the Dark):
|
|
75
|
+
Clocks track threats, progress, and NPC schemes:
|
|
76
|
+
- Threat clocks advance on misses. When full, the threat strikes.
|
|
77
|
+
- Progress clocks track long-term goals.
|
|
78
|
+
- Scheme clocks track NPC agendas (advance every 5 scenes).
|
|
79
|
+
|
|
80
|
+
NPCs:
|
|
81
|
+
NPCs have dispositions: hostile, distrustful, neutral, friendly, loyal.
|
|
82
|
+
Social strong hits shift disposition favorably. Social misses damage bonds.
|
|
83
|
+
NPCs have agendas that drive their behavior.
|
|
84
|
+
Track up to 12 active NPCs.
|
|
85
|
+
|
|
86
|
+
CRISIS:
|
|
87
|
+
- Health or spirit at 0 = crisis mode. Both at 0 = game over.
|
|
88
|
+
- In crisis, every miss is more dangerous.
|
|
89
|
+
- Game over is final. Nothing more can be rolled or updated — narrate the ending. setup_character is the only way on, and it begins a new story.
|
|
90
|
+
|
|
91
|
+
KID MODE:
|
|
92
|
+
If kidMode is true: no explicit violence, no death, hopeful tone, age-appropriate content. Enemies are "defeated" not "killed". Think Studio Ghibli, Zelda.
|
|
93
|
+
|
|
94
|
+
STORY BLUEPRINT:
|
|
95
|
+
The story follows either a 3-act structure or Kishotenketsu (4-part). Created at game start. Track act transitions based on narrative conditions, not scene numbers.
|
|
96
|
+
|
|
97
|
+
CORRECTION SYSTEM:
|
|
98
|
+
If the player starts a message with ##, treat it as a correction to the previous turn. Acknowledge the correction and rewrite the scene.
|
|
99
|
+
|
|
100
|
+
FLOW:
|
|
101
|
+
1. The LIVE CAMPAIGN SHEET at the end of these instructions is refreshed before every reply: the tracks, momentum, chaos factor, clocks, cast, and which act you are in. It is the engine's own record and it is never a turn behind, so read it rather than remembering, and never state a number that contradicts it. You do not have to open a turn with a tool call to find out where you are. `check_state` is still there for the full board — the chronicle, the whole NPC records, the story blueprint — and for the position (`state` and `instruction`) restated on demand; every other tool answers with that same pair, and a tool that is not available yet refuses and tells you what has to happen first.
|
|
102
|
+
2. Present situations with tension and choice. Two to three options, but accept anything.
|
|
103
|
+
3. For ANY risky action, you MUST call action_roll. NEVER narrate success or failure without rolling. NEVER reduce health, spirit, supply, or momentum yourself — action_roll does this through code. If you narrate damage without calling action_roll, the sidebar will be wrong and the game will break.
|
|
104
|
+
4. After location changes, new NPCs, or other world changes, call update_state. But NEVER manually set health, spirit, supply, or momentum in update_state unless the player is resting or trading — action_roll handles combat and risk.
|
|
105
|
+
5. The chaos interrupt check happens automatically inside action_roll. If the result includes a chaosInterrupt, weave that disruption into your narration.
|
|
106
|
+
6. Every 3 scenes, consider story arc progression and NPC development via update_state.
|
|
107
|
+
|
|
108
|
+
VOICE:
|
|
109
|
+
- Keep narration to 2-4 sentences. Optimized for spoken conversation.
|
|
110
|
+
- Short, punchy sentences. No visual formatting.
|
|
111
|
+
- Never mention "search results" or "sources".
|
|
112
|
+
- No exclamation points. Calm, conversational tone.
|
|
113
|
+
- One vivid detail per scene. Let the player's imagination do the rest.
|
|
114
|
+
- NPCs speak in character. Brief, natural dialog fragments.
|
|
115
|
+
- Never over-describe. If the player wants more detail, they will ask.
|
|
116
|
+
- Describe consequences naturally within the narration, do not list them.
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import {
|
|
3
|
+
applyConsequences,
|
|
4
|
+
canBurnMomentum,
|
|
5
|
+
checkChaosInterrupt,
|
|
6
|
+
gameSlot,
|
|
7
|
+
inCrisis,
|
|
8
|
+
isGameOver,
|
|
9
|
+
MOVE_LABELS,
|
|
10
|
+
MOVES,
|
|
11
|
+
RESULT_LABELS,
|
|
12
|
+
rollAction,
|
|
13
|
+
storyFlow,
|
|
14
|
+
updateChaosFactor,
|
|
15
|
+
} from "../shared.ts";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Gated on `playing`, which is what makes "never narrate a success without
|
|
19
|
+
* rolling" hold from the other side too: before `setup_character` there are no
|
|
20
|
+
* stats to roll against, and this used to roll 2d6 against nobody and apply
|
|
21
|
+
* consequences to a game that did not exist. After a game over it refuses
|
|
22
|
+
* outright — `gameOver` was a flag nothing acted on.
|
|
23
|
+
*/
|
|
24
|
+
export default storyFlow.tool({
|
|
25
|
+
description:
|
|
26
|
+
"Core mechanic. Roll 2d6 + stat (capped at 10) vs 2d10 challenge dice. Also applies consequences (health/spirit/supply/momentum changes, clock advancement) based on move type, position, and result. Call for ANY risky action. Pure conversation needs no roll.",
|
|
27
|
+
when: "playing",
|
|
28
|
+
inputSchema: z.object({
|
|
29
|
+
move: z.enum(MOVES).describe("Which move the player is making"),
|
|
30
|
+
stat: z.enum(["edge", "heart", "iron", "shadow", "wits"]).describe("Which stat to roll"),
|
|
31
|
+
position: z
|
|
32
|
+
.enum(["controlled", "risky", "desperate"])
|
|
33
|
+
.describe("How dangerous the situation is"),
|
|
34
|
+
effect: z.enum(["limited", "standard", "great"]).describe("What can realistically be achieved"),
|
|
35
|
+
purpose: z.string().max(300).describe("What the character is attempting"),
|
|
36
|
+
targetNpcId: z.string().max(32).describe("Target NPC id for social moves").optional(),
|
|
37
|
+
}),
|
|
38
|
+
execute: (args, ctx) =>
|
|
39
|
+
gameSlot.update(ctx, (state) => {
|
|
40
|
+
const statValue = state[args.stat];
|
|
41
|
+
const roll = rollAction(args.stat, statValue, args.move, ctx.random);
|
|
42
|
+
|
|
43
|
+
// Apply consequences
|
|
44
|
+
const { consequences, clockEvents, deltas } = applyConsequences(
|
|
45
|
+
state,
|
|
46
|
+
roll,
|
|
47
|
+
args.position,
|
|
48
|
+
args.effect,
|
|
49
|
+
args.targetNpcId ?? null,
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
// Persist the roll (with the exact deltas applied) so burn_momentum can
|
|
53
|
+
// validate against it and revert it — the model never supplies dice.
|
|
54
|
+
state.lastRoll = {
|
|
55
|
+
...roll,
|
|
56
|
+
position: args.position,
|
|
57
|
+
effect: args.effect,
|
|
58
|
+
targetNpcId: args.targetNpcId ?? null,
|
|
59
|
+
deltas,
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
// Update chaos factor
|
|
63
|
+
updateChaosFactor(state, roll.result);
|
|
64
|
+
|
|
65
|
+
// Check for chaos interrupt. `ctx.random` here as everywhere else in this
|
|
66
|
+
// body: the parameter is optional and falls back to `Math.random`, so
|
|
67
|
+
// omitting it took ONE of a roll's five draws off the seam and out of the
|
|
68
|
+
// process — a scene resolved from a seeded context was reproducible in its
|
|
69
|
+
// dice and not in its interrupt.
|
|
70
|
+
const interrupt = checkChaosInterrupt(state, ctx.random);
|
|
71
|
+
|
|
72
|
+
// Increment scene count
|
|
73
|
+
state.sceneCount++;
|
|
74
|
+
|
|
75
|
+
// Can burn momentum?
|
|
76
|
+
const burnTarget = canBurnMomentum(state, roll);
|
|
77
|
+
|
|
78
|
+
return {
|
|
79
|
+
purpose: args.purpose,
|
|
80
|
+
move: MOVE_LABELS[args.move] || args.move,
|
|
81
|
+
moveCode: args.move,
|
|
82
|
+
stat: args.stat,
|
|
83
|
+
statValue,
|
|
84
|
+
actionDice: [roll.d1, roll.d2],
|
|
85
|
+
challengeDice: [roll.c1, roll.c2],
|
|
86
|
+
actionScore: roll.actionScore,
|
|
87
|
+
result: RESULT_LABELS[roll.result],
|
|
88
|
+
resultCode: roll.result,
|
|
89
|
+
match: roll.match,
|
|
90
|
+
matchNote: roll.match
|
|
91
|
+
? roll.result === "STRONG_HIT" || roll.result === "WEAK_HIT"
|
|
92
|
+
? "Fateful roll. Both challenge dice match. An unexpected advantage or twist."
|
|
93
|
+
: "Fateful roll. Both challenge dice match. A dire and dramatic escalation."
|
|
94
|
+
: undefined,
|
|
95
|
+
position: args.position,
|
|
96
|
+
effect: args.effect,
|
|
97
|
+
consequences,
|
|
98
|
+
clockEvents,
|
|
99
|
+
chaosInterrupt: interrupt,
|
|
100
|
+
currentHealth: state.health,
|
|
101
|
+
currentSpirit: state.spirit,
|
|
102
|
+
currentSupply: state.supply,
|
|
103
|
+
currentMomentum: state.momentum,
|
|
104
|
+
chaosFactor: state.chaosFactor,
|
|
105
|
+
// Derived, not copied: `gameSlot`'s `after` restores the stored flags
|
|
106
|
+
// only once this body has returned, so `state.gameOver` here would be
|
|
107
|
+
// the value from before the roll that emptied the track.
|
|
108
|
+
crisisMode: inCrisis(state),
|
|
109
|
+
gameOver: isGameOver(state),
|
|
110
|
+
sceneCount: state.sceneCount,
|
|
111
|
+
canBurnMomentum: Boolean(burnTarget),
|
|
112
|
+
burnWouldYield: burnTarget ? RESULT_LABELS[burnTarget] : undefined,
|
|
113
|
+
};
|
|
114
|
+
}),
|
|
115
|
+
// A roll that emptied both tracks ends the story; anything else leaves a
|
|
116
|
+
// standing roll that `burn_momentum` may still upgrade.
|
|
117
|
+
sendFrom: (result) =>
|
|
118
|
+
result.gameOver ? { type: "DOWNED" as const } : { type: "ROLLED" as const },
|
|
119
|
+
});
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { toolFailure } from "@alexkroman1/aai/utils";
|
|
2
|
+
import {
|
|
3
|
+
applyConsequences,
|
|
4
|
+
canBurnMomentum,
|
|
5
|
+
gameSlot,
|
|
6
|
+
inCrisis,
|
|
7
|
+
isGameOver,
|
|
8
|
+
MOMENTUM_RESET,
|
|
9
|
+
RESULT_LABELS,
|
|
10
|
+
revertConsequences,
|
|
11
|
+
storyFlow,
|
|
12
|
+
} from "../shared.ts";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Gated on `playing.rollResolved` — the state that means "a roll is standing".
|
|
16
|
+
*
|
|
17
|
+
* That gate REPLACES this body's opening `if (!state.lastRoll) return { error:
|
|
18
|
+
* "No recent action roll to upgrade. Roll first." }`, which was `when` written
|
|
19
|
+
* out by hand: "is there a roll to upgrade" is a question about where the game
|
|
20
|
+
* is, not about the data, and the flow's refusal names the position and quotes
|
|
21
|
+
* the state's instruction where that sentence could only assert.
|
|
22
|
+
*
|
|
23
|
+
* The two checks BELOW stay, because they really are about the data: whether
|
|
24
|
+
* the roll was already a Strong Hit, and whether the momentum beats the
|
|
25
|
+
* challenge dice. Those are the rules of the game; the gate is the shape of the
|
|
26
|
+
* turn.
|
|
27
|
+
*
|
|
28
|
+
* Each of them answers `toolFailure(…)` (`@alexkroman1/aai/utils` — the subpath
|
|
29
|
+
* that owns the failure vocabulary, and the one that stays free of zod). A bare
|
|
30
|
+
* `{ error: "…" }` literal is structurally the same value, which is exactly why
|
|
31
|
+
* it was worth replacing: it made "this arm is a FAILURE" a coincidence of
|
|
32
|
+
* spelling rather than a call, and `sendFrom` below is typed
|
|
33
|
+
* `Exclude<R, ToolFailure>` — so what subtracts these three arms from the
|
|
34
|
+
* transition's argument now has a name at the site that produces them.
|
|
35
|
+
*/
|
|
36
|
+
export default storyFlow.tool({
|
|
37
|
+
description:
|
|
38
|
+
"Burn momentum to upgrade the most recent action roll. Only valid when current momentum beats the roll's challenge dice (both dice for a full upgrade, one for Miss to Weak Hit). Reverts the original result's consequences, applies the upgraded result, and resets momentum to +2.",
|
|
39
|
+
when: "playing.rollResolved",
|
|
40
|
+
execute: (_args, ctx) =>
|
|
41
|
+
gameSlot.update(ctx, (state) => {
|
|
42
|
+
const last = state.lastRoll;
|
|
43
|
+
// Reachable only if the position and the campaign disagree — the flow says
|
|
44
|
+
// a roll is standing and nothing recorded one — which no code path
|
|
45
|
+
// produces: `action_roll` writes `lastRoll` and sends `ROLLED` in the same
|
|
46
|
+
// call. Reported rather than thrown, mid-game.
|
|
47
|
+
if (!last) return toolFailure("No recent action roll to upgrade. Roll first.");
|
|
48
|
+
if (last.result === "STRONG_HIT") {
|
|
49
|
+
return toolFailure("The last roll was already a Strong Hit. Nothing to upgrade.");
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const upgrade = canBurnMomentum(state, last);
|
|
53
|
+
if (!upgrade) {
|
|
54
|
+
return toolFailure(
|
|
55
|
+
state.momentum <= 0
|
|
56
|
+
? "Momentum is 0 or negative. Cannot burn."
|
|
57
|
+
: "Momentum not high enough to improve the result.",
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const previousMomentum = state.momentum;
|
|
62
|
+
const previousResult = last.result;
|
|
63
|
+
|
|
64
|
+
// Undo exactly what the original result applied, then apply the
|
|
65
|
+
// upgraded result's effects (bond/disposition/momentum gains).
|
|
66
|
+
revertConsequences(state, last.deltas);
|
|
67
|
+
const upgraded = { ...last, result: upgrade };
|
|
68
|
+
const { consequences, clockEvents } = applyConsequences(
|
|
69
|
+
state,
|
|
70
|
+
upgraded,
|
|
71
|
+
last.position,
|
|
72
|
+
last.effect,
|
|
73
|
+
last.targetNpcId,
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
// Burning always resets momentum, overriding any gain from the upgrade.
|
|
77
|
+
state.momentum = MOMENTUM_RESET;
|
|
78
|
+
state.lastRoll = null;
|
|
79
|
+
|
|
80
|
+
return {
|
|
81
|
+
burned: true,
|
|
82
|
+
previousMomentum,
|
|
83
|
+
newMomentum: MOMENTUM_RESET,
|
|
84
|
+
previousResult: RESULT_LABELS[previousResult],
|
|
85
|
+
newResult: RESULT_LABELS[upgrade],
|
|
86
|
+
newResultCode: upgrade,
|
|
87
|
+
challengeDice: [last.c1, last.c2],
|
|
88
|
+
revertedConsequences: true,
|
|
89
|
+
consequences,
|
|
90
|
+
clockEvents,
|
|
91
|
+
currentHealth: state.health,
|
|
92
|
+
currentSpirit: state.spirit,
|
|
93
|
+
currentSupply: state.supply,
|
|
94
|
+
// As `action_roll`: derived rather than copied, because `after` has not
|
|
95
|
+
// run yet when this object is built.
|
|
96
|
+
crisisMode: inCrisis(state),
|
|
97
|
+
gameOver: isGameOver(state),
|
|
98
|
+
};
|
|
99
|
+
}),
|
|
100
|
+
// A burn CONSUMES the standing roll (`lastRoll` is cleared), so the resting
|
|
101
|
+
// event is `SETTLED` rather than `ROLLED` — where `action_roll` leaves one
|
|
102
|
+
// standing, this one spends it. A burn that emptied the last track is as
|
|
103
|
+
// final as a roll that did.
|
|
104
|
+
//
|
|
105
|
+
// `result` is the SUCCESS type — `sendFrom` takes `Exclude<R, ToolFailure>`
|
|
106
|
+
// now, so the `"gameOver" in result` guard that stood in for the failure arm
|
|
107
|
+
// leaking into `R` is a plain property read.
|
|
108
|
+
sendFrom: (result) =>
|
|
109
|
+
result.gameOver ? { type: "DOWNED" as const } : { type: "SETTLED" as const },
|
|
110
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { gameSlot, stateSummary, storyFlow } from "../shared.ts";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* `gameSlot.tool`, the READING half: the body is handed the value, so it needs
|
|
5
|
+
* neither a context annotation nor an opening `gameSlot.get(ctx)` — and what it
|
|
6
|
+
* is handed is deep-frozen, which is what makes "this tool only reads" a
|
|
7
|
+
* property of the declaration rather than a claim in a comment.
|
|
8
|
+
*
|
|
9
|
+
* **Legal in every state, which is why it is not a `storyFlow.tool`** — it is
|
|
10
|
+
* answerable before a character exists, and "there is no campaign yet" is a
|
|
11
|
+
* thing the narrator may need said back. It is also the one tool that reports
|
|
12
|
+
* the POSITION, the way `research-planner-agent`'s `plan_status` does: the
|
|
13
|
+
* position comes from the machine rather than from a second reading of the
|
|
14
|
+
* campaign's fields, so "there is no character yet" is the same fact here as the
|
|
15
|
+
* refusal `action_roll` would give.
|
|
16
|
+
*
|
|
17
|
+
* **It is no longer called every turn, and that is the point of `liveSheet`.**
|
|
18
|
+
* The prompt used to open every turn with this call — a full model round trip
|
|
19
|
+
* before a word of narration, on a live voice game — because the tracks and the
|
|
20
|
+
* clocks reached the model no other way. They ride in the system prompt now
|
|
21
|
+
* (`agent.ts`'s `systemPrompt` resolver), so what is left here is the half a
|
|
22
|
+
* sheet cannot carry on every request: the chronicle, the whole NPC records,
|
|
23
|
+
* the story blueprint, and the position on demand.
|
|
24
|
+
*/
|
|
25
|
+
export default gameSlot.tool({
|
|
26
|
+
description:
|
|
27
|
+
"Returns the FULL current game state — including the chronicle, the whole NPC records and the story blueprint — and where the story is. The tracks, momentum, clocks and cast are already in your instructions and refreshed every turn, so reach for this when you want the rest of the board or the position restated, not as a matter of routine.",
|
|
28
|
+
execute: (_args, game, ctx) => ({
|
|
29
|
+
// The position SPREAD rather than renamed. `at`/`next`/`storyOver` said the
|
|
30
|
+
// same three things a gated tool's result already carries as `state`,
|
|
31
|
+
// `instruction` and `done` — so within one agent the model was reading its
|
|
32
|
+
// own position under two key sets, and the system prompt's claim that
|
|
33
|
+
// "every other tool answers with the same pair" was simply false.
|
|
34
|
+
...storyFlow.position(ctx),
|
|
35
|
+
...stateSummary(game),
|
|
36
|
+
}),
|
|
37
|
+
});
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
import { tool } from "@alexkroman1/aai";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { checkChaosInterrupt, creativitySeed, d, gameSlot, pick } from "../shared.ts";
|
|
4
|
+
|
|
5
|
+
const REACTIONS = [
|
|
6
|
+
"Acts on their agenda",
|
|
7
|
+
"Reveals a secret",
|
|
8
|
+
"Makes a demand",
|
|
9
|
+
"Offers unexpected help",
|
|
10
|
+
"Betrays expectations",
|
|
11
|
+
"Shows vulnerability",
|
|
12
|
+
"Escalates the conflict",
|
|
13
|
+
"Withdraws or retreats",
|
|
14
|
+
"Changes their stance",
|
|
15
|
+
"Introduces a new complication",
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
const TWISTS = [
|
|
19
|
+
"A hidden connection is revealed",
|
|
20
|
+
"The environment shifts dramatically",
|
|
21
|
+
"An NPC's true motives surface",
|
|
22
|
+
"Time pressure intensifies",
|
|
23
|
+
"An old enemy reappears",
|
|
24
|
+
"A resource is discovered or lost",
|
|
25
|
+
"The rules of the world bend",
|
|
26
|
+
"An alliance fractures",
|
|
27
|
+
"A prophecy or omen manifests",
|
|
28
|
+
"The stakes escalate unexpectedly",
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
const ACTIONS = [
|
|
32
|
+
"Abandon",
|
|
33
|
+
"Advance",
|
|
34
|
+
"Assault",
|
|
35
|
+
"Betray",
|
|
36
|
+
"Block",
|
|
37
|
+
"Bolster",
|
|
38
|
+
"Breach",
|
|
39
|
+
"Capture",
|
|
40
|
+
"Challenge",
|
|
41
|
+
"Change",
|
|
42
|
+
"Clash",
|
|
43
|
+
"Command",
|
|
44
|
+
"Compel",
|
|
45
|
+
"Conceal",
|
|
46
|
+
"Confront",
|
|
47
|
+
"Control",
|
|
48
|
+
"Corrupt",
|
|
49
|
+
"Create",
|
|
50
|
+
"Deceive",
|
|
51
|
+
"Defend",
|
|
52
|
+
"Defy",
|
|
53
|
+
"Deliver",
|
|
54
|
+
"Demand",
|
|
55
|
+
"Depart",
|
|
56
|
+
"Destroy",
|
|
57
|
+
"Distract",
|
|
58
|
+
"Endure",
|
|
59
|
+
"Escape",
|
|
60
|
+
"Explore",
|
|
61
|
+
"Falter",
|
|
62
|
+
"Find",
|
|
63
|
+
"Follow",
|
|
64
|
+
"Forge",
|
|
65
|
+
"Forsake",
|
|
66
|
+
"Gather",
|
|
67
|
+
"Guard",
|
|
68
|
+
"Guide",
|
|
69
|
+
"Harm",
|
|
70
|
+
"Hide",
|
|
71
|
+
"Hold",
|
|
72
|
+
"Hunt",
|
|
73
|
+
"Investigate",
|
|
74
|
+
"Journey",
|
|
75
|
+
"Learn",
|
|
76
|
+
"Leave",
|
|
77
|
+
"Locate",
|
|
78
|
+
"Lose",
|
|
79
|
+
"Manipulate",
|
|
80
|
+
"Move",
|
|
81
|
+
"Oppose",
|
|
82
|
+
"Overwhelm",
|
|
83
|
+
"Persevere",
|
|
84
|
+
"Plunder",
|
|
85
|
+
"Preserve",
|
|
86
|
+
"Protect",
|
|
87
|
+
"Rage",
|
|
88
|
+
"Reach",
|
|
89
|
+
"Reclaim",
|
|
90
|
+
"Refuse",
|
|
91
|
+
"Reject",
|
|
92
|
+
"Release",
|
|
93
|
+
"Repair",
|
|
94
|
+
"Resist",
|
|
95
|
+
"Restore",
|
|
96
|
+
"Reveal",
|
|
97
|
+
"Risk",
|
|
98
|
+
"Salvage",
|
|
99
|
+
"Scheme",
|
|
100
|
+
"Search",
|
|
101
|
+
"Secure",
|
|
102
|
+
"Seize",
|
|
103
|
+
"Serve",
|
|
104
|
+
"Share",
|
|
105
|
+
"Shatter",
|
|
106
|
+
"Shelter",
|
|
107
|
+
"Strengthen",
|
|
108
|
+
"Summon",
|
|
109
|
+
"Surrender",
|
|
110
|
+
"Surround",
|
|
111
|
+
"Survive",
|
|
112
|
+
"Swear",
|
|
113
|
+
"Threaten",
|
|
114
|
+
"Track",
|
|
115
|
+
"Transform",
|
|
116
|
+
"Trap",
|
|
117
|
+
"Traverse",
|
|
118
|
+
"Uncover",
|
|
119
|
+
"Uphold",
|
|
120
|
+
"Weaken",
|
|
121
|
+
"Withdraw",
|
|
122
|
+
];
|
|
123
|
+
|
|
124
|
+
const THEMES = [
|
|
125
|
+
"Ancestor",
|
|
126
|
+
"Ash",
|
|
127
|
+
"Beast",
|
|
128
|
+
"Blood",
|
|
129
|
+
"Bone",
|
|
130
|
+
"Burden",
|
|
131
|
+
"Communion",
|
|
132
|
+
"Corruption",
|
|
133
|
+
"Crown",
|
|
134
|
+
"Darkness",
|
|
135
|
+
"Death",
|
|
136
|
+
"Debt",
|
|
137
|
+
"Decay",
|
|
138
|
+
"Despair",
|
|
139
|
+
"Divinity",
|
|
140
|
+
"Doom",
|
|
141
|
+
"Dream",
|
|
142
|
+
"Dynasty",
|
|
143
|
+
"Eclipse",
|
|
144
|
+
"Exile",
|
|
145
|
+
"Faith",
|
|
146
|
+
"Fate",
|
|
147
|
+
"Flesh",
|
|
148
|
+
"Fury",
|
|
149
|
+
"Grace",
|
|
150
|
+
"Grief",
|
|
151
|
+
"Guilt",
|
|
152
|
+
"Heritage",
|
|
153
|
+
"Hollow",
|
|
154
|
+
"Honor",
|
|
155
|
+
"Horror",
|
|
156
|
+
"Hunger",
|
|
157
|
+
"Iron",
|
|
158
|
+
"Judgment",
|
|
159
|
+
"Kingdom",
|
|
160
|
+
"Knowledge",
|
|
161
|
+
"Legacy",
|
|
162
|
+
"Loss",
|
|
163
|
+
"Madness",
|
|
164
|
+
"Memory",
|
|
165
|
+
"Mercy",
|
|
166
|
+
"Monster",
|
|
167
|
+
"Mystery",
|
|
168
|
+
"Night",
|
|
169
|
+
"Oath",
|
|
170
|
+
"Omen",
|
|
171
|
+
"Order",
|
|
172
|
+
"Passage",
|
|
173
|
+
"Peril",
|
|
174
|
+
"Plague",
|
|
175
|
+
"Power",
|
|
176
|
+
"Pride",
|
|
177
|
+
"Prophecy",
|
|
178
|
+
"Rebirth",
|
|
179
|
+
"Relic",
|
|
180
|
+
"Rot",
|
|
181
|
+
"Ruin",
|
|
182
|
+
"Sacrifice",
|
|
183
|
+
"Scar",
|
|
184
|
+
"Secret",
|
|
185
|
+
"Shadow",
|
|
186
|
+
"Shard",
|
|
187
|
+
"Silence",
|
|
188
|
+
"Sorrow",
|
|
189
|
+
"Spirit",
|
|
190
|
+
"Splendor",
|
|
191
|
+
"Storm",
|
|
192
|
+
"Throne",
|
|
193
|
+
"Time",
|
|
194
|
+
"Treachery",
|
|
195
|
+
"Truth",
|
|
196
|
+
"Valor",
|
|
197
|
+
"Vengeance",
|
|
198
|
+
"War",
|
|
199
|
+
"Waste",
|
|
200
|
+
"Winter",
|
|
201
|
+
"Wisdom",
|
|
202
|
+
"Wound",
|
|
203
|
+
];
|
|
204
|
+
|
|
205
|
+
export default tool({
|
|
206
|
+
description:
|
|
207
|
+
"Consult the oracle for narrative inspiration. Generates random prompts from thematic tables.",
|
|
208
|
+
inputSchema: z.object({
|
|
209
|
+
type: z
|
|
210
|
+
.enum(["action_theme", "npc_reaction", "scene_twist", "yes_no", "chaos_check"])
|
|
211
|
+
.describe("Type of oracle consultation"),
|
|
212
|
+
}),
|
|
213
|
+
execute(args, ctx) {
|
|
214
|
+
if (args.type === "yes_no") {
|
|
215
|
+
const roll = d(6, ctx.random);
|
|
216
|
+
const answer = roll <= 2 ? "No" : roll <= 4 ? "Yes, but with a complication" : "Yes";
|
|
217
|
+
return { type: "yes_no", roll, answer };
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
if (args.type === "chaos_check") {
|
|
221
|
+
// `checkChaosInterrupt` LOWERS the chaos factor when the roll lands, so
|
|
222
|
+
// this branch is a write and has to go through the slot's mutation
|
|
223
|
+
// window: `gameSlot.get` hands out the deep-frozen stored value, and
|
|
224
|
+
// assigning to it is a compile error and a `TypeError`. It is one branch
|
|
225
|
+
// of five, which is why this stays an ordinary `tool()` with a scoped
|
|
226
|
+
// `update` rather than becoming `gameSlot.updateTool` — the other four
|
|
227
|
+
// read nothing and store nothing.
|
|
228
|
+
return gameSlot.update(ctx, (game) => {
|
|
229
|
+
const interrupt = checkChaosInterrupt(game, ctx.random);
|
|
230
|
+
return {
|
|
231
|
+
type: "chaos_check",
|
|
232
|
+
chaosFactor: game.chaosFactor,
|
|
233
|
+
interrupted: Boolean(interrupt),
|
|
234
|
+
interruptType: interrupt,
|
|
235
|
+
};
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
if (args.type === "npc_reaction") {
|
|
240
|
+
return { type: "npc_reaction", reaction: pick(REACTIONS, ctx.random) };
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
if (args.type === "scene_twist") {
|
|
244
|
+
return { type: "scene_twist", twist: pick(TWISTS, ctx.random) };
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// action_theme (default)
|
|
248
|
+
return {
|
|
249
|
+
type: "action_theme",
|
|
250
|
+
action: pick(ACTIONS, ctx.random),
|
|
251
|
+
theme: pick(THEMES, ctx.random),
|
|
252
|
+
seed: creativitySeed(3, ctx.random),
|
|
253
|
+
};
|
|
254
|
+
},
|
|
255
|
+
});
|