@somewhere-cloud/cli 0.38.109 → 0.38.111

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.
Files changed (168) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +6 -8
  3. package/dist/commands/ai.js +3 -2
  4. package/dist/commands/ai.js.map +1 -1
  5. package/dist/commands/api.js +2 -1
  6. package/dist/commands/api.js.map +1 -1
  7. package/dist/commands/auth.js +16 -15
  8. package/dist/commands/auth.js.map +1 -1
  9. package/dist/commands/browser.js +4 -3
  10. package/dist/commands/browser.js.map +1 -1
  11. package/dist/commands/call.js +6 -5
  12. package/dist/commands/call.js.map +1 -1
  13. package/dist/commands/catalog.js +2 -1
  14. package/dist/commands/catalog.js.map +1 -1
  15. package/dist/commands/check.js +14 -13
  16. package/dist/commands/check.js.map +1 -1
  17. package/dist/commands/claim.js +5 -4
  18. package/dist/commands/claim.js.map +1 -1
  19. package/dist/commands/cron.js +10 -9
  20. package/dist/commands/cron.js.map +1 -1
  21. package/dist/commands/db.js +5 -4
  22. package/dist/commands/db.js.map +1 -1
  23. package/dist/commands/deploy.d.ts +1 -2
  24. package/dist/commands/deploy.js +140 -139
  25. package/dist/commands/deploy.js.map +1 -1
  26. package/dist/commands/dev.js +38 -37
  27. package/dist/commands/dev.js.map +1 -1
  28. package/dist/commands/docs.js +28 -27
  29. package/dist/commands/docs.js.map +1 -1
  30. package/dist/commands/email.js +3 -2
  31. package/dist/commands/email.js.map +1 -1
  32. package/dist/commands/env.js +3 -2
  33. package/dist/commands/env.js.map +1 -1
  34. package/dist/commands/errors.js +2 -1
  35. package/dist/commands/errors.js.map +1 -1
  36. package/dist/commands/feedback.js +2 -1
  37. package/dist/commands/feedback.js.map +1 -1
  38. package/dist/commands/fs.js +2 -1
  39. package/dist/commands/fs.js.map +1 -1
  40. package/dist/commands/git.js +3 -2
  41. package/dist/commands/git.js.map +1 -1
  42. package/dist/commands/hooks.js +2 -1
  43. package/dist/commands/hooks.js.map +1 -1
  44. package/dist/commands/init.js +27 -23
  45. package/dist/commands/init.js.map +1 -1
  46. package/dist/commands/mcp.js +15 -14
  47. package/dist/commands/mcp.js.map +1 -1
  48. package/dist/commands/postgres.js +13 -12
  49. package/dist/commands/postgres.js.map +1 -1
  50. package/dist/commands/project.js +5 -4
  51. package/dist/commands/project.js.map +1 -1
  52. package/dist/commands/promote.js +10 -9
  53. package/dist/commands/promote.js.map +1 -1
  54. package/dist/commands/pull.js +5 -4
  55. package/dist/commands/pull.js.map +1 -1
  56. package/dist/commands/restore.js +5 -4
  57. package/dist/commands/restore.js.map +1 -1
  58. package/dist/commands/rollback.js +7 -3
  59. package/dist/commands/rollback.js.map +1 -1
  60. package/dist/commands/run.js +3 -2
  61. package/dist/commands/run.js.map +1 -1
  62. package/dist/commands/skills.js +3 -2
  63. package/dist/commands/skills.js.map +1 -1
  64. package/dist/commands/support.js +2 -1
  65. package/dist/commands/support.js.map +1 -1
  66. package/dist/commands/tasks.js +4 -3
  67. package/dist/commands/tasks.js.map +1 -1
  68. package/dist/commands/typecheck.d.ts +1 -1
  69. package/dist/commands/typecheck.js +11 -10
  70. package/dist/commands/typecheck.js.map +1 -1
  71. package/dist/commands/update.js +3 -2
  72. package/dist/commands/update.js.map +1 -1
  73. package/dist/commands/upgrade.js +4 -3
  74. package/dist/commands/upgrade.js.map +1 -1
  75. package/dist/commands/verify.js +13 -12
  76. package/dist/commands/verify.js.map +1 -1
  77. package/dist/index.js +6 -5
  78. package/dist/index.js.map +1 -1
  79. package/dist/lib/advisor-runs.js +3 -2
  80. package/dist/lib/advisor-runs.js.map +1 -1
  81. package/dist/lib/agent-hooks.js +4 -3
  82. package/dist/lib/agent-hooks.js.map +1 -1
  83. package/dist/lib/app-test.d.ts +3 -2
  84. package/dist/lib/app-test.js +7 -3
  85. package/dist/lib/app-test.js.map +1 -1
  86. package/dist/lib/browser-run.js +3 -2
  87. package/dist/lib/browser-run.js.map +1 -1
  88. package/dist/lib/claim-handoff.js +3 -2
  89. package/dist/lib/claim-handoff.js.map +1 -1
  90. package/dist/lib/cli-invocation.d.ts +2 -0
  91. package/dist/lib/cli-invocation.js +5 -0
  92. package/dist/lib/cli-invocation.js.map +1 -0
  93. package/dist/lib/client.js +6 -5
  94. package/dist/lib/client.js.map +1 -1
  95. package/dist/lib/config.js +4 -3
  96. package/dist/lib/config.js.map +1 -1
  97. package/dist/lib/device-login.js +4 -3
  98. package/dist/lib/device-login.js.map +1 -1
  99. package/dist/lib/files.js +4 -3
  100. package/dist/lib/files.js.map +1 -1
  101. package/dist/lib/form-auth.d.ts +1 -1
  102. package/dist/lib/form-auth.js +2 -1
  103. package/dist/lib/form-auth.js.map +1 -1
  104. package/dist/lib/frontend-dev.js +6 -2
  105. package/dist/lib/frontend-dev.js.map +1 -1
  106. package/dist/lib/init-agent-guide.d.ts +2 -2
  107. package/dist/lib/init-agent-guide.js +1 -0
  108. package/dist/lib/init-agent-guide.js.map +1 -1
  109. package/dist/lib/init-feature-template.js +1 -0
  110. package/dist/lib/init-feature-template.js.map +1 -1
  111. package/dist/lib/init-features.js +9 -8
  112. package/dist/lib/init-features.js.map +1 -1
  113. package/dist/lib/init-test-template.js +55 -37
  114. package/dist/lib/init-test-template.js.map +1 -1
  115. package/dist/lib/link-hint.js +3 -2
  116. package/dist/lib/link-hint.js.map +1 -1
  117. package/dist/lib/next-actions.js +10 -20
  118. package/dist/lib/next-actions.js.map +1 -1
  119. package/dist/lib/notify/index.d.ts +3 -0
  120. package/dist/lib/notify/index.js +9 -0
  121. package/dist/lib/notify/index.js.map +1 -1
  122. package/dist/lib/notify/providers/update.d.ts +1 -1
  123. package/dist/lib/notify/providers/update.js +4 -3
  124. package/dist/lib/notify/providers/update.js.map +1 -1
  125. package/dist/lib/operational-files.js +2 -1
  126. package/dist/lib/operational-files.js.map +1 -1
  127. package/dist/lib/output.js +2 -1
  128. package/dist/lib/output.js.map +1 -1
  129. package/dist/lib/playwright-fixtures.js +14 -4
  130. package/dist/lib/playwright-fixtures.js.map +1 -1
  131. package/dist/lib/post-live-render.d.ts +1 -1
  132. package/dist/lib/post-live-render.js +2 -1
  133. package/dist/lib/post-live-render.js.map +1 -1
  134. package/dist/lib/preview-jobs.js +3 -2
  135. package/dist/lib/preview-jobs.js.map +1 -1
  136. package/dist/lib/project-pin.js +2 -1
  137. package/dist/lib/project-pin.js.map +1 -1
  138. package/dist/lib/promote-handoff.js +2 -1
  139. package/dist/lib/promote-handoff.js.map +1 -1
  140. package/dist/lib/publish-surface.js +2 -1
  141. package/dist/lib/publish-surface.js.map +1 -1
  142. package/dist/lib/skills-pack.generated.js +4 -4
  143. package/dist/lib/skills-pack.generated.js.map +1 -1
  144. package/dist/lib/skills-pack.js +4 -3
  145. package/dist/lib/skills-pack.js.map +1 -1
  146. package/dist/lib/surface-counts.js +2 -24
  147. package/dist/lib/surface-counts.js.map +1 -1
  148. package/dist/lib/test-control.d.ts +3 -0
  149. package/dist/lib/test-control.js +7 -1
  150. package/dist/lib/test-control.js.map +1 -1
  151. package/dist/lib/test-report.d.ts +3 -1
  152. package/dist/lib/test-report.js +10 -1
  153. package/dist/lib/test-report.js.map +1 -1
  154. package/dist/lib/test-reporter.js +9 -4
  155. package/dist/lib/test-reporter.js.map +1 -1
  156. package/dist/lib/test-run.d.ts +1 -0
  157. package/dist/lib/test-run.js +7 -1
  158. package/dist/lib/test-run.js.map +1 -1
  159. package/dist/lib/test-scripts.d.ts +1 -1
  160. package/dist/lib/test-scripts.js +7 -4
  161. package/dist/lib/test-scripts.js.map +1 -1
  162. package/dist/lib/typecheck.d.ts +3 -4
  163. package/dist/lib/typecheck.js +34 -15
  164. package/dist/lib/typecheck.js.map +1 -1
  165. package/dist/lib/update-security.js +2 -1
  166. package/dist/lib/update-security.js.map +1 -1
  167. package/npm-shrinkwrap.json +2 -2
  168. package/package.json +5 -4
