@alexkroman1/aai-cli 16.0.1 → 17.0.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 +3 -2
- package/dist/{_build-target-55dJisQ-.mjs → _build-target-C08aM-Es.mjs} +511 -41
- package/dist/_build-target.d.ts +109 -2
- package/dist/_deno-target.d.ts +15 -14
- package/dist/_dev-env.d.ts +19 -13
- package/dist/{_dev-server-BzWB6-4y.mjs → _dev-server-CLU9xjH5.mjs} +27 -19
- package/dist/_dev-server.d.ts +4 -3
- package/dist/_dev-vite-config.d.ts +1 -1
- package/dist/_init.d.ts +39 -0
- package/dist/_modal-target.d.ts +11 -6
- package/dist/_preflight-CnW9QiE7.mjs +116 -0
- package/dist/_preflight.d.ts +110 -5
- package/dist/{_server-common-De0haHr9.mjs → _server-common-DAcv1nC5.mjs} +46 -2
- package/dist/_server-common.d.ts +39 -0
- package/dist/_target-bundle.d.ts +112 -0
- package/dist/_target-entry.d.ts +81 -0
- package/dist/{_templates-CuP74F8D.mjs → _templates-IMeKMVIj.mjs} +1 -1
- package/dist/{_vitest-runner-AVR9VtXh.mjs → _vitest-runner-CZNGj0ZC.mjs} +22 -17
- package/dist/_vitest-runner.d.ts +36 -24
- package/dist/{_workflow-determinism-CvpqMpdh.mjs → _workflow-determinism-CLxFQ5ox.mjs} +1 -1
- package/dist/_workflow-determinism.d.ts +1 -1
- package/dist/{build-ButI2IKc.mjs → build-DrQTSc2R.mjs} +187 -289
- package/dist/build.d.ts +88 -2
- package/dist/cli.mjs +20 -16
- package/dist/{deploy-CGqPU5U-.mjs → deploy-B68-x7xM.mjs} +14 -6
- package/dist/deploy.d.ts +9 -0
- package/dist/{dev-kodAY23K.mjs → dev-ChsrNHpK.mjs} +1 -1
- package/dist/dev.d.ts +1 -1
- package/dist/{eval-DvoSz7SZ.mjs → eval-DB07kTxO.mjs} +2 -2
- package/dist/init-W-4k-lCF.mjs +559 -0
- package/dist/init.d.ts +43 -3
- package/dist/scaffold/CLAUDE.md +87 -100
- package/dist/scaffold/package.json +6 -6
- package/dist/scaffold/vite.config.ts +29 -1
- package/dist/start.mjs +1 -1
- package/dist/{studio-CtRBVVFR.mjs → studio-DEAJGBXa.mjs} +20 -10
- package/dist/templates/{hiring-desk → applicant-screening-agent}/agent.eval.test.ts +20 -6
- package/dist/templates/{hiring-desk → applicant-screening-agent}/agent.ts +28 -0
- package/dist/templates/{hiring-desk → applicant-screening-agent}/crews.ts +1 -1
- package/dist/templates/{hiring-desk → applicant-screening-agent}/shared.ts +11 -11
- package/dist/templates/{hiring-desk → applicant-screening-agent}/tools/screening_status.ts +1 -1
- package/dist/templates/{call-audit → call-audit-workflow}/agent.ts +4 -2
- package/dist/templates/{call-audit → call-audit-workflow}/client.tsx +3 -3
- package/dist/templates/{call-audit → call-audit-workflow}/guards.test.ts +2 -2
- package/dist/templates/{call-audit → call-audit-workflow}/workflows/summarize.ts +1 -1
- package/dist/templates/{code-interpreter → code-interpreter-agent}/agent.eval.test.ts +3 -2
- package/dist/templates/{code-interpreter → code-interpreter-agent}/agent.test.ts +1 -1
- package/dist/templates/{code-interpreter → code-interpreter-agent}/agent.ts +1 -0
- package/dist/templates/coding-agent/agent.eval.test.ts +136 -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/{pipeline-simple → custom-pipeline-agent}/agent.test.ts +2 -2
- package/dist/templates/{pipeline-simple → custom-pipeline-agent}/agent.ts +2 -1
- package/dist/templates/{pipeline-simple → custom-pipeline-agent}/modes.test.ts +1 -1
- package/dist/templates/{redline → document-redline-workflow}/agent.ts +4 -2
- package/dist/templates/{redline → document-redline-workflow}/client.tsx +1 -1
- package/dist/templates/{redline → document-redline-workflow}/workflows/redline.ts +1 -1
- package/dist/templates/{dispatch-center → emergency-dispatch-agent}/agent.test.ts +104 -1
- package/dist/templates/{dispatch-center → emergency-dispatch-agent}/agent.ts +15 -0
- package/dist/templates/{dispatch-center → emergency-dispatch-agent}/events.ts +1 -1
- package/dist/templates/emergency-dispatch-agent/guardrails.ts +105 -0
- package/dist/templates/{dispatch-center → emergency-dispatch-agent}/system-prompt.md +1 -0
- package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/incident_create.ts +1 -1
- package/dist/templates/{night-owl → entertainment-picks-agent}/agent.eval.test.ts +8 -1
- package/dist/templates/{night-owl → entertainment-picks-agent}/agent.test.ts +1 -1
- package/dist/templates/{night-owl → entertainment-picks-agent}/agent.ts +1 -0
- package/dist/templates/{night-owl → entertainment-picks-agent}/client.tsx +1 -1
- package/dist/templates/{night-owl → entertainment-picks-agent}/system-prompt.md +6 -0
- package/dist/templates/{night-owl → entertainment-picks-agent}/tools/revisit.ts +7 -0
- package/dist/templates/{executive-assistant → executive-inbox-agent}/agent.eval.test.ts +84 -23
- package/dist/templates/{executive-assistant → executive-inbox-agent}/agent.ts +1 -0
- package/dist/templates/{executive-assistant → executive-inbox-agent}/meeting.ts +2 -2
- package/dist/templates/{executive-assistant → executive-inbox-agent}/prompts.ts +3 -1
- package/dist/templates/{executive-assistant → executive-inbox-agent}/shared.ts +2 -2
- package/dist/templates/{executive-assistant → executive-inbox-agent}/system-prompt.md +3 -3
- package/dist/templates/{executive-assistant → executive-inbox-agent}/tools/meeting_assistant.ts +3 -3
- package/dist/templates/{executive-assistant → executive-inbox-agent}/tools/open_email.ts +8 -16
- package/dist/templates/{executive-assistant → executive-inbox-agent}/tools/send_calendar_invite.ts +1 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/agent.eval.test.ts +85 -21
- package/dist/templates/{hotel-desk → hotel-reception-agent}/agent.test.ts +2 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/agent.ts +6 -3
- package/dist/templates/{hotel-desk → hotel-reception-agent}/client.tsx +14 -2
- package/dist/templates/{hotel-desk → hotel-reception-agent}/concierge.ts +3 -2
- package/dist/templates/{hotel-desk → hotel-reception-agent}/desk-seams.test.ts +2 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/disputes.ts +9 -11
- package/dist/templates/{hotel-desk → hotel-reception-agent}/events.ts +2 -1
- package/dist/templates/hotel-reception-agent/session.ts +56 -0
- package/dist/templates/{hotel-desk → hotel-reception-agent}/shared.ts +21 -22
- package/dist/templates/{hotel-desk → hotel-reception-agent}/system-prompt.md +1 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/abandon_booking.ts +2 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/add_to_waitlist.ts +2 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/book_airport_car.ts +2 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/cancel_restaurant_reservation.ts +2 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/cancel_room_booking.ts +2 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/check_restaurant_availability.ts +1 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/check_room_availability.ts +1 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/choose_room.ts +1 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/confirm_booking.ts +2 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/dispatch_emergency.ts +2 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/dispute_charge.ts +2 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/flag_late_arrival.ts +2 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/lookup_booking.ts +2 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/lookup_guest_history.ts +1 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/lookup_invoice.ts +2 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/lookup_restaurant_reservation.ts +1 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/modify_restaurant_reservation.ts +1 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/record_card.ts +1 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/record_followup.ts +2 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/record_group_inquiry.ts +2 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/record_guest_details.ts +1 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/reinstate_booking.ts +1 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/request_flight_reconfirmation.ts +2 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/resend_confirmation.ts +2 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/reserve_table.ts +1 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/resolve_room_conflict.ts +2 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/schedule_wakeup_call.ts +2 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/set_do_not_disturb.ts +2 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/set_extras.ts +1 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/set_stay.ts +2 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/start_booking_modification.ts +2 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/start_room_booking.ts +2 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/take_guest_message.ts +2 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/transfer_call.ts +2 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/update_card.ts +2 -1
- package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/verify_booking.ts +2 -1
- package/dist/templates/{link-digest → link-digest-workflow}/agent.eval.test.ts +16 -1
- package/dist/templates/{link-digest → link-digest-workflow}/agent.test.ts +2 -2
- package/dist/templates/{link-digest → link-digest-workflow}/agent.ts +8 -3
- package/dist/templates/{link-digest → link-digest-workflow}/client.tsx +2 -2
- package/dist/templates/{link-digest → link-digest-workflow}/workflows/digest.ts +1 -1
- package/dist/templates/{health-assistant → medication-safety-agent}/agent.test.ts +55 -1
- package/dist/templates/medication-safety-agent/agent.ts +62 -0
- package/dist/templates/{recap-workflow → meeting-recap-agent}/agent.test.ts +4 -4
- package/dist/templates/{recap-workflow → meeting-recap-agent}/agent.ts +5 -1
- package/dist/templates/{recap-workflow → meeting-recap-agent}/workflows/recap.ts +3 -3
- package/dist/templates/{pizza-ordering → pizza-ordering-agent}/agent.ts +3 -0
- package/dist/templates/{podcast-digest → podcast-digest-workflow}/agent.eval.test.ts +1 -1
- package/dist/templates/{podcast-digest → podcast-digest-workflow}/agent.test.ts +1 -1
- package/dist/templates/{podcast-digest → podcast-digest-workflow}/agent.ts +6 -2
- package/dist/templates/{podcast-digest → podcast-digest-workflow}/client.tsx +3 -3
- package/dist/templates/{podcast-digest → podcast-digest-workflow}/workflows/digest.ts +1 -1
- package/dist/templates/{simple → quickstart-agent}/agent.eval.test.ts +39 -3
- package/dist/templates/{simple → quickstart-agent}/agent.test.ts +25 -3
- package/dist/templates/quickstart-agent/agent.ts +24 -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-workflow → research-handoff-agent}/agent.test.ts +1 -1
- package/dist/templates/{research-workflow → research-handoff-agent}/agent.ts +5 -1
- package/dist/templates/{research-workflow → research-handoff-agent}/workflows/filing.ts +1 -1
- package/dist/templates/{research-workflow → research-handoff-agent}/workflows/research.ts +1 -1
- package/dist/templates/{research-workflow → research-handoff-agent}/workflows/review.ts +1 -1
- package/dist/templates/{plan-and-execute → research-planner-agent}/agent.eval.test.ts +24 -2
- package/dist/templates/{plan-and-execute → research-planner-agent}/agent.ts +3 -0
- package/dist/templates/{plan-and-execute → research-planner-agent}/shared.ts +1 -1
- package/dist/templates/{plan-and-execute → research-planner-agent}/system-prompt.md +1 -1
- package/dist/templates/{retail → retail-orders-agent}/agent.ts +32 -3
- package/dist/templates/retail-orders-agent/keyterms.ts +154 -0
- package/dist/templates/{retail → retail-orders-agent}/pending.ts +2 -2
- package/dist/templates/{retail → retail-orders-agent}/resolve.ts +18 -3
- package/dist/templates/{retail → retail-orders-agent}/shared.ts +1 -1
- package/dist/templates/{retail → retail-orders-agent}/store.ts +3 -3
- package/dist/templates/{roadside-assist → roadside-assistance-agent}/agent.eval.test.ts +37 -5
- package/dist/templates/{roadside-assist → roadside-assistance-agent}/agent.test.ts +38 -6
- package/dist/templates/{roadside-assist → roadside-assistance-agent}/agent.ts +5 -1
- package/dist/templates/{roadside-assist → roadside-assistance-agent}/call.ts +1 -1
- package/dist/templates/{roadside-assist → roadside-assistance-agent}/shared.ts +15 -3
- package/dist/templates/{roadside-assist → roadside-assistance-agent}/tools/acknowledge_disclosure.ts +14 -0
- package/dist/templates/{roadside-assist → roadside-assistance-agent}/tools/dispatch_truck.ts +1 -1
- package/dist/templates/{roadside-assist → roadside-assistance-agent}/tools/lookup_coverage.ts +11 -0
- package/dist/templates/{roadside-assist → roadside-assistance-agent}/tools/service_disclosure.ts +17 -11
- package/dist/templates/{roadside-assist → roadside-assistance-agent}/yard.test.ts +4 -0
- package/dist/templates/{spoken-summary → spoken-summary-workflow}/agent.test.ts +1 -1
- package/dist/templates/{spoken-summary → spoken-summary-workflow}/agent.ts +5 -1
- package/dist/templates/{spoken-summary → spoken-summary-workflow}/client.tsx +1 -1
- package/dist/templates/{spoken-summary → spoken-summary-workflow}/workflows/summarize.ts +1 -1
- package/dist/templates/{solo-rpg → tabletop-rpg-agent}/agent.eval.test.ts +6 -0
- package/dist/templates/{solo-rpg → tabletop-rpg-agent}/agent.test.ts +125 -1
- package/dist/templates/tabletop-rpg-agent/agent.ts +58 -0
- package/dist/templates/{solo-rpg → tabletop-rpg-agent}/shared.ts +84 -3
- package/dist/templates/{solo-rpg → tabletop-rpg-agent}/system-prompt.md +1 -1
- package/dist/templates/tabletop-rpg-agent/tools/check_state.ts +37 -0
- package/dist/templates/{support-line → technical-support-agent}/agent.test.ts +3 -3
- package/dist/templates/{support-line → technical-support-agent}/agent.ts +5 -1
- package/dist/templates/technical-support-agent/knowledge.ts +165 -0
- package/dist/templates/{support-line → technical-support-agent}/nodes.ts +3 -2
- package/dist/templates/{support-line → technical-support-agent}/procedure.ts +4 -3
- package/dist/templates/technical-support-agent/shared.ts +145 -0
- package/dist/templates/{support-line → technical-support-agent}/tools/list_topics.ts +2 -1
- package/dist/templates/{infocom-adventure → text-adventure-agent}/agent.eval.test.ts +39 -6
- package/dist/templates/{infocom-adventure → text-adventure-agent}/agent.test.ts +79 -1
- package/dist/templates/{infocom-adventure → text-adventure-agent}/agent.ts +30 -1
- package/dist/templates/{infocom-adventure → text-adventure-agent}/client.tsx +2 -2
- package/dist/templates/{infocom-adventure → text-adventure-agent}/shared.ts +37 -0
- package/dist/templates/{infocom-adventure → text-adventure-agent}/system-prompt.md +9 -2
- package/dist/templates/{briefing-desk → topic-briefing-agent}/agent.eval.test.ts +21 -7
- package/dist/templates/{briefing-desk → topic-briefing-agent}/agent.test.ts +23 -11
- package/dist/templates/{briefing-desk → topic-briefing-agent}/agent.ts +5 -2
- package/dist/templates/{briefing-desk → topic-briefing-agent}/shared.ts +11 -11
- package/dist/templates/{briefing-desk → topic-briefing-agent}/slack.ts +1 -1
- package/dist/templates/{briefing-desk → topic-briefing-agent}/system-prompt.md +13 -8
- package/dist/templates/{briefing-desk → topic-briefing-agent}/tools/send_briefing.ts +43 -5
- package/dist/templates/transcription-workflow/agent.test.ts +1 -1
- package/dist/templates/transcription-workflow/agent.ts +4 -1
- package/dist/templates/transcription-workflow/client.tsx +1 -1
- package/dist/templates/transcription-workflow/workflows/batch.ts +2 -2
- package/dist/templates/transcription-workflow/workflows/transcribe.ts +1 -1
- package/dist/templates/{travel-concierge → travel-concierge-agent}/agent.ts +4 -0
- package/dist/templates/{travel-concierge → travel-concierge-agent}/shared.ts +1 -1
- package/dist/templates/{web-researcher → web-research-agent}/agent.eval.test.ts +32 -6
- package/dist/templates/{web-researcher → web-research-agent}/agent.test.ts +17 -1
- package/dist/templates/{web-researcher → web-research-agent}/agent.ts +31 -1
- package/dist/templates/{web-researcher → web-research-agent}/system-prompt.md +8 -2
- package/dist/templates/{word-wrangler → word-game-agent}/agent.eval.test.ts +79 -18
- package/dist/templates/{word-wrangler → word-game-agent}/agent.ts +20 -0
- package/dist/templates/{word-wrangler → word-game-agent}/game.ts +1 -1
- package/dist/templates/{word-wrangler → word-game-agent}/shared.ts +1 -1
- package/dist/test-CjKPQ9_B.mjs +102 -0
- package/dist/test.d.ts +37 -12
- package/package.json +5 -5
- package/dist/_init-BzQbV8Zh.mjs +0 -199
- package/dist/_preflight-CcAR577V.mjs +0 -46
- package/dist/init-D363Ls5u.mjs +0 -183
- package/dist/templates/health-assistant/agent.ts +0 -15
- package/dist/templates/simple/agent.ts +0 -8
- package/dist/templates/solo-rpg/agent.ts +0 -29
- package/dist/templates/solo-rpg/tools/check_state.ts +0 -28
- package/dist/templates/support-line/shared.ts +0 -281
- package/dist/test-Cllnx81G.mjs +0 -83
- /package/dist/templates/{hiring-desk → applicant-screening-agent}/agent.test.ts +0 -0
- /package/dist/templates/{hiring-desk → applicant-screening-agent}/client.tsx +0 -0
- /package/dist/templates/{hiring-desk → applicant-screening-agent}/leads.json +0 -0
- /package/dist/templates/{hiring-desk → applicant-screening-agent}/screening-lock.test.ts +0 -0
- /package/dist/templates/{hiring-desk → applicant-screening-agent}/screening-lock.ts +0 -0
- /package/dist/templates/{hiring-desk → applicant-screening-agent}/system-prompt.md +0 -0
- /package/dist/templates/{hiring-desk → applicant-screening-agent}/tools/candidate_details.ts +0 -0
- /package/dist/templates/{hiring-desk → applicant-screening-agent}/tools/proceed_to_emails.ts +0 -0
- /package/dist/templates/{hiring-desk → applicant-screening-agent}/tools/read_email.ts +0 -0
- /package/dist/templates/{hiring-desk → applicant-screening-agent}/tools/rescore_with_feedback.ts +0 -0
- /package/dist/templates/{hiring-desk → applicant-screening-agent}/tools/screen_candidates.ts +0 -0
- /package/dist/templates/{call-audit → call-audit-workflow}/agent.eval.test.ts +0 -0
- /package/dist/templates/{call-audit → call-audit-workflow}/agent.test.ts +0 -0
- /package/dist/templates/{call-audit → call-audit-workflow}/workflows/audit.ts +0 -0
- /package/dist/templates/{call-audit → call-audit-workflow}/workflows/ingest.ts +0 -0
- /package/dist/templates/{call-audit → call-audit-workflow}/workflows/media.ts +0 -0
- /package/dist/templates/{call-audit → call-audit-workflow}/workflows/sync-api.ts +0 -0
- /package/dist/templates/{code-interpreter → code-interpreter-agent}/system-prompt.md +0 -0
- /package/dist/templates/{pipeline-simple → custom-pipeline-agent}/agent.eval.test.ts +0 -0
- /package/dist/templates/{pipeline-simple → custom-pipeline-agent}/stages.test.ts +0 -0
- /package/dist/templates/{redline → document-redline-workflow}/agent.eval.test.ts +0 -0
- /package/dist/templates/{redline → document-redline-workflow}/agent.test.ts +0 -0
- /package/dist/templates/{redline → document-redline-workflow}/form.ts +0 -0
- /package/dist/templates/{redline → document-redline-workflow}/workflows/prompts.ts +0 -0
- /package/dist/templates/{dispatch-center → emergency-dispatch-agent}/agent.eval.test.ts +0 -0
- /package/dist/templates/{dispatch-center → emergency-dispatch-agent}/client.tsx +0 -0
- /package/dist/templates/{dispatch-center → emergency-dispatch-agent}/shared.ts +0 -0
- /package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/incident_add_note.ts +0 -0
- /package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/incident_escalate.ts +0 -0
- /package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/incident_get.ts +0 -0
- /package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/incident_triage.ts +0 -0
- /package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/incident_update_status.ts +0 -0
- /package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/ops_dashboard.ts +0 -0
- /package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/ops_protocols.ts +0 -0
- /package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/ops_run_scenario.ts +0 -0
- /package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/resources_dispatch.ts +0 -0
- /package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/resources_get_available.ts +0 -0
- /package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/resources_update_status.ts +0 -0
- /package/dist/templates/{night-owl → entertainment-picks-agent}/shared.ts +0 -0
- /package/dist/templates/{night-owl → entertainment-picks-agent}/tools/recommend.ts +0 -0
- /package/dist/templates/{executive-assistant → executive-inbox-agent}/agent.test.ts +0 -0
- /package/dist/templates/{executive-assistant → executive-inbox-agent}/calendar.test.ts +0 -0
- /package/dist/templates/{executive-assistant → executive-inbox-agent}/client.tsx +0 -0
- /package/dist/templates/{executive-assistant → executive-inbox-agent}/inbox.ts +0 -0
- /package/dist/templates/{executive-assistant → executive-inbox-agent}/nodes.ts +0 -0
- /package/dist/templates/{executive-assistant → executive-inbox-agent}/review.ts +0 -0
- /package/dist/templates/{executive-assistant → executive-inbox-agent}/tools/accept.ts +0 -0
- /package/dist/templates/{executive-assistant → executive-inbox-agent}/tools/ask_question.ts +0 -0
- /package/dist/templates/{executive-assistant → executive-inbox-agent}/tools/draft_reply.ts +0 -0
- /package/dist/templates/{executive-assistant → executive-inbox-agent}/tools/edit.ts +0 -0
- /package/dist/templates/{executive-assistant → executive-inbox-agent}/tools/ignore.ts +0 -0
- /package/dist/templates/{executive-assistant → executive-inbox-agent}/tools/inbox_status.ts +0 -0
- /package/dist/templates/{executive-assistant → executive-inbox-agent}/tools/new_email.ts +0 -0
- /package/dist/templates/{executive-assistant → executive-inbox-agent}/tools/respond.ts +0 -0
- /package/dist/templates/{executive-assistant → executive-inbox-agent}/tools/review_memory.ts +0 -0
- /package/dist/templates/{executive-assistant → executive-inbox-agent}/tools/triage_inbox.ts +0 -0
- /package/dist/templates/{hotel-desk → hotel-reception-agent}/booking.ts +0 -0
- /package/dist/templates/{hotel-desk → hotel-reception-agent}/card.ts +0 -0
- /package/dist/templates/{hotel-desk → hotel-reception-agent}/catalogs.ts +0 -0
- /package/dist/templates/{hotel-desk → hotel-reception-agent}/desk.ts +0 -0
- /package/dist/templates/{hotel-desk → hotel-reception-agent}/hotel.ts +0 -0
- /package/dist/templates/{hotel-desk → hotel-reception-agent}/policies.ts +0 -0
- /package/dist/templates/{hotel-desk → hotel-reception-agent}/records.ts +0 -0
- /package/dist/templates/{hotel-desk → hotel-reception-agent}/restaurant.ts +0 -0
- /package/dist/templates/{hotel-desk → hotel-reception-agent}/seed.ts +0 -0
- /package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/book_business_center.ts +0 -0
- /package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/book_spa_appointment.ts +0 -0
- /package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/book_tour.ts +0 -0
- /package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/lookup_policy.ts +0 -0
- /package/dist/templates/{hotel-desk → hotel-reception-agent}/tools/order_flowers.ts +0 -0
- /package/dist/templates/{link-digest → link-digest-workflow}/api-client.ts +0 -0
- /package/dist/templates/{health-assistant → medication-safety-agent}/agent.eval.test.ts +0 -0
- /package/dist/templates/{health-assistant → medication-safety-agent}/fda.test.ts +0 -0
- /package/dist/templates/{health-assistant → medication-safety-agent}/fda.ts +0 -0
- /package/dist/templates/{health-assistant → medication-safety-agent}/system-prompt.md +0 -0
- /package/dist/templates/{health-assistant → medication-safety-agent}/tools/check_drug_interaction.ts +0 -0
- /package/dist/templates/{health-assistant → medication-safety-agent}/tools/medication_lookup.ts +0 -0
- /package/dist/templates/{recap-workflow → meeting-recap-agent}/agent.eval.test.ts +0 -0
- /package/dist/templates/{recap-workflow → meeting-recap-agent}/shared.ts +0 -0
- /package/dist/templates/{recap-workflow → meeting-recap-agent}/tools/cancel_recap.ts +0 -0
- /package/dist/templates/{recap-workflow → meeting-recap-agent}/tools/keep_transcript.ts +0 -0
- /package/dist/templates/{recap-workflow → meeting-recap-agent}/tools/recap_progress.ts +0 -0
- /package/dist/templates/{recap-workflow → meeting-recap-agent}/tools/recap_status.ts +0 -0
- /package/dist/templates/{recap-workflow → meeting-recap-agent}/tools/request_recap.ts +0 -0
- /package/dist/templates/{recap-workflow → meeting-recap-agent}/workflows/tokens.ts +0 -0
- /package/dist/templates/{pizza-ordering → pizza-ordering-agent}/agent.eval.test.ts +0 -0
- /package/dist/templates/{pizza-ordering → pizza-ordering-agent}/agent.test.ts +0 -0
- /package/dist/templates/{pizza-ordering → pizza-ordering-agent}/client.tsx +0 -0
- /package/dist/templates/{pizza-ordering → pizza-ordering-agent}/shared.ts +0 -0
- /package/dist/templates/{pizza-ordering → pizza-ordering-agent}/system-prompt.md +0 -0
- /package/dist/templates/{pizza-ordering → pizza-ordering-agent}/tools/add_pizza.ts +0 -0
- /package/dist/templates/{pizza-ordering → pizza-ordering-agent}/tools/place_order.ts +0 -0
- /package/dist/templates/{pizza-ordering → pizza-ordering-agent}/tools/remove_pizza.ts +0 -0
- /package/dist/templates/{pizza-ordering → pizza-ordering-agent}/tools/set_customer_name.ts +0 -0
- /package/dist/templates/{pizza-ordering → pizza-ordering-agent}/tools/update_pizza.ts +0 -0
- /package/dist/templates/{pizza-ordering → pizza-ordering-agent}/tools/view_order.ts +0 -0
- /package/dist/templates/{podcast-digest → podcast-digest-workflow}/workflows/feeds.ts +0 -0
- /package/dist/templates/{podcast-digest → podcast-digest-workflow}/workflows/slack.ts +0 -0
- /package/dist/templates/{research-workflow → research-handoff-agent}/agent.eval.test.ts +0 -0
- /package/dist/templates/{research-workflow → research-handoff-agent}/shared.ts +0 -0
- /package/dist/templates/{research-workflow → research-handoff-agent}/tools/file_it_now.ts +0 -0
- /package/dist/templates/{research-workflow → research-handoff-agent}/tools/request_research.ts +0 -0
- /package/dist/templates/{research-workflow → research-handoff-agent}/tools/research_progress.ts +0 -0
- /package/dist/templates/{research-workflow → research-handoff-agent}/tools/research_status.ts +0 -0
- /package/dist/templates/{research-workflow → research-handoff-agent}/workflows/notes.ts +0 -0
- /package/dist/templates/{research-workflow → research-handoff-agent}/workflows/prompts.ts +0 -0
- /package/dist/templates/{plan-and-execute → research-planner-agent}/agent.test.ts +0 -0
- /package/dist/templates/{plan-and-execute → research-planner-agent}/client.tsx +0 -0
- /package/dist/templates/{plan-and-execute → research-planner-agent}/procedure.ts +0 -0
- /package/dist/templates/{plan-and-execute → research-planner-agent}/prompts.ts +0 -0
- /package/dist/templates/{plan-and-execute → research-planner-agent}/tools/plan_status.ts +0 -0
- /package/dist/templates/{plan-and-execute → research-planner-agent}/tools/revise_plan.ts +0 -0
- /package/dist/templates/{plan-and-execute → research-planner-agent}/tools/start_plan.ts +0 -0
- /package/dist/templates/{plan-and-execute → research-planner-agent}/tools/work_next_step.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/address.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/agent.eval.test.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/agent.test.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/authenticate.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/cancel.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/client.tsx +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/payment.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/pending.test.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/refund.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/registry.test.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/resolve.test.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/returns.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/seed.json +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/seed.test.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/shared.test.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/store.test.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/swap.test.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/swap.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/system-prompt.md +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/tools/cancel_change.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/tools/cancel_pending_order.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/tools/confirm_change.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/tools/exchange_delivered_order_items.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/tools/find_user_id_by_email.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/tools/find_user_id_by_name_zip.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/tools/get_item_details.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/tools/get_order_details.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/tools/get_product_details.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/tools/get_user_details.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/tools/list_all_product_types.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/tools/modify_pending_order_address.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/tools/modify_pending_order_items.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/tools/modify_pending_order_payment.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/tools/modify_user_address.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/tools/return_delivered_order_items.ts +0 -0
- /package/dist/templates/{retail → retail-orders-agent}/tools/transfer_to_human_agents.ts +0 -0
- /package/dist/templates/{roadside-assist → roadside-assistance-agent}/events.ts +0 -0
- /package/dist/templates/{roadside-assist → roadside-assistance-agent}/system-prompt.md +0 -0
- /package/dist/templates/{roadside-assist → roadside-assistance-agent}/tools/job_status.ts +0 -0
- /package/dist/templates/{roadside-assist → roadside-assistance-agent}/tools/report_location.ts +0 -0
- /package/dist/templates/{roadside-assist → roadside-assistance-agent}/yard.ts +0 -0
- /package/dist/templates/{spoken-summary → spoken-summary-workflow}/agent.eval.test.ts +0 -0
- /package/dist/templates/{spoken-summary → spoken-summary-workflow}/workflows/transcribe.ts +0 -0
- /package/dist/templates/{solo-rpg → tabletop-rpg-agent}/client.tsx +0 -0
- /package/dist/templates/{solo-rpg → tabletop-rpg-agent}/tools/action_roll.ts +0 -0
- /package/dist/templates/{solo-rpg → tabletop-rpg-agent}/tools/burn_momentum.ts +0 -0
- /package/dist/templates/{solo-rpg → tabletop-rpg-agent}/tools/oracle.ts +0 -0
- /package/dist/templates/{solo-rpg → tabletop-rpg-agent}/tools/setup_character.ts +0 -0
- /package/dist/templates/{solo-rpg → tabletop-rpg-agent}/tools/update_state.ts +0 -0
- /package/dist/templates/{support-line → technical-support-agent}/agent.eval.test.ts +0 -0
- /package/dist/templates/{support-line → technical-support-agent}/client.tsx +0 -0
- /package/dist/templates/{support-line → technical-support-agent}/knowledge.json +0 -0
- /package/dist/templates/{support-line → technical-support-agent}/prompts.ts +0 -0
- /package/dist/templates/{support-line → technical-support-agent}/system-prompt.md +0 -0
- /package/dist/templates/{support-line → technical-support-agent}/tools/answer_question.ts +0 -0
- /package/dist/templates/{support-line → technical-support-agent}/tools/log_ticket.ts +0 -0
- /package/dist/templates/{infocom-adventure → text-adventure-agent}/tools/game_state_drop.ts +0 -0
- /package/dist/templates/{infocom-adventure → text-adventure-agent}/tools/game_state_flag.ts +0 -0
- /package/dist/templates/{infocom-adventure → text-adventure-agent}/tools/game_state_get.ts +0 -0
- /package/dist/templates/{infocom-adventure → text-adventure-agent}/tools/game_state_move.ts +0 -0
- /package/dist/templates/{infocom-adventure → text-adventure-agent}/tools/game_state_restart.ts +0 -0
- /package/dist/templates/{infocom-adventure → text-adventure-agent}/tools/game_state_score.ts +0 -0
- /package/dist/templates/{infocom-adventure → text-adventure-agent}/tools/game_state_take.ts +0 -0
- /package/dist/templates/{briefing-desk → topic-briefing-agent}/tools/briefing_so_far.ts +0 -0
- /package/dist/templates/{briefing-desk → topic-briefing-agent}/tools/research_topic.ts +0 -0
- /package/dist/templates/{briefing-desk → topic-briefing-agent}/tools/verify_claim.ts +0 -0
- /package/dist/templates/{travel-concierge → travel-concierge-agent}/agent.eval.test.ts +0 -0
- /package/dist/templates/{travel-concierge → travel-concierge-agent}/agent.test.ts +0 -0
- /package/dist/templates/{travel-concierge → travel-concierge-agent}/call-events.ts +0 -0
- /package/dist/templates/{travel-concierge → travel-concierge-agent}/client.tsx +0 -0
- /package/dist/templates/{travel-concierge → travel-concierge-agent}/routing.ts +0 -0
- /package/dist/templates/{travel-concierge → travel-concierge-agent}/system-prompt.md +0 -0
- /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/book_car_rental.ts +0 -0
- /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/book_excursion.ts +0 -0
- /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/book_hotel.ts +0 -0
- /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/cancel_action.ts +0 -0
- /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/cancel_ticket.ts +0 -0
- /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/complete_or_escalate.ts +0 -0
- /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/confirm_action.ts +0 -0
- /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/lookup_booking.ts +0 -0
- /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/search_car_rentals.ts +0 -0
- /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/search_excursions.ts +0 -0
- /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/search_flights.ts +0 -0
- /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/search_hotels.ts +0 -0
- /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/to_car_rental_assistant.ts +0 -0
- /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/to_excursion_assistant.ts +0 -0
- /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/to_flight_assistant.ts +0 -0
- /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/to_hotel_assistant.ts +0 -0
- /package/dist/templates/{travel-concierge → travel-concierge-agent}/tools/update_ticket.ts +0 -0
- /package/dist/templates/{word-wrangler → word-game-agent}/agent.test.ts +0 -0
- /package/dist/templates/{word-wrangler → word-game-agent}/client.tsx +0 -0
- /package/dist/templates/{word-wrangler → word-game-agent}/guess.ts +0 -0
- /package/dist/templates/{word-wrangler → word-game-agent}/player.ts +0 -0
- /package/dist/templates/{word-wrangler → word-game-agent}/system-prompt.md +0 -0
- /package/dist/templates/{word-wrangler → word-game-agent}/tools/final_score.ts +0 -0
- /package/dist/templates/{word-wrangler → word-game-agent}/tools/relay_description.ts +0 -0
- /package/dist/templates/{word-wrangler → word-game-agent}/tools/repeat_word.ts +0 -0
- /package/dist/templates/{word-wrangler → word-game-agent}/tools/skip_word.ts +0 -0
- /package/dist/templates/{word-wrangler → word-game-agent}/tools/start_game.ts +0 -0
- /package/dist/templates/{word-wrangler → word-game-agent}/words.ts +0 -0
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { agent } from "@alexkroman1/aai";
|
|
2
|
-
|
|
3
|
-
// No providers declared: the agent runs the default all-AssemblyAI cascaded
|
|
4
|
-
// pipeline, billed to ASSEMBLYAI_API_KEY. (Add `voice: "..."` to pick its
|
|
5
|
-
// TTS voice, or declare any of stt/llm/tts to swap a single stage.)
|
|
6
|
-
export default agent({
|
|
7
|
-
name: "Simple Assistant",
|
|
8
|
-
});
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { agent } from "@alexkroman1/aai";
|
|
2
|
-
import { gameProjection, storyFlow } from "./shared.ts";
|
|
3
|
-
|
|
4
|
-
export default agent({
|
|
5
|
-
name: "Solo RPG",
|
|
6
|
-
greeting:
|
|
7
|
-
"Welcome. Tell me your name, or describe the kind of story you want, and we will begin. You can say something like, dark fantasy warrior named Kael, or just give me a name and I will build a world around you.",
|
|
8
|
-
sttPrompt:
|
|
9
|
-
"Solo RPG terms: strong hit, weak hit, miss, momentum, chaos factor, clock, disposition, bond, edge, heart, iron, shadow, wits, face danger, compel, gather information, secure advantage, clash, strike, endure harm, endure stress, make connection, test bond, resupply, world shaping",
|
|
10
|
-
maxSteps: 8,
|
|
11
|
-
|
|
12
|
-
// One declaration replaces a `ctx.send("game_state", state)` in every
|
|
13
|
-
// state-mutating tool — six of them, and adding a seventh meant
|
|
14
|
-
// remembering to push or watching the UI quietly fall out of sync.
|
|
15
|
-
// NOT the identity: `gameView` withholds the seven fields the sidebar never
|
|
16
|
-
// reads and every unplayed act's goal and mood with them, which is the only
|
|
17
|
-
// defence there is against a spoiler leak (see `shared.ts`). The slot's own
|
|
18
|
-
// default is what a session that has run no tool projects.
|
|
19
|
-
syncState: gameProjection,
|
|
20
|
-
|
|
21
|
-
// The flow gates the tools whether or not it is declared here. What DECLARING
|
|
22
|
-
// it buys is the other half the states were written for: the active state's
|
|
23
|
-
// `instruction` goes in front of the model on every turn, rather than only on
|
|
24
|
-
// the turns a tool result happens to carry it back. `system-prompt.md` already
|
|
25
|
-
// tells the narrator to read `instruction` as ground truth — this is what
|
|
26
|
-
// makes that true before the first tool call of a turn, and it is the field
|
|
27
|
-
// six of the other seven flow templates declare.
|
|
28
|
-
dialogs: [storyFlow],
|
|
29
|
-
});
|
|
@@ -1,28 +0,0 @@
|
|
|
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`** — the
|
|
10
|
-
* prompt says to call it FIRST every turn, and that includes the turn before a
|
|
11
|
-
* character exists. It is also the one tool that reports the POSITION, the way
|
|
12
|
-
* `plan-and-execute`'s `plan_status` does: the position comes from the machine
|
|
13
|
-
* rather than from a second reading of the campaign's fields, so "there is no
|
|
14
|
-
* character yet" is the same fact here as the refusal `action_roll` would give.
|
|
15
|
-
*/
|
|
16
|
-
export default gameSlot.tool({
|
|
17
|
-
description:
|
|
18
|
-
"Returns the full current game state, and where the story is. Call this at the start of every turn, before narrating or rolling, and treat the returned values as ground truth — never guess or remember stats from previous turns.",
|
|
19
|
-
execute: (_args, game, ctx) => ({
|
|
20
|
-
// The position SPREAD rather than renamed. `at`/`next`/`storyOver` said the
|
|
21
|
-
// same three things a gated tool's result already carries as `state`,
|
|
22
|
-
// `instruction` and `done` — so within one agent the model was reading its
|
|
23
|
-
// own position under two key sets, and the system prompt's claim that
|
|
24
|
-
// "every other tool answers with the same pair" was simply false.
|
|
25
|
-
...storyFlow.position(ctx),
|
|
26
|
-
...stateSummary(game),
|
|
27
|
-
}),
|
|
28
|
-
});
|
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The knowledge base, the retriever, and what the browser is shown.
|
|
3
|
-
*
|
|
4
|
-
* **The retriever is lexical, and that is a deliberate difference from the
|
|
5
|
-
* notebooks this template ports.** Their self-RAG and CRAG graphs retrieve from
|
|
6
|
-
* a Chroma vectorstore over OpenAI embeddings; this SDK has no vector store
|
|
7
|
-
* (`ctx.vector` was removed — see the root guide), and a template that needed
|
|
8
|
-
* one would be a template nobody can run. So retrieval here is term overlap
|
|
9
|
-
* with an inverse-document-frequency weight, which is genuinely worse at
|
|
10
|
-
* meaning and genuinely fine at words.
|
|
11
|
-
*
|
|
12
|
-
* That makes the corrective loop MORE valuable rather than less, which is the
|
|
13
|
-
* point worth taking away: CRAG exists because retrieval is imperfect, and a
|
|
14
|
-
* weaker retriever is exactly the case its grader and its query rewriter were
|
|
15
|
-
* designed for. A caller saying "my internet keeps dying at night" retrieves
|
|
16
|
-
* nothing useful by words alone — the rewrite step is what turns it into
|
|
17
|
-
* "evening slowdown congestion peak time" and finds D10.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
import {
|
|
21
|
-
type DeepReadonly,
|
|
22
|
-
type SlotCaps,
|
|
23
|
-
type StateProjection,
|
|
24
|
-
sessionSlot,
|
|
25
|
-
} from "@alexkroman1/aai";
|
|
26
|
-
import knowledge from "./knowledge.json" with { type: "json" };
|
|
27
|
-
|
|
28
|
-
export interface Doc {
|
|
29
|
-
id: string;
|
|
30
|
-
title: string;
|
|
31
|
-
topic: string;
|
|
32
|
-
text: string;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export const PRODUCT: string = knowledge.product;
|
|
36
|
-
export const DOCS: Doc[] = knowledge.docs;
|
|
37
|
-
|
|
38
|
-
export const TOPICS: string[] = [...new Set(DOCS.map((doc) => doc.topic))].sort();
|
|
39
|
-
|
|
40
|
-
// ─── Retrieval ───────────────────────────────────────────────────────────────
|
|
41
|
-
|
|
42
|
-
/** Words that match everything and therefore rank nothing. */
|
|
43
|
-
const STOPWORDS = new Set([
|
|
44
|
-
"the",
|
|
45
|
-
"and",
|
|
46
|
-
"for",
|
|
47
|
-
"you",
|
|
48
|
-
"your",
|
|
49
|
-
"are",
|
|
50
|
-
"was",
|
|
51
|
-
"with",
|
|
52
|
-
"that",
|
|
53
|
-
"this",
|
|
54
|
-
"have",
|
|
55
|
-
"has",
|
|
56
|
-
"can",
|
|
57
|
-
"not",
|
|
58
|
-
"but",
|
|
59
|
-
"how",
|
|
60
|
-
"why",
|
|
61
|
-
"what",
|
|
62
|
-
"when",
|
|
63
|
-
"will",
|
|
64
|
-
"from",
|
|
65
|
-
"into",
|
|
66
|
-
"out",
|
|
67
|
-
"get",
|
|
68
|
-
"does",
|
|
69
|
-
"did",
|
|
70
|
-
"any",
|
|
71
|
-
"all",
|
|
72
|
-
"our",
|
|
73
|
-
"their",
|
|
74
|
-
"there",
|
|
75
|
-
"then",
|
|
76
|
-
"than",
|
|
77
|
-
"about",
|
|
78
|
-
"just",
|
|
79
|
-
"been",
|
|
80
|
-
"were",
|
|
81
|
-
"they",
|
|
82
|
-
"them",
|
|
83
|
-
"his",
|
|
84
|
-
"her",
|
|
85
|
-
"its",
|
|
86
|
-
"one",
|
|
87
|
-
"two",
|
|
88
|
-
"who",
|
|
89
|
-
"whom",
|
|
90
|
-
"some",
|
|
91
|
-
]);
|
|
92
|
-
|
|
93
|
-
function tokenize(text: string): string[] {
|
|
94
|
-
return text
|
|
95
|
-
.toLowerCase()
|
|
96
|
-
.split(/[^a-z0-9]+/)
|
|
97
|
-
.filter((word) => word.length > 2 && !STOPWORDS.has(word));
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Term → how many documents contain it, and per document, term → how often it
|
|
102
|
-
* occurs. Both computed once at module load, in the one pass that has to visit
|
|
103
|
-
* every token anyway.
|
|
104
|
-
*
|
|
105
|
-
* The per-document COUNTS are what scoring needs. Keeping the raw token list
|
|
106
|
-
* instead made `retrieve` walk it end to end once per query term, allocating a
|
|
107
|
-
* filtered array each time, to recover a number this loop already had.
|
|
108
|
-
*/
|
|
109
|
-
const DOC_FREQUENCY = new Map<string, number>();
|
|
110
|
-
const DOC_TERM_COUNTS = new Map<string, Map<string, number>>();
|
|
111
|
-
for (const doc of DOCS) {
|
|
112
|
-
const counts = new Map<string, number>();
|
|
113
|
-
for (const token of tokenize(`${doc.title} ${doc.topic} ${doc.text}`)) {
|
|
114
|
-
counts.set(token, (counts.get(token) ?? 0) + 1);
|
|
115
|
-
}
|
|
116
|
-
DOC_TERM_COUNTS.set(doc.id, counts);
|
|
117
|
-
for (const term of counts.keys()) {
|
|
118
|
-
DOC_FREQUENCY.set(term, (DOC_FREQUENCY.get(term) ?? 0) + 1);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/** How many documents one retrieval returns before grading. */
|
|
123
|
-
export const RETRIEVE_K = 4;
|
|
124
|
-
|
|
125
|
-
export interface Retrieved {
|
|
126
|
-
doc: Doc;
|
|
127
|
-
score: number;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* The `retrieve` node: top-k by idf-weighted term overlap.
|
|
132
|
-
*
|
|
133
|
-
* A term in one document is worth much more than a term in eight — without the
|
|
134
|
-
* weight, "fibre" and "hub" (in nearly every document) drown the one word that
|
|
135
|
-
* actually distinguishes the caller's question.
|
|
136
|
-
*/
|
|
137
|
-
export function retrieve(query: string, k: number = RETRIEVE_K): Retrieved[] {
|
|
138
|
-
const terms = new Set(tokenize(query));
|
|
139
|
-
if (terms.size === 0) return [];
|
|
140
|
-
const scored: Retrieved[] = [];
|
|
141
|
-
for (const doc of DOCS) {
|
|
142
|
-
const counts = DOC_TERM_COUNTS.get(doc.id);
|
|
143
|
-
let score = 0;
|
|
144
|
-
for (const term of terms) {
|
|
145
|
-
const hits = counts?.get(term) ?? 0;
|
|
146
|
-
if (hits === 0) continue;
|
|
147
|
-
const frequency = DOC_FREQUENCY.get(term) ?? 1;
|
|
148
|
-
// Diminishing returns per repeat, so one long document cannot win on
|
|
149
|
-
// repetition alone.
|
|
150
|
-
score += Math.log(1 + hits) * Math.log(DOCS.length / frequency + 1);
|
|
151
|
-
}
|
|
152
|
-
if (score > 0) scored.push({ doc, score });
|
|
153
|
-
}
|
|
154
|
-
return scored.sort((a, b) => b.score - a.score).slice(0, k);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/** One document as the answer prompt sees it. */
|
|
158
|
-
export function formatDoc(doc: Doc): string {
|
|
159
|
-
return `[${doc.id}] ${doc.title}\n${doc.text}`;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
// ─── The trace ───────────────────────────────────────────────────────────────
|
|
163
|
-
// Their graph is watched by streaming node names to a notebook. A caller hears
|
|
164
|
-
// none of that, so the run records itself and the browser renders it.
|
|
165
|
-
|
|
166
|
-
export interface GradedDoc {
|
|
167
|
-
id: string;
|
|
168
|
-
title: string;
|
|
169
|
-
relevant: boolean;
|
|
170
|
-
reason: string;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
export interface TraceStep {
|
|
174
|
-
/** The node's name, spelled as their graph spells it. */
|
|
175
|
-
node: string;
|
|
176
|
-
detail: string;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
export interface AnswerTrace {
|
|
180
|
-
question: string;
|
|
181
|
-
/** The query retrieval actually ran on — rewritten, if it was. */
|
|
182
|
-
query: string;
|
|
183
|
-
rewrites: number;
|
|
184
|
-
steps: TraceStep[];
|
|
185
|
-
docs: GradedDoc[];
|
|
186
|
-
answer: string | null;
|
|
187
|
-
/** `null` until the hallucination grader has run. */
|
|
188
|
-
grounded: boolean | null;
|
|
189
|
-
/** `null` until the answer grader has run. */
|
|
190
|
-
useful: boolean | null;
|
|
191
|
-
/** True when the loop gave up and the caller should be offered a ticket. */
|
|
192
|
-
exhausted: boolean;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
export interface Ticket {
|
|
196
|
-
reference: string;
|
|
197
|
-
question: string;
|
|
198
|
-
/** Server-side only — the projection never carries it. */
|
|
199
|
-
callback: string;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
export interface SupportState {
|
|
203
|
-
/** The most recent run, which is what the sidebar renders. */
|
|
204
|
-
trace: AnswerTrace | null;
|
|
205
|
-
/** Every question this call has asked, capped. */
|
|
206
|
-
asked: string[];
|
|
207
|
-
ticket: Ticket | null;
|
|
208
|
-
ticketCounter: number;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
export function emptySupportState(): SupportState {
|
|
212
|
-
return { trace: null, asked: [], ticket: null, ticketCounter: 0 };
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* How many of this call's questions the slot keeps.
|
|
217
|
-
*
|
|
218
|
-
* Exported because a spec reads it — the bound is declared once, here, and the
|
|
219
|
-
* test that the twenty-first question drops the first must not restate the
|
|
220
|
-
* number.
|
|
221
|
-
*/
|
|
222
|
-
export const ASKED_CAP = 20;
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* The growth bound, named and TYPED.
|
|
226
|
-
*
|
|
227
|
-
* `SlotCaps<SupportState>` admits only the state's array-valued keys, so a cap
|
|
228
|
-
* on `ticketCounter` or a mistyped `askedd` is a compile error at the
|
|
229
|
-
* declaration rather than a bound that silently caps nothing. `asked` rides in
|
|
230
|
-
* every `syncState` frame, which is why it is the field that needs one.
|
|
231
|
-
*/
|
|
232
|
-
const caps: SlotCaps<SupportState> = { asked: ASKED_CAP };
|
|
233
|
-
|
|
234
|
-
export const supportSlot = sessionSlot("support", emptySupportState, { caps });
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* The call as a READ hands it out: deep-frozen, and typed to say so.
|
|
238
|
-
*
|
|
239
|
-
* {@link supportView} takes this rather than {@link SupportState}, which is the
|
|
240
|
-
* widening a deep-readonly slot forces and the reason it is worth doing: a
|
|
241
|
-
* mutable state still satisfies it, so a call with an `update` draft is
|
|
242
|
-
* unaffected, while a projection that WOULD have mutated stops compiling
|
|
243
|
-
* instead of throwing at its first call.
|
|
244
|
-
*/
|
|
245
|
-
export type FrozenSupportState = DeepReadonly<SupportState>;
|
|
246
|
-
|
|
247
|
-
// ─── The projection ──────────────────────────────────────────────────────────
|
|
248
|
-
|
|
249
|
-
export interface SupportView {
|
|
250
|
-
product: string;
|
|
251
|
-
trace: DeepReadonly<AnswerTrace> | null;
|
|
252
|
-
asked: readonly string[];
|
|
253
|
-
/** The reference only — the callback number stays on the server. */
|
|
254
|
-
ticket: string | null;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* What the browser sees. The `ticket` field is why this is a projection rather
|
|
259
|
-
* than the state itself: a ticket carries the caller's phone number, and
|
|
260
|
-
* `syncState` is where you decide what leaves the server.
|
|
261
|
-
*/
|
|
262
|
-
export function supportView(state: FrozenSupportState): SupportView {
|
|
263
|
-
return {
|
|
264
|
-
product: PRODUCT,
|
|
265
|
-
trace: state.trace,
|
|
266
|
-
asked: state.asked,
|
|
267
|
-
ticket: state.ticket?.reference ?? null,
|
|
268
|
-
};
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* The projection BOTH ends use: `syncState` on the agent, `useAgentState` in
|
|
273
|
-
* the client.
|
|
274
|
-
*
|
|
275
|
-
* Annotated with `StateProjection<SupportView>` because this export IS the
|
|
276
|
-
* contract between the two — it is the only thing `agent.ts` and `client.tsx`
|
|
277
|
-
* share, and naming what a projection is (a callable carrying the slot's `key`
|
|
278
|
-
* and `create`) is what tells a reader why passing it to `useAgentState`
|
|
279
|
-
* derives the pre-first-frame value for free.
|
|
280
|
-
*/
|
|
281
|
-
export const supportProjection: StateProjection<SupportView> = supportSlot.projection(supportView);
|
package/dist/test-Cllnx81G.mjs
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { a as ok, n as fail } from "./_output-DBP9Op_d.mjs";
|
|
3
|
-
import { n as log } from "./_ui-DCt4qZrk.mjs";
|
|
4
|
-
import { l as formatCappedList } from "./_utils-D5JGcjiW.mjs";
|
|
5
|
-
import { i as unrunSpecFiles, n as classifyVitestError, r as runVitest, t as WIDEN_HINT } from "./_vitest-runner-AVR9VtXh.mjs";
|
|
6
|
-
import { omitUndefined } from "@alexkroman1/aai/utils";
|
|
7
|
-
//#region src/test.ts
|
|
8
|
-
/**
|
|
9
|
-
* `aai test` — run agent tests via vitest.
|
|
10
|
-
*
|
|
11
|
-
* The launcher is `_vitest-runner.ts`, shared with `aai eval` and `aai build`'s
|
|
12
|
-
* pre-build gate. What is here is the COMMAND: which files the test tier runs,
|
|
13
|
-
* and the verdict over the ones a run did not cover.
|
|
14
|
-
*/
|
|
15
|
-
/**
|
|
16
|
-
* The files `aai test` runs, in preference order.
|
|
17
|
-
*
|
|
18
|
-
* The tier's filenames belong to the command, not to the runner — `aai eval`
|
|
19
|
-
* declares `EVAL_FILES` the same way one module over, and neither names the
|
|
20
|
-
* other's. `aai build` imports this one because its pre-build gate runs the
|
|
21
|
-
* TEST tier.
|
|
22
|
-
*/
|
|
23
|
-
const TEST_FILES = ["agent.test.ts", "agent.test.js"];
|
|
24
|
-
/**
|
|
25
|
-
* Execute agent tests and return structured result.
|
|
26
|
-
*
|
|
27
|
-
* **An incomplete run is not a pass.** For as long as this command answered
|
|
28
|
-
* `{"ok":true,"data":{"passed":true}}` with exit 0 over specs it had not run,
|
|
29
|
-
* the scaffold's `"test": "aai test"` was what users wired into CI — so a suite
|
|
30
|
-
* of 25 tests could go red in the editor and green in the pipeline, and adding
|
|
31
|
-
* one tool could break `registry.test.ts` in 17 assertions with `pnpm test` and
|
|
32
|
-
* `pnpm build` both staying green throughout. It is the same defect
|
|
33
|
-
* `defineExec`'s `cwd` policy exists for (a green result for a project that is
|
|
34
|
-
* not there), one directory over, and it gets the same answer: the command
|
|
35
|
-
* fails, names the files, and names the flag that runs them.
|
|
36
|
-
*/
|
|
37
|
-
async function executeTest(cwd, opts = {}) {
|
|
38
|
-
log.step(opts.all ? "Running project tests" : "Running agent tests");
|
|
39
|
-
try {
|
|
40
|
-
const ran = runVitest(cwd, {
|
|
41
|
-
candidates: TEST_FILES,
|
|
42
|
-
announceUnrun: false,
|
|
43
|
-
...omitUndefined({ all: opts.all })
|
|
44
|
-
});
|
|
45
|
-
const unrun = unrunSpecFiles(cwd, ran);
|
|
46
|
-
if (unrun.length > 0) return incomplete(ran, unrun);
|
|
47
|
-
if (ran === false) {
|
|
48
|
-
log.info("No test file found. Create agent.test.ts to add tests.");
|
|
49
|
-
return ok({
|
|
50
|
-
passed: true,
|
|
51
|
-
skipped: true,
|
|
52
|
-
ran: [],
|
|
53
|
-
unrun: [],
|
|
54
|
-
complete: true
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
log.success(`Tests passed (${ran.length} spec file(s))`);
|
|
58
|
-
return ok({
|
|
59
|
-
passed: true,
|
|
60
|
-
ran,
|
|
61
|
-
unrun: [],
|
|
62
|
-
complete: true
|
|
63
|
-
});
|
|
64
|
-
} catch (err) {
|
|
65
|
-
const { code, message } = classifyVitestError(err);
|
|
66
|
-
return fail(code, message);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* The verdict for a run that left specs uncovered.
|
|
71
|
-
*
|
|
72
|
-
* Both arms fail, and the `ran === false` arm is the one that had misled
|
|
73
|
-
* longest: `aai test` printed "No test file found" while the project's specs sat
|
|
74
|
-
* right there unrun, which reads as "this project has no tests". Measured on a
|
|
75
|
-
* project whose only spec was `tools/echo_back.test.ts` — `{"passed":true,
|
|
76
|
-
* "skipped":true}`, exit 0, and not a word about it.
|
|
77
|
-
*/
|
|
78
|
-
function incomplete(ran, unrun) {
|
|
79
|
-
const preamble = ran === false ? `\`aai test\` found no agent.test.ts, so it ran nothing, but ${unrun.length} spec file(s) exist` : `\`aai test\` ran ${ran.join(", ")} only — ${unrun.length} other spec file(s) in this project were not run`;
|
|
80
|
-
return fail("incomplete_run", `${preamble}: ${formatCappedList(unrun)}. An unrun spec is not a passing one, so this is not a green result.`, WIDEN_HINT);
|
|
81
|
-
}
|
|
82
|
-
//#endregion
|
|
83
|
-
export { TEST_FILES, executeTest };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/templates/{hiring-desk → applicant-screening-agent}/tools/candidate_details.ts
RENAMED
|
File without changes
|
/package/dist/templates/{hiring-desk → applicant-screening-agent}/tools/proceed_to_emails.ts
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/templates/{hiring-desk → applicant-screening-agent}/tools/rescore_with_feedback.ts
RENAMED
|
File without changes
|
/package/dist/templates/{hiring-desk → applicant-screening-agent}/tools/screen_candidates.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/incident_add_note.ts
RENAMED
|
File without changes
|
/package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/incident_escalate.ts
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/incident_triage.ts
RENAMED
|
File without changes
|
/package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/incident_update_status.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/ops_run_scenario.ts
RENAMED
|
File without changes
|
/package/dist/templates/{dispatch-center → emergency-dispatch-agent}/tools/resources_dispatch.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/templates/{executive-assistant → executive-inbox-agent}/tools/review_memory.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/templates/{health-assistant → medication-safety-agent}/tools/check_drug_interaction.ts
RENAMED
|
File without changes
|
/package/dist/templates/{health-assistant → medication-safety-agent}/tools/medication_lookup.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|