Skip to content

fix(agent): create loops through HTML import#70

Merged
DavidBabinec merged 1 commit into
mainfrom
fix/agent-loop-html-import
Jun 17, 2026
Merged

fix(agent): create loops through HTML import#70
DavidBabinec merged 1 commit into
mainfrom
fix/agent-loop-html-import

Conversation

@DavidBabinec

Copy link
Copy Markdown
Contributor

What changed

  • Added a list_loop_sources site AI tool that exposes loop source ids, data table ids, ordering/filter metadata, and valid {currentEntry.field} binding tokens.
  • Added <instatic-loop> support to the HTML importer so AI-authored HTML creates a real base.loop node instead of a plain container.
  • Updated the site agent prompt/write-tool descriptions and docs to guide agents away from invalid {{post.*}} bindings.
  • Added coverage for the new loop source catalog and importer mapping.

Why

The site agent could previously guess loop bindings and source ids, but it had no read tool for the available dynamic data tokens. More importantly, the HTML import path had no loop marker, so attempts to create a loop through replaceNodeHtml imported as ordinary container markup.

Impact

Agents can now create post/data loops through the existing HTML-native write surface using <instatic-loop data-source-id="data.rows" data-table-id="...">, and loop children can use returned {currentEntry.*} tokens reliably.

Verification

  • bun install
  • bun run build
  • bun test
  • bun run lint

@DavidBabinec
DavidBabinec marked this pull request as ready for review June 17, 2026 12:35
@DavidBabinec
DavidBabinec merged commit b5846a2 into main Jun 17, 2026
6 checks passed
@DavidBabinec
DavidBabinec deleted the fix/agent-loop-html-import branch June 17, 2026 12:35
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