unfazed 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +80 -0
- package/README.md +93 -5
- package/REFERENCE.md +72 -13
- package/dist/cli/login.d.ts +1 -1
- package/dist/client.d.ts +21 -1
- package/dist/client.js +12 -4
- package/dist/client.js.map +1 -1
- package/dist/errors.d.ts +49 -0
- package/dist/errors.js +25 -0
- package/dist/errors.js.map +1 -1
- package/dist/generated/gql.d.ts +14 -2
- package/dist/generated/gql.js +5 -2
- package/dist/generated/gql.js.map +1 -1
- package/dist/generated/graphql.d.ts +82 -1
- package/dist/generated/graphql.js +87 -1
- package/dist/generated/graphql.js.map +1 -1
- package/dist/index.d.ts +17 -3
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/dist/oidc.d.ts +161 -0
- package/dist/oidc.js +391 -0
- package/dist/oidc.js.map +1 -0
- package/dist/operations.d.ts +29 -1
- package/dist/operations.js +70 -1
- package/dist/operations.js.map +1 -1
- package/dist/reference.generated.js +1 -1
- package/dist/reference.generated.js.map +1 -1
- package/dist/reference.js +3 -3
- package/dist/reference.js.map +1 -1
- package/dist/unfazed.d.ts +84 -19
- package/dist/unfazed.js +249 -54
- package/dist/unfazed.js.map +1 -1
- package/package.json +1 -1
- package/schema/SOURCE.json +3 -3
- package/schema/schema.graphqls +81 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unfazed",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Official TypeScript SDK for unfazed. The code-mode companion to the unfazed MCP server: deploy, wait, tail logs and roll back from one script. `npx unfazed login` signs you in. Also ships the unfazed World for Workflow SDK (unfazed/workflow).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
package/schema/SOURCE.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"$comment": "Provenance for the vendored copy of graph/schema.graphqls. Written by scripts/sync-schema.ts — do not edit by hand.",
|
|
3
3
|
"repo": "unfazed",
|
|
4
4
|
"path": "graph/schema.graphqls",
|
|
5
|
-
"unfazedCommit": "
|
|
6
|
-
"schemaLastChangedCommit": "
|
|
7
|
-
"sha256": "
|
|
5
|
+
"unfazedCommit": "4be6045659d43d6db4278279a18629473c6d900d",
|
|
6
|
+
"schemaLastChangedCommit": "8df8b4663f02c5f71ad0179d90bc3113ee5f4962",
|
|
7
|
+
"sha256": "634b949697e8845b5ec43d97cc97f17a283a140d4e9d01079d317a4c118b1b64",
|
|
8
8
|
"syncedAt": "2026-10-22"
|
|
9
9
|
}
|
package/schema/schema.graphqls
CHANGED
|
@@ -598,6 +598,8 @@ type Deployment {
|
|
|
598
598
|
gitRepo: String
|
|
599
599
|
gitCommit: String
|
|
600
600
|
createdAt: String!
|
|
601
|
+
"The deploy's measured timeline; null before its build finished, and for deployments from before it was recorded."
|
|
602
|
+
timings: DeploymentTimings
|
|
601
603
|
"""
|
|
602
604
|
The runtime target serving this exact current deployment: an enrolled worker
|
|
603
605
|
or the control plane. Null for historical releases and residual legacy
|
|
@@ -638,9 +640,31 @@ type DeploymentEvent {
|
|
|
638
640
|
message: String!
|
|
639
641
|
vmID: String
|
|
640
642
|
metadata: JSON
|
|
643
|
+
"The phases a timing event (deployment.build_finished, deployment.phases) measured, as numbers; null for any other event."
|
|
644
|
+
timings: DeploymentTimings
|
|
641
645
|
createdAt: String!
|
|
642
646
|
}
|
|
643
647
|
|
|
648
|
+
"""
|
|
649
|
+
A deploy's measured timeline in milliseconds: what its
|
|
650
|
+
deployment.build_finished and deployment.phases events record (the latest of
|
|
651
|
+
each, the READY summary over the build's), as the SDK's
|
|
652
|
+
parseDeploymentTimings reads them.
|
|
653
|
+
"""
|
|
654
|
+
type DeploymentTimings {
|
|
655
|
+
"From the deployment's start until it was READY; null before READY."
|
|
656
|
+
totalMs: Int
|
|
657
|
+
"The build's wall time."
|
|
658
|
+
buildMs: Int
|
|
659
|
+
"The promotion's wall time."
|
|
660
|
+
promoteMs: Int
|
|
661
|
+
"The other measured phases, name to milliseconds: the build VM's (vm_install, vm_build, ...) and the promotion's own (admission, ...)."
|
|
662
|
+
phases: JSON!
|
|
663
|
+
buildMode: String
|
|
664
|
+
artifactTransport: String
|
|
665
|
+
buildMemoryMiB: Int
|
|
666
|
+
}
|
|
667
|
+
|
|
644
668
|
type ServiceRuntimeStatus {
|
|
645
669
|
deploymentID: ID!
|
|
646
670
|
alias: String
|
|
@@ -664,6 +688,30 @@ type ServiceRuntimeStatus {
|
|
|
664
688
|
crashes: ServiceCrashes
|
|
665
689
|
"True when the app's server tracks its crashes, so a null crashes means none; false for a server runtime that predates crash tracking, and for boxes."
|
|
666
690
|
crashesTracked: Boolean!
|
|
691
|
+
"The deployment's measured deploy timeline (MCP get_service_status timings)."
|
|
692
|
+
timings: DeploymentTimings
|
|
693
|
+
"Set when the alias no longer runs this release (or never did); health is then superseded (failed for an attempt that never went live) unless this release still serves by its own preview URL."
|
|
694
|
+
notLive: ReleaseNotLive
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
"""
|
|
698
|
+
A release its alias does not run: a deploy or rollback replaced it, the
|
|
699
|
+
release that did was deleted, or it failed before it went live. Nothing runs
|
|
700
|
+
it for its app, so retrying a read never changes that; a rollback makes it
|
|
701
|
+
live again.
|
|
702
|
+
"""
|
|
703
|
+
type ReleaseNotLive {
|
|
704
|
+
alias: String!
|
|
705
|
+
"The release the alias runs now; null when it runs none, or one the caller may not see."
|
|
706
|
+
liveDeploymentID: ID
|
|
707
|
+
"When that release took the alias."
|
|
708
|
+
liveSince: String
|
|
709
|
+
"When this release stopped serving the alias; null for an attempt that never went live."
|
|
710
|
+
replacedAt: String
|
|
711
|
+
"True for an attempt that failed before it went live."
|
|
712
|
+
neverLive: Boolean!
|
|
713
|
+
"All of the above in one sentence."
|
|
714
|
+
message: String!
|
|
667
715
|
}
|
|
668
716
|
|
|
669
717
|
"Recent crashes of a service on the server that runs it."
|
|
@@ -703,6 +751,8 @@ type ServiceRuntimeLogs {
|
|
|
703
751
|
stdoutBytes: Int!
|
|
704
752
|
stderrBytes: Int!
|
|
705
753
|
tailBytes: Int!
|
|
754
|
+
"Set when the alias no longer runs this release (or never did): the logs are whatever is still held for it, often none."
|
|
755
|
+
notLive: ReleaseNotLive
|
|
706
756
|
}
|
|
707
757
|
|
|
708
758
|
type AppStateValue {
|
|
@@ -2125,6 +2175,8 @@ type FileCommit {
|
|
|
2125
2175
|
waiting: Boolean!
|
|
2126
2176
|
"The app's commits waiting, while this one does."
|
|
2127
2177
|
waitingCount: Int!
|
|
2178
|
+
"While waiting, the commit's place in the app's commit queue: it has landed once AppCommitPage.waitingCommits is 0, or AppCommitPage.landedSeq reaches it."
|
|
2179
|
+
queueSeq: Int
|
|
2128
2180
|
"Whether the branch head, this write included, is imported and deployed like a push."
|
|
2129
2181
|
deploys: Boolean!
|
|
2130
2182
|
"Paths a push changed too since the write was made: the head keeps the pushed version (sha is the merge). Empty otherwise."
|
|
@@ -2637,6 +2689,8 @@ type AppCommitPage {
|
|
|
2637
2689
|
waitingCommits: Int!
|
|
2638
2690
|
"When the oldest waiting write was made (RFC3339); null when none waits."
|
|
2639
2691
|
waitingSince: String
|
|
2692
|
+
"While writes wait, the queue seq of the commit that last landed: a write whose FileCommit.queueSeq is at most this one is done. Null when none landed since the queue was last empty."
|
|
2693
|
+
landedSeq: Int
|
|
2640
2694
|
"The commit every live alias of the app runs, whether or not it is on this page."
|
|
2641
2695
|
deployed: [AppDeployedCommit!]!
|
|
2642
2696
|
}
|
|
@@ -2725,9 +2779,11 @@ type RestoreAppVersionPayload {
|
|
|
2725
2779
|
"The new commit; with committed false, the head that already holds that version."
|
|
2726
2780
|
sha: String!
|
|
2727
2781
|
committed: Boolean!
|
|
2728
|
-
"Whether the new commit is deployed like a push. The deploy is an import queued behind the restore
|
|
2782
|
+
"Whether the new commit is deployed like a push. The deploy is an import queued behind the restore, with no deployment id yet: waitForDeployment(workspaceID, gitCommit: sha, alias: deployAlias, after: waitAfter) waits for it."
|
|
2729
2783
|
deploys: Boolean!
|
|
2730
2784
|
message: String!
|
|
2785
|
+
"The workspace restored."
|
|
2786
|
+
workspaceID: ID!
|
|
2731
2787
|
"The app's branch."
|
|
2732
2788
|
branch: String!
|
|
2733
2789
|
"The alias a push deploys to, when the link names one; null otherwise (unfazed.json apps[] deploys each of its aliases)."
|
|
@@ -2736,6 +2792,8 @@ type RestoreAppVersionPayload {
|
|
|
2736
2792
|
restoredFrom: String!
|
|
2737
2793
|
"The branch head the new commit was made on; null with committed false."
|
|
2738
2794
|
parent: String
|
|
2795
|
+
"Where the platform's deployment order stood when the restore began: waitForDeployment's after, so an earlier deploy of the same files never answers. A place in that order, not a time, so a clock change cannot hide the restore's deploy."
|
|
2796
|
+
waitAfter: Int!
|
|
2739
2797
|
}
|
|
2740
2798
|
|
|
2741
2799
|
enum WorkflowRunStatus { PENDING RUNNING COMPLETED FAILED CANCELLED }
|
|
@@ -2975,8 +3033,14 @@ type WriteWorkspaceFilesPayload {
|
|
|
2975
3033
|
|
|
2976
3034
|
"What waitForDeployment read when it stopped waiting (MCP wait_for_deployment)."
|
|
2977
3035
|
type DeploymentWaitPayload {
|
|
2978
|
-
"The deployment as the wait left it."
|
|
2979
|
-
deployment: Deployment
|
|
3036
|
+
"The deployment as the wait left it; null only when waiting by gitCommit before the import made it."
|
|
3037
|
+
deployment: Deployment
|
|
3038
|
+
"The deployment's status; waiting by gitCommit before the import made it, IMPORTING, or FAILED once the import failed on the commit."
|
|
3039
|
+
status: String!
|
|
3040
|
+
"Waiting by gitCommit: the workspace's latest git import, IMPORTING, READY or FAILED."
|
|
3041
|
+
importStatus: String
|
|
3042
|
+
"Waiting by gitCommit: that import's error, from the git provider and the build — untrusted text."
|
|
3043
|
+
importError: String
|
|
2980
3044
|
"True when the budget, or a server restart, ended the wait first: deployment is the current, unfinished state. Not an error: call again to keep waiting."
|
|
2981
3045
|
timedOut: Boolean!
|
|
2982
3046
|
"How long the server waited, in milliseconds."
|
|
@@ -3104,8 +3168,20 @@ type PlatformEventPage {
|
|
|
3104
3168
|
}
|
|
3105
3169
|
|
|
3106
3170
|
extend type Query {
|
|
3107
|
-
"
|
|
3108
|
-
|
|
3171
|
+
"""
|
|
3172
|
+
Block until a deployment leaves BUILDING (and a new app's direct landing
|
|
3173
|
+
ends) or timeoutSeconds pass (default 45, at most 50), then return it — the
|
|
3174
|
+
server-side wait of MCP wait_for_deployment (the same wait), woken by the
|
|
3175
|
+
deploy pipeline itself, so a client never polls. A timeout is not an error:
|
|
3176
|
+
timedOut is true and the deployment is the current state; call again to keep
|
|
3177
|
+
waiting. Give id, or workspaceID with gitCommit for the deploy a git import
|
|
3178
|
+
makes of that commit (a restore, a push or a sync deploys before any id
|
|
3179
|
+
exists): it waits for the import to make it, then for it, within the same
|
|
3180
|
+
budget. alias is required when several apps deployed the commit; after
|
|
3181
|
+
(RestoreAppVersionPayload.waitAfter) counts only deployments begun after it,
|
|
3182
|
+
so an earlier deploy of the same commit never answers.
|
|
3183
|
+
"""
|
|
3184
|
+
waitForDeployment(id: ID, workspaceID: ID, gitCommit: String, alias: String, after: Int, timeoutSeconds: Int): DeploymentWaitPayload!
|
|
3109
3185
|
"A service app's error groups, most recently seen first (MCP list_errors). status: open, resolved or muted (default all); limit 1 to 100 (default 20); cursor is the previous page's nextCursor."
|
|
3110
3186
|
appErrors(workspaceID: ID!, alias: String!, status: String, limit: Int, cursor: String): AppErrorGroupPage!
|
|
3111
3187
|
"One error group of a service app with its latest occurrence, recent occurrences and the deployments it was seen in (MCP get_error_group)."
|