@somewhere-cloud/cli 0.38.114 → 0.38.116

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.
@@ -1,13 +1,18 @@
1
1
  export const BUNDLED_SKILLS_PACK = {
2
2
  "schema": 1,
3
3
  "name": "somewhere-skills",
4
- "version": "1+00d36600840b",
5
- "sha256": "00d36600840bbbceb1366ce31c46ff2a22f00b566086d1f6fb9c07fcc2ff3b5b",
4
+ "version": "1+27a07555a794",
5
+ "sha256": "27a07555a79411e5bb286b5fbd2162f002219e133d244ed9984ba0ee77ecc181",
6
6
  "files": [
7
+ {
8
+ "path": "adopt/SKILL.md",
9
+ "sha256": "5dc965b36ff1f688b29825ed50850ee6a3aafff05daf533a06d79d69ae57df05",
10
+ "content": "---\nname: adopt\ndescription: When you have a public Somewhere app repo and need a new instance in the user's own account.\n---\n\n# Run a public repo as your own instance\n\n## 1. Clone and inspect\n\nRun `git clone <public-repo-url> <new-instance-folder>` and `cd <new-instance-folder>`. Run `git remote get-url origin` and `git rev-parse HEAD` to record what you copied. Keep any inherited `.somewhere.json` in place for the new-instance deploy. Read any setup notes. With or without notes, run `rg -n 'signInPath|createSomewhereAuth|somewhereAuth|appRoles:|verifyInvocation|mcp:' .`. Read `somewhere.auth.json` for the sign-in path when present. Otherwise trace auth UI and routes from the auth calls. Read `db/schema.ts` for app-wide roles, the invocation guard in each job handler for its caller, and each endpoint's `mcp` declaration for the tool name and input. Use `grep -R -n -E` with the same pattern if ripgrep is unavailable.\n\n## 2. Check the CLI and account\n\nUse CLI 0.38.115 or later. Run `somewhere --version` and `somewhere whoami`. If needed, run `npx -y @somewhere-cloud/cli@latest --version` and use that invocation for every command below. Run `somewhere login` if needed and check `somewhere whoami` again for the intended account.\n\n## 3. Deploy a new instance\n\nFrom the clone, run `somewhere deploy --new`. It publishes raw source and updates the link to a new project named for the folder. The current CLI keeps control of deploy when the installed repo pin is older. Use the new ID in `somewhere project view <new-id> --json` to verify ownership and confirm that it differs from the inherited ID.\n\n## 4. Check the public page and inputs\n\nRun `curl -fsS <printed-app-url>/` and confirm it serves the app. If a required input is missing, run `somewhere deploy --list-unpublished` to inspect omissions. For an app with a sign-in adapter, run `somewhere file somewhere.auth.json --version <deployed-version> --project <new-id>` and check its `signInPath`.\n\n## 5. Give the owner access\n\nHave the intended owner sign in to the app and confirm their identity. Use the deploy cue or run `somewhere auth roles grant <app-email-or-user-id> <declared-role> --project <new-id>`. Verify with `somewhere auth roles list --role <declared-role> --project <new-id>` and have the owner exercise a private action. On a disposable project, run `somewhere test-users prepare owner --json` from its linked folder and use the actor's email or ID for the grant. To check the owner page, run `somewhere browser --project <new-id> --path <owner-path> --auth-user <app-user-id>` with the ID from the manifest. Run `somewhere test-users cleanup` after the proof.\n\n## 6. Register and test schedules\n\nRun `somewhere cron list --project <new-id>`. The `sw.jobs.verifyInvocation` guard accepts jobs as well as cron. Trace its callers to tell which handlers need a recurring schedule. Read the handler for the route and payload, and use the setup notes or confirm the cadence with the owner when source gives none. For each missing schedule run `somewhere cron create '<cron>' <route> --name <name> --project <new-id>` with `--payload '<json>'` and `--timezone <IANA-zone>` as needed. Add `--disabled` on a fixture. Run `somewhere cron run <name> --project <new-id> --wait` and verify the effect. For captured mail, run `somewhere email test-inbox <test-address>`. Use an address allowed by the handler. For a recurring schedule, check the enabled status and next run in `somewhere cron list --project <new-id>`.\n\n## 7. Connect app tools and record the result\n\nIf the app declares tools, run `somewhere docs app-mcp`. Connect `<printed-app-url>/mcp` in a client that supports remote MCP with OAuth. Start signed out, check that the app redirects to its sign-in page, then sign in as the app owner and approve. List the tools, perform a reversible private action and check its effect in the app. For a headless app sign-in, keep one cookie jar across consent and sign-in, use a browser user agent and send the app's origin on same-origin form POSTs. Record the live URL, owner access, private action, tool and schedule results, and the public upstream URL and commit.\n\nSources (`somewhere docs <topic>`): adopt.\n"
11
+ },
7
12
  {
8
13
  "path": "deploy-verify-loop/SKILL.md",
9
- "sha256": "d8336d3a78f17acc115b4a17d964e45e84f977e25a5952ce482abc113ffb0454",
10
- "content": "---\nname: deploy-verify-loop\ndescription: After edits, typecheck and run focused tests; verify the final deployed journey and rerun after relevant fixes.\n---\n\n# Deploy, verify, read the failure\n\n## The loop\n\n```bash\nsomewhere typecheck\nsomewhere deploy\n```\n\nDon't bundle the source yourself; the platform runs the frontend build.\n\nRun `somewhere claim` and open its link to keep a temporary app. Tests that need the email inbox work after you claim the app.\n\n```bash\nsomewhere deploy-check --run /api/hello -X POST -d '{\"name\":\"Ada\"}'\n```\n\n| Step | Command | What it tells you |\n|---|---|---|\n| Verify | `somewhere verify [--flow flow.json]` | Runs the live app at desktop and phone sizes: named steps, console/network health, both screenshots. |\n| Inspect | `somewhere browser [target]` | One page: screenshot, snapshot, DOM, network, or an evaluated expression. |\n| Diagnose | `somewhere logs --tail 10`, `somewhere errors` | Recent function output, then failures split into refused and exception. `errors` also works on a temporary project. |\n\n## A flow for verify --flow\n\n```json\n{ \"actions\": [{ \"fill\": \"#title\", \"value\": \"Verify entry\" }, { \"fill\": \"#from_email\", \"value\": \"v@example.com\" },\n { \"click\": \"#send\" }, { \"expect\": { \"selector\": \"#status\", \"text\": \"Received\" } }], \"viewports\": [\"desktop\"] }\n```\n\n`passed` requires successful steps and request expectations, no page errors, and no unexpected failed requests. It can be false even when every step succeeded.\n\n## Failure 1: the live site still shows the old version\n\nBrowser or CDN cache. Hard-reload (Cmd-Shift-R), or check with `curl -sI https://{subdomain}.somewhere.site`.\n\n## Failure 2: a route fails\n\nShow recent failures with a `kind` column: **refused** for a 4xx your own handler returned on purpose, **exception** for an uncaught throw or a 5xx.\n\nThe `stack` field is the single most useful field for debugging — it tells you the exact file + line in your code where the throw originated.\n\n| `somewhere rollback [project]` | `-y, --yes`, `--json` | Select the previous retained production release. |\n\nSources (`somewhere docs <topic>`): browser, cli, common-mistakes, deploy, getting-started, recipe-signed-in-app, troubleshooting.\n"
14
+ "sha256": "a4c44a9c77503863c3b6b7da32552c58872c36761198f42b6e6f507692a979bd",
15
+ "content": "---\nname: deploy-verify-loop\ndescription: After edits, typecheck and run focused tests; verify the final deployed journey and rerun after relevant fixes.\n---\n\n# Deploy, verify, read the failure\n\n## The loop\n\n```bash\nsomewhere typecheck\nsomewhere deploy\n```\n\nDon't bundle the source yourself; the platform runs the frontend build.\n\nRun `somewhere claim` and open its link to keep a temporary app. Tests that need the email inbox work after you claim the app.\n\n```bash\nsomewhere deploy-check --run /api/hello -X POST -d '{\"name\":\"Ada\"}'\n```\n\n| Step | Command | What it tells you |\n|---|---|---|\n| Verify | `somewhere verify [--flow flow.json]` | Runs the live app at desktop and phone sizes: named steps, console/network health, both screenshots. |\n| Inspect | `somewhere browser [target]` | One page: screenshot, snapshot, DOM, network, or an evaluated expression. |\n| Diagnose | `somewhere logs --tail 10`, `somewhere errors` | Recent function output, then failures split into refused and exception. `errors` also works on a temporary project. |\n\n## A flow for verify --flow\n\n```json\n{ \"actions\": [{ \"fill\": \"#title\", \"value\": \"Verify entry\" }, { \"fill\": \"#from_email\", \"value\": \"v@example.com\" },\n { \"click\": \"#send\" }, { \"expect\": { \"selector\": \"#status\", \"text\": \"Received\" } }], \"viewports\": [\"desktop\"] }\n```\n\n`passed` requires successful steps and request expectations, no page errors, and no unexpected failed requests. It can be false even when every step succeeded.\n\n## Failure 1: the live site still shows the old version\n\nBrowser or CDN cache. Hard-reload (Cmd-Shift-R), or check with `curl -sI https://{subdomain}.somewhere.site`.\n\n## Failure 2: a route fails\n\nShow recent failures with a `kind` column: **refused** for a 4xx your own handler returned on purpose, **exception** for an uncaught throw or a 5xx.\n\nThe `stack` field is the single most useful field for debugging — it tells you the exact file + line in your code where the throw originated.\n\n| `somewhere rollback [project]` | `-y, --yes`, `--json` | Select the previous retained production release. By default this changes code without restoring data. |\n\nSources (`somewhere docs <topic>`): browser, cli, common-mistakes, deploy, getting-started, recipe-signed-in-app, troubleshooting.\n"
11
16
  },
12
17
  {
13
18
  "path": "schema-changes/SKILL.md",
@@ -1 +1 @@
1
- {"version":3,"file":"skills-pack.generated.js","sourceRoot":"","sources":["../../src/lib/skills-pack.generated.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,mBAAmB,GAAe;IAC7C,QAAQ,EAAE,CAAC;IACX,MAAM,EAAE,kBAAkB;IAC1B,SAAS,EAAE,gBAAgB;IAC3B,QAAQ,EAAE,kEAAkE;IAC5E,OAAO,EAAE;QACP;YACE,MAAM,EAAE,6BAA6B;YACrC,QAAQ,EAAE,kEAAkE;YAC5E,SAAS,EAAE,6vEAA6vE;SACzwE;QACD;YACE,MAAM,EAAE,yBAAyB;YACjC,QAAQ,EAAE,kEAAkE;YAC5E,SAAS,EAAE,22EAA22E;SACv3E;QACD;YACE,MAAM,EAAE,wBAAwB;YAChC,QAAQ,EAAE,kEAAkE;YAC5E,SAAS,EAAE,miGAAmiG;SAC/iG;QACD;YACE,MAAM,EAAE,0BAA0B;YAClC,QAAQ,EAAE,kEAAkE;YAC5E,SAAS,EAAE,s2DAAs2D;SACl3D;QACD;YACE,MAAM,EAAE,kCAAkC;YAC1C,QAAQ,EAAE,kEAAkE;YAC5E,SAAS,EAAE,wzEAAwzE;SACp0E;QACD;YACE,MAAM,EAAE,+BAA+B;YACvC,QAAQ,EAAE,kEAAkE;YAC5E,SAAS,EAAE,82DAA82D;SAC13D;QACD;YACE,MAAM,EAAE,iBAAiB;YACzB,QAAQ,EAAE,kEAAkE;YAC5E,SAAS,EAAE,k/FAAk/F;SAC9/F;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"skills-pack.generated.js","sourceRoot":"","sources":["../../src/lib/skills-pack.generated.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,mBAAmB,GAAe;IAC7C,QAAQ,EAAE,CAAC;IACX,MAAM,EAAE,kBAAkB;IAC1B,SAAS,EAAE,gBAAgB;IAC3B,QAAQ,EAAE,kEAAkE;IAC5E,OAAO,EAAE;QACP;YACE,MAAM,EAAE,gBAAgB;YACxB,QAAQ,EAAE,kEAAkE;YAC5E,SAAS,EAAE,yoIAAyoI;SACrpI;QACD;YACE,MAAM,EAAE,6BAA6B;YACrC,QAAQ,EAAE,kEAAkE;YAC5E,SAAS,EAAE,kzEAAkzE;SAC9zE;QACD;YACE,MAAM,EAAE,yBAAyB;YACjC,QAAQ,EAAE,kEAAkE;YAC5E,SAAS,EAAE,22EAA22E;SACv3E;QACD;YACE,MAAM,EAAE,wBAAwB;YAChC,QAAQ,EAAE,kEAAkE;YAC5E,SAAS,EAAE,miGAAmiG;SAC/iG;QACD;YACE,MAAM,EAAE,0BAA0B;YAClC,QAAQ,EAAE,kEAAkE;YAC5E,SAAS,EAAE,s2DAAs2D;SACl3D;QACD;YACE,MAAM,EAAE,kCAAkC;YAC1C,QAAQ,EAAE,kEAAkE;YAC5E,SAAS,EAAE,wzEAAwzE;SACp0E;QACD;YACE,MAAM,EAAE,+BAA+B;YACvC,QAAQ,EAAE,kEAAkE;YAC5E,SAAS,EAAE,82DAA82D;SAC13D;QACD;YACE,MAAM,EAAE,iBAAiB;YACzB,QAAQ,EAAE,kEAAkE;YAC5E,SAAS,EAAE,k/FAAk/F;SAC9/F;KACF;CACF,CAAC"}
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@somewhere-cloud/cli",
3
- "version": "0.38.114",
3
+ "version": "0.38.116",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@somewhere-cloud/cli",
9
- "version": "0.38.114",
9
+ "version": "0.38.116",
10
10
  "bundleDependencies": [
11
11
  "@modelcontextprotocol/sdk",
12
12
  "chokidar",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@somewhere-cloud/cli",
3
- "version": "0.38.114",
3
+ "version": "0.38.116",
4
4
  "description": "CLI for somewhere.cloud — auth, projects, deploy, pull, promote, db, logs, env, MCP bridge.",
5
5
  "keywords": [
6
6
  "somewhere",