@@ -1,4 +1,4 @@
1
- export declare const AGENT_WORKFLOW = "## Build, deploy, test\n\nEnough to start a typical app: declare access and use the browser client; docs are for exceptions.\n\n| Requirement | Declaration below |\n| --- | --- |\n| Each user sees only their own rows | notes: owner() |\n| Team: owner invites members; members read/write; creator or team owner deletes | tasks: anyOf(owner(), group()); sw.groups endpoints below |\n| Owner/staff record with staff-only child notes | tickets: owner() or appRole(); parent() thread; staff-only notes; staff by verified emailDomain (or grantableBy) |\n| Public pages from private drafts | pages: conditional publicRead |\n| Share one record read-only | shared_notes/note_shares: read-only grant() |\n\ndb/schema.ts is declaration only: imports, constants/spreads, default schema;\nno helpers/expressions. id() is random text; owner() stamps user_id. client.read\nincludes the key. Inside anyOf(), owner() takes only column/read: it stamps the\ncreator, not create/delete options; group() gates placement (non-member create is\nrefused); inside anyOf an operation missing from roles allows no group role. Other fields: timestamp({ default: 'now' }), text({ nullable: true });\nindexes: [['team_id']].\n\n```ts\nimport { schema, table, id, text, owner, group, anyOf, parent, appRole, boolean, grant } from 'somewhere/db';\nexport default schema({\n notes: table({ id: id(), title: text() }, { scope: owner(), client: { read: ['id', 'title'], create: ['title'], update: ['title'], delete: true },\n }),\n tasks: table({ id: id(), team_id: text(), title: text() }, {\n scope: anyOf(owner(), group({ column: 'team_id', roles: { read: ['owner', 'admin', 'member'],\n create: ['owner', 'admin', 'member'], update: ['owner', 'admin', 'member'], delete: ['owner'] } })),\n client: { read: ['id', 'team_id', 'title'], create: ['team_id', 'title'], update: ['title'], delete: true },\n }),\n tickets: table({ id: id(), subject: text() }, {\n scope: anyOf(owner(), appRole({ roles: { read: ['staff'], create: ['staff'], update: ['staff'] } })),\n client: { read: true, create: ['subject'], update: ['subject'] },\n }),\n messages: table({ id: id(), ticket_id: text({ references: 'tickets' }), body: text() }, {\n scope: parent({ via: 'ticket_id' }),\n client: { read: true, create: ['ticket_id', 'body'] },\n }),\n staff_notes: table({ id: id(), ticket_id: text({ references: 'tickets' }), body: text() }, {\n scope: appRole({ roles: { read: ['staff'], create: ['staff'] } }),\n client: { read: true, create: ['ticket_id', 'body'] },\n }),\n pages: table({ id: id(), title: text(), published: boolean({ default: false }) }, {\n scope: owner(), client: { read: ['id', 'title'], create: ['title'], update: ['title'],\n publicRead: { where: { published: true } } },\n }),\n note_shares: table({ id: id(), grantee_id: text(), note_id: text({ references: 'shared_notes', onDelete: 'cascade' }) }, {\n scope: owner(), unique: [['note_id', 'grantee_id']],\n }),\n shared_notes: table({ id: id(), title: text() }, {\n scope: anyOf(owner(), grant({ table: 'note_shares', grantee: 'grantee_id', row: 'note_id', operations: ['read'] })),\n client: { read: ['id', 'title'], create: ['title'], update: ['title'] },\n }),\n}, { appRoles: { staff: { emailDomain: 'staff.example' } } });\n```\n\nWho is staff is your app's decision; the platform enforces what the role may do.\nFirst choice, as above: emailDomain. The role holds once the person verifies an address\nat that domain; no grant code. An email ending alone proves nothing: anyone can sign up\nas anyone@your-domain without owning that mailbox. Without verification, grant only from\nsomething the visitor cannot choose, such as an invitation your app issued, checked inside\nthe sign-up route: single use, bound to one account, its link delivered only to that person:\nsomewhere docs sw.auth --section server-assigned-app-roles-setroles.\nmessages use parent(): owner() would hide staff replies from the customer.\nA staff reply is a messages row, and creating a parent() child needs create on the parent\nfor that person: its owner, or a role listed under the parent's create. Read or update is\nnot enough. So tickets lists create: ['staff']; without it every staff reply is refused\n(403 POLICY_AUTHORITY_REQUIRED).\nPublish pages in an owner-checked endpoint. Share with caller-scoped\nsw.db.insert('note_shares', { grantee_id, note_id }); it checks row ownership.\nBrowser calls THROW, not { error }; catch below.\nBrowser list: max 100, paginate after; no order (sort locally or in an endpoint).\n\n```ts\nimport { data } from 'somewhere:data';\nexport async function save(title: string) {\n try { await data.notes.create({ title }); return null; }\n catch (e) { return e instanceof Error ? e.message : 'Save failed'; }\n}\nexport const list = (after?: string) => data.notes.list({ limit: 100, after });\n```\n\nA page that needs several reads: start them together and show it once every read it depends on has answered.\nKeep an input disabled until the data it depends on has loaded, including who the user is.\nNever let a late answer overwrite what the user typed: fill an input from loaded data only before it is enabled.\n\nTeams are built-in groups: the platform keeps the team, invitations, roster, removal,\nleaving, last owner. Starting a team needs a signed-in user; joining needs a verified\nemail (a password sign-up joins once it enters its emailed code).\nNo email verification in your app: keep membership in your own table with member() (somewhere docs sw.groups --section relationships-that-are-not-teams) and assign staff with setRoles in the sign-up route (above).\nThe browser cannot call\nsw.groups: pass each call through an endpoint. A parent() child's delete follows the task\n(creator or team owner), so \"comment author or team owner deletes\" is an endpoint.\nStaff making others staff: appRoles { staff: { grantableBy: ['staff'] } } and\nsw.groups.appRoles.grant(request, userId, 'staff') in an endpoint (never to oneself).\nComplete apps and specs: somewhere docs sw.groups --section team-example or staff-example.\n\n```ts\n// api/teams.ts \u2014 GET my teams (completes invitations to me); POST starts one I own\nconst refusal = (e: { code: string; message: string; status: number }) =>\n Response.json({ error: e.code, message: e.message }, { status: e.status });\nexport const GET = sw.endpoint({ auth: 'required', handler: async ({ request }, sw) => {\n const page = await sw.groups.list(request, { limit: 100 });\n return page.error ? refusal(page.error) : { teams: page.data.items, next_cursor: page.data.next_cursor };\n} });\nexport default sw.endpoint({ auth: 'required', body: { name: 'string' }, handler: async ({ request, body }, sw) => {\n const made = await sw.groups.create(request, { name: body.name });\n return made.error ? refusal(made.error) : { id: made.data.id };\n} });\n```\n\n```ts\n// api/teams/[id]/invitations.ts \u2014 owners invite; others 403; a member's address 409 ALREADY_MEMBER\nexport default sw.endpoint({ auth: 'required', body: { email: 'string' }, handler: async ({ request, params, body }, sw) => {\n const sent = await sw.groups.invite(request, params.id, { email: body.email, role: 'member', redirect_uri: '/' });\n return sent.error ? Response.json({ error: sent.error.code }, { status: sent.error.status }) : { delivery: sent.data.delivery };\n} });\n```\n\nSame shape: sw.groups.get/members(request, id), remove(request, id, userId), leave(request, id)\n(last owner: 409 LAST_OWNER), delete(request, id) by owners.\n\nDo not hand-write access to app-read/write data: declare who may read/write it.\nserverOnly() fits job/import/audit/counter state.\nGrant ledgers use owner() without browser writes. Undeclarable: arbitrary predicates\n(e.g. expiry) or per-role writable fields (split tables or check that write).\n\nBuild src/pages/HomePage.tsx; routes src/App.tsx + src/routes.ts; auth src/auth/hooks.ts.\nAuth is wired: keep api/auth/[...path].ts; src/config.ts controls providers.\napi/notes/[id]/sub.ts \u2192 params.id; underscore files are helpers. POST: default export;\nGET/DELETE: named exports.\n\n```ts\nexport const GET = sw.endpoint({ auth: 'required', handler: async (_, sw) => sw.db.from('notes', { limit: 100 }) });\n```\n\nsw.db applies caller scopes; sw.db.server bypasses them: authorize first.\nCaller-scoped sw.db.insert needs no client.create grant: client limits only the browser.\nReads: from(table, { where, columns, order: [['id', 'asc']], limit, offset }).\nFilter: { id: { in: ids } }; unique: [['a', 'b']] in schema.\nWrites: insert(table, values), update(table, { where, set }), remove(table, { where }).\ntx takes an ARRAY of write intents, never a callback; pre-generate related IDs.\n\nBrowser: fetch(path, { method: 'POST', credentials: 'same-origin',\nheaders: { 'content-type': 'application/json' }, body: JSON.stringify(values) }).\nAccess cookies refresh automatically. Cookie-auth POST/PATCH/DELETE from scripts\nneed Origin equal to the app URL.\n\nAfter every deploy, somewhere verify checks the page loads and looks right at desktop and phone size, with no\ntest to write. Journeys, several users and access rules go in tests/*.mjs with somewhere test.\nRun somewhere test after a successful deploy: npx @somewhere-cloud/cli deploy && npx @somewhere-cloud/cli test\nIt runs every tests/*.mjs and tests/*.cjs Playwright script and prints failures first. Start from\ntests/app-check.mjs: change its checks to the journeys you changed and your access boundaries.\nKeep each run short:\n- Short waits: page.setDefaultTimeout(5_000) on every page; a deployed app answers in under\n a second. Never sleep for a fixed time: wait for the thing itself (the text, the response).\n- Stop at the first failure and print what the page showed (page.url(), the visible error\n text). Checks after a failure only wait out their timeouts. app.check() does both.\n- After a fix, rerun the scripts that failed, each one whole: npx @somewhere-cloud/cli test --failed.\nThe test helper, @somewhere-cloud/cli/script (import or require); these are all the calls a test needs:\n const app = await openAppTest(); // the live origin, release and data contract\n const ana = await app.signUp(page); // through your form: { id, email, password, verified }\n // { email: 'Ana@Staff.Example' } is used exactly as typed; or { domain: 'staff.example' };\n // then app.verify(page, ana) if your app needs a verified address\n const benPage = await browser.newPage(); const ben = await app.signUp(benPage); // a second user\n await app.signOut(page); await app.signIn(page, ana);\n const r = await app.data(page, { table, operation, id, values, where, limit }); // as that person\n // r.kind: ok | empty | refused | missing-or-refused | malformed | stale-contract | error\n // (also r.status, r.data, r.error); the contract and Origin are added for you\n await app.expectRefused(benPage, { table, operation: 'get', id }, { allowed: page });\n // 401/403 passes; an empty or 404 answer passes only with allowed: someone it succeeds for\n const seen = captureResponses(benPage); await seen.find(secret); // where a secret appeared\n await app.check('name', async () => { ... }); await app.finish(); // finish deletes the sign-ups\nIt finds your form by data-testid \"auth-email\", \"auth-password\", \"auth-signup\", \"auth-signin\",\n\"signout\" (or data-sw-auth); otherwise pass app.signUp(page, { form: { email, password, signUp, signIn } }).\nOpen a list item by clicking the item element itself (what a person clicks), not a link inside it.\nDeploy raw source, no frontend build; type errors stop upload.\nThe complete team spec, with removal and leaving: somewhere docs sw.groups --section team-example.\nDiagnose with somewhere errors and somewhere logs.\n\nOn demand:\n- Server paging: `somewhere docs sw.db --section server-read-paging`\n\n## Testing shared access\n\nWith the team endpoints above, the owner invites a fixture by email; test users are verified,\nso its next GET /api/teams shows the team. A test user who still owns a team is not deleted:\ndelete the team last (api/teams/[id].ts DELETE: sw.groups.delete). Group calls take\nabout a second, so raise the timeout:\n\n```ts\n// tests/team.spec.ts\nimport { test, expect } from '@somewhere-cloud/cli/testing';\ntest.describe.configure({ timeout: 90_000 });\ntest('owner invites a second user by email', async ({ newUser }) => {\n const [owner, bob] = await Promise.all([newUser(), newUser()]);\n const { id } = await (await owner.request.post('/api/teams', { data: { name: 'Shared team' } })).json();\n expect((await owner.request.post(`/api/teams/${id}/invitations`, { data: { email: bob.email } })).ok()).toBeTruthy();\n const { teams } = await (await bob.request.get('/api/teams')).json();\n expect(teams).toContainEqual(expect.objectContaining({ id, role: 'member' }));\n expect((await owner.request.delete(`/api/teams/${id}`)).status()).toBe(204);\n});\n```\n";
1
+ export declare const AGENT_WORKFLOW = "## Build, deploy, test\n\nEnough to start a typical app: declare access and use the browser client; docs are for exceptions.\n\n| Requirement | Declaration below |\n| --- | --- |\n| Each user sees only their own rows | notes: owner() |\n| Team: owner invites members; members read/write; creator or team owner deletes | tasks: anyOf(owner(), group()); sw.groups endpoints below |\n| Owner/staff record with staff-only child notes | tickets: owner() or appRole(); parent() thread; staff-only notes; staff by verified emailDomain (or grantableBy) |\n| Public pages from private drafts | pages: conditional publicRead |\n| Share one record read-only | shared_notes/note_shares: read-only grant() |\n\ndb/schema.ts is declaration only: imports, constants/spreads, default schema;\nno helpers/expressions. id() is random text; owner() stamps user_id. client.read\nincludes the key. Inside anyOf(), owner() takes only column/read: it stamps the\ncreator, not create/delete options; group() gates placement (non-member create is\nrefused); inside anyOf an operation missing from roles allows no group role. Other fields: timestamp({ default: 'now' }), text({ nullable: true });\nindexes: [['team_id']].\n\n```ts\nimport { schema, table, id, text, owner, group, anyOf, parent, appRole, boolean, grant } from 'somewhere/db';\nexport default schema({\n notes: table({ id: id(), title: text() }, { scope: owner(), client: { read: ['id', 'title'], create: ['title'], update: ['title'], delete: true },\n }),\n tasks: table({ id: id(), team_id: text(), title: text() }, {\n scope: anyOf(owner(), group({ column: 'team_id', roles: { read: ['owner', 'admin', 'member'],\n create: ['owner', 'admin', 'member'], update: ['owner', 'admin', 'member'], delete: ['owner'] } })),\n client: { read: ['id', 'team_id', 'title'], create: ['team_id', 'title'], update: ['title'], delete: true },\n }),\n tickets: table({ id: id(), subject: text() }, {\n scope: anyOf(owner(), appRole({ roles: { read: ['staff'], create: ['staff'], update: ['staff'] } })),\n client: { read: true, create: ['subject'], update: ['subject'] },\n }),\n messages: table({ id: id(), ticket_id: text({ references: 'tickets' }), body: text() }, {\n scope: parent({ via: 'ticket_id' }),\n client: { read: true, create: ['ticket_id', 'body'] },\n }),\n staff_notes: table({ id: id(), ticket_id: text({ references: 'tickets' }), body: text() }, {\n scope: appRole({ roles: { read: ['staff'], create: ['staff'] } }),\n client: { read: true, create: ['ticket_id', 'body'] },\n }),\n pages: table({ id: id(), title: text(), published: boolean({ default: false }) }, {\n scope: owner(), client: { read: ['id', 'title'], create: ['title'], update: ['title'],\n publicRead: { where: { published: true } } },\n }),\n note_shares: table({ id: id(), grantee_id: text(), note_id: text({ references: 'shared_notes', onDelete: 'cascade' }) }, {\n scope: owner(), unique: [['note_id', 'grantee_id']],\n }),\n shared_notes: table({ id: id(), title: text() }, {\n scope: anyOf(owner(), grant({ table: 'note_shares', grantee: 'grantee_id', row: 'note_id', operations: ['read'] })),\n client: { read: ['id', 'title'], create: ['title'], update: ['title'] },\n }),\n}, { appRoles: { staff: { emailDomain: 'staff.example' } } });\n```\n\nWho is staff is your app's decision; the platform enforces what the role may do.\nFirst choice, as above: emailDomain. The role holds once the person verifies an address\nat that domain; no grant code. An email ending alone proves nothing: anyone can sign up\nas anyone@your-domain without owning that mailbox. Without verification, grant only from\nsomething the visitor cannot choose, such as an invitation your app issued, checked inside\nthe sign-up route: single use, bound to one account, its link delivered only to that person:\nsomewhere docs sw.auth --section server-assigned-app-roles-setroles.\nmessages use parent(): owner() would hide staff replies from the customer.\nA staff reply is a messages row, and creating a parent() child needs create on the parent\nfor that person: its owner, or a role listed under the parent's create. Read or update is\nnot enough. So tickets lists create: ['staff']; without it every staff reply is refused\n(403 POLICY_AUTHORITY_REQUIRED).\nPublish pages in an owner-checked endpoint. Share with caller-scoped\nsw.db.insert('note_shares', { grantee_id, note_id }); it checks row ownership.\nBrowser calls THROW, not { error }; catch below.\nBrowser list: max 100, paginate after; no order (sort locally or in an endpoint).\n\n```ts\nimport { data } from 'somewhere:data';\nexport async function save(title: string) {\n try { await data.notes.create({ title }); return null; }\n catch (e) { return e instanceof Error ? e.message : 'Save failed'; }\n}\nexport const list = (after?: string) => data.notes.list({ limit: 100, after });\n```\n\nA page that needs several reads: start them together and show it once every read it depends on has answered.\nKeep an input disabled until the data it depends on has loaded, including who the user is.\nNever let a late answer overwrite what the user typed: fill an input from loaded data only before it is enabled.\n\nTeams are built-in groups: the platform keeps the team, invitations, roster, removal,\nleaving, last owner. Starting a team needs a signed-in user; joining needs a verified\nemail (a password sign-up joins once it enters its emailed code).\nNo email verification in your app: keep membership in your own table with member() (somewhere docs sw.groups --section relationships-that-are-not-teams) and assign staff with setRoles in the sign-up route (above).\nThe browser cannot call\nsw.groups: pass each call through an endpoint. A parent() child's delete follows the task\n(creator or team owner), so \"comment author or team owner deletes\" is an endpoint.\nStaff making others staff: appRoles { staff: { grantableBy: ['staff'] } } and\nsw.groups.appRoles.grant(request, userId, 'staff') in an endpoint (never to oneself).\nComplete apps and specs: somewhere docs sw.groups --section team-example or staff-example.\n\n```ts\n// api/teams.ts \u2014 GET my teams (completes invitations to me); POST starts one I own\nconst refusal = (e: { code: string; message: string; status: number }) =>\n Response.json({ error: e.code, message: e.message }, { status: e.status });\nexport const GET = sw.endpoint({ auth: 'required', handler: async ({ request }, sw) => {\n const page = await sw.groups.list(request, { limit: 100 });\n return page.error ? refusal(page.error) : { teams: page.data.items, next_cursor: page.data.next_cursor };\n} });\nexport default sw.endpoint({ auth: 'required', body: { name: 'string' }, handler: async ({ request, body }, sw) => {\n const made = await sw.groups.create(request, { name: body.name });\n return made.error ? refusal(made.error) : { id: made.data.id };\n} });\n```\n\n```ts\n// api/teams/[id]/invitations.ts \u2014 owners invite; others 403; a member's address 409 ALREADY_MEMBER\nexport default sw.endpoint({ auth: 'required', body: { email: 'string' }, handler: async ({ request, params, body }, sw) => {\n const sent = await sw.groups.invite(request, params.id, { email: body.email, role: 'member', redirect_uri: '/' });\n return sent.error ? Response.json({ error: sent.error.code }, { status: sent.error.status }) : { delivery: sent.data.delivery };\n} });\n```\n\nSame shape: sw.groups.get/members(request, id), remove(request, id, userId), leave(request, id)\n(last owner: 409 LAST_OWNER), delete(request, id) by owners.\n\nDo not hand-write access to app-read/write data: declare who may read/write it.\nserverOnly() fits job/import/audit/counter state.\nGrant ledgers use owner() without browser writes. Undeclarable: arbitrary predicates\n(e.g. expiry) or per-role writable fields (split tables or check that write).\n\nBuild src/pages/HomePage.tsx; routes src/App.tsx + src/routes.ts; auth src/auth/hooks.ts.\nAuth is wired: keep api/auth/[...path].ts; src/config.ts controls providers.\napi/notes/[id]/sub.ts \u2192 params.id; underscore files are helpers. POST: default export;\nGET/DELETE: named exports.\n\n```ts\nexport const GET = sw.endpoint({ auth: 'required', handler: async (_, sw) => sw.db.from('notes', { limit: 100 }) });\n```\n\nsw.db applies caller scopes; sw.db.server bypasses them: authorize first.\nCaller-scoped sw.db.insert needs no client.create grant: client limits only the browser.\nReads: from(table, { where, columns, order: [['id', 'asc']], limit, offset }).\nFilter: { id: { in: ids } }; unique: [['a', 'b']] in schema.\nWrites: insert(table, values), update(table, { where, set }), remove(table, { where }).\ntx takes an ARRAY of write intents, never a callback; pre-generate related IDs.\n\nBrowser: fetch(path, { method: 'POST', credentials: 'same-origin',\nheaders: { 'content-type': 'application/json' }, body: JSON.stringify(values) }).\nAccess cookies refresh automatically. Cookie-auth POST/PATCH/DELETE from scripts\nneed Origin equal to the app URL.\n\nAfter every deploy, somewhere verify checks the page loads and looks right at desktop and phone size, with no\ntest to write. Journeys, several users and access rules go in tests/*.mjs with somewhere test.\nRun somewhere test after a successful deploy: npx @somewhere-cloud/cli deploy && npx @somewhere-cloud/cli test\nTests that need the email inbox work after you claim the app.\nIt runs every tests/*.mjs and tests/*.cjs Playwright script and prints failures first. Start from\ntests/app-check.mjs: change its checks to the journeys you changed and your access boundaries.\nKeep each run short:\n- Short waits: page.setDefaultTimeout(5_000) on every page; a deployed app answers in under\n a second. Never sleep for a fixed time: wait for the thing itself (the text, the response).\n- Stop at the first failure and print what the page showed (page.url(), the visible error\n text). Checks after a failure only wait out their timeouts. app.check() does both.\n- After a fix, rerun the scripts that failed, each one whole: npx @somewhere-cloud/cli test --failed.\nThe test helper, @somewhere-cloud/cli/script (import or require); these are all the calls a test needs:\n const app = await openAppTest(); // the live origin, release and data contract\n const ana = await app.signUp(page); // through your form: { id, email, password, verified }\n // { email: 'Ana@Staff.Example' } is used exactly as typed; or { domain: 'staff.example' };\n // then app.verify(page, ana) if your app needs a verified address\n const benPage = await browser.newPage(); const ben = await app.signUp(benPage); // a second user\n await app.signOut(page); await app.signIn(page, ana);\n const r = await app.data(page, { table, operation, id, values, where, limit }); // as that person\n // r.kind: ok | empty | refused | missing-or-refused | malformed | stale-contract | error\n // (also r.status, r.data, r.error); the contract and Origin are added for you\n await app.expectRefused(benPage, { table, operation: 'get', id }, { allowed: page });\n // 401/403 passes; an empty or 404 answer passes only with allowed: someone it succeeds for\n const seen = captureResponses(benPage); await seen.find(secret); // where a secret appeared\n await app.check('name', async () => { ... }); await app.finish(); // finish deletes the sign-ups\nIt finds your form by data-testid \"auth-email\", \"auth-password\", \"auth-signup\", \"auth-signin\",\n\"signout\" (or data-sw-auth); otherwise pass app.signUp(page, { form: { email, password, signUp, signIn } }).\nOpen a list item by clicking the item element itself (what a person clicks), not a link inside it.\nDeploy raw source, no frontend build; type errors stop upload.\nThe complete team spec, with removal and leaving: somewhere docs sw.groups --section team-example.\nDiagnose with somewhere errors and somewhere logs.\n\nOn demand:\n- Server paging: `somewhere docs sw.db --section server-read-paging`\n\n## Testing shared access\n\nWith the team endpoints above, the owner invites a fixture by email; test users are verified,\nso its next GET /api/teams shows the team. A test user who still owns a team is not deleted:\ndelete the team last (api/teams/[id].ts DELETE: sw.groups.delete). Group calls take\nabout a second, so raise the timeout:\n\n```ts\n// tests/team.spec.ts\nimport { test, expect } from '@somewhere-cloud/cli/testing';\ntest.describe.configure({ timeout: 90_000 });\ntest('owner invites a second user by email', async ({ newUser }) => {\n const [owner, bob] = await Promise.all([newUser(), newUser()]);\n const { id } = await (await owner.request.post('/api/teams', { data: { name: 'Shared team' } })).json();\n expect((await owner.request.post(`/api/teams/${id}/invitations`, { data: { email: bob.email } })).ok()).toBeTruthy();\n const { teams } = await (await bob.request.get('/api/teams')).json();\n expect(teams).toContainEqual(expect.objectContaining({ id, role: 'member' }));\n expect((await owner.request.delete(`/api/teams/${id}`)).status()).toBe(204);\n});\n```\n";
2
2
  export declare const SKILLS_POINTER = "Task-specific skills: `.agents/skills/`. Inspect/update with somewhere skills status/update.";
