Files
TREK/shared/src/assistant/cards/tour.contract.ts
T
Maurice d07b8ba56e feat(assistant): web search through the provider, and cards with a way back for the smaller tour writes
- Web search: ChatGPT (Responses web_search), Anthropic (web_search server
  tool) and OpenRouter (web plugin) search the web themselves when the admin
  switch allows it (on as it ships). A search shows as a step ("Searching the
  web for ..."), the cited pages as source chips under the answer. Anthropic
  answers that searched are replayed with their blocks (new provider state
  adapter); the search step never goes back to the model as a call. The
  prompt says when to search and that chosen places still go through
  search_place.
- Tour writes: assign_tour_track (undo: take that assignment off),
  unassign_tour_track, set_tour_activity_excluded (undo: the other switch),
  link_tour_packing and unlink_tour_packing (undo from the link before, which
  both answers now name) get change cards and their ways back.
2026-10-23 19:13:51 +02:00

33 lines
1.3 KiB
TypeScript

import { tourListCardSchema } from './tour-list.card';
import { tourRouteCardSchema } from './tour-route.card';
export * from './tour-list.card';
export * from './tour-route.card';
/**
* What the tours bring to the assistant chat: the kinds of card they draw,
* the verbs of their change cards and what an applied change of theirs
* touches, beyond the core ones. cards/index.ts and assistant.schema.ts
* spread these into the card union and the shared enums, so a new kind, verb
* or entity is added here and nowhere else.
*/
export const TOUR_CARD_SCHEMAS = [tourRouteCardSchema, tourListCardSchema] as const;
/** addTour, updateTour and importTour sit in the core list already. */
/** A station of a city walk checked off on its day: visited, skipped, or the mark taken back. */
export const TOUR_VERB_KEYS = [
'markVisited',
'markSkipped',
'markPlanned',
// A recorded track put on a tour as the way it was done, or taken off it.
'assignTrack',
'unassignTrack',
// A tour left out of the user's activity sums, or counted again.
'excludeTour',
'countTour',
// A tour pointed at its trip's packing list, or let go of it.
'linkPacking',
'unlinkPacking',
] as const;
/** 'tour' is a core entity already. */
export const TOUR_APPLIED_ENTITIES = [] as const;