Skip to content

feat(convo): emit model on conversation.append; kind agent-coding-session v1.2.0 - #132

Open
akesling wants to merge 1 commit into
akesling/kind-uri-constantsfrom
akesling/append-model-field
Open

feat(convo): emit model on conversation.append; kind agent-coding-session v1.2.0#132
akesling wants to merge 1 commit into
akesling/kind-uri-constantsfrom
akesling/append-model-field

Conversation

@akesling

@akesling akesling commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Stacked on #164 (kind-URI consolidation) — review that first; this targets its branch and will retarget to main when it merges.

Reported by Pathbase: consumers reading structural.model on conversation.append always get null, because the model is encoded only in the actor string (agent:<model>) and meta.actors, so its stats view grouped every token under one unknown model.

Change

  • Emit model on conversation.append in toolpath-convo::derive: the structural payload carries the model that produced the turn whenever the source records one; the key is omitted otherwise — no placeholder ever lands in a payload. There is a single emitter, so all seven providers (claude, gemini, codex, pi, cursor, opencode, copilot) gain it at once. Actor strings and meta.actors are unchanged.
  • Extraction round-trips it: extract prefers the payload model and falls back to parsing the agent:<model> actor for pre-v1.2.0 documents.
  • Kind agent-coding-session v1.2.0: a new bundled schema documenting the optional model property on conversationAppend — the only semantic delta from v1.1.0 — registered in BUNDLED_KINDS, with PATH_KIND_AGENT_CODING_SESSION now stamping the v1.2.0 URI and the previous URI preserved as ..._V1_1_0. Site spec page and indices updated. Consumers that match the kind by slug or major version are unaffected.
  • Crate versions bumped in-commit per the kind-URI-change policy established by the v1.1.0 adoption, with Cargo.lock, site/_data/crates.json, and the toolpath-cli shim kept in sync. All bumps are breaking-level under 0.x caret semantics, so downstream pins do not auto-flow.

Because #164 lands first, minting here touches only the constant, the schema file, its BUNDLED_KINDS entry, one pin test, the site page, and the changelog — five Rust files instead of ten.

Not in this PR

The harness-generated-turn fix (a deriver bug fix with no schema change) is #165, independent of this work. The companion read-side change in Pathbase — model resolution with actor-definition and actor-suffix fallbacks — fixes already-uploaded documents retroactively.

Testing

Full workspace suite, clippy, rustdoc, the examples gate, and the site build green. New tests pin: the payload model present when the session records one and absent otherwise, payload preferred over the actor parse on extract, and v1.2.0 bundled and resolving as newest alongside exact-version pinning of v1.0.0 and v1.1.0.

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown

🔍 Preview deployed: https://e45e1a05.toolpath.pages.dev

@akesling
akesling force-pushed the akesling/append-model-field branch 2 times, most recently from 03fff1a to dd7ffb0 Compare August 4, 2026 15:30
@akesling akesling self-assigned this Aug 6, 2026
@akesling
akesling force-pushed the akesling/append-model-field branch from 0031dc9 to 2c3eaa4 Compare August 6, 2026 17:47
…sion v1.2.0

Assistant turns' structural payloads now carry the model that produced
them, so documents are self-describing without parsing the actor
string. The key is emitted only when the source session records a
model; extraction prefers the payload field and falls back to the
agent:<model> actor parse for pre-v1.2.0 documents. Actor strings and
meta.actors are unchanged.

The optional model field is documented in a new agent-coding-session
v1.2.0 kind (bundled schema, site spec page); derived documents are
stamped with the v1.2.0 URI. Crates bumped per the kind-URI-change
policy: every deriver and the CLIs.

Reported by Pathbase, whose stats view grouped every token under
"(unknown)" for derived documents.
@akesling
akesling force-pushed the akesling/append-model-field branch from 2c3eaa4 to b192823 Compare August 6, 2026 18:24
@akesling
akesling changed the base branch from main to akesling/kind-uri-constants August 6, 2026 18:24
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