3
3
  export declare const DECLARED_ACCESS_POINTER = "";
4
4
  /** One line telling agents the app's data and code can leave:
@@ -10,5 +10,5 @@ export declare const MCP_POINTER = "Use this app from Claude as its signed-in us
10
10
  /** One line on what a preview cannot do today, so no agent learns it by failing.
11
11
  * Rewrite it when previews gain these (the full list: docs dev-environments). */
12
12
  export declare const PREVIEW_POINTER = "somewhere preview runs your change on a copy of production data with its own sign-in: a preview starts with no users (sign up in it or `somewhere preview user-add`), its sign-in mail is captured (`somewhere preview mail`), and rows private to a production user stay hidden from preview users. Server user lookup, roles and built-in teams work in a preview (its own users, its own copy; team invitations are captured); jobs/cron handlers do not yet: check those in production after promoting (`somewhere docs dev-environments`). Test your change in the preview before you promote it: `somewhere test --preview`.";
13
- export declare const INIT_AGENTS_MD = "# somewhere.cloud project contract\n## Build, deploy, test\n\nEnough to start a typical app: declare access and use the browser client; docs are for exceptions.\n\n| Requirement | Declaration below |\n| --- | --- |\n| Each user sees only their own rows | notes: owner() |\n| Team: owner invites members; members read/write; creator or team owner deletes | tasks: anyOf(owner(), group()); sw.groups endpoints below |\n| Owner/staff record with staff-only child notes | tickets: owner() or appRole(); parent() thread; staff-only notes; staff by verified emailDomain (or grantableBy) |\n| Public pages from private drafts | pages: conditional publicRead |\n| Share one record read-only | shared_notes/note_shares: read-only grant() |\n\ndb/schema.ts is declaration only: imports, constants/spreads, default schema;\nno helpers/expressions. id() is random text; owner() stamps user_id. client.read\nincludes the key. Inside anyOf(), owner() takes only column/read: it stamps the\ncreator, not create/delete options; group() gates placement (non-member create is\nrefused); inside anyOf an operation missing from roles allows no group role. Other fields: timestamp({ default: 'now' }), text({ nullable: true });\nindexes: [['team_id']].\n\n```ts\nimport { schema, table, id, text, owner, group, anyOf, parent, appRole, boolean, grant } from 'somewhere/db';\nexport default schema({\n notes: table({ id: id(), title: text() }, { scope: owner(), client: { read: ['id', 'title'], create: ['title'], update: ['title'], delete: true },\n }),\n tasks: table({ id: id(), team_id: text(), title: text() }, {\n scope: anyOf(owner(), group({ column: 'team_id', roles: { read: ['owner', 'admin', 'member'],\n create: ['owner', 'admin', 'member'], update: ['owner', 'admin', 'member'], delete: ['owner'] } })),\n client: { read: ['id', 'team_id', 'title'], create: ['team_id', 'title'], update: ['title'], delete: true },\n }),\n tickets: table({ id: id(), subject: text() }, {\n scope: anyOf(owner(), appRole({ roles: { read: ['staff'], create: ['staff'], update: ['staff'] } })),\n client: { read: true, create: ['subject'], update: ['subject'] },\n }),\n messages: table({ id: id(), ticket_id: text({ references: 'tickets' }), body: text() }, {\n scope: parent({ via: 'ticket_id' }),\n client: { read: true, create: ['ticket_id', 'body'] },\n }),\n staff_notes: table({ id: id(), ticket_id: text({ references: 'tickets' }), body: text() }, {\n scope: appRole({ roles: { read: ['staff'], create: ['staff'] } }),\n client: { read: true, create: ['ticket_id', 'body'] },\n }),\n pages: table({ id: id(), title: text(), published: boolean({ default: false }) }, {\n scope: owner(), client: { read: ['id', 'title'], create: ['title'], update: ['title'],\n publicRead: { where: { published: true } } },\n }),\n note_shares: table({ id: id(), grantee_id: text(), note_id: text({ references: 'shared_notes', onDelete: 'cascade' }) }, {\n scope: owner(), unique: [['note_id', 'grantee_id']],\n }),\n shared_notes: table({ id: id(), title: text() }, {\n scope: anyOf(owner(), grant({ table: 'note_shares', grantee: 'grantee_id', row: 'note_id', operations: ['read'] })),\n client: { read: ['id', 'title'], create: ['title'], update: ['title'] },\n }),\n}, { appRoles: { staff: { emailDomain: 'staff.example' } } });\n```\n\nWho is staff is your app's decision; the platform enforces what the role may do.\nFirst choice, as above: emailDomain. The role holds once the person verifies an address\nat that domain; no grant code. An email ending alone proves nothing: anyone can sign up\nas anyone@your-domain without owning that mailbox. Without verification, grant only from\nsomething the visitor cannot choose, such as an invitation your app issued, checked inside\nthe sign-up route: single use, bound to one account, its link delivered only to that person:\nsomewhere docs sw.auth --section server-assigned-app-roles-setroles.\nmessages use parent(): owner() would hide staff replies from the customer.\nA staff reply is a messages row, and creating a parent() child needs create on the parent\nfor that person: its owner, or a role listed under the parent's create. Read or update is\nnot enough. So tickets lists create: ['staff']; without it every staff reply is refused\n(403 POLICY_AUTHORITY_REQUIRED).\nPublish pages in an owner-checked endpoint. Share with caller-scoped\nsw.db.insert('note_shares', { grantee_id, note_id }); it checks row ownership.\nBrowser calls THROW, not { error }; catch below.\nBrowser list: max 100, paginate after; no order (sort locally or in an endpoint).\n\n```ts\nimport { data } from 'somewhere:data';\nexport async function save(title: string) {\n try { await data.notes.create({ title }); return null; }\n catch (e) { return e instanceof Error ? e.message : 'Save failed'; }\n}\nexport const list = (after?: string) => data.notes.list({ limit: 100, after });\n```\n\nA page that needs several reads: start them together and show it once every read it depends on has answered.\nKeep an input disabled until the data it depends on has loaded, including who the user is.\nNever let a late answer overwrite what the user typed: fill an input from loaded data only before it is enabled.\n\nTeams are built-in groups: the platform keeps the team, invitations, roster, removal,\nleaving, last owner. Starting a team needs a signed-in user; joining needs a verified\nemail (a password sign-up joins once it enters its emailed code).\nNo email verification in your app: keep membership in your own table with member() (somewhere docs sw.groups --section relationships-that-are-not-teams) and assign staff with setRoles in the sign-up route (above).\nThe browser cannot call\nsw.groups: pass each call through an endpoint. A parent() child's delete follows the task\n(creator or team owner), so \"comment author or team owner deletes\" is an endpoint.\nStaff making others staff: appRoles { staff: { grantableBy: ['staff'] } } and\nsw.groups.appRoles.grant(request, userId, 'staff') in an endpoint (never to oneself).\nComplete apps and specs: somewhere docs sw.groups --section team-example or staff-example.\n\n```ts\n// api/teams.ts \u2014 GET my teams (completes invitations to me); POST starts one I own\nconst refusal = (e: { code: string; message: string; status: number }) =>\n Response.json({ error: e.code, message: e.message }, { status: e.status });\nexport const GET = sw.endpoint({ auth: 'required', handler: async ({ request }, sw) => {\n const page = await sw.groups.list(request, { limit: 100 });\n return page.error ? refusal(page.error) : { teams: page.data.items, next_cursor: page.data.next_cursor };\n} });\nexport default sw.endpoint({ auth: 'required', body: { name: 'string' }, handler: async ({ request, body }, sw) => {\n const made = await sw.groups.create(request, { name: body.name });\n return made.error ? refusal(made.error) : { id: made.data.id };\n} });\n```\n\n```ts\n// api/teams/[id]/invitations.ts \u2014 owners invite; others 403; a member's address 409 ALREADY_MEMBER\nexport default sw.endpoint({ auth: 'required', body: { email: 'string' }, handler: async ({ request, params, body }, sw) => {\n const sent = await sw.groups.invite(request, params.id, { email: body.email, role: 'member', redirect_uri: '/' });\n return sent.error ? Response.json({ error: sent.error.code }, { status: sent.error.status }) : { delivery: sent.data.delivery };\n} });\n```\n\nSame shape: sw.groups.get/members(request, id), remove(request, id, userId), leave(request, id)\n(last owner: 409 LAST_OWNER), delete(request, id) by owners.\n\nDo not hand-write access to app-read/write data: declare who may read/write it.\nserverOnly() fits job/import/audit/counter state.\nGrant ledgers use owner() without browser writes. Undeclarable: arbitrary predicates\n(e.g. expiry) or per-role writable fields (split tables or check that write).\n\nBuild src/pages/HomePage.tsx; routes src/App.tsx + src/routes.ts; auth src/auth/hooks.ts.\nAuth is wired: keep api/auth/[...path].ts; src/config.ts controls providers.\napi/notes/[id]/sub.ts \u2192 params.id; underscore files are helpers. POST: default export;\nGET/DELETE: named exports.\n\n```ts\nexport const GET = sw.endpoint({ auth: 'required', handler: async (_, sw) => sw.db.from('notes', { limit: 100 }) });\n```\n\nsw.db applies caller scopes; sw.db.server bypasses them: authorize first.\nCaller-scoped sw.db.insert needs no client.create grant: client limits only the browser.\nReads: from(table, { where, columns, order: [['id', 'asc']], limit, offset }).\nFilter: { id: { in: ids } }; unique: [['a', 'b']] in schema.\nWrites: insert(table, values), update(table, { where, set }), remove(table, { where }).\ntx takes an ARRAY of write intents, never a callback; pre-generate related IDs.\n\nBrowser: fetch(path, { method: 'POST', credentials: 'same-origin',\nheaders: { 'content-type': 'application/json' }, body: JSON.stringify(values) }).\nAccess cookies refresh automatically. Cookie-auth POST/PATCH/DELETE from scripts\nneed Origin equal to the app URL.\n\nAfter every deploy, somewhere verify checks the page loads and looks right at desktop and phone size, with no\ntest to write. Journeys, several users and access rules go in tests/*.mjs with somewhere test.\nRun somewhere test after a successful deploy: npx @somewhere-cloud/cli deploy && npx @somewhere-cloud/cli test\nIt runs every tests/*.mjs and tests/*.cjs Playwright script and prints failures first. Start from\ntests/app-check.mjs: change its checks to the journeys you changed and your access boundaries.\nKeep each run short:\n- Short waits: page.setDefaultTimeout(5_000) on every page; a deployed app answers in under\n a second. Never sleep for a fixed time: wait for the thing itself (the text, the response).\n- Stop at the first failure and print what the page showed (page.url(), the visible error\n text). Checks after a failure only wait out their timeouts. app.check() does both.\n- After a fix, rerun the scripts that failed, each one whole: npx @somewhere-cloud/cli test --failed.\nThe test helper, @somewhere-cloud/cli/script (import or require); these are all the calls a test needs:\n const app = await openAppTest(); // the live origin, release and data contract\n const ana = await app.signUp(page); // through your form: { id, email, password, verified }\n // { email: 'Ana@Staff.Example' } is used exactly as typed; or { domain: 'staff.example' };\n // then app.verify(page, ana) if your app needs a verified address\n const benPage = await browser.newPage(); const ben = await app.signUp(benPage); // a second user\n await app.signOut(page); await app.signIn(page, ana);\n const r = await app.data(page, { table, operation, id, values, where, limit }); // as that person\n // r.kind: ok | empty | refused | missing-or-refused | malformed | stale-contract | error\n // (also r.status, r.data, r.error); the contract and Origin are added for you\n await app.expectRefused(benPage, { table, operation: 'get', id }, { allowed: page });\n // 401/403 passes; an empty or 404 answer passes only with allowed: someone it succeeds for\n const seen = captureResponses(benPage); await seen.find(secret); // where a secret appeared\n await app.check('name', async () => { ... }); await app.finish(); // finish deletes the sign-ups\nIt finds your form by data-testid \"auth-email\", \"auth-password\", \"auth-signup\", \"auth-signin\",\n\"signout\" (or data-sw-auth); otherwise pass app.signUp(page, { form: { email, password, signUp, signIn } }).\nOpen a list item by clicking the item element itself (what a person clicks), not a link inside it.\nDeploy raw source, no frontend build; type errors stop upload.\nThe complete team spec, with removal and leaving: somewhere docs sw.groups --section team-example.\nDiagnose with somewhere errors and somewhere logs.\n\nOn demand:\n- Server paging: `somewhere docs sw.db --section server-read-paging`\n\n## Testing shared access\n\nWith the team endpoints above, the owner invites a fixture by email; test users are verified,\nso its next GET /api/teams shows the team. A test user who still owns a team is not deleted:\ndelete the team last (api/teams/[id].ts DELETE: sw.groups.delete). Group calls take\nabout a second, so raise the timeout:\n\n```ts\n// tests/team.spec.ts\nimport { test, expect } from '@somewhere-cloud/cli/testing';\ntest.describe.configure({ timeout: 90_000 });\ntest('owner invites a second user by email', async ({ newUser }) => {\n const [owner, bob] = await Promise.all([newUser(), newUser()]);\n const { id } = await (await owner.request.post('/api/teams', { data: { name: 'Shared team' } })).json();\n expect((await owner.request.post(`/api/teams/${id}/invitations`, { data: { email: bob.email } })).ok()).toBeTruthy();\n const { teams } = await (await bob.request.get('/api/teams')).json();\n expect(teams).toContainEqual(expect.objectContaining({ id, role: 'member' }));\n expect((await owner.request.delete(`/api/teams/${id}`)).status()).toBe(204);\n});\n```\n\nTask-specific skills: `.agents/skills/`. Inspect/update with somewhere skills status/update.\nData/code export limits: `somewhere docs portability`.\nUse this app from Claude as its signed-in user (MCP tools): `somewhere docs sw.endpoint --section mcp-tools-for-claude`.\nsomewhere preview runs your change on a copy of production data with its own sign-in: a preview starts with no users (sign up in it or `somewhere preview user-add`), its sign-in mail is captured (`somewhere preview mail`), and rows private to a production user stay hidden from preview users. Server user lookup, roles and built-in teams work in a preview (its own users, its own copy; team invitations are captured); jobs/cron handlers do not yet: check those in production after promoting (`somewhere docs dev-environments`). Test your change in the preview before you promote it: `somewhere test --preview`.\n";
13
+ export declare const INIT_AGENTS_MD = "# somewhere.cloud project contract\n## Build, deploy, test\n\nEnough to start a typical app: declare access and use the browser client; docs are for exceptions.\n\n| Requirement | Declaration below |\n| --- | --- |\n| Each user sees only their own rows | notes: owner() |\n| Team: owner invites members; members read/write; creator or team owner deletes | tasks: anyOf(owner(), group()); sw.groups endpoints below |\n| Owner/staff record with staff-only child notes | tickets: owner() or appRole(); parent() thread; staff-only notes; staff by verified emailDomain (or grantableBy) |\n| Public pages from private drafts | pages: conditional publicRead |\n| Share one record read-only | shared_notes/note_shares: read-only grant() |\n\ndb/schema.ts is declaration only: imports, constants/spreads, default schema;\nno helpers/expressions. id() is random text; owner() stamps user_id. client.read\nincludes the key. Inside anyOf(), owner() takes only column/read: it stamps the\ncreator, not create/delete options; group() gates placement (non-member create is\nrefused); inside anyOf an operation missing from roles allows no group role. Other fields: timestamp({ default: 'now' }), text({ nullable: true });\nindexes: [['team_id']].\n\n```ts\nimport { schema, table, id, text, owner, group, anyOf, parent, appRole, boolean, grant } from 'somewhere/db';\nexport default schema({\n notes: table({ id: id(), title: text() }, { scope: owner(), client: { read: ['id', 'title'], create: ['title'], update: ['title'], delete: true },\n }),\n tasks: table({ id: id(), team_id: text(), title: text() }, {\n scope: anyOf(owner(), group({ column: 'team_id', roles: { read: ['owner', 'admin', 'member'],\n create: ['owner', 'admin', 'member'], update: ['owner', 'admin', 'member'], delete: ['owner'] } })),\n client: { read: ['id', 'team_id', 'title'], create: ['team_id', 'title'], update: ['title'], delete: true },\n }),\n tickets: table({ id: id(), subject: text() }, {\n scope: anyOf(owner(), appRole({ roles: { read: ['staff'], create: ['staff'], update: ['staff'] } })),\n client: { read: true, create: ['subject'], update: ['subject'] },\n }),\n messages: table({ id: id(), ticket_id: text({ references: 'tickets' }), body: text() }, {\n scope: parent({ via: 'ticket_id' }),\n client: { read: true, create: ['ticket_id', 'body'] },\n }),\n staff_notes: table({ id: id(), ticket_id: text({ references: 'tickets' }), body: text() }, {\n scope: appRole({ roles: { read: ['staff'], create: ['staff'] } }),\n client: { read: true, create: ['ticket_id', 'body'] },\n }),\n pages: table({ id: id(), title: text(), published: boolean({ default: false }) }, {\n scope: owner(), client: { read: ['id', 'title'], create: ['title'], update: ['title'],\n publicRead: { where: { published: true } } },\n }),\n note_shares: table({ id: id(), grantee_id: text(), note_id: text({ references: 'shared_notes', onDelete: 'cascade' }) }, {\n scope: owner(), unique: [['note_id', 'grantee_id']],\n }),\n shared_notes: table({ id: id(), title: text() }, {\n scope: anyOf(owner(), grant({ table: 'note_shares', grantee: 'grantee_id', row: 'note_id', operations: ['read'] })),\n client: { read: ['id', 'title'], create: ['title'], update: ['title'] },\n }),\n}, { appRoles: { staff: { emailDomain: 'staff.example' } } });\n```\n\nWho is staff is your app's decision; the platform enforces what the role may do.\nFirst choice, as above: emailDomain. The role holds once the person verifies an address\nat that domain; no grant code. An email ending alone proves nothing: anyone can sign up\nas anyone@your-domain without owning that mailbox. Without verification, grant only from\nsomething the visitor cannot choose, such as an invitation your app issued, checked inside\nthe sign-up route: single use, bound to one account, its link delivered only to that person:\nsomewhere docs sw.auth --section server-assigned-app-roles-setroles.\nmessages use parent(): owner() would hide staff replies from the customer.\nA staff reply is a messages row, and creating a parent() child needs create on the parent\nfor that person: its owner, or a role listed under the parent's create. Read or update is\nnot enough. So tickets lists create: ['staff']; without it every staff reply is refused\n(403 POLICY_AUTHORITY_REQUIRED).\nPublish pages in an owner-checked endpoint. Share with caller-scoped\nsw.db.insert('note_shares', { grantee_id, note_id }); it checks row ownership.\nBrowser calls THROW, not { error }; catch below.\nBrowser list: max 100, paginate after; no order (sort locally or in an endpoint).\n\n```ts\nimport { data } from 'somewhere:data';\nexport async function save(title: string) {\n try { await data.notes.create({ title }); return null; }\n catch (e) { return e instanceof Error ? e.message : 'Save failed'; }\n}\nexport const list = (after?: string) => data.notes.list({ limit: 100, after });\n```\n\nA page that needs several reads: start them together and show it once every read it depends on has answered.\nKeep an input disabled until the data it depends on has loaded, including who the user is.\nNever let a late answer overwrite what the user typed: fill an input from loaded data only before it is enabled.\n\nTeams are built-in groups: the platform keeps the team, invitations, roster, removal,\nleaving, last owner. Starting a team needs a signed-in user; joining needs a verified\nemail (a password sign-up joins once it enters its emailed code).\nNo email verification in your app: keep membership in your own table with member() (somewhere docs sw.groups --section relationships-that-are-not-teams) and assign staff with setRoles in the sign-up route (above).\nThe browser cannot call\nsw.groups: pass each call through an endpoint. A parent() child's delete follows the task\n(creator or team owner), so \"comment author or team owner deletes\" is an endpoint.\nStaff making others staff: appRoles { staff: { grantableBy: ['staff'] } } and\nsw.groups.appRoles.grant(request, userId, 'staff') in an endpoint (never to oneself).\nComplete apps and specs: somewhere docs sw.groups --section team-example or staff-example.\n\n```ts\n// api/teams.ts \u2014 GET my teams (completes invitations to me); POST starts one I own\nconst refusal = (e: { code: string; message: string; status: number }) =>\n Response.json({ error: e.code, message: e.message }, { status: e.status });\nexport const GET = sw.endpoint({ auth: 'required', handler: async ({ request }, sw) => {\n const page = await sw.groups.list(request, { limit: 100 });\n return page.error ? refusal(page.error) : { teams: page.data.items, next_cursor: page.data.next_cursor };\n} });\nexport default sw.endpoint({ auth: 'required', body: { name: 'string' }, handler: async ({ request, body }, sw) => {\n const made = await sw.groups.create(request, { name: body.name });\n return made.error ? refusal(made.error) : { id: made.data.id };\n} });\n```\n\n```ts\n// api/teams/[id]/invitations.ts \u2014 owners invite; others 403; a member's address 409 ALREADY_MEMBER\nexport default sw.endpoint({ auth: 'required', body: { email: 'string' }, handler: async ({ request, params, body }, sw) => {\n const sent = await sw.groups.invite(request, params.id, { email: body.email, role: 'member', redirect_uri: '/' });\n return sent.error ? Response.json({ error: sent.error.code }, { status: sent.error.status }) : { delivery: sent.data.delivery };\n} });\n```\n\nSame shape: sw.groups.get/members(request, id), remove(request, id, userId), leave(request, id)\n(last owner: 409 LAST_OWNER), delete(request, id) by owners.\n\nDo not hand-write access to app-read/write data: declare who may read/write it.\nserverOnly() fits job/import/audit/counter state.\nGrant ledgers use owner() without browser writes. Undeclarable: arbitrary predicates\n(e.g. expiry) or per-role writable fields (split tables or check that write).\n\nBuild src/pages/HomePage.tsx; routes src/App.tsx + src/routes.ts; auth src/auth/hooks.ts.\nAuth is wired: keep api/auth/[...path].ts; src/config.ts controls providers.\napi/notes/[id]/sub.ts \u2192 params.id; underscore files are helpers. POST: default export;\nGET/DELETE: named exports.\n\n```ts\nexport const GET = sw.endpoint({ auth: 'required', handler: async (_, sw) => sw.db.from('notes', { limit: 100 }) });\n```\n\nsw.db applies caller scopes; sw.db.server bypasses them: authorize first.\nCaller-scoped sw.db.insert needs no client.create grant: client limits only the browser.\nReads: from(table, { where, columns, order: [['id', 'asc']], limit, offset }).\nFilter: { id: { in: ids } }; unique: [['a', 'b']] in schema.\nWrites: insert(table, values), update(table, { where, set }), remove(table, { where }).\ntx takes an ARRAY of write intents, never a callback; pre-generate related IDs.\n\nBrowser: fetch(path, { method: 'POST', credentials: 'same-origin',\nheaders: { 'content-type': 'application/json' }, body: JSON.stringify(values) }).\nAccess cookies refresh automatically. Cookie-auth POST/PATCH/DELETE from scripts\nneed Origin equal to the app URL.\n\nAfter every deploy, somewhere verify checks the page loads and looks right at desktop and phone size, with no\ntest to write. Journeys, several users and access rules go in tests/*.mjs with somewhere test.\nRun somewhere test after a successful deploy: npx @somewhere-cloud/cli deploy && npx @somewhere-cloud/cli test\nTests that need the email inbox work after you claim the app.\nIt runs every tests/*.mjs and tests/*.cjs Playwright script and prints failures first. Start from\ntests/app-check.mjs: change its checks to the journeys you changed and your access boundaries.\nKeep each run short:\n- Short waits: page.setDefaultTimeout(5_000) on every page; a deployed app answers in under\n a second. Never sleep for a fixed time: wait for the thing itself (the text, the response).\n- Stop at the first failure and print what the page showed (page.url(), the visible error\n text). Checks after a failure only wait out their timeouts. app.check() does both.\n- After a fix, rerun the scripts that failed, each one whole: npx @somewhere-cloud/cli test --failed.\nThe test helper, @somewhere-cloud/cli/script (import or require); these are all the calls a test needs:\n const app = await openAppTest(); // the live origin, release and data contract\n const ana = await app.signUp(page); // through your form: { id, email, password, verified }\n // { email: 'Ana@Staff.Example' } is used exactly as typed; or { domain: 'staff.example' };\n // then app.verify(page, ana) if your app needs a verified address\n const benPage = await browser.newPage(); const ben = await app.signUp(benPage); // a second user\n await app.signOut(page); await app.signIn(page, ana);\n const r = await app.data(page, { table, operation, id, values, where, limit }); // as that person\n // r.kind: ok | empty | refused | missing-or-refused | malformed | stale-contract | error\n // (also r.status, r.data, r.error); the contract and Origin are added for you\n await app.expectRefused(benPage, { table, operation: 'get', id }, { allowed: page });\n // 401/403 passes; an empty or 404 answer passes only with allowed: someone it succeeds for\n const seen = captureResponses(benPage); await seen.find(secret); // where a secret appeared\n await app.check('name', async () => { ... }); await app.finish(); // finish deletes the sign-ups\nIt finds your form by data-testid \"auth-email\", \"auth-password\", \"auth-signup\", \"auth-signin\",\n\"signout\" (or data-sw-auth); otherwise pass app.signUp(page, { form: { email, password, signUp, signIn } }).\nOpen a list item by clicking the item element itself (what a person clicks), not a link inside it.\nDeploy raw source, no frontend build; type errors stop upload.\nThe complete team spec, with removal and leaving: somewhere docs sw.groups --section team-example.\nDiagnose with somewhere errors and somewhere logs.\n\nOn demand:\n- Server paging: `somewhere docs sw.db --section server-read-paging`\n\n## Testing shared access\n\nWith the team endpoints above, the owner invites a fixture by email; test users are verified,\nso its next GET /api/teams shows the team. A test user who still owns a team is not deleted:\ndelete the team last (api/teams/[id].ts DELETE: sw.groups.delete). Group calls take\nabout a second, so raise the timeout:\n\n```ts\n// tests/team.spec.ts\nimport { test, expect } from '@somewhere-cloud/cli/testing';\ntest.describe.configure({ timeout: 90_000 });\ntest('owner invites a second user by email', async ({ newUser }) => {\n const [owner, bob] = await Promise.all([newUser(), newUser()]);\n const { id } = await (await owner.request.post('/api/teams', { data: { name: 'Shared team' } })).json();\n expect((await owner.request.post(`/api/teams/${id}/invitations`, { data: { email: bob.email } })).ok()).toBeTruthy();\n const { teams } = await (await bob.request.get('/api/teams')).json();\n expect(teams).toContainEqual(expect.objectContaining({ id, role: 'member' }));\n expect((await owner.request.delete(`/api/teams/${id}`)).status()).toBe(204);\n});\n```\n\nTask-specific skills: `.agents/skills/`. Inspect/update with somewhere skills status/update.\nData/code export limits: `somewhere docs portability`.\nUse this app from Claude as its signed-in user (MCP tools): `somewhere docs sw.endpoint --section mcp-tools-for-claude`.\nsomewhere preview runs your change on a copy of production data with its own sign-in: a preview starts with no users (sign up in it or `somewhere preview user-add`), its sign-in mail is captured (`somewhere preview mail`), and rows private to a production user stay hidden from preview users. Server user lookup, roles and built-in teams work in a preview (its own users, its own copy; team invitations are captured); jobs/cron handlers do not yet: check those in production after promoting (`somewhere docs dev-environments`). Test your change in the preview before you promote it: `somewhere test --preview`.\n";
14
14
  export declare const INIT_CLAUDE_MD = "Read AGENTS.md for project instructions.\n";
