unfazed 0.6.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/CHANGELOG.md +88 -0
  2. package/README.md +299 -78
  3. package/REFERENCE.md +284 -0
  4. package/dist/cli/login.d.ts +129 -0
  5. package/dist/cli/login.js +596 -0
  6. package/dist/cli/login.js.map +1 -0
  7. package/dist/cli/workflow.d.ts +31 -0
  8. package/dist/cli/workflow.js +157 -0
  9. package/dist/cli/workflow.js.map +1 -0
  10. package/dist/cli.d.ts +2 -0
  11. package/dist/cli.js +173 -0
  12. package/dist/cli.js.map +1 -0
  13. package/dist/client.d.ts +26 -5
  14. package/dist/client.js +93 -48
  15. package/dist/client.js.map +1 -1
  16. package/dist/credentials.d.ts +123 -0
  17. package/dist/credentials.js +317 -0
  18. package/dist/credentials.js.map +1 -0
  19. package/dist/errors.d.ts +64 -0
  20. package/dist/errors.js +95 -0
  21. package/dist/errors.js.map +1 -1
  22. package/dist/generated/gql.d.ts +78 -2
  23. package/dist/generated/gql.js +21 -2
  24. package/dist/generated/gql.js.map +1 -1
  25. package/dist/generated/graphql.d.ts +505 -6
  26. package/dist/generated/graphql.js +439 -2
  27. package/dist/generated/graphql.js.map +1 -1
  28. package/dist/index.d.ts +25 -6
  29. package/dist/index.js +23 -5
  30. package/dist/index.js.map +1 -1
  31. package/dist/operations.d.ts +116 -5
  32. package/dist/operations.js +379 -7
  33. package/dist/operations.js.map +1 -1
  34. package/dist/reference.d.ts +18 -0
  35. package/dist/reference.generated.d.ts +2 -0
  36. package/dist/reference.generated.js +5 -0
  37. package/dist/reference.generated.js.map +1 -0
  38. package/dist/reference.js +38 -0
  39. package/dist/reference.js.map +1 -0
  40. package/dist/remote/app.js +2 -1
  41. package/dist/remote/app.js.map +1 -1
  42. package/dist/remote/world.d.ts +2 -2
  43. package/dist/remote/world.js +32 -16
  44. package/dist/remote/world.js.map +1 -1
  45. package/dist/unfazed.d.ts +545 -68
  46. package/dist/unfazed.js +688 -64
  47. package/dist/unfazed.js.map +1 -1
  48. package/dist/wait.d.ts +7 -0
  49. package/dist/wait.js.map +1 -1
  50. package/dist/workflow/nitro.js +5 -3
  51. package/dist/workflow/nitro.js.map +1 -1
  52. package/package.json +22 -6
  53. package/schema/SOURCE.json +4 -4
  54. package/schema/schema.graphqls +1628 -30
package/CHANGELOG.md ADDED
@@ -0,0 +1,88 @@
1
+ # Changelog
2
+
3
+ ## 0.8.0
4
+
5
+ Fixes from a hands-on Code Mode test (2026-10-22), and the MCP tools the SDK
6
+ lacked. Needs the platform change that adds `writeWorkspaceFiles`,
7
+ `waitForDeployment`, the error and event queries and the new
8
+ `restoreAppVersion` fields; on an older platform `writeFiles` and the deploy
9
+ wait fall back to their 0.7 behaviour.
10
+
11
+ **Breaking**
12
+
13
+ - `writeFiles` returns a `WriteFilesResult` (`{ files, written, failed,
14
+ totalBytes, commit, commits, landed? }`) instead of `WorkspaceFile[]`, and a
15
+ file that fails throws `UnfazedWriteError` (its `result` and `failed`)
16
+ instead of `UnfazedGraphQLError`; `allowPartial: true` returns the result
17
+ instead. Its defaults are now 100 files and 32 MiB per request (were 20 and
18
+ 4 MiB).
19
+ - `getEvents` returns `DeploymentEvent[]` whose `type` is the event's own
20
+ dotted name (`"deployment.build_finished"`, `"service.vm_started"`), as MCP
21
+ shows it. The GraphQL enum moved to `typeEnum`; `rawType` stays, deprecated.
22
+
23
+ **Changed**
24
+
25
+ - `writeFiles` is ONE request and ONE commit on an app with platform git (the
26
+ `writeWorkspaceFiles` mutation MCP's `write_workspace_files` uses), with
27
+ `commitMessage`, and answers the commit: `sha`, `committed`, `waiting`,
28
+ `waitingCount`, `deploys`, `conflicts`, `writeSHA`, `paused`. A map over one
29
+ request's limits is several requests, one commit each. `writeFile` and
30
+ `writeBinaryFile` are one-file batches and answer the file with its
31
+ `commit`.
32
+ - `deployService/deployStatic/deployBox/deploy({ wait: true })` and
33
+ `waitForDeployment` wait server-side (MCP `wait_for_deployment`): READY comes
34
+ back one round trip after it happens, with the full deployment, no poll
35
+ interval and no re-read. The 9.0 s vs 6.8 s gap in the report was the old
36
+ 1 s × 1.5 poll backoff (READY seen at the 8.1 s poll) plus the full re-read.
37
+ The polling fallback starts at 0.5 s and caps at 3 s.
38
+ - A deploy with `wait: true` carries `timings`: `platform` (`totalMs`,
39
+ `buildMs`, `promoteMs`, every measured phase as numbers) and `client`
40
+ (`createMs`, `waitMs`, `totalMs`, `waitRequests`, `waitMode`).
41
+ `timings: false` skips the extra read.
42
+ - The platform holds at most 16 long waits of one account at once (and one
43
+ per GraphQL request). A deploy wait refused past that polls instead;
44
+ `waitForEvents` throws an error `isTooManyWaits` recognizes.
45
+
46
+ **Added**
47
+
48
+ - `help(topic?)` and `REFERENCE`: every method with its signature, in one
49
+ page (REFERENCE.md, shipped in the package).
50
+ - `waitForCommit(workspaceId)` and `writeFiles(…, { waitForCommit })`; the
51
+ saved / committed / deployed states are documented.
52
+ - History: `listCommits`, `getCommit`, `restoreVersion` (with `wait: true` it
53
+ follows the import the restore queues to its READY deployments).
54
+ - Errors: `listErrors`, `getErrorGroup`, `resolveErrorGroup`,
55
+ `muteErrorGroup`, `reopenErrorGroup`.
56
+ - Events: `listEventTypes`, `pollEvents`, `waitForEvents`.
57
+ - `getDeploymentTimings(id)` and `parseDeploymentTimings(events)`.
58
+
59
+ ## 0.7.0
60
+
61
+ `deleteApp`, and `deleteWorkspace` names every app it takes offline
62
+ (`confirmAliases`, `liveApps`).
63
+
64
+ ## 0.6.1
65
+
66
+ `npx unfazed login`, and the SDK uses the stored login.
67
+
68
+ ## 0.6.0
69
+
70
+ `unfazed/workflow`: the unfazed World for Workflow SDK; `--backend unfazed`
71
+ for Workflow SDK's CLI.
72
+
73
+ ## 0.5.0
74
+
75
+ Runs: access mode, app alias, integrations on a run, `listRunHarnesses`.
76
+
77
+ ## 0.4.0
78
+
79
+ Runs: `verify` commands and the harness result.
80
+
81
+ ## 0.3.0
82
+
83
+ Agent runs.
84
+
85
+ ## 0.2.0
86
+
87
+ `ensureWorkspace`, `ignoreNotFound`; `deleteWorkspace` fixed; a harder
88
+ `rollback`.