description: "Add a fixed three-card tarot draw to a DSH profile." kind: "package-bundle"
dsh-tarot
English | 中文
Summary
Draw three distinct cards from a 78-card Rider–Waite–Smith deck, ordered as past influences, present situation, and future direction. The Web page spreads all 78 face-down cards across the conversation width without an inner scrollbar. Each draw reshuffles card identities, and each click removes one chosen back. The result includes images and interpretation notes fetched from the selected upright or reversed pages on w.taluo.com. The model can explain the spread, ask about your circumstances, and refine its reading using the same cards.
Table of Contents
- Use this package
- Understand the implementation
- Model Experience
- Known Limitations and Deferred Work
- Dev Note
Use this package
The tested runtime is DSH 0.2.1-rc.2 with Cordis 4.0.5 and Node ^22.19.0 || >=24. Install the prebuilt GitHub Release into your existing Web profile:
dsh plugin --profile web add https://github.com/auwc/dsh-tarot/releases/download/v0.5.0/dsh-tarot-0.5.0.tgz
dsh --profile web --dump-config
The composed configuration contains a tarot row. Start your Web profile normally and ask “Draw three tarot cards for my current situation.” The model calls tarot_draw({ question: "My current situation" }) and waits for your three clicks. The result then shows the selected cards, positions, orientations, image links, and source pages. Model access still uses your profile's configured provider. The close button shows “Hide card choices” or “Cancel draw” according to the question type; hiding the panel leaves the tool request pending.
The bundle supplies these configuration fields. When replacing the tarot row's configuration, provide all three fields:
| Field | Bundle value | Accepted values |
|---|---|---|
reversedPermille |
500 |
Integer 0–1000; 0 gives all upright, 1000 all reversed |
maxQuestionChars |
500 |
Integer 1–10000; trimmed Unicode code points |
sourceTimeoutMs |
5000 |
Integer 100–30000; maximum wait per selected source page |
Blank questions and questions exceeding the configured limit fail before drawing. Card count and positions are fixed; extra input fields cannot change them.
Understand the implementation
Implementation and developmentThe named Cordis plugin registers a tool whose disposer belongs to its plugin scope. Node's crypto.randomInt shuffles all 78 card identities before displaying their hidden positions. The tool waits on userQuestions.ask for three distinct positions selected in order by the user. Orientations use separate random draws after the answer. The tool fetches only the three revealed interpretation pages, extracts bounded notes, and records them with the selected cards in the tool result. Native tool results retain readable text and meta.tarot, so saved results do not depend on drawing again. scripts/crawl-catalog.mjs refreshes the 78-card link catalog from the site's five index pages; it does not bundle images or article text.
From the independent package directory, install locked dependencies and run the checks:
pnpm install --frozen-lockfile --ignore-scripts
pnpm test
pnpm run build
pnpm pack
Tests cover the deck, deterministic edge choices, input validation, cancellation, disposal, and a real Loader/agent-loop composition with a scripted model. Two recorded sessions replay upright and reversed draws without an API key. Only the composition test's random source is mocked; published DSH runtime packages execute normally.
Model Experience
The profile gains one tool schema and a consultation instruction. Each successful native call adds the question, three card names/positions/orientations, source URLs, and extracted notes to model context; the deck's other cards do not enter the prompt. The model is instructed to give a provisional reading, check a specific card-based hypothesis against the user's experience, then ask what happened and what makes the situation difficult as needed. It asks one main question at a time and revises the same spread after each answer. The note fields are source material, not a deterministic interpretation; model wording and question choice vary. Ordinary model caching applies.
Known Limitations and Deferred Work
Card images and interpretation notes load from the source site, so they require network access and may change there. No image or article is bundled. If a page fails, the result marks its notes unavailable; the model is instructed not to attribute its own reading to that page. Headless runs without a user-question answerer cannot draw. Reusing cards for follow-up questions is a model instruction, not an enforced deduplication rule; a new tool invocation draws again. A crash before the result is logged has no recoverable selection. Nested PTC calls return JSON but do not persist the dedicated presentation metadata; the outer program must return the facts it needs to retain.
Dev Note
No live provider call is needed for the recorded tests. Compatibility is limited to the pinned runtime; installation into other prerelease versions requires verification.
No comments yet. Be the first to write one.