@@ -151,6 +151,7 @@ need Origin equal to the app URL.
151
151
  After every deploy, somewhere verify checks the page loads and looks right at desktop and phone size, with no
152
152
  test to write. Journeys, several users and access rules go in tests/*.mjs with somewhere test.
153
153
  Run somewhere test after a successful deploy: npx @somewhere-cloud/cli deploy && npx @somewhere-cloud/cli test
154
+ Tests that need the email inbox work after you claim the app.
154
155
  It runs every tests/*.mjs and tests/*.cjs Playwright script and prints failures first. Start from
155
156
  tests/app-check.mjs: change its checks to the journeys you changed and your access boundaries.
156
157
  Keep each run short:
@@ -1 +1 @@
1
- {"version":3,"file":"init-agent-guide.js","sourceRoot":"","sources":["../../src/lib/init-agent-guide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,2EAA2E;AAC3E,0EAA0E;AAC1E,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0M7B,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,2BAA2B,UAAU,0DAA0D,CAAC;AAE9H,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAE1C;;+EAE+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K,eAAe,IAAI,CAAC;AACvK,MAAM,CAAC,MAAM,cAAc,GAAG,4CAA4C,CAAC"}
@@ -3201,6 +3201,7 @@ export function createFeatureTemplate(selection, options) {
3201
3201
  { path: '.gitignore', content: buildScaffoldGitignore() },
3202
3202
  { path: 'AGENTS.md', content: INIT_AGENTS_MD.replace(/## Getting started[^]*?After edits:/, `## Testing
3203
3203
  Run somewhere test after a successful deploy: npx @somewhere-cloud/cli deploy && npx @somewhere-cloud/cli test
3204
+ Tests that need the email inbox work after you claim the app.
3204
3205
  It runs every tests/*.mjs and tests/*.cjs Playwright script and prints failures first.
3205
3206
  Start from tests/app-check.mjs: change its checks to the journeys you changed and your access boundaries.
3206
3207
  Helpers from @somewhere-cloud/cli/script (import or require): signUp/signIn/signOut through your form,
@@ -1 +1 @@
1
- {"version":3,"file":"init-feature-template.js","sourceRoot":"","sources":["../../src/lib/init-feature-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGzD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAW5I,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;+BAeU,WAAW;;;;;;;;;;;CAWzC,CAAC;AAEF,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;CAchB,CAAC;AAEF,SAAS,SAAS,CAAC,OAAe;IAChC,6EAA6E;IAC7E,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,OAAO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,EAClE,EAAE,IAAI,EAAE,qCAAqC,EAAE,OAAO,EAAE,uBAAuB,EAAE,EACjF,EAAE,IAAI,EAAE,2BAA2B,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,qBAAqB,EAAE,EACvG,EAAE,IAAI,EAAE,+BAA+B,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAC5E,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { cliInvocation } from './cli-invocation.js';
1
2
  // The module menu for `somewhere init --features`. A const table, not a
2
3
  // plugin system: each module names what it requires, and the resolver adds
3
4
  // those requirements and reports them. Files come from init-feature-template.ts.
@@ -6,7 +7,7 @@ export const INIT_UI_MODES = ['styled', 'headless'];
6
7
  const MODULES = [
7
8
  {
8
9
  id: 'auth',
9
- summary: 'Email/password sign-up, sign-in and sign-out through the SDK cookie session: the packaged /api/auth route, auth hooks over the SDK provider, a sign-in page, a "Forgot password?" link with /forgot-password and /reset-password pages over api/forgot-password.ts and api/reset-password.ts (sw.auth.forgot, sw.auth.reset), a "Verify your email" code panel for password accounts (the session decides the account; no token in page code), the /auth/magic page that sign-in and sw.auth.invite (group) invitation links open, routed in front of the sign-in gate (an explicit Continue press redeems the one-time token once and opens the link\'s redirect_uri only when it is a page of this app), and a per-user private boundary behind a loading state. Plain `somewhere init` includes this and private-data.',
10
+ summary: `Email/password sign-up, sign-in and sign-out through the SDK cookie session: the packaged /api/auth route, auth hooks over the SDK provider, a sign-in page, a "Forgot password?" link with /forgot-password and /reset-password pages over api/forgot-password.ts and api/reset-password.ts (sw.auth.forgot, sw.auth.reset), a "Verify your email" code panel for password accounts (the session decides the account; no token in page code), the /auth/magic page that sign-in and sw.auth.invite (group) invitation links open, routed in front of the sign-in gate (an explicit Continue press redeems the one-time token once and opens the link\'s redirect_uri only when it is a page of this app), and a per-user private boundary behind a loading state. Plain \`${cliInvocation()} init\` includes this and private-data.`,
10
11
  requires: [],
11
12
  },
12
13
  {
@@ -31,13 +32,13 @@ const UI_MODES = [
31
32
  ];
32
33
  // Listed so an agent reading the catalog does not invent them from scratch.
33
34
  const NOT_OFFERED = [
34
- { id: 'private-files', reason: 'Not offered by init yet; see `somewhere docs declared-files`.' },
35
- { id: 'oauth', reason: 'Not a module: every auth starter has it. List `google`, `github` or `discord` in `SIGN_IN_PROVIDERS` (src/config.ts); the buttons and `/auth/callback` page are already wired. See `somewhere docs auth-client`.' },
35
+ { id: 'private-files', reason: `Not offered by init yet; see \`${cliInvocation()} docs declared-files\`.` },
36
+ { id: 'oauth', reason: `Not a module: every auth starter has it. List \`google\`, \`github\` or \`discord\` in \`SIGN_IN_PROVIDERS\` (src/config.ts); the buttons and \`/auth/callback\` page are already wired. See \`${cliInvocation()} docs auth-client\`.` },
36
37
  { id: 'mfa', reason: 'Not generated.' },
37
- { id: 'payments', reason: 'Not generated. See `somewhere docs payments`.' },
38
- { id: 'teams', reason: 'Not generated. See member() scopes in `somewhere docs declared-data`.' },
39
- { id: 'public-sharing', reason: 'Not generated. See publicRead in `somewhere docs declared-data`.' },
40
- { id: 'agent-durable', reason: 'Not generated. The agent module runs inline; durable runs, cancel, streaming, memory and external tools need their own design. See `somewhere docs sw.agent`.' },
38
+ { id: 'payments', reason: `Not generated. See \`${cliInvocation()} docs payments\`.` },
39
+ { id: 'teams', reason: `Not generated. See member() scopes in \`${cliInvocation()} docs declared-data\`.` },
40
+ { id: 'public-sharing', reason: `Not generated. See publicRead in \`${cliInvocation()} docs declared-data\`.` },
41
+ { id: 'agent-durable', reason: `Not generated. The agent module runs inline; durable runs, cancel, streaming, memory and external tools need their own design. See \`${cliInvocation()} docs sw.agent\`.` },
41
42
  ];
42
43
  /** A usage error: the command exits 2 before any login, request or write. */
