unfazed 0.4.0 → 0.5.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.
@@ -493,6 +493,19 @@ export const RunFieldsFragment = graphql(`
493
493
  verify
494
494
  approval
495
495
  mode
496
+ access
497
+ alias
498
+ integrations {
499
+ kind
500
+ bindingID
501
+ env
502
+ skills
503
+ mcpServers {
504
+ name
505
+ transport
506
+ readOnly
507
+ }
508
+ }
496
509
  parentRunID
497
510
  depth
498
511
  question {
@@ -622,4 +635,14 @@ export const FollowUpRunDocument = graphql(`
622
635
  }
623
636
  }
624
637
  `);
638
+ export const ListRunHarnessesDocument = graphql(`
639
+ query SdkRunHarnesses {
640
+ runHarnesses {
641
+ name
642
+ title
643
+ summary
644
+ requires
645
+ }
646
+ }
647
+ `);
625
648
  //# sourceMappingURL=operations.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;CA0B/C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;CAyBrC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,OAAO,CAAC;;;;;;;;;;;;;CAa9C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG,OAAO,CAAC;;;;;;;;;;;CAW7C,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,OAAO,CAAC;;;;;;CAM9C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,OAAO,CAAC;;;;;;;;;;;;C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,iBAAiB,GAAG,OAAO,CAAC;;;;;;CAMxC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC;;;;;;CAMrC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,OAAO,CAAC;;;;;;;;;CAStC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,OAAO,CAAC;;;;;;;;;;;;;CAavC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,OAAO,CAAC;;;;;;CAMxC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,OAAO,CAAC;;;;;;;;;;;;CAYxC,CAAC,CAAC;AAEH,wFAAwF;AACxF,MAAM,CAAC,MAAM,kBAAkB,GAAG,OAAO,CAAC;;;;;;;;CAQzC,CAAC,CAAC;AAEH,6DAA6D;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 verify\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 result {\n status\n detail\n text\n }\n verifyExitCode\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"]}
1
+ {"version":3,"file":"operations.js","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"m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B,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;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG,OAAO,CAAC;;;;;;;;;CAS/C,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 verify\n approval\n mode\n access\n alias\n integrations {\n kind\n bindingID\n env\n skills\n mcpServers {\n name\n transport\n readOnly\n }\n }\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 result {\n status\n detail\n text\n }\n verifyExitCode\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\nexport const ListRunHarnessesDocument = graphql(`\n query SdkRunHarnesses {\n runHarnesses {\n name\n title\n summary\n requires\n }\n }\n`);\n"]}
package/dist/unfazed.d.ts CHANGED
@@ -1,10 +1,12 @@
1
1
  import { UnfazedClient, type ClientOptions, type RequestOptions } from "./client.js";
2
- import type { CreateDeploymentInput, DeploymentFieldsFragment, ListDeploymentsInput, RunFieldsFragment, RunStatus, ServiceMode, ServiceRuntime, SdkCreateWorkspaceMutation } from "./generated/graphql.js";
2
+ import type { CreateDeploymentInput, DeploymentFieldsFragment, ListDeploymentsInput, RunFieldsFragment, RunStatus, ServiceMode, ServiceRuntime, SdkCreateWorkspaceMutation, SdkRunHarnessesQuery } from "./generated/graphql.js";
3
3
  import { type WaitOptions } from "./wait.js";
4
4
  /** A deployment as the workflow layer returns it. */
5
5
  export type Deployment = DeploymentFieldsFragment;
6
6
  /** An agent run as the workflow layer returns it. */
7
7
  export type Run = RunFieldsFragment;
8
+ /** One harness preset of the box image, from {@link Unfazed.listRunHarnesses}. */
9
+ export type RunHarness = SdkRunHarnessesQuery["runHarnesses"][number];
8
10
  /**
9
11
  * A workspace as {@link Unfazed.createWorkspace} and
10
12
  * {@link Unfazed.ensureWorkspace} return it.
@@ -197,6 +199,20 @@ export interface CreateRunOptions {
197
199
  * transcript. Approve it with {@link Unfazed.followUpRun}. Omit to do the task.
198
200
  */
199
201
  mode?: "plan";
202
+ /**
203
+ * `"read-only"` (the default) or `"read-write"`. A read-only run gets the
204
+ * app's integrations' read-only credentials (none where the product has no
205
+ * read-only key), only their read MCP tools, and a platform token that
206
+ * cannot deploy or write env; read-write gets the app's own credentials,
207
+ * read+write tools and a deploy-capable token. Ask for read-write only
208
+ * when the run must change things.
209
+ */
210
+ access?: "read-only" | "read-write";
211
+ /**
212
+ * The app (alias) whose integrations the run gets. Implicit when the
213
+ * workspace has one app; required when it has several.
214
+ */
215
+ alias?: string;
200
216
  /** The run this one continues. Usually set for you by {@link Unfazed.followUpRun}. */
201
217
  parentRunId?: string;
202
218
  /**
@@ -770,6 +786,13 @@ export declare class Unfazed {
770
786
  waitForRun(runId: string, waitOptions?: WaitOptions): Promise<Run>;
771
787
  /** Reads one run by id. Throws if it does not exist or is not visible to you. */
772
788
  getRun(runId: string, options?: RequestOptions): Promise<Run>;
789
+ /**
790
+ * The harness presets a run may name (`createRun({ harness })`): name,
791
+ * title, what it is, and the workspace secrets it requires (set them with
792
+ * {@link Unfazed.setSecret} before the run). Empty when the node's box
793
+ * image carries no catalogue.
794
+ */
795
+ listRunHarnesses(options?: RequestOptions): Promise<RunHarness[]>;
773
796
  /** Your agent runs, newest first, optionally filtered by workspace/status. */
774
797
  listRuns(filter?: ListRunsFilter, options?: RequestOptions): Promise<{
775
798
  total: number;
@@ -791,6 +814,8 @@ export declare class Unfazed {
791
814
  verify: Array<string>;
792
815
  approval: string;
793
816
  mode: string;
817
+ access: string;
818
+ alias: string | null;
794
819
  parentRunID: string | null;
795
820
  depth: number;
796
821
  memoryMiB: number;
@@ -804,6 +829,17 @@ export declare class Unfazed {
804
829
  createdAt: string;
805
830
  startedAt: string | null;
806
831
  settledAt: string | null;
832
+ integrations: Array<{
833
+ kind: string;
834
+ bindingID: string;
835
+ env: string;
836
+ skills: Array<string>;
837
+ mcpServers: Array<{
838
+ name: string;
839
+ transport: string;
840
+ readOnly: boolean;
841
+ }>;
842
+ }>;
807
843
  question: {
808
844
  id: string;
809
845
  text: string;
package/dist/unfazed.js CHANGED
@@ -667,7 +667,7 @@ export class Unfazed {
667
667
  * means and how a timeout is reported.
668
668
  */
669
669
  async createRun(options) {
670
- const { workspaceId, prompt, harness, command, setup, skills, verify, memoryMiB, maxSeconds, metadata, includeFiles, approval, mode, parentRunId, wait, waitOptions, signal, } = options;
670
+ const { workspaceId, prompt, harness, command, setup, skills, verify, memoryMiB, maxSeconds, metadata, includeFiles, approval, mode, access, alias, parentRunId, wait, waitOptions, signal, } = options;
671
671
  const requestOptions = signal ? { signal } : {};
672
672
  const data = await this.client.mutate(ops.CreateRunDocument, {
673
673
  input: {
@@ -684,6 +684,8 @@ export class Unfazed {
684
684
  ...(includeFiles === undefined ? {} : { includeFiles }),
685
685
  ...(approval === undefined ? {} : { approval }),
686
686
  ...(mode === undefined ? {} : { mode }),
687
+ ...(access === undefined ? {} : { access }),
688
+ ...(alias === undefined ? {} : { alias }),
687
689
  ...(parentRunId === undefined ? {} : { parentRunID: parentRunId }),
688
690
  },
689
691
  }, requestOptions);
@@ -728,6 +730,16 @@ export class Unfazed {
728
730
  const data = await this.client.query(ops.GetRunDocument, { id: runId }, options);
729
731
  return data.run;
730
732
  }
733
+ /**
734
+ * The harness presets a run may name (`createRun({ harness })`): name,
735
+ * title, what it is, and the workspace secrets it requires (set them with
736
+ * {@link Unfazed.setSecret} before the run). Empty when the node's box
737
+ * image carries no catalogue.
738
+ */
739
+ async listRunHarnesses(options) {
740
+ const data = await this.client.query(ops.ListRunHarnessesDocument, {}, options);
741
+ return data.runHarnesses;
742
+ }
731
743
  /** Your agent runs, newest first, optionally filtered by workspace/status. */
732
744
  async listRuns(filter = {}, options) {
733
745
  const { workspaceId, status, limit, offset } = filter;