unfazed 0.1.0 → 0.3.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/README.md +166 -6
- package/dist/client.d.ts +1 -1
- package/dist/client.js +1 -1
- package/dist/client.js.map +1 -1
- package/dist/errors.d.ts +41 -0
- package/dist/errors.js +63 -0
- package/dist/errors.js.map +1 -1
- package/dist/generated/gql.d.ts +45 -1
- package/dist/generated/gql.js +12 -1
- package/dist/generated/gql.js.map +1 -1
- package/dist/generated/graphql.d.ts +396 -0
- package/dist/generated/graphql.js +351 -2
- package/dist/generated/graphql.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/operations.d.ts +52 -0
- package/dist/operations.js +159 -2
- package/dist/operations.js.map +1 -1
- package/dist/unfazed.d.ts +452 -11
- package/dist/unfazed.js +445 -18
- package/dist/unfazed.js.map +1 -1
- package/package.json +1 -1
- package/schema/SOURCE.json +4 -4
- package/schema/schema.graphqls +178 -0
package/dist/operations.d.ts
CHANGED
|
@@ -15,8 +15,18 @@ export declare const CreateWorkspaceDocument: import("./index.js").TypedDocument
|
|
|
15
15
|
export declare const ListWorkspacesDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkListWorkspacesQuery, {
|
|
16
16
|
[x: string]: never;
|
|
17
17
|
}>;
|
|
18
|
+
/**
|
|
19
|
+
* Deleting a workspace, with the deployment cascade made explicit.
|
|
20
|
+
*
|
|
21
|
+
* `withDeployments` is not decoration: without it the server REFUSES while the
|
|
22
|
+
* workspace has any deployment history at all — including FAILED records —
|
|
23
|
+
* with `workspace %q still has deployments; delete them first`. A workspace
|
|
24
|
+
* that was ever deployed is therefore undeletable through the bare mutation,
|
|
25
|
+
* so the SDK always sends the flag and lets the caller choose the value.
|
|
26
|
+
*/
|
|
18
27
|
export declare const DeleteWorkspaceDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkDeleteWorkspaceMutation, {
|
|
19
28
|
workspaceID: string | number;
|
|
29
|
+
withDeployments?: boolean | null | undefined | undefined;
|
|
20
30
|
}>;
|
|
21
31
|
export declare const WriteTextFileDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkWriteTextFileMutation, {
|
|
22
32
|
workspaceID: string | number;
|
|
@@ -134,3 +144,45 @@ export declare const ListAppEnvDocument: import("./index.js").TypedDocumentStrin
|
|
|
134
144
|
workspaceID: string | number;
|
|
135
145
|
alias: string;
|
|
136
146
|
}>;
|
|
147
|
+
/** Run fields the SDK returns everywhere. */
|
|
148
|
+
export declare const RunFieldsFragment: import("./index.js").TypedDocumentString<import("./index.js").RunFieldsFragment, unknown>;
|
|
149
|
+
export declare const CreateRunDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkCreateRunMutation, {
|
|
150
|
+
input: import("./index.js").CreateRunInput;
|
|
151
|
+
}>;
|
|
152
|
+
export declare const GetRunDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkGetRunQuery, {
|
|
153
|
+
id: string | number;
|
|
154
|
+
}>;
|
|
155
|
+
/**
|
|
156
|
+
* The poll document, deliberately narrow — see {@link PollDeploymentDocument}
|
|
157
|
+
* for why: this runs every few seconds for potentially up to an hour.
|
|
158
|
+
*/
|
|
159
|
+
export declare const PollRunDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkPollRunQuery, {
|
|
160
|
+
id: string | number;
|
|
161
|
+
}>;
|
|
162
|
+
export declare const ListRunsDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkListRunsQuery, {
|
|
163
|
+
input?: import("./index.js").ListRunsInput | null | undefined;
|
|
164
|
+
}>;
|
|
165
|
+
export declare const CancelRunDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkCancelRunMutation, {
|
|
166
|
+
id: string | number;
|
|
167
|
+
}>;
|
|
168
|
+
export declare const RunEventsDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkRunEventsQuery, {
|
|
169
|
+
runID: string | number;
|
|
170
|
+
limit?: number | null | undefined | undefined;
|
|
171
|
+
}>;
|
|
172
|
+
/** The live console tail of a RUNNING run. Empty with `running: false` once settled. */
|
|
173
|
+
export declare const RunConsoleDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkRunConsoleQuery, {
|
|
174
|
+
id: string | number;
|
|
175
|
+
tailBytes?: number | null | undefined | undefined;
|
|
176
|
+
}>;
|
|
177
|
+
/** The bounded end of a finished run's stored transcript. */
|
|
178
|
+
export declare const RunTranscriptDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkRunTranscriptQuery, {
|
|
179
|
+
id: string | number;
|
|
180
|
+
tailBytes?: number | null | undefined | undefined;
|
|
181
|
+
}>;
|
|
182
|
+
export declare const AnswerRunDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkAnswerRunMutation, {
|
|
183
|
+
id: string | number;
|
|
184
|
+
answer: string;
|
|
185
|
+
}>;
|
|
186
|
+
export declare const FollowUpRunDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkFollowUpRunMutation, {
|
|
187
|
+
input: import("./index.js").FollowUpRunInput;
|
|
188
|
+
}>;
|
package/dist/operations.js
CHANGED
|
@@ -97,9 +97,18 @@ export const ListWorkspacesDocument = graphql(`
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
`);
|
|
100
|
+
/**
|
|
101
|
+
* Deleting a workspace, with the deployment cascade made explicit.
|
|
102
|
+
*
|
|
103
|
+
* `withDeployments` is not decoration: without it the server REFUSES while the
|
|
104
|
+
* workspace has any deployment history at all — including FAILED records —
|
|
105
|
+
* with `workspace %q still has deployments; delete them first`. A workspace
|
|
106
|
+
* that was ever deployed is therefore undeletable through the bare mutation,
|
|
107
|
+
* so the SDK always sends the flag and lets the caller choose the value.
|
|
108
|
+
*/
|
|
100
109
|
export const DeleteWorkspaceDocument = graphql(`
|
|
101
|
-
mutation SdkDeleteWorkspace($workspaceID: ID
|
|
102
|
-
deleteWorkspace(input: { workspaceID: $workspaceID }) {
|
|
110
|
+
mutation SdkDeleteWorkspace($workspaceID: ID!, $withDeployments: Boolean) {
|
|
111
|
+
deleteWorkspace(input: { workspaceID: $workspaceID, withDeployments: $withDeployments }) {
|
|
103
112
|
ok
|
|
104
113
|
}
|
|
105
114
|
}
|
|
@@ -458,4 +467,152 @@ export const ListAppEnvDocument = graphql(`
|
|
|
458
467
|
}
|
|
459
468
|
}
|
|
460
469
|
`);
|
|
470
|
+
/* -------------------------------------------------------------------------
|
|
471
|
+
* Agent runs
|
|
472
|
+
*
|
|
473
|
+
* A run is the past-tense counterpart to a deployment: "boot a fresh VM,
|
|
474
|
+
* hand it a prompt, let a harness work, keep the transcript, record what it
|
|
475
|
+
* cost, reap the VM". `createRun` returns once the VM has started
|
|
476
|
+
* (RUNNING) or FAILED with `error` when it could not boot — unlike
|
|
477
|
+
* `createDeployment`, a FAILED run is a normal return value, not something
|
|
478
|
+
* that only shows up later in a poll.
|
|
479
|
+
* ---------------------------------------------------------------------- */
|
|
480
|
+
/** Run fields the SDK returns everywhere. */
|
|
481
|
+
export const RunFieldsFragment = graphql(`
|
|
482
|
+
fragment RunFields on Run {
|
|
483
|
+
id
|
|
484
|
+
workspaceID
|
|
485
|
+
ownerId
|
|
486
|
+
status
|
|
487
|
+
rawStatus
|
|
488
|
+
command
|
|
489
|
+
harness
|
|
490
|
+
prompt
|
|
491
|
+
setup
|
|
492
|
+
skills
|
|
493
|
+
approval
|
|
494
|
+
mode
|
|
495
|
+
parentRunID
|
|
496
|
+
depth
|
|
497
|
+
question {
|
|
498
|
+
id
|
|
499
|
+
text
|
|
500
|
+
options
|
|
501
|
+
askedAt
|
|
502
|
+
}
|
|
503
|
+
memoryMiB
|
|
504
|
+
maxSeconds
|
|
505
|
+
metadata
|
|
506
|
+
error
|
|
507
|
+
exitCode
|
|
508
|
+
vmID
|
|
509
|
+
transcriptAvailable
|
|
510
|
+
usage {
|
|
511
|
+
vmSeconds
|
|
512
|
+
memoryMiB
|
|
513
|
+
mibSeconds
|
|
514
|
+
}
|
|
515
|
+
createdAt
|
|
516
|
+
startedAt
|
|
517
|
+
settledAt
|
|
518
|
+
}
|
|
519
|
+
`);
|
|
520
|
+
export const CreateRunDocument = graphql(`
|
|
521
|
+
mutation SdkCreateRun($input: CreateRunInput!) {
|
|
522
|
+
createRun(input: $input) {
|
|
523
|
+
...RunFields
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
`);
|
|
527
|
+
export const GetRunDocument = graphql(`
|
|
528
|
+
query SdkGetRun($id: ID!) {
|
|
529
|
+
run(id: $id) {
|
|
530
|
+
...RunFields
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
`);
|
|
534
|
+
/**
|
|
535
|
+
* The poll document, deliberately narrow — see {@link PollDeploymentDocument}
|
|
536
|
+
* for why: this runs every few seconds for potentially up to an hour.
|
|
537
|
+
*/
|
|
538
|
+
export const PollRunDocument = graphql(`
|
|
539
|
+
query SdkPollRun($id: ID!) {
|
|
540
|
+
run(id: $id) {
|
|
541
|
+
id
|
|
542
|
+
status
|
|
543
|
+
error
|
|
544
|
+
exitCode
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
`);
|
|
548
|
+
export const ListRunsDocument = graphql(`
|
|
549
|
+
query SdkListRuns($input: ListRunsInput) {
|
|
550
|
+
runs(input: $input) {
|
|
551
|
+
items {
|
|
552
|
+
...RunFields
|
|
553
|
+
}
|
|
554
|
+
total
|
|
555
|
+
limit
|
|
556
|
+
offset
|
|
557
|
+
hasMore
|
|
558
|
+
nextOffset
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
`);
|
|
562
|
+
export const CancelRunDocument = graphql(`
|
|
563
|
+
mutation SdkCancelRun($id: ID!) {
|
|
564
|
+
cancelRun(id: $id) {
|
|
565
|
+
...RunFields
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
`);
|
|
569
|
+
export const RunEventsDocument = graphql(`
|
|
570
|
+
query SdkRunEvents($runID: ID!, $limit: Int) {
|
|
571
|
+
runEvents(runID: $runID, limit: $limit) {
|
|
572
|
+
id
|
|
573
|
+
runID
|
|
574
|
+
type
|
|
575
|
+
severity
|
|
576
|
+
message
|
|
577
|
+
metadata
|
|
578
|
+
createdAt
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
`);
|
|
582
|
+
/** The live console tail of a RUNNING run. Empty with `running: false` once settled. */
|
|
583
|
+
export const RunConsoleDocument = graphql(`
|
|
584
|
+
query SdkRunConsole($id: ID!, $tailBytes: Int) {
|
|
585
|
+
runConsole(id: $id, tailBytes: $tailBytes) {
|
|
586
|
+
runID
|
|
587
|
+
running
|
|
588
|
+
text
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
`);
|
|
592
|
+
/** The bounded end of a finished run's stored transcript. */
|
|
593
|
+
export const RunTranscriptDocument = graphql(`
|
|
594
|
+
query SdkRunTranscript($id: ID!, $tailBytes: Int) {
|
|
595
|
+
runTranscript(id: $id, tailBytes: $tailBytes) {
|
|
596
|
+
runID
|
|
597
|
+
available
|
|
598
|
+
text
|
|
599
|
+
totalBytes
|
|
600
|
+
truncated
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
`);
|
|
604
|
+
export const AnswerRunDocument = graphql(`
|
|
605
|
+
mutation SdkAnswerRun($id: ID!, $answer: String!) {
|
|
606
|
+
answerRun(id: $id, answer: $answer) {
|
|
607
|
+
...RunFields
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
`);
|
|
611
|
+
export const FollowUpRunDocument = graphql(`
|
|
612
|
+
mutation SdkFollowUpRun($input: FollowUpRunInput!) {
|
|
613
|
+
followUpRun(input: $input) {
|
|
614
|
+
...RunFields
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
`);
|
|
461
618
|
//# sourceMappingURL=operations.js.map
|
package/dist/operations.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG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AAM,iBAAiB,GAAG,OAAO,CAAC;;;;;;;;;;;;;;CAcxC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAO,CAAC;;;;;;;;;;;;;;CAc3C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAO,CAAC;;;;;;CAM3C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,OAAO,CAAC;;;;;;CAM5C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,OAAO,CAAC;;;;;;;;;;;;CAYzC,CAAC,CAAC","sourcesContent":["/**\n * Every GraphQL document the workflow layer sends.\n *\n * These are wrapped in `graphql(...)` so graphql-codegen validates them\n * against the vendored schema at codegen time and emits exact result/variable\n * types. A field that stops existing server-side turns into a compile error\n * here rather than a runtime surprise in an agent's script.\n *\n * The one document NOT defined here is the batched file write: it has a\n * variable number of aliased root fields, so it is assembled at runtime in\n * `unfazed.ts`. See the comment there.\n */\nimport { graphql } from \"./generated/gql.js\";\n\n/**\n * Deployment fields the SDK returns everywhere.\n *\n * `id` + `aliasRevision` + `aliasHeld` are the rollback compare-and-swap\n * triple; `previewUrl` is the immutable by-id URL you can verify BEFORE the\n * alias moves; `error` carries the build failure text when status is FAILED.\n */\nexport const DeploymentFieldsFragment = graphql(`\n fragment DeploymentFields on Deployment {\n id\n workspaceID\n kind\n runtime\n alias\n serviceMode\n healthPath\n cronSchedule\n cronPath\n url\n previewUrl\n sshCommand\n aliasHeld\n aliasRevision\n status\n error\n filesCount\n sizeBytes\n size\n spaMode\n gitRepo\n gitCommit\n createdAt\n }\n`);\n\nexport const WhoamiDocument = graphql(`\n query SdkWhoami {\n whoami {\n kind\n userID\n name\n agentID\n agentName\n claimed\n claimedBy\n scopes\n expiresAt\n usage {\n month\n requests\n limit\n }\n resources {\n workspaces\n workspaceLimit\n services\n serviceLimit\n }\n }\n }\n`);\n\nexport const CreateWorkspaceDocument = graphql(`\n mutation SdkCreateWorkspace($name: String!) {\n createWorkspace(input: { name: $name }) {\n workspace {\n id\n name\n ownerId\n projectId\n createdAt\n updatedAt\n }\n }\n }\n`);\n\nexport const ListWorkspacesDocument = graphql(`\n query SdkListWorkspaces {\n workspaces {\n id\n name\n ownerId\n projectId\n createdAt\n updatedAt\n }\n }\n`);\n\nexport const DeleteWorkspaceDocument = graphql(`\n mutation SdkDeleteWorkspace($workspaceID: ID!) {\n deleteWorkspace(input: { workspaceID: $workspaceID }) {\n ok\n }\n }\n`);\n\nexport const WriteTextFileDocument = graphql(`\n mutation SdkWriteTextFile($workspaceID: ID!, $path: String!, $text: String!) {\n writeWorkspaceTextFile(input: { workspaceID: $workspaceID, path: $path, text: $text }) {\n file {\n path\n sizeBytes\n size\n sha256\n updatedAt\n }\n }\n }\n`);\n\nexport const WriteBase64FileDocument = graphql(`\n mutation SdkWriteBase64File($workspaceID: ID!, $path: String!, $contentBase64: String!) {\n writeWorkspaceBase64File(\n input: { workspaceID: $workspaceID, path: $path, contentBase64: $contentBase64 }\n ) {\n file {\n path\n sizeBytes\n size\n sha256\n updatedAt\n }\n }\n }\n`);\n\nexport const ListFilesDocument = graphql(`\n query SdkListFiles($input: ListWorkspaceFilesInput!) {\n workspaceFilesPage(input: $input) {\n items {\n path\n sizeBytes\n size\n sha256\n updatedAt\n }\n total\n limit\n offset\n hasMore\n nextOffset\n }\n }\n`);\n\nexport const ReadFileDocument = graphql(`\n query SdkReadFile($input: ReadWorkspaceFileInput!) {\n readWorkspaceFile(input: $input) {\n text\n offset\n limit\n totalBytes\n truncated\n nextOffset\n file {\n path\n sizeBytes\n size\n sha256\n updatedAt\n }\n }\n }\n`);\n\nexport const DeleteFileDocument = graphql(`\n mutation SdkDeleteFile($workspaceID: ID!, $path: String!) {\n deleteWorkspaceFile(input: { workspaceID: $workspaceID, path: $path }) {\n ok\n }\n }\n`);\n\nexport const CreateDeploymentDocument = graphql(`\n mutation SdkCreateDeployment($input: CreateDeploymentInput!) {\n createDeployment(input: $input) {\n deployment {\n ...DeploymentFields\n }\n }\n }\n`);\n\nexport const DeployWorkspaceDocument = graphql(`\n mutation SdkDeployWorkspace($input: DeployWorkspaceInput!) {\n deployWorkspace(input: $input) {\n deployment {\n ...DeploymentFields\n }\n }\n }\n`);\n\nexport const GetDeploymentDocument = graphql(`\n query SdkGetDeployment($id: ID!) {\n deployment(id: $id) {\n ...DeploymentFields\n }\n }\n`);\n\n/**\n * The poll document, deliberately narrow.\n *\n * Waiting can run for minutes at a few seconds per tick; selecting the full\n * fragment every time would cost the server (and an agent's rate limit) far\n * more than the four fields the state machine actually reads.\n */\nexport const PollDeploymentDocument = graphql(`\n query SdkPollDeployment($id: ID!) {\n deployment(id: $id) {\n id\n status\n error\n aliasHeld\n url\n previewUrl\n }\n }\n`);\n\nexport const GetDeploymentByAliasDocument = graphql(`\n query SdkGetDeploymentByAlias($alias: String!) {\n deploymentByAlias(alias: $alias) {\n ...DeploymentFields\n }\n }\n`);\n\nexport const ListDeploymentsDocument = graphql(`\n query SdkListDeployments($input: ListDeploymentsInput) {\n deploymentsPage(input: $input) {\n items {\n ...DeploymentFields\n }\n total\n limit\n offset\n hasMore\n nextOffset\n }\n }\n`);\n\nexport const ListReleasesDocument = graphql(`\n query SdkListReleases($alias: String!) {\n deploymentReleases(alias: $alias) {\n ...DeploymentFields\n }\n }\n`);\n\nexport const RollbackDocument = graphql(`\n mutation SdkRollback(\n $deploymentID: ID!\n $expectedCurrentDeploymentID: ID!\n $expectedCurrentAliasRevision: String!\n ) {\n rollbackDeployment(\n input: {\n deploymentID: $deploymentID\n expectedCurrentDeploymentID: $expectedCurrentDeploymentID\n expectedCurrentAliasRevision: $expectedCurrentAliasRevision\n }\n ) {\n ...DeploymentFields\n }\n }\n`);\n\nexport const ServiceStatusDocument = graphql(`\n query SdkServiceStatus($deploymentID: ID!) {\n serviceStatus(deploymentID: $deploymentID) {\n deploymentID\n alias\n serviceMode\n running\n health\n vmID\n inFlight\n alwaysOn\n memSizeMiB\n startedAt\n lastUsedAt\n lastStoppedAt\n restartCount\n lastError\n }\n }\n`);\n\nexport const ServiceLogsDocument = graphql(`\n query SdkServiceLogs($deploymentID: ID!, $tailBytes: Int) {\n serviceLogs(deploymentID: $deploymentID, tailBytes: $tailBytes) {\n deploymentID\n stdout\n stderr\n truncated\n stdoutBytes\n stderrBytes\n tailBytes\n }\n }\n`);\n\nexport const DeploymentEventsDocument = graphql(`\n query SdkDeploymentEvents($deploymentID: ID!, $limit: Int) {\n deploymentEvents(deploymentID: $deploymentID, limit: $limit) {\n id\n deploymentID\n type\n rawType\n severity\n message\n vmID\n createdAt\n }\n }\n`);\n\nexport const RestartServiceDocument = graphql(`\n mutation SdkRestartService($deploymentID: ID!) {\n restartService(input: { deploymentID: $deploymentID }) {\n deploymentID\n running\n health\n vmID\n restartCount\n lastError\n }\n }\n`);\n\nexport const StopServiceDocument = graphql(`\n mutation SdkStopService($deploymentID: ID!) {\n stopService(input: { deploymentID: $deploymentID }) {\n deploymentID\n running\n health\n vmID\n restartCount\n lastError\n }\n }\n`);\n\nexport const DeleteDeploymentDocument = graphql(`\n mutation SdkDeleteDeployment($deploymentID: ID!) {\n deleteDeployment(input: { deploymentID: $deploymentID }) {\n ok\n }\n }\n`);\n\n/* -------------------------------------------------------------------------\n * Env & secrets\n *\n * Workspace-scoped values are SERVICE defaults for every app in the source;\n * app-scoped values override them for one alias. Both are snapshotted into a\n * release at deploy time, so a change only reaches a running app after a\n * redeploy — the workflow layer's doc comments repeat this where it matters.\n * ---------------------------------------------------------------------- */\n\nexport const SetWorkspaceEnvDocument = graphql(`\n mutation SdkSetWorkspaceEnv($workspaceID: ID!, $name: String!, $value: String!) {\n setWorkspaceEnv(input: { workspaceID: $workspaceID, name: $name, value: $value }) {\n env {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n }\n`);\n\nexport const SetWorkspaceSecretDocument = graphql(`\n mutation SdkSetWorkspaceSecret($workspaceID: ID!, $name: String!, $value: String!) {\n setWorkspaceSecret(input: { workspaceID: $workspaceID, name: $name, value: $value }) {\n env {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n }\n`);\n\nexport const DeleteWorkspaceEnvDocument = graphql(`\n mutation SdkDeleteWorkspaceEnv($workspaceID: ID!, $name: String!) {\n deleteWorkspaceEnv(input: { workspaceID: $workspaceID, name: $name }) {\n ok\n }\n }\n`);\n\nexport const ListWorkspaceEnvDocument = graphql(`\n query SdkListWorkspaceEnv($workspaceID: ID!) {\n workspaceEnv(workspaceID: $workspaceID) {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n`);\n\nexport const SetAppEnvDocument = graphql(`\n mutation SdkSetAppEnv($workspaceID: ID!, $alias: String!, $name: String!, $value: String!) {\n setAppEnv(input: { workspaceID: $workspaceID, alias: $alias, name: $name, value: $value }) {\n env {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n }\n`);\n\nexport const SetAppSecretDocument = graphql(`\n mutation SdkSetAppSecret($workspaceID: ID!, $alias: String!, $name: String!, $value: String!) {\n setAppSecret(input: { workspaceID: $workspaceID, alias: $alias, name: $name, value: $value }) {\n env {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n }\n`);\n\nexport const RemoveAppEnvDocument = graphql(`\n mutation SdkRemoveAppEnv($workspaceID: ID!, $alias: String!, $name: String!) {\n removeAppEnv(input: { workspaceID: $workspaceID, alias: $alias, name: $name }) {\n ok\n }\n }\n`);\n\nexport const InheritAppEnvDocument = graphql(`\n mutation SdkInheritAppEnv($workspaceID: ID!, $alias: String!, $name: String!) {\n inheritAppEnv(input: { workspaceID: $workspaceID, alias: $alias, name: $name }) {\n ok\n }\n }\n`);\n\nexport const ListAppEnvDocument = graphql(`\n query SdkListAppEnv($workspaceID: ID!, $alias: String!) {\n appEnv(workspaceID: $workspaceID, alias: $alias) {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n`);\n"]}
|
|
1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A6D;AAC7D,MAAM,CAAC,MAAM,qBAAqB,GAAG,OAAO,CAAC;;;;;;;;;;CAU5C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,OAAO,CAAC;;;;;;CAMxC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,OAAO,CAAC;;;;;;CAM1C,CAAC,CAAC","sourcesContent":["/**\n * Every GraphQL document the workflow layer sends.\n *\n * These are wrapped in `graphql(...)` so graphql-codegen validates them\n * against the vendored schema at codegen time and emits exact result/variable\n * types. A field that stops existing server-side turns into a compile error\n * here rather than a runtime surprise in an agent's script.\n *\n * The one document NOT defined here is the batched file write: it has a\n * variable number of aliased root fields, so it is assembled at runtime in\n * `unfazed.ts`. See the comment there.\n */\nimport { graphql } from \"./generated/gql.js\";\n\n/**\n * Deployment fields the SDK returns everywhere.\n *\n * `id` + `aliasRevision` + `aliasHeld` are the rollback compare-and-swap\n * triple; `previewUrl` is the immutable by-id URL you can verify BEFORE the\n * alias moves; `error` carries the build failure text when status is FAILED.\n */\nexport const DeploymentFieldsFragment = graphql(`\n fragment DeploymentFields on Deployment {\n id\n workspaceID\n kind\n runtime\n alias\n serviceMode\n healthPath\n cronSchedule\n cronPath\n url\n previewUrl\n sshCommand\n aliasHeld\n aliasRevision\n status\n error\n filesCount\n sizeBytes\n size\n spaMode\n gitRepo\n gitCommit\n createdAt\n }\n`);\n\nexport const WhoamiDocument = graphql(`\n query SdkWhoami {\n whoami {\n kind\n userID\n name\n agentID\n agentName\n claimed\n claimedBy\n scopes\n expiresAt\n usage {\n month\n requests\n limit\n }\n resources {\n workspaces\n workspaceLimit\n services\n serviceLimit\n }\n }\n }\n`);\n\nexport const CreateWorkspaceDocument = graphql(`\n mutation SdkCreateWorkspace($name: String!) {\n createWorkspace(input: { name: $name }) {\n workspace {\n id\n name\n ownerId\n projectId\n createdAt\n updatedAt\n }\n }\n }\n`);\n\nexport const ListWorkspacesDocument = graphql(`\n query SdkListWorkspaces {\n workspaces {\n id\n name\n ownerId\n projectId\n createdAt\n updatedAt\n }\n }\n`);\n\n/**\n * Deleting a workspace, with the deployment cascade made explicit.\n *\n * `withDeployments` is not decoration: without it the server REFUSES while the\n * workspace has any deployment history at all — including FAILED records —\n * with `workspace %q still has deployments; delete them first`. A workspace\n * that was ever deployed is therefore undeletable through the bare mutation,\n * so the SDK always sends the flag and lets the caller choose the value.\n */\nexport const DeleteWorkspaceDocument = graphql(`\n mutation SdkDeleteWorkspace($workspaceID: ID!, $withDeployments: Boolean) {\n deleteWorkspace(input: { workspaceID: $workspaceID, withDeployments: $withDeployments }) {\n ok\n }\n }\n`);\n\nexport const WriteTextFileDocument = graphql(`\n mutation SdkWriteTextFile($workspaceID: ID!, $path: String!, $text: String!) {\n writeWorkspaceTextFile(input: { workspaceID: $workspaceID, path: $path, text: $text }) {\n file {\n path\n sizeBytes\n size\n sha256\n updatedAt\n }\n }\n }\n`);\n\nexport const WriteBase64FileDocument = graphql(`\n mutation SdkWriteBase64File($workspaceID: ID!, $path: String!, $contentBase64: String!) {\n writeWorkspaceBase64File(\n input: { workspaceID: $workspaceID, path: $path, contentBase64: $contentBase64 }\n ) {\n file {\n path\n sizeBytes\n size\n sha256\n updatedAt\n }\n }\n }\n`);\n\nexport const ListFilesDocument = graphql(`\n query SdkListFiles($input: ListWorkspaceFilesInput!) {\n workspaceFilesPage(input: $input) {\n items {\n path\n sizeBytes\n size\n sha256\n updatedAt\n }\n total\n limit\n offset\n hasMore\n nextOffset\n }\n }\n`);\n\nexport const ReadFileDocument = graphql(`\n query SdkReadFile($input: ReadWorkspaceFileInput!) {\n readWorkspaceFile(input: $input) {\n text\n offset\n limit\n totalBytes\n truncated\n nextOffset\n file {\n path\n sizeBytes\n size\n sha256\n updatedAt\n }\n }\n }\n`);\n\nexport const DeleteFileDocument = graphql(`\n mutation SdkDeleteFile($workspaceID: ID!, $path: String!) {\n deleteWorkspaceFile(input: { workspaceID: $workspaceID, path: $path }) {\n ok\n }\n }\n`);\n\nexport const CreateDeploymentDocument = graphql(`\n mutation SdkCreateDeployment($input: CreateDeploymentInput!) {\n createDeployment(input: $input) {\n deployment {\n ...DeploymentFields\n }\n }\n }\n`);\n\nexport const DeployWorkspaceDocument = graphql(`\n mutation SdkDeployWorkspace($input: DeployWorkspaceInput!) {\n deployWorkspace(input: $input) {\n deployment {\n ...DeploymentFields\n }\n }\n }\n`);\n\nexport const GetDeploymentDocument = graphql(`\n query SdkGetDeployment($id: ID!) {\n deployment(id: $id) {\n ...DeploymentFields\n }\n }\n`);\n\n/**\n * The poll document, deliberately narrow.\n *\n * Waiting can run for minutes at a few seconds per tick; selecting the full\n * fragment every time would cost the server (and an agent's rate limit) far\n * more than the four fields the state machine actually reads.\n */\nexport const PollDeploymentDocument = graphql(`\n query SdkPollDeployment($id: ID!) {\n deployment(id: $id) {\n id\n status\n error\n aliasHeld\n url\n previewUrl\n }\n }\n`);\n\nexport const GetDeploymentByAliasDocument = graphql(`\n query SdkGetDeploymentByAlias($alias: String!) {\n deploymentByAlias(alias: $alias) {\n ...DeploymentFields\n }\n }\n`);\n\nexport const ListDeploymentsDocument = graphql(`\n query SdkListDeployments($input: ListDeploymentsInput) {\n deploymentsPage(input: $input) {\n items {\n ...DeploymentFields\n }\n total\n limit\n offset\n hasMore\n nextOffset\n }\n }\n`);\n\nexport const ListReleasesDocument = graphql(`\n query SdkListReleases($alias: String!) {\n deploymentReleases(alias: $alias) {\n ...DeploymentFields\n }\n }\n`);\n\nexport const RollbackDocument = graphql(`\n mutation SdkRollback(\n $deploymentID: ID!\n $expectedCurrentDeploymentID: ID!\n $expectedCurrentAliasRevision: String!\n ) {\n rollbackDeployment(\n input: {\n deploymentID: $deploymentID\n expectedCurrentDeploymentID: $expectedCurrentDeploymentID\n expectedCurrentAliasRevision: $expectedCurrentAliasRevision\n }\n ) {\n ...DeploymentFields\n }\n }\n`);\n\nexport const ServiceStatusDocument = graphql(`\n query SdkServiceStatus($deploymentID: ID!) {\n serviceStatus(deploymentID: $deploymentID) {\n deploymentID\n alias\n serviceMode\n running\n health\n vmID\n inFlight\n alwaysOn\n memSizeMiB\n startedAt\n lastUsedAt\n lastStoppedAt\n restartCount\n lastError\n }\n }\n`);\n\nexport const ServiceLogsDocument = graphql(`\n query SdkServiceLogs($deploymentID: ID!, $tailBytes: Int) {\n serviceLogs(deploymentID: $deploymentID, tailBytes: $tailBytes) {\n deploymentID\n stdout\n stderr\n truncated\n stdoutBytes\n stderrBytes\n tailBytes\n }\n }\n`);\n\nexport const DeploymentEventsDocument = graphql(`\n query SdkDeploymentEvents($deploymentID: ID!, $limit: Int) {\n deploymentEvents(deploymentID: $deploymentID, limit: $limit) {\n id\n deploymentID\n type\n rawType\n severity\n message\n vmID\n createdAt\n }\n }\n`);\n\nexport const RestartServiceDocument = graphql(`\n mutation SdkRestartService($deploymentID: ID!) {\n restartService(input: { deploymentID: $deploymentID }) {\n deploymentID\n running\n health\n vmID\n restartCount\n lastError\n }\n }\n`);\n\nexport const StopServiceDocument = graphql(`\n mutation SdkStopService($deploymentID: ID!) {\n stopService(input: { deploymentID: $deploymentID }) {\n deploymentID\n running\n health\n vmID\n restartCount\n lastError\n }\n }\n`);\n\nexport const DeleteDeploymentDocument = graphql(`\n mutation SdkDeleteDeployment($deploymentID: ID!) {\n deleteDeployment(input: { deploymentID: $deploymentID }) {\n ok\n }\n }\n`);\n\n/* -------------------------------------------------------------------------\n * Env & secrets\n *\n * Workspace-scoped values are SERVICE defaults for every app in the source;\n * app-scoped values override them for one alias. Both are snapshotted into a\n * release at deploy time, so a change only reaches a running app after a\n * redeploy — the workflow layer's doc comments repeat this where it matters.\n * ---------------------------------------------------------------------- */\n\nexport const SetWorkspaceEnvDocument = graphql(`\n mutation SdkSetWorkspaceEnv($workspaceID: ID!, $name: String!, $value: String!) {\n setWorkspaceEnv(input: { workspaceID: $workspaceID, name: $name, value: $value }) {\n env {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n }\n`);\n\nexport const SetWorkspaceSecretDocument = graphql(`\n mutation SdkSetWorkspaceSecret($workspaceID: ID!, $name: String!, $value: String!) {\n setWorkspaceSecret(input: { workspaceID: $workspaceID, name: $name, value: $value }) {\n env {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n }\n`);\n\nexport const DeleteWorkspaceEnvDocument = graphql(`\n mutation SdkDeleteWorkspaceEnv($workspaceID: ID!, $name: String!) {\n deleteWorkspaceEnv(input: { workspaceID: $workspaceID, name: $name }) {\n ok\n }\n }\n`);\n\nexport const ListWorkspaceEnvDocument = graphql(`\n query SdkListWorkspaceEnv($workspaceID: ID!) {\n workspaceEnv(workspaceID: $workspaceID) {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n`);\n\nexport const SetAppEnvDocument = graphql(`\n mutation SdkSetAppEnv($workspaceID: ID!, $alias: String!, $name: String!, $value: String!) {\n setAppEnv(input: { workspaceID: $workspaceID, alias: $alias, name: $name, value: $value }) {\n env {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n }\n`);\n\nexport const SetAppSecretDocument = graphql(`\n mutation SdkSetAppSecret($workspaceID: ID!, $alias: String!, $name: String!, $value: String!) {\n setAppSecret(input: { workspaceID: $workspaceID, alias: $alias, name: $name, value: $value }) {\n env {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n }\n`);\n\nexport const RemoveAppEnvDocument = graphql(`\n mutation SdkRemoveAppEnv($workspaceID: ID!, $alias: String!, $name: String!) {\n removeAppEnv(input: { workspaceID: $workspaceID, alias: $alias, name: $name }) {\n ok\n }\n }\n`);\n\nexport const InheritAppEnvDocument = graphql(`\n mutation SdkInheritAppEnv($workspaceID: ID!, $alias: String!, $name: String!) {\n inheritAppEnv(input: { workspaceID: $workspaceID, alias: $alias, name: $name }) {\n ok\n }\n }\n`);\n\nexport const ListAppEnvDocument = graphql(`\n query SdkListAppEnv($workspaceID: ID!, $alias: String!) {\n appEnv(workspaceID: $workspaceID, alias: $alias) {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n`);\n\n/* -------------------------------------------------------------------------\n * Agent runs\n *\n * A run is the past-tense counterpart to a deployment: \"boot a fresh VM,\n * hand it a prompt, let a harness work, keep the transcript, record what it\n * cost, reap the VM\". `createRun` returns once the VM has started\n * (RUNNING) or FAILED with `error` when it could not boot — unlike\n * `createDeployment`, a FAILED run is a normal return value, not something\n * that only shows up later in a poll.\n * ---------------------------------------------------------------------- */\n\n/** Run fields the SDK returns everywhere. */\nexport const RunFieldsFragment = graphql(`\n fragment RunFields on Run {\n id\n workspaceID\n ownerId\n status\n rawStatus\n command\n harness\n prompt\n setup\n skills\n approval\n mode\n parentRunID\n depth\n question {\n id\n text\n options\n askedAt\n }\n memoryMiB\n maxSeconds\n metadata\n error\n exitCode\n vmID\n transcriptAvailable\n usage {\n vmSeconds\n memoryMiB\n mibSeconds\n }\n createdAt\n startedAt\n settledAt\n }\n`);\n\nexport const CreateRunDocument = graphql(`\n mutation SdkCreateRun($input: CreateRunInput!) {\n createRun(input: $input) {\n ...RunFields\n }\n }\n`);\n\nexport const GetRunDocument = graphql(`\n query SdkGetRun($id: ID!) {\n run(id: $id) {\n ...RunFields\n }\n }\n`);\n\n/**\n * The poll document, deliberately narrow — see {@link PollDeploymentDocument}\n * for why: this runs every few seconds for potentially up to an hour.\n */\nexport const PollRunDocument = graphql(`\n query SdkPollRun($id: ID!) {\n run(id: $id) {\n id\n status\n error\n exitCode\n }\n }\n`);\n\nexport const ListRunsDocument = graphql(`\n query SdkListRuns($input: ListRunsInput) {\n runs(input: $input) {\n items {\n ...RunFields\n }\n total\n limit\n offset\n hasMore\n nextOffset\n }\n }\n`);\n\nexport const CancelRunDocument = graphql(`\n mutation SdkCancelRun($id: ID!) {\n cancelRun(id: $id) {\n ...RunFields\n }\n }\n`);\n\nexport const RunEventsDocument = graphql(`\n query SdkRunEvents($runID: ID!, $limit: Int) {\n runEvents(runID: $runID, limit: $limit) {\n id\n runID\n type\n severity\n message\n metadata\n createdAt\n }\n }\n`);\n\n/** The live console tail of a RUNNING run. Empty with `running: false` once settled. */\nexport const RunConsoleDocument = graphql(`\n query SdkRunConsole($id: ID!, $tailBytes: Int) {\n runConsole(id: $id, tailBytes: $tailBytes) {\n runID\n running\n text\n }\n }\n`);\n\n/** The bounded end of a finished run's stored transcript. */\nexport const RunTranscriptDocument = graphql(`\n query SdkRunTranscript($id: ID!, $tailBytes: Int) {\n runTranscript(id: $id, tailBytes: $tailBytes) {\n runID\n available\n text\n totalBytes\n truncated\n }\n }\n`);\n\nexport const AnswerRunDocument = graphql(`\n mutation SdkAnswerRun($id: ID!, $answer: String!) {\n answerRun(id: $id, answer: $answer) {\n ...RunFields\n }\n }\n`);\n\nexport const FollowUpRunDocument = graphql(`\n mutation SdkFollowUpRun($input: FollowUpRunInput!) {\n followUpRun(input: $input) {\n ...RunFields\n }\n }\n`);\n"]}
|