@eloxiv/cli 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +12 -2
- package/dist/AgentSkills.d.ts +51 -0
- package/dist/AgentSkills.d.ts.map +1 -0
- package/dist/AgentSkills.js +264 -0
- package/dist/AgentSkills.js.map +1 -0
- package/dist/AgentWeb.d.ts +83 -0
- package/dist/AgentWeb.d.ts.map +1 -0
- package/dist/AgentWeb.js +436 -0
- package/dist/AgentWeb.js.map +1 -0
- package/dist/App.d.ts +213 -0
- package/dist/App.d.ts.map +1 -0
- package/dist/App.js +357 -0
- package/dist/App.js.map +1 -0
- package/dist/Blueprint.d.ts +47 -0
- package/dist/Blueprint.d.ts.map +1 -0
- package/dist/Blueprint.js +241 -0
- package/dist/Blueprint.js.map +1 -0
- package/dist/Brand.d.ts +42 -0
- package/dist/Brand.d.ts.map +1 -0
- package/dist/Brand.js +370 -0
- package/dist/Brand.js.map +1 -0
- package/dist/Changelog.d.ts +22 -0
- package/dist/Changelog.d.ts.map +1 -0
- package/dist/Changelog.js +117 -0
- package/dist/Changelog.js.map +1 -0
- package/dist/Cli.d.ts +17 -0
- package/dist/Cli.d.ts.map +1 -0
- package/dist/Cli.js +810 -0
- package/dist/Cli.js.map +1 -0
- package/dist/DbAdmin.d.ts +18 -0
- package/dist/DbAdmin.d.ts.map +1 -0
- package/dist/DbAdmin.js +91 -0
- package/dist/DbAdmin.js.map +1 -0
- package/dist/Dependencies.d.ts +53 -0
- package/dist/Dependencies.d.ts.map +1 -0
- package/dist/Dependencies.js +132 -0
- package/dist/Dependencies.js.map +1 -0
- package/dist/Deploy.d.ts +39 -0
- package/dist/Deploy.d.ts.map +1 -0
- package/dist/Deploy.js +458 -0
- package/dist/Deploy.js.map +1 -0
- package/dist/Docs.d.ts +71 -0
- package/dist/Docs.d.ts.map +1 -0
- package/dist/Docs.js +240 -0
- package/dist/Docs.js.map +1 -0
- package/dist/Doctor.d.ts +56 -0
- package/dist/Doctor.d.ts.map +1 -0
- package/dist/Doctor.js +368 -0
- package/dist/Doctor.js.map +1 -0
- package/dist/Dossier.d.ts +23 -0
- package/dist/Dossier.d.ts.map +1 -0
- package/dist/Dossier.js +92 -0
- package/dist/Dossier.js.map +1 -0
- package/dist/Emit.d.ts +26 -0
- package/dist/Emit.d.ts.map +1 -0
- package/dist/Emit.js +51 -0
- package/dist/Emit.js.map +1 -0
- package/dist/Errors.d.ts +26 -0
- package/dist/Errors.d.ts.map +1 -0
- package/dist/Errors.js +17 -0
- package/dist/Errors.js.map +1 -0
- package/dist/Evals.d.ts +52 -0
- package/dist/Evals.d.ts.map +1 -0
- package/dist/Evals.js +126 -0
- package/dist/Evals.js.map +1 -0
- package/dist/Files.d.ts +47 -0
- package/dist/Files.d.ts.map +1 -0
- package/dist/Files.js +145 -0
- package/dist/Files.js.map +1 -0
- package/dist/Generate.d.ts +80 -0
- package/dist/Generate.d.ts.map +1 -0
- package/dist/Generate.js +310 -0
- package/dist/Generate.js.map +1 -0
- package/dist/Guards.d.ts +45 -0
- package/dist/Guards.d.ts.map +1 -0
- package/dist/Guards.js +530 -0
- package/dist/Guards.js.map +1 -0
- package/dist/Inspect.d.ts +125 -0
- package/dist/Inspect.d.ts.map +1 -0
- package/dist/Inspect.js +270 -0
- package/dist/Inspect.js.map +1 -0
- package/dist/Keychain.d.ts +57 -0
- package/dist/Keychain.d.ts.map +1 -0
- package/dist/Keychain.js +73 -0
- package/dist/Keychain.js.map +1 -0
- package/dist/Lock.d.ts +13 -0
- package/dist/Lock.d.ts.map +1 -0
- package/dist/Lock.js +145 -0
- package/dist/Lock.js.map +1 -0
- package/dist/Mcp.d.ts +91 -0
- package/dist/Mcp.d.ts.map +1 -0
- package/dist/Mcp.js +128 -0
- package/dist/Mcp.js.map +1 -0
- package/dist/Merge.d.ts +18 -0
- package/dist/Merge.d.ts.map +1 -0
- package/dist/Merge.js +43 -0
- package/dist/Merge.js.map +1 -0
- package/dist/Migrate.d.ts +78 -0
- package/dist/Migrate.d.ts.map +1 -0
- package/dist/Migrate.js +288 -0
- package/dist/Migrate.js.map +1 -0
- package/dist/Plugins.d.ts +36 -0
- package/dist/Plugins.d.ts.map +1 -0
- package/dist/Plugins.js +304 -0
- package/dist/Plugins.js.map +1 -0
- package/dist/Postgres.d.ts +73 -0
- package/dist/Postgres.d.ts.map +1 -0
- package/dist/Postgres.js +294 -0
- package/dist/Postgres.js.map +1 -0
- package/dist/Publish.d.ts +23 -0
- package/dist/Publish.d.ts.map +1 -0
- package/dist/Publish.js +59 -0
- package/dist/Publish.js.map +1 -0
- package/dist/Registry.d.ts +539 -0
- package/dist/Registry.d.ts.map +1 -0
- package/dist/Registry.js +340 -0
- package/dist/Registry.js.map +1 -0
- package/dist/Remote.d.ts +90 -0
- package/dist/Remote.d.ts.map +1 -0
- package/dist/Remote.js +1006 -0
- package/dist/Remote.js.map +1 -0
- package/dist/Run.d.ts +120 -0
- package/dist/Run.d.ts.map +1 -0
- package/dist/Run.js +477 -0
- package/dist/Run.js.map +1 -0
- package/dist/SyncGen.d.ts +118 -0
- package/dist/SyncGen.d.ts.map +1 -0
- package/dist/SyncGen.js +392 -0
- package/dist/SyncGen.js.map +1 -0
- package/dist/Update.d.ts +301 -0
- package/dist/Update.d.ts.map +1 -0
- package/dist/Update.js +627 -0
- package/dist/Update.js.map +1 -0
- package/dist/bin.d.ts +3 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +42 -0
- package/dist/bin.js.map +1 -0
- package/dist/docs/backlog.md +56 -0
- package/dist/docs/ci.md +277 -0
- package/dist/docs/cli.md +696 -0
- package/dist/docs/connectors/google.md +115 -0
- package/dist/docs/connectors/http-openapi.md +7 -0
- package/dist/docs/connectors/mcp.md +8 -0
- package/dist/docs/connectors/microsoft-graph.md +75 -0
- package/dist/docs/connectors/openai.md +25 -0
- package/dist/docs/connectors/slack.md +162 -0
- package/dist/docs/connectors/workos.md +39 -0
- package/dist/docs/contracts/README.md +173 -0
- package/dist/docs/contracts/action-consent.md +92 -0
- package/dist/docs/contracts/action-registry.md +85 -0
- package/dist/docs/contracts/actor.md +100 -0
- package/dist/docs/contracts/agent-resources.md +90 -0
- package/dist/docs/contracts/agent-runtime.md +257 -0
- package/dist/docs/contracts/approvals.md +126 -0
- package/dist/docs/contracts/audit.md +75 -0
- package/dist/docs/contracts/auth-provider.md +74 -0
- package/dist/docs/contracts/calendar-provider.md +46 -0
- package/dist/docs/contracts/client-sdk.md +245 -0
- package/dist/docs/contracts/collab-document.md +151 -0
- package/dist/docs/contracts/command.md +44 -0
- package/dist/docs/contracts/connections.md +235 -0
- package/dist/docs/contracts/context-accounting.md +50 -0
- package/dist/docs/contracts/daemon.md +243 -0
- package/dist/docs/contracts/db-tx.md +53 -0
- package/dist/docs/contracts/delegation.md +68 -0
- package/dist/docs/contracts/device-control.md +103 -0
- package/dist/docs/contracts/directory-provider.md +36 -0
- package/dist/docs/contracts/directory.md +161 -0
- package/dist/docs/contracts/document-source.md +33 -0
- package/dist/docs/contracts/files.md +115 -0
- package/dist/docs/contracts/flags.md +83 -0
- package/dist/docs/contracts/host.md +68 -0
- package/dist/docs/contracts/http-api.md +43 -0
- package/dist/docs/contracts/ingestion.md +130 -0
- package/dist/docs/contracts/ingress.md +141 -0
- package/dist/docs/contracts/invocation.md +260 -0
- package/dist/docs/contracts/local-client.md +108 -0
- package/dist/docs/contracts/locale.md +56 -0
- package/dist/docs/contracts/machine-identity.md +117 -0
- package/dist/docs/contracts/mail-provider.md +49 -0
- package/dist/docs/contracts/memory.md +53 -0
- package/dist/docs/contracts/messaging.md +40 -0
- package/dist/docs/contracts/metering.md +139 -0
- package/dist/docs/contracts/model-provider.md +84 -0
- package/dist/docs/contracts/module-manifest.md +213 -0
- package/dist/docs/contracts/notification-channel.md +90 -0
- package/dist/docs/contracts/notifications.md +123 -0
- package/dist/docs/contracts/outbox.md +80 -0
- package/dist/docs/contracts/privacy.md +110 -0
- package/dist/docs/contracts/progress.md +52 -0
- package/dist/docs/contracts/query-surface.md +108 -0
- package/dist/docs/contracts/readiness.md +63 -0
- package/dist/docs/contracts/release.md +142 -0
- package/dist/docs/contracts/result-rendering.md +61 -0
- package/dist/docs/contracts/sandbox.md +186 -0
- package/dist/docs/contracts/scheduler.md +148 -0
- package/dist/docs/contracts/screen-context.md +81 -0
- package/dist/docs/contracts/search.md +120 -0
- package/dist/docs/contracts/secrets.md +74 -0
- package/dist/docs/contracts/settings.md +109 -0
- package/dist/docs/contracts/sharing.md +77 -0
- package/dist/docs/contracts/slot.md +48 -0
- package/dist/docs/contracts/space.md +67 -0
- package/dist/docs/contracts/storage-adapter.md +45 -0
- package/dist/docs/contracts/storage-backend.md +56 -0
- package/dist/docs/contracts/sync.md +213 -0
- package/dist/docs/contracts/telemetry.md +80 -0
- package/dist/docs/contracts/theme-tokens.md +50 -0
- package/dist/docs/contracts/tool-source.md +58 -0
- package/dist/docs/contracts/versioning.md +99 -0
- package/dist/docs/contracts/view.md +65 -0
- package/dist/docs/contracts/work-items.md +99 -0
- package/dist/docs/contracts/workflow.md +82 -0
- package/dist/docs/decisions.md +163 -0
- package/dist/docs/example-app.md +192 -0
- package/dist/docs/getting-started.md +927 -0
- package/dist/docs/goal.md +54 -0
- package/dist/docs/parity.md +29 -0
- package/dist/docs/performance.md +129 -0
- package/dist/docs/registry/README.md +74 -0
- package/dist/docs/registry/app.md +38 -0
- package/dist/docs/registry/approvals-ui-foldkit.md +28 -0
- package/dist/docs/registry/calendar-ui-foldkit.md +27 -0
- package/dist/docs/registry/calendar.md +35 -0
- package/dist/docs/registry/chat-ui-foldkit.md +30 -0
- package/dist/docs/registry/desktop-rune.md +49 -0
- package/dist/docs/registry/desktop.md +32 -0
- package/dist/docs/registry/eloxiv-action.md +25 -0
- package/dist/docs/registry/eloxiv-connector.md +25 -0
- package/dist/docs/registry/eloxiv-module.md +25 -0
- package/dist/docs/registry/eloxiv-policy.md +25 -0
- package/dist/docs/registry/eloxiv-view.md +25 -0
- package/dist/docs/registry/hello-ui-foldkit.md +29 -0
- package/dist/docs/registry/hello.md +39 -0
- package/dist/docs/registry/home-ui-foldkit.md +27 -0
- package/dist/docs/registry/home.md +29 -0
- package/dist/docs/registry/inbox-ui-foldkit.md +27 -0
- package/dist/docs/registry/mail-ui-foldkit.md +27 -0
- package/dist/docs/registry/mail.md +34 -0
- package/dist/docs/registry/meeting-prep.md +26 -0
- package/dist/docs/registry/members-ui-foldkit.md +28 -0
- package/dist/docs/registry/mobile.md +37 -0
- package/dist/docs/registry/notes-ui-foldkit.md +27 -0
- package/dist/docs/registry/notes.md +26 -0
- package/dist/docs/registry/people-ui-foldkit.md +28 -0
- package/dist/docs/registry/people.md +38 -0
- package/dist/docs/registry/shell-foldkit.md +34 -0
- package/dist/docs/registry/theme.md +25 -0
- package/dist/docs/registry/ui-conformance.md +30 -0
- package/dist/docs/release.md +100 -0
- package/dist/docs/scaffold.md +826 -0
- package/dist/docs/security/threat-model.md +299 -0
- package/dist/docs/upstream/zero-cache-socket-handoff.md +105 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/package.json +48 -3
- package/src/AgentSkills.ts +329 -0
- package/src/AgentWeb.ts +507 -0
- package/src/App.ts +435 -0
- package/src/Blueprint.ts +276 -0
- package/src/Brand.ts +415 -0
- package/src/Changelog.ts +136 -0
- package/src/Cli.ts +1458 -0
- package/src/DbAdmin.ts +115 -0
- package/src/Dependencies.ts +170 -0
- package/src/Deploy.ts +563 -0
- package/src/Docs.ts +309 -0
- package/src/Doctor.ts +424 -0
- package/src/Dossier.ts +148 -0
- package/src/Emit.ts +68 -0
- package/src/Errors.ts +18 -0
- package/src/Evals.ts +153 -0
- package/src/Files.ts +152 -0
- package/src/Generate.ts +402 -0
- package/src/Guards.ts +541 -0
- package/src/Inspect.ts +358 -0
- package/src/Keychain.ts +107 -0
- package/src/Lock.ts +174 -0
- package/src/Mcp.ts +159 -0
- package/src/Merge.ts +70 -0
- package/src/Migrate.ts +331 -0
- package/src/Plugins.ts +347 -0
- package/src/Postgres.ts +353 -0
- package/src/Publish.ts +64 -0
- package/src/Registry.ts +405 -0
- package/src/Remote.ts +1158 -0
- package/src/Run.ts +541 -0
- package/src/SyncGen.ts +570 -0
- package/src/Update.ts +873 -0
- package/src/bin.ts +46 -0
- package/src/index.ts +7 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# The example app (criterion 11): plan
|
|
2
|
+
|
|
3
|
+
This is the plan for criterion 11 ([goal.md](goal.md), definition of done 11), as decided in [decisions.md](decisions.md): decision 11 and the "Example app" section. It covers the app's journeys, the screens each journey needs, the registry items to build, and what the browser and desktop journeys already cover. It was written on 2026-11-10, before `build/foldkit-migrate` and `build/business-modules` reached `build/main`. The work starts once both have landed.
|
|
4
|
+
|
|
5
|
+
## Status (build/example-app, 2026-11-10)
|
|
6
|
+
|
|
7
|
+
- **Prerequisites done.** UI items ask for kernel modules (backlog 20; `chat-ui-foldkit` and `approvals-ui-foldkit` 0.1.1). The member routes are built: Directory 1.2.0 adds `addMemberByEmail`, served by `packages/kernel/src/MemberRoutes.ts`; tests in `packages/testing/test/member-admin-routes.test.ts`; Sol's review is done, and its kernel-wide CSRF and session-link fixes come from `build/session-csrf`. `shell-foldkit` 0.3.0 lets a screen take `/` and passes the shell's links to screens.
|
|
8
|
+
- **Screens built** (registry UI items 0.1.0): `home-ui-foldkit`, `inbox-ui-foldkit`, `members-ui-foldkit`, `people-ui-foldkit`, `mail-ui-foldkit` (list and thread) and `calendar-ui-foldkit`, with Story and Scene tests (`registry/test/shell-foldkit-reference.test.ts`). Supporting changes: `mail` 0.1.2 adds the `mail.messages` query, and the chat SDK gains inbox steps (`stepsFor`, `chatClient.workItem`).
|
|
9
|
+
- **Assembled.** `examples/hello-app` was assembled through the CLI only and now holds 21 items.
|
|
10
|
+
- **Journeys.**
|
|
11
|
+
- Browser: J1 to J8 (`e2e/example.spec.ts`), set up by `e2e/example.ts` in the global setup.
|
|
12
|
+
- Desktop: desktop 0.5.4 runs J1 to J8 inside the webview (Alice's journeys, then Bob's after he signs in: J2's list-only view, J3 and J5), with checks shared by the Linux and Windows driver (`webdriver-e2e.ts`) and the macOS one (`hooks-e2e.ts`). The lane (`tools/scripts/desktop-lane.ts`) sets up the same data and pairs a headless runner (`e2e/runner.ts`).
|
|
13
|
+
- Fakes: both start the providers' protocol fakes, not the real services.
|
|
14
|
+
- **J7, the agent.** The example installs the `openai` model connector (0.1.2). The composition lists it in `modelProviders`, and `app` 0.8.0 gives the agent its provider. In the journeys it talks to a scripted model behind an OpenAI-compatible endpoint (`e2e/model.ts`, plain http on this machine with `ELOXIV_MODEL_ALLOW_LOCAL_HTTP=1`). Asked to accept an invitation, the agent's `calendar.respond` waits for the person's consent in the chat, then runs and reaches the provider. A declined `mail.send` sends nothing. On the desktop, the person's headless runner (the host's own daemon build, paired as a runner, with the daemon's fake harness) serves a turn sent to it. Desktop 0.4.2 asks for the kernel's devices module.
|
|
15
|
+
- Found by the desktop run: WebKit (the webview on Linux and macOS) holds back a response's first 512 bytes to sniff its type, so a run's short opening events (the consent prompt) never reached the chat. The kernel's run event stream now sends `x-content-type-options: nosniff` and opens with a 2 KB comment (`registry/test/chat-sdk.test.ts`).
|
|
16
|
+
- **After build/main's PR #18 (2026-11-14).** The member routes are in the cookie guard's inventory, and their tests cover a cross-site cookie request (refused, nothing added) and a sign-out racing a write (the reusable race, `conformance/SignOutRace.ts`), in `member-admin-routes.test.ts`. App 0.7.0 of this branch became 0.8.0 over build/main's own 0.7.0 (the zero-cache patch).
|
|
17
|
+
- **Criterion 9's home space.** A registry kind `space` and its item `home` bring the kernel's spaces, agent and inbox modules to an app with no UI; `examples/headless-app` adds it and `openai` through the CLI, and `registry/test/headless.test.ts` runs the home space's scenarios through the SDK, the CLI and MCP. Found by them: the agent's routes refused an OAuth grant with the `actions` scope, so `eloxiv agent` after `eloxiv login` could not follow its run (fixed in `agent/Http.ts`).
|
|
18
|
+
- **Parity.** C-084 (launcher) and C-085 (global agent) are `registry`. C-086 stays open: its channel and A2A requests answered in their origin thread are not this app's journeys.
|
|
19
|
+
- **Open.**
|
|
20
|
+
- macOS and Windows lanes run in CI only, and Windows is blocked by GitHub billing.
|
|
21
|
+
|
|
22
|
+
## What criterion 11 asks for
|
|
23
|
+
|
|
24
|
+
- **One app in `examples/`, assembled only through the CLI** (`eloxiv init`, `add`, `update`), the way an outside developer would assemble it.
|
|
25
|
+
- **The home space**: a launcher, the unified inbox, the global agent and member administration.
|
|
26
|
+
- **People, Mail and Calendar**, with the Microsoft Graph and Google connectors.
|
|
27
|
+
- **A plain reference UI** built from the registry's thin reference screens (decision 11), limited to what the journeys exercise. It is not a finished product. Each screen is a Foldkit Submodel (`defineScreen`) on `@eloxiv/client` (the Foldkit adapter, live queries, `call`) and, for the agent, the headless chat SDK (`@eloxiv/client/chat`). A screen holds interaction state only (selection, drafts, loading, errors), never a second declaration of entity fields (decision 9). It is styled with the UI kit and the theme tokens, so keyboard, focus, dark/light and right-to-left come from the kit.
|
|
28
|
+
- **End-to-end journeys in the browser and in the Tauri desktop host** on Linux, macOS and Windows, with the daemon as the host's sidecar. For the agent journey, a paired headless runner serves the agent's turns.
|
|
29
|
+
|
|
30
|
+
Decision 11 leaves these out of scope:
|
|
31
|
+
|
|
32
|
+
- broad settings pages and the Dispatch-style admin control plane (member administration stays: a list, roles, add and remove);
|
|
33
|
+
- rich kits such as data grids or editors;
|
|
34
|
+
- folders, rules, search UI, snoozing and finding time in Mail and Calendar;
|
|
35
|
+
- the People structure screens (`people.structure`).
|
|
36
|
+
|
|
37
|
+
## What each branch brings
|
|
38
|
+
|
|
39
|
+
| From | What the example uses |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| `build/foldkit-migrate` | `shell-foldkit` 0.2.0: routing, slots, the screen contract (`screens/<name>.ts`, `defineScreen`), kernel-view screens with their own `route` and `title`, the settings frame (profile, members list, language, appearance), the UI kit, the error view and the organisation switcher. `chat-ui-foldkit` 0.1.0 and `approvals-ui-foldkit` 0.1.0. `@eloxiv/client/chat` (the headless chat SDK). `GET /api/org/members` and the client's `listMembers`. desktop 0.4.0, which embeds the app's own shell from `desktop/dist`. |
|
|
42
|
+
| `build/business-modules` | `people`, `mail` and `calendar` 0.1.0 (headless), `microsoft-graph` 0.1.3 and `google` 0.1.4. `app` 0.4.0, whose composition lists the kernel modules the installed modules ask for (`kernelModules`: inbox, sharing, connections, search, ingestion) and the installed connectors. `eloxiv.sync.ts` gains the inbox tables when the inbox is installed. `ctx.connections`, external effects, work-item sources (`mail.followUps`, `calendar.invitations`). `examples/headless-app` (criterion 9). |
|
|
43
|
+
|
|
44
|
+
## Prerequisites found while planning
|
|
45
|
+
|
|
46
|
+
These sit outside the screens themselves. Each is small, but the journeys cannot pass without it.
|
|
47
|
+
|
|
48
|
+
1. **Composing the kernel's sync tables (backlog 13).**
|
|
49
|
+
- The composition adds the inbox tables only.
|
|
50
|
+
- The global agent needs `agentTables` and `agentQueries` in `eloxiv.sync.ts`, plus `agentModule` in the composition.
|
|
51
|
+
- The launcher needs `spacesTables` and `spacesQueries`, plus `spacesModule`.
|
|
52
|
+
- Plan: extend `kernelModules` so a UI item can ask for kernel modules too. `chat-ui-foldkit` asks for the agent and `home-ui-foldkit` for spaces. The CLI then composes their modules and sync exports exactly as it does for the inbox. This resolves backlog 13.
|
|
53
|
+
2. **Member administration has no write surface.**
|
|
54
|
+
- Directory's management operations are kernel calls only (`Directory.as(headers)`). Over HTTP, only `GET /api/org/members` exists.
|
|
55
|
+
- Plan: add routes for adding an existing user by email, removing a member, and assigning and unassigning a role. Each needs `eloxiv.directory.manage`, takes a person's own session only, runs under the caller's asserted chain like the members route, and is audited. None may remove or demote the organisation's last owner.
|
|
56
|
+
- Add the matching client functions next to `listMembers`.
|
|
57
|
+
- Update the Directory contract and its conformance kit.
|
|
58
|
+
- Removing a member already revokes their in-flight authority (Authority's membership link), so the journey can check that.
|
|
59
|
+
3. **The agent's model in the example.**
|
|
60
|
+
- The browser journeys run the kernel's own agent loop on the scripted ModelProvider (`packages/testing/src/Agent.ts`), set in the example's deployment configuration for tests only, never as a default. Locally, a real model replaces it when `ELOXIV_MODEL_OPENAI_API_KEY` is set (after `build/agent-evals` lands).
|
|
61
|
+
- The desktop journey runs the turn on the paired headless runner (the daemon sidecar) with the fake harness (`packages/daemon/fixtures/fake-harness.mjs`). CI has no Claude Code or Codex subscription. The real harnesses stay proven locally by `daemon-real.test.ts`.
|
|
62
|
+
4. **Connectors in the journeys.**
|
|
63
|
+
- The journeys run Graph and Google over their protocol fakes (`MicrosoftGraphFake`, `GoogleFake`), with the kernel's connector settings pointed at them.
|
|
64
|
+
- That proves the screens and the path through them. It proves no connection: per "Proven connections" in progress.md, Google is proven live, while Graph is not (no licence).
|
|
65
|
+
- The example's seed connects each test person's Connection through the real OAuth flow against the fake, as `registry/test/headless.test.ts` does.
|
|
66
|
+
5. **A home route.**
|
|
67
|
+
- The shell owns `/` and refuses a screen that claims it.
|
|
68
|
+
- Plan: one small change to `shell-foldkit`. `/` shows the installed screen marked `home: true` (the launcher) and otherwise falls back to the shell's current index. An app without `home-ui-foldkit` is unchanged.
|
|
69
|
+
|
|
70
|
+
## Decisions (coordinator, 2026-11-10)
|
|
71
|
+
|
|
72
|
+
- **Where the app lives:** `examples/hello-app` grows into the example app. A rename may be proposed at the end if the name reads badly by then; not now.
|
|
73
|
+
- **Prerequisites 1 to 5:** approved as described, with these additions.
|
|
74
|
+
- UI items asking for kernel modules resolves backlog 13.
|
|
75
|
+
- The member routes need `eloxiv.directory.manage`, run under the caller's asserted authority, and take a person's own session only, like the read route. The organisation's last owner can never be removed or demoted. Directory has no owner role, so "owner" here means a member holding `eloxiv.directory.manage`: no route may leave the organisation without one. The routes get an independent review.
|
|
76
|
+
- The launcher may claim `/`.
|
|
77
|
+
- **The agent's model:** CI uses the scripted model and the fake harness. Locally, the journeys use a real model when `ELOXIV_MODEL_OPENAI_API_KEY` is set, once `build/agent-evals` lands.
|
|
78
|
+
- **When:** building starts once `build/foldkit-migrate` and `build/business-modules` are both on `build/main`. The integration queue: neon, sandbox-gc, foldkit-migrate, agent-evals, business-modules.
|
|
79
|
+
|
|
80
|
+
## Where the app lives
|
|
81
|
+
|
|
82
|
+
**Decided:** grow `examples/hello-app` into the example app rather than start a new directory.
|
|
83
|
+
|
|
84
|
+
- It already has the Foldkit shell, the desktop host and its sidecar.
|
|
85
|
+
- The Playwright suite (`e2e/system.ts`), the desktop lane (`tools/scripts/desktop-lane.ts`), the benchmarks and CI's desktop matrix all point at it.
|
|
86
|
+
- Criterion 15 measures the budgets against the full example app, so they follow it there with no change.
|
|
87
|
+
- `hello` and `notes` stay as they are; the slots journey uses them.
|
|
88
|
+
|
|
89
|
+
**Alternative:** a new `examples/<name>` assembled from `eloxiv init`. It makes the "as an outside developer would" story cleaner, but it means moving the suite, the lane, the benchmarks and CI to the new app.
|
|
90
|
+
|
|
91
|
+
Either way, `examples/headless-app` stays as criterion 9's proof, with no UI installed. `examples/hello-only` (app, hello and the shell, assembled through the CLI) is the hello app the hello budgets measure (docs/performance.md), so the example app can grow without moving them.
|
|
92
|
+
|
|
93
|
+
Assembly, through the CLI only:
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
eloxiv add --cwd examples/hello-app people mail calendar microsoft-graph google
|
|
97
|
+
eloxiv add --cwd examples/hello-app home-ui-foldkit inbox-ui-foldkit members-ui-foldkit chat-ui-foldkit \
|
|
98
|
+
approvals-ui-foldkit people-ui-foldkit mail-ui-foldkit calendar-ui-foldkit
|
|
99
|
+
eloxiv generate --cwd examples/hello-app
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Registry items to build
|
|
103
|
+
|
|
104
|
+
Each item adds one file to `shell-foldkit/src/screens/`, unless noted otherwise.
|
|
105
|
+
|
|
106
|
+
- **Kernel modules:** an item that needs a kernel module asks for it through `kernelModules` (prerequisite 1).
|
|
107
|
+
- **Records:** a record's screen reads its id from `ScreenContext.record`.
|
|
108
|
+
- **Writes:** every write is an action through the invocation path, with the generated optimistic mutators where the module has them.
|
|
109
|
+
|
|
110
|
+
| Item | Screen(s) and route | Reads (live queries) | Writes (actions) |
|
|
111
|
+
| --- | --- | --- | --- |
|
|
112
|
+
| `home-ui-foldkit` (new) | The launcher at `/` (prerequisite 5): the person's spaces (`resolveSpaces` over `spacesQueries`), each a list of view links, plus the home entries (inbox, agent, members for administrators). Asks for `spacesModule`. | `spaces.granted`, `spaces.preferences` | `spaces.personalise` (pin) |
|
|
113
|
+
| `inbox-ui-foldkit` (new) | The unified inbox, a kernel-view screen at `/inbox`: work items assigned to me or my groups, with state and due date. Each item links to its record through its source's view route. | `inboxQueries` (work items) | `inbox.claim`, `inbox.complete`, `inbox.dismiss`, `inbox.reassign` |
|
|
114
|
+
| `chat-ui-foldkit` (exists, 0.1.0) | The global agent at `/agent/conversation`: conversation, composer, streamed transcript, consent prompts in the chat. Gains `kernelModules: ["agent"]`. | `agentQueries` | the chat SDK (send, decide) |
|
|
115
|
+
| `approvals-ui-foldkit` (exists, 0.1.0) | Approval and consent requests at `/approvals/request` and `/consent/request`, reached from the inbox. | `inboxQueries` (approval requests) | `approvals.approve`, `approvals.reject`, `consent.approve`, `consent.reject` |
|
|
116
|
+
| `members-ui-foldkit` (new) | Member administration, a kernel-view screen at `/admin/members`: members with roles. Administrators can add an existing user by email, assign and unassign roles, and remove a member. Others see the list only. | `listMembers` (HTTP; members are not synced) | the new member routes (prerequisite 2) |
|
|
117
|
+
| `people-ui-foldkit` (new) | `people.directory` at `/people`: name, title, department and manager. The person view at `/people/<id>`: their record, manager chain and reports, and a link to their member account when linked. Sensitive fields appear only where the replica holds them (HR). | `people.directory`, `people.person` | none in the journeys (HR edits stay headless) |
|
|
118
|
+
| `mail-ui-foldkit` (new) | `mail.inbox` at `/mail`: threads, newest first, with unread state. `mail.thread` at `/mail/thread/<id>`: the messages with body text (`mail.body`). Compose and reply as a dialog (UI kit) from either screen, showing the outgoing message's state until its effect settles. | `mail.threads`, `mail.thread`, `mail.outgoing`, `mail.mailboxes` | `mail.send`, `mail.reply`, `mail.markRead`, `mail.flag`, `mail.archive` |
|
|
119
|
+
| `calendar-ui-foldkit` (new) | `calendar.agenda` at `/calendar`: events, soonest first, with invitations marked. The event view at `/calendar/<id>`: time, organiser, attendees, my response, and accept, tentative or decline with the change's state until its effect settles. | `calendar.agenda`, `calendar.invitations`, `calendar.changes` | `calendar.respond` |
|
|
120
|
+
| `shell-foldkit` (0.2.0 → 0.3.0) | The `home: true` screen at `/` (prerequisite 5). Nothing else. | | |
|
|
121
|
+
| `app` (0.4.x → next) | The composition's support for UI items' `kernelModules` (prerequisite 1). | | |
|
|
122
|
+
| desktop (0.4.0) | No change expected. The journey script gains the example's checks (below). | | |
|
|
123
|
+
|
|
124
|
+
A person's own calls from these screens are never held for consent (ActionConsent: only agent-originated calls are), so Mail and Calendar need no consent prompt of their own. Consent appears only in the agent journey, in the chat and the consent screen.
|
|
125
|
+
|
|
126
|
+
Each new item comes with:
|
|
127
|
+
|
|
128
|
+
- Story and Scene tests for its Model transitions and Commands (decision 10's testing split);
|
|
129
|
+
- a `meta.eloxiv` entry with its version and dependencies;
|
|
130
|
+
- docs in `docs/cli.md`'s optional UI items list;
|
|
131
|
+
- a parity note.
|
|
132
|
+
|
|
133
|
+
## Journeys
|
|
134
|
+
|
|
135
|
+
The browser runs every journey in Playwright against the assembled example, with a kernel, zero-cache and the protocol fakes. The desktop runs J1 to J8 in the Tauri webview (desktop 0.5.4) through the WebDriver journey (`desktop/scripts/webdriver-e2e.ts`, Linux and Windows) and the injected one (`hooks-e2e.ts` with `hooks-journey.ts`, macOS), with the daemon sidecar running and paired as a headless runner for J7. J2's newcomer is a verified account `e2e/example.ts` creates; the driver checks over HTTP that it may open the organisation while a member and is refused once removed.
|
|
136
|
+
|
|
137
|
+
| # | Journey | Screens | Items |
|
|
138
|
+
| --- | --- | --- | --- |
|
|
139
|
+
| J1 | **Home.** Sign in. The launcher lists the home entries and the granted spaces (a seeded "Work" space with People, Mail and Calendar). Opening each is a route change with no reload, served from the replica (the route-change timing hook). Pinning a space reorders the launcher and survives a reload. | launcher, people, mail, calendar | home, people, mail, calendar, shell |
|
|
140
|
+
| J2 | **Members.** An administrator adds an existing user by email and gives them the `hr` role. That person signs in (a second browser context) and sees the organisation and the HR-only fields in People. The administrator takes the role away and the fields leave the replica live. The administrator removes the member: their next write is refused and their rows go. A non-administrator sees the list without the controls. | members, people, person | members, people |
|
|
141
|
+
| J3 | **People.** The directory was imported through HR's Google Connection (fake). Open a person: their manager chain and reports. A member linked to their record sees "you". A colleague's sensitive fields are absent from the replica, not merely hidden. | people directory, person | people |
|
|
142
|
+
| J4 | **Mail.** The threads list shows the person's mail and never a colleague's. Open a thread: messages with bodies, marked read. Reply: the outgoing message shows as sending, then sent once the effect succeeds (the fake's sent items hold it once). Compose a new message the same way. Flag a message: a follow-up appears in the unified inbox, and clearing the flag closes it. | mail list, thread, compose | mail, inbox |
|
|
143
|
+
| J5 | **Calendar.** An invitation synced from the provider (fake) appears in the agenda, marked, and in the unified inbox. Open the event and accept: the change is pending until the provider has the answer (the fake holds the account's own response), then the event shows "accepted" and the inbox item closes. | agenda, event, respond, inbox | calendar, inbox |
|
|
144
|
+
| J6 | **Unified inbox.** Items from Mail (follow-up) and Calendar (invitation) side by side. Claim one, complete one, dismiss one. Opening an item goes to its record's screen. A colleague's items never appear. | inbox, thread, event | inbox, mail, calendar |
|
|
145
|
+
| J7 | **Global agent.** From the launcher, open the agent and ask it to accept the invitation. The agent's `calendar.respond` is held for consent and the prompt shows in the chat. Approving it runs the call, the change reaches the provider, the agenda shows the answer, and the transcript records it. Rejecting a second request leaves nothing sent. Browser: the scripted model. Desktop: the turn runs on the paired headless runner (daemon sidecar, fake harness). | agent (chat), consent, agenda | chat, approvals, calendar |
|
|
146
|
+
| J8 | **Isolation.** The organisation-switch checker (`e2e/org-switch.spec.ts`) runs over the Mail list and the inbox: after a switch, no render or DOM mutation shows the previous organisation's threads or items. Sign-out closes the replica (existing specs). | mail list, inbox | mail, inbox, shell |
|
|
147
|
+
|
|
148
|
+
Each journey's assertions read the screens' accessible names and roles (the UI kit gives them) and, where it matters, the database or the fake's state, as the existing specs do.
|
|
149
|
+
|
|
150
|
+
## What exists today, and what is missing
|
|
151
|
+
|
|
152
|
+
**Browser (Playwright, `e2e/`), on `build/foldkit-migrate`:**
|
|
153
|
+
|
|
154
|
+
| Spec | Covers |
|
|
155
|
+
| --- | --- |
|
|
156
|
+
| `shell.spec.ts` | StyleX theme in light, dark and right-to-left; the appearance dialog's focus; routes and deep links; per-organisation IndexedDB; sign-out closing the WebSocket; the settings frame (profile, the members list, language) |
|
|
157
|
+
| `org-switch.spec.ts` | switcher, sync scope, reload; no transient rows in any render or mutation; the checker's own negative test |
|
|
158
|
+
| `optimistic.spec.ts` | an optimistic write reaching a second client; a refused write rolled back with its typed error |
|
|
159
|
+
| `second-client.spec.ts` | org-visible and private greetings across clients |
|
|
160
|
+
| `sign-out.spec.ts` | revoke, retry, interrupted sign-out, a session revoked elsewhere |
|
|
161
|
+
| `slots.spec.ts` | notes' contributed view beside hello's, its own route, switching |
|
|
162
|
+
| `make-view.spec.ts` | MAKE views sandboxed, in the shell |
|
|
163
|
+
|
|
164
|
+
`build/main` has `foldkit.spec.ts` (the proof), which foldkit-migrate folds into the specs above.
|
|
165
|
+
|
|
166
|
+
**Desktop (`desktop/scripts/webdriver-e2e.ts`, verdicts in `journey-checks.ts`), against `examples/hello-app` in the release Tauri build with the daemon sidecar:**
|
|
167
|
+
|
|
168
|
+
- sign-in;
|
|
169
|
+
- an optimistic write and a refused one rolled back;
|
|
170
|
+
- a write reaching a second client;
|
|
171
|
+
- an organisation switch with no transient rows;
|
|
172
|
+
- the dialog's keyboard and focus behaviour;
|
|
173
|
+
- sign-out.
|
|
174
|
+
|
|
175
|
+
`measure-launch.ts` gives launch to interactive. CI's `desktop` matrix runs it on Linux (Blacksmith, under `xvfb-run`), macOS (Blacksmith macOS 15) and Windows (`windows-2025`). Locally only Linux runs.
|
|
176
|
+
|
|
177
|
+
**Headless (criterion 9, `registry/test/headless.test.ts`):** 11 scenarios over the typed client, the CLI and MCP for People, Mail and Calendar. These are the same behaviours J3 to J7 take through the screens.
|
|
178
|
+
|
|
179
|
+
**Missing:**
|
|
180
|
+
|
|
181
|
+
- **Browser:** every journey above (J1 to J8). None of the People, Mail, Calendar, inbox, launcher or members screens exist. Chat and approvals have no browser spec yet: their screens are proven by Story and Scene and the chat SDK against the agent conformance kernel, because the example installs neither the agent nor the inbox (backlog 13).
|
|
182
|
+
- **Desktop:** J1, J4, J6 and J7 in the webview, and a daemon sidecar paired as a headless runner during the journey. Today the sidecar runs but serves no agent turn in the desktop journey.
|
|
183
|
+
- **macOS and Windows:** these journeys run in CI's desktop lanes only (no local macOS or Windows host). **The Windows lane is blocked by GitHub billing for now**: the plan keeps it in the matrix and records its state in progress.md, and criterion 11 stays partial until it passes there.
|
|
184
|
+
|
|
185
|
+
## Order of work, once both branches are on `build/main`
|
|
186
|
+
|
|
187
|
+
1. Branch `build/example-app` from `build/main`.
|
|
188
|
+
2. Prerequisites 1, 2 and 5: kernel module composition for UI items, the member routes, and the shell's home route. Each gets fail-first tests, and the contracts and docs are updated.
|
|
189
|
+
3. The screens as registry UI items, thin, in the order the journeys need them: inbox, people, mail, calendar, home, members. Then wire the existing chat and approvals items to the agent.
|
|
190
|
+
4. Assemble the example through the CLI only (`eloxiv add`, `generate`), with the test-only scripted model and the protocol fakes configured in the e2e system.
|
|
191
|
+
5. The journeys: Playwright J1 to J8. The desktop journey gains J1, J4, J6 and J7 for Linux, with the daemon paired as a headless runner.
|
|
192
|
+
6. Verify under the heavy lock (typecheck first), get an independent review of the member routes and the composition change, update progress.md (criterion 11, the proven connections unchanged) and backlog 13.
|