@scarn/sdk 0.8.18 → 0.8.19

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.
@@ -67,7 +67,7 @@ export declare class StepDefinitions extends HeyApiClient {
67
67
  }
68
68
  export declare class Tasks extends HeyApiClient {
69
69
  /**
70
- * Starts a standalone Task from a step-definition version or a prompt. Responds 409 `Scarn.ConcurrencyGroupFull` when the step's concurrency group on the work item is full: no Task is created, and `meta.heldBy` names the Tasks that hold the group.
70
+ * Starts a standalone Task from a step-definition version or a prompt. `environment.name` runs it in that named environment instead of the step's own or the repo default, and `environment.extraConnectors` adds catalog connectors for this Task only. Responds 422 `ENVIRONMENT_OVERRIDE_INLINE` when the step has an inline environment, `ENVIRONMENT_NOT_FOUND`, `ENVIRONMENT_OVERRIDE_INCOMPATIBLE` when the environment doesn't fit the step, and `CONNECTOR_NOT_FOUND`, `CONNECTOR_ALREADY_PRESENT` or `CONNECTOR_VAR_MISSING` for an extra connector. Responds 409 `Scarn.ConcurrencyGroupFull` when the step's concurrency group on the work item is full: no Task is created, and `meta.heldBy` names the Tasks that hold the group.
71
71
  */
72
72
  createTask<ThrowOnError extends boolean = false>(options: Options<PostApiTasksData, ThrowOnError>): import("./client").RequestResult<PostApiTasksResponses, PostApiTasksErrors, ThrowOnError, "fields">;
73
73
  /**
@@ -129,7 +129,7 @@ export declare class TaskRuns extends HeyApiClient {
129
129
  */
130
130
  issueLogFeedWriteToken<ThrowOnError extends boolean = false>(options: Options<PostApiTaskRunsByTaskRunIdLogFeedTokenData, ThrowOnError>): import("./client").RequestResult<PostApiTaskRunsByTaskRunIdLogFeedTokenResponses, PostApiTaskRunsByTaskRunIdLogFeedTokenErrors, ThrowOnError, "fields">;
131
131
  /**
132
- * Returns the values of the named project secrets for the task run's project, and lists the names the project has no secret for. Marks each returned secret used. Requires the claim token and `executions:write`. Only secrets referenced by the run's environment (its inline vars, or its pinned named environment version) may be asked for; any other name returns 403 `SECRET_NOT_REFERENCED`.
132
+ * Returns the values of the named project secrets for the task run's project, and lists the names the project has no secret for. Marks each returned secret used. Requires the claim token and `executions:write`. Only secrets referenced by the run's environment (its inline vars, or its pinned named environment version) or by its Task's extra connectors may be asked for; any other name returns 403 `SECRET_NOT_REFERENCED`.
133
133
  */
134
134
  resolveTaskRunEnvironment<ThrowOnError extends boolean = false>(options: Options<PostApiTaskRunsByTaskRunIdEnvironmentData, ThrowOnError>): import("./client").RequestResult<PostApiTaskRunsByTaskRunIdEnvironmentResponses, PostApiTaskRunsByTaskRunIdEnvironmentErrors, ThrowOnError, "fields">;
135
135
  }
@@ -3479,6 +3479,17 @@ export type PostApiTasksData = {
3479
3479
  workItemId: string;
3480
3480
  inputJson?: unknown | null;
3481
3481
  executionTimeoutSeconds?: number | null;
3482
+ environment?: {
3483
+ name?: string;
3484
+ extraConnectors?: Array<{
3485
+ connectorId: string;
3486
+ vars?: {
3487
+ [key: string]: {
3488
+ secret: string;
3489
+ };
3490
+ };
3491
+ }>;
3492
+ };
3482
3493
  stepDefinitionId: string;
3483
3494
  stepDefinitionVersion: number;
3484
3495
  } | {
@@ -3486,7 +3497,19 @@ export type PostApiTasksData = {
3486
3497
  workItemId: string;
3487
3498
  inputJson?: unknown | null;
3488
3499
  executionTimeoutSeconds?: number | null;
3500
+ environment?: {
3501
+ name?: string;
3502
+ extraConnectors?: Array<{
3503
+ connectorId: string;
3504
+ vars?: {
3505
+ [key: string]: {
3506
+ secret: string;
3507
+ };
3508
+ };
3509
+ }>;
3510
+ };
3489
3511
  prompt: string;
3512
+ repoWrite?: boolean;
3490
3513
  };
3491
3514
  path?: never;
3492
3515
  query?: never;
@@ -3641,6 +3664,16 @@ export type PostApiTasksResponses = {
3641
3664
  kind: 'agent' | 'code';
3642
3665
  name: string | null;
3643
3666
  taskExecutionConfigId: string | null;
3667
+ environmentSelection: {
3668
+ extraConnectors: Array<{
3669
+ connectorId: string;
3670
+ vars: {
3671
+ [key: string]: {
3672
+ secret: string;
3673
+ };
3674
+ };
3675
+ }>;
3676
+ } | null;
3644
3677
  inputJson: unknown | null;
3645
3678
  retryJson: unknown | null;
3646
3679
  grants: Array<{
@@ -4090,6 +4123,16 @@ export type GetApiTasksByTaskIdResponses = {
4090
4123
  kind: 'agent' | 'code';
4091
4124
  name: string | null;
4092
4125
  taskExecutionConfigId: string | null;
4126
+ environmentSelection: {
4127
+ extraConnectors: Array<{
4128
+ connectorId: string;
4129
+ vars: {
4130
+ [key: string]: {
4131
+ secret: string;
4132
+ };
4133
+ };
4134
+ }>;
4135
+ } | null;
4093
4136
  inputJson: unknown | null;
4094
4137
  retryJson: unknown | null;
4095
4138
  grants: Array<{
@@ -5393,6 +5436,14 @@ export type PostApiTaskRunsByTaskRunIdWorkerContextResponses = {
5393
5436
  protocol?: 'legacy' | 'auto' | '2026-07-28';
5394
5437
  };
5395
5438
  } | null;
5439
+ extraConnectors: Array<{
5440
+ connectorId: string;
5441
+ vars: {
5442
+ [key: string]: {
5443
+ secret: string;
5444
+ };
5445
+ };
5446
+ }>;
5396
5447
  };
5397
5448
  agentPrompt: {
5398
5449
  sessionTitle: string;
@@ -602,6 +602,14 @@ declare const buildTaskPlaneClient: (taskRuns: TaskRuns) => {
602
602
  protocol?: "legacy" | "auto" | "2026-07-28";
603
603
  };
604
604
  } | null;
605
+ extraConnectors: Array<{
606
+ connectorId: string;
607
+ vars: {
608
+ [key: string]: {
609
+ secret: string;
610
+ };
611
+ };
612
+ }>;
605
613
  };
606
614
  agentPrompt: {
607
615
  sessionTitle: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@scarn/sdk",
4
- "version": "0.8.18",
4
+ "version": "0.8.19",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {