Skip to content

feat(session-forms): add the Session Forms demo - #39

Draft
AndrewKirkovski wants to merge 59 commits into
masterfrom
codex/session-forms-v1-release
Draft

AndrewKirkovski wants to merge 59 commits into
masterfrom
codex/session-forms-v1-release

Conversation

@AndrewKirkovski

@AndrewKirkovski AndrewKirkovski commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This pull request adds a Session Forms demo to the app: a session-forms-demo page, scripted fixture agents for tests, a forms_demo agent on a real model, and a session-forms e2e spec. Fixture agents load only with the session-forms-fixtures profile, so no production agent can reach them.

Keep this draft until Session forms are published

The forms backend is in wippyai/session#77, which is not released. The lock still names the published wippy/session 0.6.19, and local runs replace it with the Session branch. After the Session release, this branch must move its dependency declaration and lock to that version and pass a boot with no replacements. Only then is it ready to merge.

Also in this pull request

Each item is a separate commit, so it can be reviewed alone:

  • The branch merges master, so it has chore: adopt Web Host 1.0.68, @wippy-fe 0.0.68 and facade 0.6.50 #40 (Web Host 1.0.68, @wippy-fe 0.0.68 and facade 0.6.50). The Session Forms Demo app gets the same Host 1.0.68 pin and ^0.0.68 ranges.
  • Wippy modules move to their latest versions. The largest moves are keeper/keeper 0.5.63 to 0.5.113 and wippy/dataflow 0.5.4 to 0.7.35. The 2026-11-09 framework release brings facade 0.6.51, views 0.5.14, agent 0.5.12, llm 0.5.15 and usage 0.3.27.
  • npm audit fix runs in the frontend projects, and vite moves to ^6.4.5 in the demo app.
  • The upload worker gets an env.get policy for queue_strategy, which the new uploads module reads.
  • The Attention e2e title fixtures return the table the Session reads.
  • e2e/README.md states the real WebSocket origin rule.

Security alerts

npm audit reports no high alerts in the 10 projects. The rest are 8 moderate alerts per project for minimatch under vue-tsc and @typescript-eslint, which need major updates, and 2 low alerts for mermaid.

GitHub also lists 44 open alerts on frontend/package-lock.json. That file is no longer in the repository, so no code change can clear them. They must be dismissed in the GitHub security tab.

Verification

On b59a89b, with runtime 0.3.60a, the Session branch at 43c02b7 replaced, modules reinstalled with --refresh, and new databases:

  • All 10 front ends build from empty node_modules without changing a lock file, and make.bat lint exits 0.
  • The Session Forms core case (ask, answer, reload) passes in all four cells: compat and managed layouts, each with the iframe and fragment engines. No console, page or request errors, only Host 1.0.68 loads, and the served form bundles match the Session branch by sha256. Managed layout does not reopen the last chat after a reload, so there the stored rows are read through the session API.
  • session-forms e2e, which finds the demo page by its iframe and so runs with the iframe engine only: 6 of 6 in compat. In managed layout 5 of 6 pass, and the reload case fails for the same managed-layout reason. Version leak passes.
  • On the e2e runtime: chat-compatibility passes 1 and skips 1. The Attention helper spec passes 51, and the Attention suites pass 33 in the visual-capture cell and skip 3 by design.

The first boot on a new database logs no such table: uploads from userspace/uploads, whose recovery job starts before the migrations finish. Boots also log session title generation failed ("Generated title is empty"), which comes from the title call in wippy/session, not from this repository.

Earlier, on ea35d94 with runtime 0.3.57a: build and lint exit 0, session-forms e2e passed 2 and version leak 1, chat-compatibility passed 1 and skipped 1, and Attention passed 33 and skipped 3.

AndrewKirkovski and others added 30 commits September 1, 2026 13:10
Moves `wippy/facade` to 0.6.39 (which points `fe_facade_url` at
`webcomponents-1.0.58`) and all 53 `@wippy-fe/*` references across the
nine frontend workspaces to `^0.0.58`.

Also fixes four hardcoded Web Host CDN pins that were still on 1.0.55 -
three releases stale. They are absolute URLs that bypass `fe_facade_url`
entirely, so bumping the facade alone never moved them:

  static/login.html                          4 theme CSS links
  src/app/api/login.jet                      3 theme CSS links
  frontend/applications/main/app.html        dev-proxy.js
  frontend/applications/iframe-demo/app.html dev-proxy.js

The login page had therefore been loading theme CSS from 1.0.55 since
that release. Caught by auditing the network panel for version leaks
during the pre-publish smoke; every request now resolves to 1.0.58. The
`static/app/**` copies of `app.html` are build output and were
regenerated by rebuilding the two apps rather than hand-edited, so the
bump is only real if the frontend build actually ran.

The lock moves `wippy/facade` and nothing else - a targeted
`wippy update wippy/facade` rather than a repo-wide re-resolve, which
would have swept every module to its latest published version and can
drag in unrelated breakage.

Verified on a fully-published boot: no `replacements:`, no localhost,
facade from the hub, host from the CDN and packages from npm. 218
requests, none on any host version below 1.0.58, no 4xx/5xx, and no
console errors or warnings once authenticated. All web components load
and render.
butschster/llm-codex serves models from the local Codex CLI sign-in, so
agent-driven demo scenarios can run without an OpenRouter budget. Launch
needs the machine-specific requirement
butschster.llm_codex:codex_home_path (the Codex CLI home directory).

Local test dependency; leave it out of a release of this app.
`make run-dev` (and `make.bat run-dev`) starts the app on APP_PORT, or on a
free port when unset, and applies the matching gateway override. It also
rewrites APP_PORT, WIPPY_URL, APP_BASE_URL and PUBLIC_API_URL in .env,
because the file env store wins over process env and a CLI-only override
leaves those URLs on the old port.

Optional inputs: FACADE_URL, FE_MODE, RENDER_ENGINE, WIPPY (runtime path),
WIPPY_CONFIG (extra --config files) and WIPPY_OVERRIDES (extra -o entries).
RUN_DEV_MANIFEST writes the resolved origins as JSON. `run` is unchanged.
- Declare butschster/llm-codex with codex_home_path from the new
  app.env:codex_home variable (CODEX_HOME in .env) and the user security
  group for its status endpoints.
- Register DeepSeek V4.1 Flash on the OpenRouter-compatible provider as a
  fast-class model; it does not become a default.
- Enable the chat model picker (facade allow_select_model).

Local test setup for agent-driven scenarios. Decide before any release of
this app whether these belong in the template.
POST /api/v1/session-forms-dev/artifacts/{id}/touch appends a line to one of
the caller's artifacts through the Session repository (with an expected
revision) and publishes the update event. It answers 404 unless
SESSION_FORMS_DEV_FIXTURES=true, requires login, and is denied to the
plain user group. Development fixture only.
- Session Forms page (frontend/applications/session-forms-demo) that
  starts a chat with either agent; make build-app-session-forms-demo.
- app.agents:forms_demo: a real agent with the
  wippy.session.forms:ask_user trait.
- app.session_forms_demo:fixture_agent: a deterministic provider with no
  model call. "ask me" creates a fixed delivery form; an answer gets
  "Thanks, noted: <value>." Both use the production state endpoint.
- The fixture agent reads answers from the record attribute of the
  <wippy-form-answers> element and detects late answers from the record, and
  it sets answered_message on both demo forms.
- The demo page also lists the plain fixture agent (no forms trait).
- The dev-only artifact touch endpoint refuses session forms, so it cannot
  bypass the form's own update rules.
wippy/session 0.1.31 -> 0.6.3, wippy/agent 0.4.15 -> 0.5.1,
wippy/dataflow 0.5.4 -> 0.7.20, wippy/facade 0.6.39 -> 0.6.41,
keeper/keeper 0.5.63 -> 0.5.89, userspace/uploads 0.5.16 -> 0.5.25, and
patch updates for bootloader, migration, relay, security, terminal, test,
usage and views. wippy/llm stays 0.5.2 and now carries its hash.
…index

- New "Session Forms Steering Fixture" agent (forms plus Session steering),
  listed on the demo page, so steering and form answers can be tested
  together.