43
44
  export class InitSelectionError extends Error {
@@ -96,7 +97,7 @@ export function initCatalog(generate) {
96
97
  const everything = [...INIT_MODULE_IDS];
97
98
  return {
98
99
  version: 1,
99
- command: 'somewhere init --name <slug> --features <ids> [--ui styled|headless] [--dry-run] [--json]',
100
+ command: `${cliInvocation()} init --name <slug> --features <ids> [--ui styled|headless] [--dry-run] [--json]`,
100
101
  modules: MODULES.map((entry) => ({
101
102
  id: entry.id,
102
103
  summary: entry.summary,
@@ -1 +1 @@
1
- {"version":3,"file":"init-features.js","sourceRoot":"","sources":["../../src/lib/init-features.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,2EAA2E;AAC3E,iFAAiF;AAEjF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,OAAO,CAAU,CAAC;AAGxF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAU,CAAC;AAS7D,MAAM,OAAO,GAAoC;IAC/C;QACE,EAAE,EAAE,MAAM;QACV,OAAO,EAAE,2xBAA2xB;QACpyB,QAAQ,EAAE,EAAE;KACb;IACD;QACE,EAAE,EAAE,YAAY;QAChB,OAAO,EAAE,0OAA0O;QACnP,QAAQ,EAAE,CAAC,MAAM,CAAC;KACnB;IACD;QACE,EAAE,EAAE,cAAc;QAClB,OAAO,EAAE,2PAA2P;QACpQ,QAAQ,EAAE,CAAC,MAAM,CAAC;KACnB;IACD;QACE,EAAE,EAAE,OAAO;QACX,OAAO,EAAE,+dAA+d;QACxe,QAAQ,EAAE,CAAC,MAAM,CAAC;KACnB;CACF,CAAC;AAEF,MAAM,QAAQ,GAAmD;IAC/D,EAAE,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,sHAAsH,EAAE;IACjJ,EAAE,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,iIAAiI,EAAE;CAC/J,CAAC;AAEF,4EAA4E;AAC5E,MAAM,WAAW,GAA8C;IAC7D,EAAE,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,+DAA+D,EAAE;IAChG,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,kNAAkN,EAAE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K,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE;QACvC,MAAM,EAAE,GAAG,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;QACxG,OAAO,GAAG,EAAE,uBAAuB,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IACrD,CAAC,CAAC,CAAC;IACH,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,SAAS,SAAS,CAAC,EAAE,EAAE,CAAC;AAC/G,CAAC"}
@@ -4,6 +4,7 @@
4
4
  const SCRIPT = (privateData) => `// tests/app-check.mjs — an ordinary Playwright script for this app: change the checks to match
5
5
  // what you built. Run it after a successful deploy, never after a refused one:
6
6
  // npx @somewhere-cloud/cli deploy && npx @somewhere-cloud/cli test
7
+ // Tests that need the email inbox work after you claim the app.
7
8
  // It writes its result once to .somewhere/app-check.json; the exit code is the verdict.
8
9
  // It stops at the first failed check and prints the page's URL and visible error text.
9
10
  // After a fix, rerun the scripts that failed, each one whole: npx @somewhere-cloud/cli test --failed.
@@ -21,45 +22,62 @@ const person = async () => {
21
22
  return { page, account: await app.signUp(page) };
22
23
  };
23
24
  try {
24
- const [ana, ben] = await Promise.all([person(), person()]);
25
- await app.check('the signed-in page shows the account', () => ana.page.getByText(ana.account.email).waitFor());
26
- await app.check('sign out, then sign back in', async () => {
27
- await app.signOut(ana.page);
28
- await app.signIn(ana.page, ana.account);
25
+ await app.check('the sign-in page loads', async () => {
26
+ const page = await browser.newPage({ baseURL: app.origin });
27
+ try {
28
+ await page.goto('/');
29
+ await page.locator('[data-app-state="signed-out"]').waitFor({ timeout: 5_000 });
30
+ } finally {
31
+ await page.close();
32
+ }
29
33
  });
30
- ${privateData ? ` await app.check('a note stays private to its owner', async () => {
31
- const secret = 'private ' + crypto.randomUUID(); // a unique value: search for it, not a common word
32
- await ana.page.getByLabel('Title').fill(secret);
33
- await ana.page.getByRole('button', { name: 'Add note' }).click();
34
- await ana.page.getByRole('heading', { name: secret }).waitFor();
35
- const seen = captureResponses(ben.page);
36
- await ben.page.reload();
37
- await dataReady(ben.page); // the list has loaded, not merely "signed in"
38
- const leaks = await seen.find(secret);
39
- if (leaks.length) throw new Error('the other person received the note: ' + JSON.stringify(leaks));
40
- const { data: [note] } = await app.data(ana.page, { table: 'notes', operation: 'list', where: { title: secret } });
41
- await app.expectRefused(ben.page, { table: 'notes', operation: 'get', id: note.id }, { allowed: ana.page });
42
- await app.expectRefused(ben.page, { table: 'notes', operation: 'update', id: note.id, values: { title: 'changed' } }, { allowed: ana.page });
43
- await app.expectRefused(ben.page, { table: 'notes', operation: 'delete', id: note.id }, { allowed: ana.page });
44
- });
45
- ` : ` // Your own tables (db/schema.ts), called as a signed-in person: app.data adds the release's
46
- // data contract and the Origin, and says ok, empty or refused. No need to read either from the page.
47
- // const { data: [task] } = await app.data(ana.page, { table: 'tasks', operation: 'list' });
48
- // await app.expectRefused(ben.page, { table: 'tasks', operation: 'get', id: task.id }, { allowed: ana.page });
49
- `} // A list item opens its page when a person clicks the item itself. Click the item element, not a link
50
- // inside it: a test that clicks the inner link passes even when clicking the item does nothing.
51
- // await ana.page.getByTestId('team-item').first().click();
52
- // await ana.page.getByTestId('team-name').waitFor(); // the item's own page, reached in the app
53
- await app.check('at phone width nothing scrolls sideways', async () => {
54
- await ana.page.setViewportSize({ width: 390, height: 844 });
55
- await ana.page.reload();
56
- await ana.page.getByText(ana.account.email).waitFor();
57
- const wide = await ana.page.evaluate(() => [document.documentElement, ...document.querySelectorAll('body *')]
58
- .filter((el) => el.scrollWidth > el.clientWidth + 1
59
- && (el === document.documentElement || ['auto', 'scroll'].includes(getComputedStyle(el).overflowX)))
60
- .map((el) => el.tagName.toLowerCase() + (typeof el.className === 'string' && el.className ? '.' + el.className.split(' ')[0] : '')));
61
- if (wide.length) throw new Error('scrolls sideways at 390 px: ' + wide.join(', '));
34
+ let ana, ben;
35
+ const signedUp = await app.check('sign up through the app', async () => {
36
+ // Finish both attempts before cleanup, even if one fails.
37
+ const people = await Promise.allSettled([person(), person()]);
38
+ for (const result of people) if (result.status === 'rejected') throw result.reason;
39
+ [ana, ben] = people.map(result => result.value);
62
40
  });
41
+ if (signedUp) {
42
+ await app.check('the signed-in page shows the account', () => ana.page.getByText(ana.account.email).waitFor());
43
+ await app.check('sign out, then sign back in', async () => {
44
+ await app.signOut(ana.page);
45
+ await app.signIn(ana.page, ana.account);
46
+ });
47
+ ${privateData ? ` await app.check('a note stays private to its owner', async () => {
48
+ const secret = 'private ' + crypto.randomUUID(); // a unique value: search for it, not a common word
49
+ await ana.page.getByLabel('Title').fill(secret);
50
+ await ana.page.getByRole('button', { name: 'Add note' }).click();
51
+ await ana.page.getByRole('heading', { name: secret }).waitFor();
52
+ const seen = captureResponses(ben.page);
53
+ await ben.page.reload();
54
+ await dataReady(ben.page); // the list has loaded, not merely "signed in"
55
+ const leaks = await seen.find(secret);
56
+ if (leaks.length) throw new Error('the other person received the note: ' + JSON.stringify(leaks));
57
+ const { data: [note] } = await app.data(ana.page, { table: 'notes', operation: 'list', where: { title: secret } });
58
+ await app.expectRefused(ben.page, { table: 'notes', operation: 'get', id: note.id }, { allowed: ana.page });
59
+ await app.expectRefused(ben.page, { table: 'notes', operation: 'update', id: note.id, values: { title: 'changed' } }, { allowed: ana.page });
60
+ await app.expectRefused(ben.page, { table: 'notes', operation: 'delete', id: note.id }, { allowed: ana.page });
61
+ });
62
+ ` : ` // Your own tables (db/schema.ts), called as a signed-in person: app.data adds the release's
63
+ // data contract and the Origin, and says ok, empty or refused. No need to read either from the page.
64
+ // const { data: [task] } = await app.data(ana.page, { table: 'tasks', operation: 'list' });
65
+ // await app.expectRefused(ben.page, { table: 'tasks', operation: 'get', id: task.id }, { allowed: ana.page });
66
+ `} // A list item opens its page when a person clicks the item itself. Click the item element, not a link
67
+ // inside it: a test that clicks the inner link passes even when clicking the item does nothing.
68
+ // await ana.page.getByTestId('team-item').first().click();
69
+ // await ana.page.getByTestId('team-name').waitFor(); // the item's own page, reached in the app
70
+ await app.check('at phone width nothing scrolls sideways', async () => {
71
+ await ana.page.setViewportSize({ width: 390, height: 844 });
72
+ await ana.page.reload();
73
+ await ana.page.getByText(ana.account.email).waitFor();
74
+ const wide = await ana.page.evaluate(() => [document.documentElement, ...document.querySelectorAll('body *')]
75
+ .filter((el) => el.scrollWidth > el.clientWidth + 1
76
+ && (el === document.documentElement || ['auto', 'scroll'].includes(getComputedStyle(el).overflowX)))
77
+ .map((el) => el.tagName.toLowerCase() + (typeof el.className === 'string' && el.className ? '.' + el.className.split(' ')[0] : '')));
78
+ if (wide.length) throw new Error('scrolls sideways at 390 px: ' + wide.join(', '));
79
+ });
80
+ }
63
81
  } finally {
64
82
  await app.finish(); // confirms the release, deletes the accounts, writes the result once
65
83
  await browser.close();
@@ -1 +1 @@
1
- {"version":3,"file":"init-test-template.js","sourceRoot":"","sources":["../../src/lib/init-test-template.ts"],"names":[],"mappings":"AAEA,iGAAiG;AACjG,kGAAkG;AAClG,wEAAwE;AAExE,MAAM,MAAM,GAAG,CAAC,WAAoB,EAAE,EAAE,CAAC;;;;;;;;sBAQnB,WAAW,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,EAAE;;;;;;;;;;;;;;;;;;EAkBtE,WAAW,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;CAef,CAAC,CAAC,CAAC;;;;CAIH;;;;;;;;;;;;;;;;;;CAkBA,CAAC;AAEF,kGAAkG;AAClG,MAAM,UAAU,YAAY,CAAC,UAAqC,EAAE;IAClE,OAAO,CAAC,EAAE,IAAI,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC;AAC1F,CAAC"}
1
+ {"version":3,"file":"init-test-template.js","sourceRoot":"","sources":["../../src/lib/init-test-template.ts"],"names":[],"mappings":"AAEA,iGAAiG;AACjG,kGAAkG;AAClG,wEAAwE;AAExE,MAAM,MAAM,GAAG,CAAC,WAAoB,EAAE,EAAE,CAAC;;;;;;;;;sBASnB,WAAW,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkCtE,WAAW,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;CAef,CAAC,CAAC,CAAC;;;;CAIH;;;;;;;;;;;;;;;;;;;CAmBA,CAAC;AAEF,kGAAkG;AAClG,MAAM,UAAU,YAAY,CAAC,UAAqC,EAAE;IAClE,OAAO,CAAC,EAAE,IAAI,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC;AAC1F,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { cliInvocation } from './cli-invocation.js';
1
2
  import { loadConfig } from './config.js';
2
3
  /** Appended wherever a command needs a project and this folder has no link
3
4
  * ( item 15): name the exact commands that link one, instead of
@@ -7,7 +8,7 @@ export function unlinkedFolderHint() {
7
8
  const config = loadConfig();
8
9
  const signedIn = Boolean(config?.token) && config?.temporary !== true;
9
10
  return signedIn
10
- ? ' Link this folder to a project: `somewhere init --link --project <name-or-id>` (list yours with `somewhere projects`), or create one: `somewhere init --bare --name <name>`.'
11
- : ' Sign in first (`somewhere login`), then link this folder: `somewhere init --link --project <name-or-id>`.';
11
+ ? ` Link this folder to a project: \`${cliInvocation()} init --link --project <name-or-id>\` (list yours with \`${cliInvocation()} projects\`), or create one: \`${cliInvocation()} init --bare --name <name>\`.`
12
+ : ` Sign in first (\`${cliInvocation()} login\`), then link this folder: \`${cliInvocation()} init --link --project <name-or-id>\`.`;
12
13
  }
13
14
  //# sourceMappingURL=link-hint.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"link-hint.js","sourceRoot":"","sources":["../../src/lib/link-hint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC;;;mDAGmD;AACnD,MAAM,UAAU,kBAAkB;IAChC,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;IAC5B,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,MAAM,EAAE,SAAS,KAAK,IAAI,CAAC;IACtE,OAAO,QAAQ;QACb,CAAC,CAAC,8KAA8K;QAChL,CAAC,CAAC,4GAA4G,CAAC;AACnH,CAAC"}
1
+ {"version":3,"file":"link-hint.js","sourceRoot":"","sources":["../../src/lib/link-hint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC;;;mDAGmD;AACnD,MAAM,UAAU,kBAAkB;IAChC,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;IAC5B,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,MAAM,EAAE,SAAS,KAAK,IAAI,CAAC;IACtE,OAAO,QAAQ;QACb,CAAC,CAAC,qCAAqC,aAAa,EAAE,4DAA4D,aAAa,EAAE,kCAAkC,aAAa,EAAE,+BAA+B;QACjN,CAAC,CAAC,qBAAqB,aAAa,EAAE,uCAAuC,aAAa,EAAE,wCAAwC,CAAC;AACzI,CAAC"}
@@ -1,14 +1,4 @@
1
- /**
2
- * What to run next, decided in ONE place.
3
- *
4
- * Invariants:
5
- * - Exact commands. test/next-actions.test.mjs re-derives every suggestion
6
- * from the CLI's own `--help`, so a renamed flag fails the build.
7
- * - At most three. A next step, not a capability catalogue.
8
- * - Human output only. `deploy --json` emits the raw platform response and
9
- * `init --json` the project object; neither gains a key nobody asked for.
10
- * - No network and no new state: every input is one the caller already has.
11
- */
1
+ import { cliInvocation } from './cli-invocation.js';
12
2
  /** Quote an argument that is not safe bare in a shell. Live URLs are plain
13
3
  * today; a suggestion is pasted verbatim, so it may not depend on that. */
14
4
  export function shellQuote(value) {
@@ -19,11 +9,11 @@ export function shellQuote(value) {
19
9
  const SEE_IT_LINKED = {
20
10
  // VERIFY mode: a linked project saves the screenshot into the project files
21
11
  // and prints a link that opens it.
22
- command: 'somewhere browser --screenshot',
12
+ command: `${cliInvocation()} browser --screenshot`,
23
13
  why: 'see the live page — console errors, failed requests, and a screenshot link',
24
14
  };
25
15
  const CHECK_IT_LINKED = {
26
- command: 'somewhere verify',
16
+ command: `${cliInvocation()} verify`,
27
17
  why: 'the page loads and looks right at desktop and phone size; nothing to write',
28
18
  };
29
19
  /** EYES mode on a public URL, which REQUIRES `--store` — commands/browser.ts
@@ -31,7 +21,7 @@ const CHECK_IT_LINKED = {
31
21
  * scope (worker TEMP_ACCOUNT_KEY_SCOPES), so this works on that path too. */
32
22
  function seeItByUrl(liveUrl) {
33
23
  return {
34
- command: `somewhere browser ${shellQuote(liveUrl)} --screenshot --store`,
24
+ command: `${cliInvocation()} browser ${shellQuote(liveUrl)} --screenshot --store`,
35
25
  why: 'see the live page — console errors, failed requests, and a screenshot link',
36
26
  };
37
27
  }
@@ -40,7 +30,7 @@ export function nextActions(ctx) {
40
30
  case 'init':
41
31
  return [
42
32
  {
43
- command: 'somewhere deploy',
33
+ command: `${cliInvocation()} deploy`,
44
34
  why: ctx.scaffolded
45
35
  ? 'publish the starter and get its live URL — the deploy is the backend'
46
36
  : 'publish this source and get its live URL — the deploy is the backend',
@@ -49,23 +39,23 @@ export function nextActions(ctx) {
49
39
  {
50
40
  // Last, and explicitly "after that": frontend hot reload proxies to
51
41
  // the deployed backend and refuses on a project with no release.
52
- command: 'somewhere dev',
42
+ command: `${cliInvocation()} dev`,
53
43
  why: 'after that, frontend hot reload against the deployed backend',
54
44
  },
55
45
  ];
56
46
  case 'login':
57
47
  return [
58
48
  ctx.linkedProject
59
- ? { command: 'somewhere deploy', why: 'publish this directory and get its live URL' }
49
+ ? { command: `${cliInvocation()} deploy`, why: 'publish this directory and get its live URL' }
60
50
  : {
61
- command: 'somewhere init',
51
+ command: `${cliInvocation()} init`,
62
52
  why: 'create or link a project here, with a full-stack starter',
63
53
  },
64
54
  ];
65
55
  case 'deploy': {
66
- const test = { command: 'somewhere test', why: 'journeys, several users and access rules: your tests/*.mjs' };
56
+ const test = { command: `${cliInvocation()} test`, why: 'journeys, several users and access rules: your tests/*.mjs' };
67
57
  if (ctx.temporary)
68
- return ctx.liveUrl ? [seeItByUrl(ctx.liveUrl), test] : [];
58
+ return ctx.liveUrl ? [seeItByUrl(ctx.liveUrl)] : [];
69
59
  // Test first, then verify (the AGENTS.md split); the screenshot link last.
70
60
  if (ctx.projectLinked)
71
61
  return [test, CHECK_IT_LINKED, SEE_IT_LINKED];
@@ -1 +1 @@
1
- {"version":3,"file":"next-actions.js","sourceRoot":"","sources":["../../src/lib/next-actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAyBH;4EAC4E;AAC5E,MAAM,UAAU,UAAU,CAAC,KAAa;IACtC,OAAO,0BAA0B,CAAC,IAAI,CAAC,KAAK,CAAC;QAC3C,CAAC,CAAC,KAAK;QACP,CAAC,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC;AAC1C,CAAC;AAED,MAAM,aAAa,GAAe;IAChC,4EAA4E;IAC5E,mCAAmC;IACnC,OAAO,EAAE,gCAAgC;IACzC,GAAG,EAAE,4EAA4E;CAClF,CAAC;AAEF,MAAM,eAAe,GAAe;IAClC,OAAO,EAAE,kBAAkB;IAC3B,GAAG,EAAE,4EAA4E;CAClF,CAAC;AAEF;;8EAE8E;AAC9E,SAA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,CAAC,CAAC,EAAE,CAAC;YACvE,2EAA2E;YAC3E,IAAI,GAAG,CAAC,aAAa;gBAAE,OAAO,CAAC,IAAI,EAAE,eAAe,EAAE,aAAa,CAAC,CAAC;YACrE,IAAI,GAAG,CAAC,OAAO;gBAAE,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC;YACxD,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;AACH,CAAC;AASD;2DAC2D;AAC3D,MAAM,UAAU,iBAAiB,CAC/B,OAAqB,EACrB,SAA2B,EAAE;IAE7B,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACpC,MAAM,KAAK,GAAG,EAAE,OAAO,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,CAAC;IAC9E,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;IAChE,OAAO,OAAO,CAAC,GAAG,CAChB,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAC1E,CAAC;AACJ,CAAC"}
@@ -1,3 +1,6 @@
1
+ /** Keep the temporary deploy handoff as the last output of the command. */
2
+ export declare function suppressExitNotices(): void;
3
+ export declare function printExitNotices(notices: string[]): void;
1
4
  /** Commands that own their output stay silent. In particular, an `update`
2
5
  * process keeps its old in-memory
3
6
  * version after installing the new package, so its generic exit notice would
@@ -6,6 +6,15 @@ import { getOutdatedWarning, updateProvider } from './providers/update.js';
6
6
  * it inherits the gate + stderr emission below, so it can never reach stdout,
7
7
  * or agent/piped output. */
8
8
  const PROVIDERS = [updateProvider];
9
+ let exitNoticesSuppressed = false;
10
+ /** Keep the temporary deploy handoff as the last output of the command. */
11
+ export function suppressExitNotices() {
12
+ exitNoticesSuppressed = true;
13
+ }
14
+ export function printExitNotices(notices) {
15
+ if (!exitNoticesSuppressed && notices.length)
16
+ process.stderr.write('\n' + notices.join('\n') + '\n');
17
+ }
9
18
  /** Updates own their output; offline lint must never trigger an update fetch. */
10
19
  const SKIP_SUBCOMMANDS = new Set(['update', 'lint']);
11
20
  /** Commands that own their output stay silent. In particular, an `update`