Skip to content

docs: add conceptual documentation for thread inputs#335

Merged
sethjuarez merged 3 commits into
mainfrom
sethjuarez/fix-ci-and-merge-prs
Apr 11, 2026
Merged

docs: add conceptual documentation for thread inputs#335
sethjuarez merged 3 commits into
mainfrom
sethjuarez/fix-ci-and-merge-prs

Conversation

@sethjuarez

Copy link
Copy Markdown
Member

Summary

Adds a new core-concepts page documenting how kind: thread inputs work for multi-turn conversation in Prompty.

What's included

New page: core-concepts/conversation-history.mdx

  • Overview — what threads are and why they matter
  • Declaration — how to add kind: thread to inputs
  • Template placement — where to put {{conversation}} and why position matters
  • Passing data — message format with examples in Python, TypeScript, C#, and Rust
  • Internal mechanics — nonce-based expansion pipeline (render → parse → expand) with mermaid diagrams
  • Security — why nonces prevent role marker injection
  • Best practices — token budgets, sliding windows, summarization, stateless design
  • Agent mode integration — how threads work with apiType: agent

Cross-references added

  • core-concepts/index.mdx — listed in Configuration section
  • core-concepts/file-format.mdxthread kind linked to the new page
  • tutorials/chat-assistant.mdx — added to Next Steps card grid

Build verification

All pages build successfully. The only link validation errors are pre-existing /reference/ broken links (7 occurrences in 6 files) — unrelated to this change.

sethjuarez and others added 3 commits April 10, 2026 15:03
Bump Python (2.0.0a8), TypeScript (2.0.0-alpha.8), C# (2.0.0-alpha.8),
and VS Code extension packages for release including:
- fix: recursive array/object JSON Schema in tool params (#332)
- feat: Rust runtime parity + optional authenticationMode (#333)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When randomBytes/token_hex generates an all-digit hex nonce (e.g.
'1234567890123456'), parseAttrs type coercion converts it to a number.
The subsequent strict comparison (number !== string) always fails,
causing a spurious 'Nonce mismatch' error.

Fix: compare nonces as strings in buildMessage/build_message across
Python, TypeScript, and Rust parsers.

Probability of all-digit 16-char hex: (10/16)^16 ≈ 0.01% — matches
the observed flaky CI failure rate.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…story)

Adds a new core-concepts page explaining how thread inputs work in Prompty:
- What threads are and why they use nonce-based expansion
- How to declare kind: thread inputs and place them in templates
- Data format with multi-language examples (Python, TypeScript, C#, Rust)
- Internal pipeline mechanics (render → parse → expand)
- Best practices: token budgets, sliding windows, stateless design
- Integration with agent mode

Also adds cross-references from the file-format doc, core-concepts index,
and the chat-assistant tutorial.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sethjuarez
sethjuarez merged commit 714697f into main Apr 11, 2026
20 of 22 checks passed
@sethjuarez
sethjuarez deleted the sethjuarez/fix-ci-and-merge-prs branch June 9, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant