Skip to content

Agent chat - #52

Draft
paulsonnentag wants to merge 23 commits into
mainfrom
agent-chat
Draft

Agent chat#52
paulsonnentag wants to merge 23 commits into
mainfrom
agent-chat

Conversation

@paulsonnentag

Copy link
Copy Markdown
Contributor

No description provided.

Provenance generalizes comments: entries stored in a generated doc's
@provenance section link its elements (targets) back to ranges in the
docs they came from (sources), always as automerge urls. The provider
indexes every doc mounted inside it and answers patchwork:provenance
subscriptions scoped by either end, so a source text doc can see inbound
links it doesn't store. codemirror-base renders provenance source ranges
(dotted link-accent tint) and pushes their targets into the shared focus
selection when the cursor lands on them.
Add an unfoldable debug section showing installed/loaded/active llm:skills.
Let the computer activate skills mid-run: a load_skill tool, and
auto-activation when read_doc returns a document matching an inactive
skill's datatypes (instructions delivered inline with the read result).
codemirror-base no longer knows about provenance: `codemirror:extension`
modules may now be factories receiving {handle, element, repo}, and the
corkboard registers one that decorates provenance source ranges and pushes
their linked targets into the shared focus selection.
The model can now mint edit-stable refs — an element by path/{id} matcher,
or a text range by cursor-anchored offsets — so provenance entries can point
at specific passages and elements instead of whole documents. Bumps the
debug panel version to v0.0.2.
…rgets

Lets a selection on a Petrinaut canvas light up the source text range,
not just the other way round.
Provenance entries moved under the document's @Patchwork envelope
(a plain array, no `entries` wrapper) — the provider indexes and
ref-urls them from the new path.
@patchcrow

patchcrow commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

✅ Patchwork glance ready

https://patchwork-preview-52--patchwork-base.netlify.app

Patchwork from inkandswitch/patchwork.inkandswitch.com, packages from this PR at 6694943.

build-info.json

paulsonnentag and others added 12 commits August 26, 2026 17:02
The agent's computer gets a start_scenario tool: called before each
alternative's edits, it forks a fresh draft off main and re-aims the
run's doc resolution at it, so one sequential run can produce several
independent scenarios. Runs that opened scenarios end with a picker
embed instead of the single accept/reject — chips check each branch out
(with diff baselines) for browsing back and forth, accept merges the
selected scenario and unlinks the rest, reject-all discards everything.
On pnpm >= 11 a workspace-less `pnpm -r` recurses into every directory
with a package.json, including the aggregated copies in
static-dist/packages/. Those keep their dev/build scripts but have no
sources or node_modules, so they all fail and their exit code tears
down the whole watch.
- add get datatypes tool and skill
- add create embed of datatype to existing corkboard skill
Record merge provenance on the DraftDoc (mergedFrom per clone, mergedInto)
and walk the change DAG between fork and merge heads to pull a merged
draft's changes out of the time-based grouping into one labelled group.
Scrub boundaries now resolve from the rendered row order instead of raw
timestamps (merged changes interleave in time), and the baseline handle
renders as the boundary below its change so a selected group reads as a
full band. Merging adopts members the target never forked, keeping their
changes scoped to the target draft.
Mirror the drafts sidebar's updated mergeDraft in mergeAgentDraft: adopt
members the merge target never forked, and record mergedFrom per clone and
mergedInto on the draft, so chat-accepted drafts show up as attributed
"Merged" groups in the drafts timeline.
Fill the FIRST unfilled tool-call card — searching from the end paired a
multi-call round's results with the wrong cards. Inactivity timeout up to
5 minutes: a model streaming a huge tool call looks silent to the llm lib.
SkillsDebug reads the shared CHAT_VERSION instead of its own constant.
Change groups split at comment timestamps so each comment (including
replies and resolved threads) gets its own row. Clicking a comment pins
the draft to its state at that time, switches the context sidebar to the
comments tab via a new patchwork:open-context-tool event, and asks the
comments view to select and scroll to the thread through an openThread
field on the shared patchwork:focus doc. Comment writes no longer count
as edits, and the idle scrubber line sits above comments newer than the
latest change.
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.

3 participants