- "list forms" quotes the last form index in the prompt, which is the
  Session's current one, not an older copy from an earlier reply.
- Makefile/make.ps1/make.bat: add frontend/applications/session-forms-demo
  to the `lint` target, matching every other app/web-component package.
- Give session-forms-demo its own eslint setup (devDependencies +
  .eslintrc.cjs, copied from the main app's convention) — it previously had
  none, which is why it was never wired into `lint` to begin with.
- Fix a latent bug the new lint wiring surfaced: ESLint's flat-config
  search walks up past this repo's own root and, from a worktree nested
  under the gen-2-chat Web Host checkout, picks up the Host's unrelated
  root eslint.config.mjs, breaking every app's `--ext` flag. Force
  eslintrc mode (ESLINT_USE_FLAT_CONFIG=false) for the `lint` target in
  both the Makefile and make.ps1.
- Add a `verify` target (Makefile + make.ps1) composing `build` + `lint` +
  the same backend Lua lint the GitLab CI "Lint" stage already runs
  (`wippy lint --level error`), with a Windows-adapter binary resolver
  (Resolve-WippyBinary) mirroring scripts/run-dev.mjs's WIPPY/local-exe/
  PATH fallback.

A pre-existing, unrelated @typescript-eslint/consistent-type-imports error
in frontend/web-components/mermaid/src/app/mermaid-fallback.ts (dates to
commit 8f3dde8, ~130 commits back) still blocks a fully green `make lint`/
`make verify` run; left alone as out of scope and flagged separately.
Two specs against the deterministic Session Forms Fixture agent
(app.session_forms_demo:fixture_agent) through the real page/chat flow:

- "ask me" -> pick an option -> answered; stays answered after a full
  page reload.
- "ask me" -> "propose action" -> answering the now-stale form gets the
  fixture's late-answer reply.

Both assert the question card's own `card-state` host attribute
(active/answered — the component's styling contract, see
use-host-reflection.ts) rather than timing, the single visible
"Answered a question about delivery." user message, the fixture's
"Thanks, noted: ..."/late-answer reply, and zero console errors.

Navigation deviates from helpers/login.ts's navigateHostTo/
HOST_IFRAME_SELECTOR: live inspection of the running build showed the
Host now mounts as the top-level document directly (no outer host
iframe), and "Session Forms Demo" has no sidebar entry — it's reached
by its own top-level route (/session-forms-demo), same as the sibling
"Iframe Demo" page's /demo. Confirmed e2e/bridge.spec.ts now times out
against a live instance for the same reason; left as a separate,
pre-existing issue (flagged, not fixed here) since it affects an
existing spec unrelated to Session Forms.

Verified: two consecutive full runs green (no flakiness) against the
already-running demo app.
…e import

- verify runs `wippy lint --level error --ns app,app.*`: the whole-workspace
  lint reports errors inside the vendored keeper module under wippy
  v0.3.43a, which this repo does not own.
- mermaid-fallback uses a type-only import instead of an `import()` type,
  which consistent-type-imports forbids; the runtime import stays dynamic.
- The Session Forms demo page passes vue/max-attributes-per-line.
8c70300 added a root npm lockfile alongside the existing pnpm-lock.yaml,
so the two resolved the same package.json independently. e2e/README.md
and the root scripts already assume pnpm; pnpm-lock.yaml was already in
sync with package.json, so no dependency changes were needed, just the
duplicate lockfile.
…spec.ts

e2e/helpers/login.ts's HOST_IFRAME_SELECTOR, getDemoFrame and
navigateHostTo assumed the Web Host is wrapped in an outer
`<iframe src="...iframe.html">`. The current facade (0.6.41) mounts the
Host as a top-level ESM module directly into the page instead, with no
wrapper iframe at all, and boots with its sidebar closed/navbar hidden
(no nav items to click).

- getHostFrame() detects which shape is live (outer iframe vs top-level
  page) instead of assuming one, and getDemoFrame/navigateHostTo now go
  through it.
- DEMO_IFRAME_SELECTOR / THEMED_DEMO_IFRAME_SELECTOR now match the
  srcdoc iframe a routed view.page actually renders into
  (`iframe[name="wippy:page:<registry id>"]`), not the old
  `w-artifact[id=...]` shape, which only applies when that page is
  embedded as a nested artifact elsewhere. Added pageIframeSelector()
  so other specs can derive the same selector for their own page.
- bridge.spec.ts moves off navigateHostTo('Iframe Demo') (no sidebar
  entry exists for it in the current build) onto page.goto('/demo') +
  getDemoFrame/getHostFrame; all three of its tests pass again.
- session-forms.spec.ts moves onto pageIframeSelector() instead of its
  own hardcoded selector, and its navigation-note comment is trimmed of
  review dates, test-report references and the reviewer's .local path
  (kept the technical reasoning).

Verified against the running demo app: bridge.spec.ts (3/3) and
session-forms.spec.ts (2/2) pass, twice in a row.
The forms_demo agent was bound to a model that only exists with the local
Codex test provider. It now uses claude-sonnet-4-6, the model the wippy
agent uses, so it resolves from this app's own model catalog. The comment
above it now describes the agent and what it needs from wippy/session.
Release shape: the app no longer depends on butschster/llm-codex, which read
and rewrote the operator's Codex CLI sign-in. This removes

- the llm_codex dependency and the app.env:codex_home variable (CODEX_HOME),
- the butschster/llm-codex entry in wippy.lock, edited by hand so the other
  locked modules keep their versions (wippy update would also move session,
  llm, bootloader, dataflow and migration),
- allow_select_model on the facade, which was added together with the Codex
  provider to pick test models in chat. The facade default is false.

gpt-5.3-codex and deepseek-v4.1-flash stay: both route through the normal
OpenRouter-compatible provider.
A release must not list or start the deterministic fixture agents. The
app.session_forms_demo namespace (three fixture agents, the deterministic
provider and model, and the dev-only artifact endpoint) is now disabled by
.wippy.yaml (disable.namespaces) unless the session-forms-fixtures profile is
selected. With the namespace removed the entries do not exist, so they are
not listed and cannot be started.

- scripts/run-dev.mjs adds --profile session-forms-fixtures when
  SESSION_FORMS_DEV_FIXTURES is "true" in .env or the environment (the same
  variable as app.env:session_forms_dev_fixtures), and keeps .wippy.yaml in
  the config list when WIPPY_CONFIG is set, because any --config replaces
  wippy's default .wippy.yaml.
- make verify lints twice, with and without the profile, so the fixture Lua
  stays checked.
- README, e2e README and the Session Forms spec say how to turn them on.
…ms page

The page hard-coded four agents. Without the dev fixtures, three of them are
not registered, and their buttons would fail with "not in the agents list".
The page now fetches /api/v1/agents/list on load and shows a card only for
the agents in the response, so the fixture cards appear when the fixtures are
on and are absent otherwise. The intro text and package description no longer
promise four agents.
deepseek-v4.1-flash came in with the Codex test wiring, no agent in the
template uses it, and it tied claude-haiku-4-5 at priority 80 in the fast
class, which made class:fast resolution ambiguous.
Vue's template compiler condenses whitespace in static text, so the
multi-line sequence diagram written inside <template data-type> reached the
web component as one line and drew a single participant with no messages.
Bind the diagram text with v-text from a script string so the newlines
survive, while still demonstrating the children-content mechanism.
…m a Vue SFC

The inert <template data-type> child delivers its text as written in raw HTML,
but a Vue SFC condenses whitespace in static text, so multi-line text such as a
Mermaid diagram arrives on one line. Document passing it with v-text from a
script string, matching the Components page demo.
Fix the 22 vue/html-indent warnings in pages/iframe-demo.vue (indentation only).
Replace the two `any` annotations in app/app.vue with real types: the
'@theme' handler now takes the typed theme mode from the proxy events, and the
'action:navigate' handler narrows its payload through a NavigatePayload shape
that covers both the nested and flat relay forms.
generate.lua gets reply and ask_form helpers and a work_slowly function with a SLOW_DELAY constant. touch_artifact.lua gets a not_found helper and one ownership check. Comments lose planning ids, history and the trigger list, which moves to the README. Behavior is unchanged.
…ases

The README section on the dev fixtures now owns the explanation, with a table of the phrases the fixture agents reply to. The registry, env, agents, Makefile, make.ps1, run-dev and .wippy.yaml comments shrink to one line or a pointer, and the Components page comment links to the component guide.
The page fetched /api/v1/agents/list on mount and again on every Start chat click. It now fetches once through loadAgents() and starts the chat from the stored agent, so the Starting state is gone. The card descriptions and the not-available message are shorter.
collectConsoleErrors in e2e/helpers/console.ts replaces the copies in the Session Forms, fragment PoC and managed layout specs. The Session Forms spec gets askForForm and FORM_TIMEOUT, and its header and comments lose planning ids. login.ts loses history notes.
The Coverage section named a warn-suppressor spec that does not exist and left out the Session Forms, engine, layout, theming and version specs. It now describes each spec that exists. The fixture setup note links to the root README instead of repeating it.
The file is a compiler cache that vue-tsc rewrites on each type-check run. The new app no longer tracks one, and .gitignore ignores *.tsbuildinfo. The copies in main and iframe-demo are already tracked on master and stay as they are.
…wo build caches

The test:e2e:warn-suppressor script ran e2e/warn-suppressor.spec.ts, which does not exist, and nothing else referenced it. The tsconfig.tsbuildinfo files of the main and iframe-demo apps are TypeScript build caches, and .gitignore already ignores *.tsbuildinfo. They leave the index and stay on disk.
Copies "Overlays render inside the shadow root" from THEMING.md 0.0.61,
including how overlay layers follow a component's forced theme.
Conflict resolutions:
- Makefile, make.ps1: both sides' targets (verify, run-dev, build-app-session-forms-demo from V1; prepare-e2e, run-e2e, test-attention*, NPM_INSTALL from master); the Session Forms app now uses NPM_INSTALL like the other builds.
- package.json: master's Attention e2e scripts; the dead warn-suppressor script stays removed.
- wippy.lock: master's module set and versions (Session 0.6.7, facade 0.6.43, agent 0.5.3, llm 0.5.6, relay 0.3.16).
- static/login.html, src/app/api/login.jet, frontend/applications/*/app.html: Host CDN pins at webcomponents-1.0.62, including the Session Forms app.
- Frontend package.json and package-lock.json files (main, iframe-demo, seven web components): published @wippy-fe 0.0.62 pins; the Session Forms app moves to 0.0.62 as well and its lockfile is regenerated by make.ps1 build.
- frontend/applications/main/src/app/app.vue: master's navigate and theme handlers.
- frontend/applications/main/src/pages/components.vue: V1 children-content example for Mermaid (v-text on the native template).
- frontend/web-components/mermaid/src/app/mermaid-fallback.ts: master's named Mermaid type import.
The compatibility spec reads file_uuids from a persisted message and interaction from a Stop reply, and both are optional in the helper types, so tsc rejected the spec.
Locator.evaluate in @playwright/test 1.64 declares three type parameters (result, argument, element) with no overload that takes the result alone, so evaluate<string[]> and evaluate<boolean> fail with TS2558 under a fresh install. The callbacks already return string[] and boolean, so the explicit type argument is dropped and the result type is inferred. The same code type-checks with 1.60.0 and 1.64.1.
The e2e files iterate NodeListOf with for...of and spread. TypeScript 5.9 reports TS2488 for that unless the lib list names DOM.Iterable (5 errors in fragment-poc.spec.ts, helpers/attention.ts and release62-config.spec.ts). TypeScript 6 and 7 include it already, so the entry changes nothing there. The type check now passes on TypeScript 5.9, 6.0 and 7.0 with Playwright 1.60.0 and 1.64.1.
Host 1.0.64 names the Stop control "Stop generating" ("Stopping..." while it
settles). The composer diagnostics looked only for "Stop session", so the
readiness check could not see a running turn's Stop control. The selector now
accepts the current names and the earlier one, because the compatibility cells
for earlier Hosts still use it.
The merged wippy/session module requires wippy/llm >=0.5.7 and
wippy/agent >=0.5.4 (src/_index.yaml of the Session module). The lock held
0.5.3 and 0.5.6, so every start rewrote it with the two newer versions.
Commit the lock the runtime resolves.
…ires

Revert 11 module bumps that no part of the demo needs: keeper, uploads,
users, bootloader, dataflow, migration, security, terminal, test, usage and
views. With these at their master versions the app boots, signs in through
the facade and passes e2e/session-forms.spec.ts.

The remaining moves follow from src/app/deps/_index.yaml: agent >=0.5.3 and
llm >=0.5.6 (locked at 0.5.4 and 0.5.7), relay >=0.3.16, facade >=0.6.43,
session >=0.6.7, and the new wippy-swiss/voice dependency.
The launcher rewrote APP_PORT, WIPPY_URL, APP_BASE_URL and PUBLIC_API_URL in
the project's .env before the runtime started, also on a dry run, so a later
plain `wippy run` pointed at a dead port.

It now writes a per-run copy of .env with those four keys replaced under
.local/run-dev/, points the runtime at it with
-o app.env:file:file_path=..., passes the same values to the runtime's
process environment, and removes the copy when the runtime exits. A dry run
(RUN_DEV_DRY_RUN=1) writes neither the copy nor the manifest.
The spec needs the fixture agents, which exist only with the
session-forms-fixtures profile. Without them it timed out. It now skips with
a reason unless SESSION_FORMS_DEV_FIXTURES=true. Document the skip and the
run-dev env file behavior in e2e/README.md.
The launcher points the runtime's env storage at a per-run copy of .env
that it deletes on exit. When .env has no ENCRYPTION_KEY, the encryption-key
bootloader stores a generated key in that copy, so every run would get a new
key and could not read data encrypted by the previous one. Stop with a clear
message instead of a warning: run `make run` once so the runtime writes the
key to .env, or set it yourself.
…fix the checkpoint marker

The fixture now matches the stable start of the Session checkpoint prompt, so
"list forms" reports a present checkpoint summary again.

New scripted phrases, all usable as typed text or as an Other answer:
- slow tool: text, then a 25 second tool, then "Slow job finished."
- fail after text: text, a quick tool, then a provider error
- limit after text: text and a quick tool; the Limit Fixture agent allows one step
- artifact and ask: an inline artifact tool and ask_user in one round
The check accepts an Origin with the same host and port as the socket plus the
allow_origins list. A page on localhost with a socket on 127.0.0.1 is rejected,
and the reverse, so the README no longer says localhost itself is rejected.
Raise vite to ^6.4.5 in the Session Forms demo app and run npm audit fix
without force. This clears the high alerts (vite, follow-redirects,
source-map-js) and the moderate postcss-selector-parser alert.

The remaining moderate alerts need a major version: vue-tsc 3 and a
typescript-eslint release that no longer depends on the affected minimatch.
@wippy-fe packages stay at ^0.0.67.
wippy update moved 13 modules: keeper 0.5.112, dataflow 0.7.35, uploads 0.5.29,
migration 0.3.26, test 0.4.24, views 0.5.13, relay 0.3.20, bootloader 0.3.18,
facade 0.6.49, usage 0.3.26, terminal 0.4.6, security 0.4.3 and session 0.6.19,
which is the version the Session Forms V1 branch declares. wippy/agent and
wippy/llm have no newer release. The app boots on the new lock.
userspace/uploads 0.5.29 reads userspace.uploads.env:queue_strategy in the
worker. The worker's policy allowed only the database variable, so every
upload logged a warning and fell back to fifo.
The Session reads result.title, so the bare string these fixtures returned
logged "No title returned" for every session of an Attention or compatibility
run.
Brings in #40 (Web Host 1.0.68, @wippy-fe 0.0.68 and facade 0.6.50).
wippy.lock keeps this branch's modules and moves the ones with newer
releases: keeper 0.5.113, agent 0.5.12, facade 0.6.51 (which supersedes
master's 0.6.50), llm 0.5.15, usage 0.3.27 and views 0.5.14.
The Session Forms Demo app loads dev-proxy.js from webcomponents-1.0.68
and moves its @wippy-fe ranges to ^0.0.68, like the other front ends after
#40. Only the @wippy-fe lock entries 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.

2 participants