@scarn/sdk 0.8.8 → 0.8.10

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.
@@ -12,7 +12,7 @@ import {
12
12
  import {
13
13
  repoConfigInputSchema,
14
14
  repoRuntimeMismatch
15
- } from "./chunk-ejzfdm1z.js";
15
+ } from "./chunk-xzx08r6y.js";
16
16
  import {
17
17
  findArtifactMarkers
18
18
  } from "./chunk-ngy1fdcx.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  Automations,
4
4
  createClient
5
- } from "./chunk-vmdn05vj.js";
5
+ } from "./chunk-c3xzrd3w.js";
6
6
  import {
7
7
  exports_external
8
8
  } from "./chunk-skzxcba3.js";
@@ -888,7 +888,14 @@ class Projects extends HeyApiClient {
888
888
  return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/members", ...options });
889
889
  }
890
890
  updateProjectMemberPermissions(options) {
891
- return (options.client ?? this.client).put({ url: "/api/projects/{projectId}/members/{userId}/permissions", ...options });
891
+ return (options.client ?? this.client).put({
892
+ url: "/api/projects/{projectId}/members/{userId}/permissions",
893
+ ...options,
894
+ headers: {
895
+ "Content-Type": "application/json",
896
+ ...options.headers
897
+ }
898
+ });
892
899
  }
893
900
  checkProjectRepo(options) {
894
901
  return (options.client ?? this.client).post({
@@ -958,6 +965,16 @@ class Tasks extends HeyApiClient {
958
965
  cancelTask(options) {
959
966
  return (options.client ?? this.client).post({ url: "/api/tasks/{taskId}/cancel", ...options });
960
967
  }
968
+ retryTask(options) {
969
+ return (options.client ?? this.client).post({
970
+ url: "/api/tasks/{taskId}/retry",
971
+ ...options,
972
+ headers: {
973
+ "Content-Type": "application/json",
974
+ ...options.headers
975
+ }
976
+ });
977
+ }
961
978
  getTask(options) {
962
979
  return (options.client ?? this.client).get({ url: "/api/tasks/{taskId}", ...options });
963
980
  }
@@ -1114,6 +1131,16 @@ class TaskRuns extends HeyApiClient {
1114
1131
  }
1115
1132
  });
1116
1133
  }
1134
+ issueWorkSignalToken(options) {
1135
+ return (options.client ?? this.client).post({
1136
+ url: "/api/projects/{projectId}/work-signal-token",
1137
+ ...options,
1138
+ headers: {
1139
+ "Content-Type": "application/json",
1140
+ ...options.headers
1141
+ }
1142
+ });
1143
+ }
1117
1144
  }
1118
1145
 
1119
1146
  class PipelineDefinitions extends HeyApiClient {
@@ -30,11 +30,11 @@ import {
30
30
  import {
31
31
  repoConfigInputSchema,
32
32
  repoRuntimeMismatch
33
- } from "./chunk-ejzfdm1z.js";
33
+ } from "./chunk-xzx08r6y.js";
34
34
  import {
35
35
  StepDefinitions,
36
36
  createClient
37
- } from "./chunk-vmdn05vj.js";
37
+ } from "./chunk-c3xzrd3w.js";
38
38
  import {
39
39
  buildArtifactMarker
40
40
  } from "./chunk-ngy1fdcx.js";
@@ -721,8 +721,8 @@ var Repo = {
721
721
  none() {
722
722
  return { mode: "none" };
723
723
  },
724
- readOnly() {
725
- return { mode: "readOnly" };
724
+ readOnly(opts) {
725
+ return { mode: "readOnly", ...opts };
726
726
  },
727
727
  readWrite(opts) {
728
728
  return { mode: "readWrite", ...opts };
@@ -745,16 +745,27 @@ function compileRepo(repo, runtime, ctx = {}) {
745
745
  if (mismatch !== null) {
746
746
  throw new Error(`${where} "${spec.mode}" cannot be used with executionMode "${executionMode}": ${mismatch}.`);
747
747
  }
748
- const config2 = spec.mode === "readWrite" ? toReadWriteConfig(spec) : { mode: spec.mode };
748
+ const config2 = toRepoConfigInput(spec);
749
749
  const parsed = repoConfigInputSchema.safeParse(config2);
750
750
  if (!parsed.success) {
751
751
  throw new Error(`${where}: ${parsed.error.issues.map((issue) => `${issue.path.join(".") || "mode"} ${issue.message}`).join("; ")}`);
752
752
  }
753
753
  return config2;
754
754
  }
755
+ function toRepoConfigInput(spec) {
756
+ if (spec.mode === "readWrite")
757
+ return toReadWriteConfig(spec);
758
+ if (spec.mode === "readOnly")
759
+ return { mode: "readOnly", ...gitCredentialsOf(spec) };
760
+ return { mode: "none" };
761
+ }
762
+ function gitCredentialsOf(spec) {
763
+ return spec.gitCredentials !== undefined ? { gitCredentials: spec.gitCredentials } : {};
764
+ }
755
765
  function toReadWriteConfig(spec) {
756
766
  return {
757
767
  mode: "readWrite",
768
+ ...gitCredentialsOf(spec),
758
769
  ...spec.message !== undefined ? {
759
770
  message: `${spec.message}`
760
771
  } : {},
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  PipelineDefinitions,
4
4
  createClient
5
- } from "./chunk-vmdn05vj.js";
5
+ } from "./chunk-c3xzrd3w.js";
6
6
  import {
7
7
  exports_external
8
8
  } from "./chunk-skzxcba3.js";
@@ -41,22 +41,31 @@ var repoCommitMessageSchema = exports_external.string().max(MAX_REPO_COMMIT_MESS
41
41
  message: `may only use {{input.\u2026}}, {{result.\u2026}}, {{${REPO_COMMIT_MESSAGE_WORK_ITEM_KEYS.map((key) => `workItem.${key}`).join("}} and {{")}}} tokens`
42
42
  });
43
43
  var onPushFailureSchema = exports_external.enum(["fail", "warn"]);
44
+ var repoGitCredentialsSchema = exports_external.enum(["auto", "none"]);
44
45
  var repoConfigInputSchema = exports_external.discriminatedUnion("mode", [
45
46
  exports_external.object({ mode: exports_external.literal("none") }).strict(),
46
- exports_external.object({ mode: exports_external.literal("readOnly") }).strict(),
47
+ exports_external.object({
48
+ mode: exports_external.literal("readOnly"),
49
+ gitCredentials: repoGitCredentialsSchema.optional()
50
+ }).strict(),
47
51
  exports_external.object({
48
52
  mode: exports_external.literal("readWrite"),
49
53
  message: repoCommitMessageSchema.nullish(),
50
- onPushFailure: onPushFailureSchema.optional()
54
+ onPushFailure: onPushFailureSchema.optional(),
55
+ gitCredentials: repoGitCredentialsSchema.optional()
51
56
  }).strict()
52
57
  ]);
53
58
  var repoConfigSchema = exports_external.discriminatedUnion("mode", [
54
59
  exports_external.object({ mode: exports_external.literal("none") }).strict(),
55
- exports_external.object({ mode: exports_external.literal("readOnly") }).strict(),
60
+ exports_external.object({
61
+ mode: exports_external.literal("readOnly"),
62
+ gitCredentials: repoGitCredentialsSchema
63
+ }).strict(),
56
64
  exports_external.object({
57
65
  mode: exports_external.literal("readWrite"),
58
66
  message: repoCommitMessageSchema.nullable(),
59
- onPushFailure: onPushFailureSchema
67
+ onPushFailure: onPushFailureSchema,
68
+ gitCredentials: repoGitCredentialsSchema
60
69
  }).strict()
61
70
  ]);
62
71
  var REPO_RUNTIME_SUPPORT = {
@@ -77,14 +86,18 @@ function repoRuntimeMismatch(executionMode, mode) {
77
86
  }
78
87
  function resolveRepoConfig(executionMode, input) {
79
88
  const mode = input?.mode ?? REPO_RUNTIME_SUPPORT[executionMode].default;
80
- if (mode !== "readWrite")
89
+ if (mode === "none")
81
90
  return { mode };
91
+ const gitCredentials = (input && "gitCredentials" in input ? input.gitCredentials : undefined) ?? "auto";
92
+ if (mode === "readOnly")
93
+ return { mode, gitCredentials };
82
94
  const readWrite = input?.mode === "readWrite" ? input : undefined;
83
95
  return {
84
96
  mode,
85
97
  message: readWrite?.message ?? null,
86
- onPushFailure: readWrite?.onPushFailure ?? "fail"
98
+ onPushFailure: readWrite?.onPushFailure ?? "fail",
99
+ gitCredentials
87
100
  };
88
101
  }
89
102
 
90
- export { MAX_REPO_COMMIT_MESSAGE_LENGTH, REPO_COMMIT_MESSAGE_TOKEN_ROOTS, REPO_COMMIT_MESSAGE_WORK_ITEM_KEYS, commitMessageUsesWorkItem, findDisallowedCommitMessageTokenRoots, repoCommitMessageSchema, repoConfigInputSchema, repoConfigSchema, REPO_RUNTIME_SUPPORT, repoRuntimeMismatch, resolveRepoConfig };
103
+ export { MAX_REPO_COMMIT_MESSAGE_LENGTH, REPO_COMMIT_MESSAGE_TOKEN_ROOTS, REPO_COMMIT_MESSAGE_WORK_ITEM_KEYS, commitMessageUsesWorkItem, findDisallowedCommitMessageTokenRoots, repoCommitMessageSchema, repoGitCredentialsSchema, repoConfigInputSchema, repoConfigSchema, REPO_RUNTIME_SUPPORT, repoRuntimeMismatch, resolveRepoConfig };
@@ -3,7 +3,7 @@ import {
3
3
  ScarnClient,
4
4
  TaskRuns,
5
5
  createClient
6
- } from "./chunk-vmdn05vj.js";
6
+ } from "./chunk-c3xzrd3w.js";
7
7
  // src/task-plane-client.ts
8
8
  function unwrap(result) {
9
9
  if (result.error)
@@ -86,6 +86,13 @@ var buildTaskPlaneClient = (taskRuns) => {
86
86
  unwrap(await taskRuns.recordTaskArtifactFailure({ path: { taskRunId }, body }));
87
87
  },
88
88
  listTaskArtifacts: async ({ taskRunId }) => unwrap(await taskRuns.listTaskArtifacts({ path: { taskRunId } })),
89
+ issueWorkSignalToken: ({
90
+ projectId,
91
+ workerId
92
+ }) => taskRuns.issueWorkSignalToken({
93
+ path: { projectId },
94
+ body: workerId === undefined ? {} : { workerId }
95
+ }),
89
96
  getArtifactDownloadUrl: async ({
90
97
  taskRunId,
91
98
  artifactId
package/dist/client.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  createScarnClient,
4
4
  createTaskPlaneClient
5
- } from "./chunk-738k8p1c.js";
5
+ } from "./chunk-zjp1c7ye.js";
6
6
  import {
7
7
  Api,
8
8
  Automations,
@@ -28,7 +28,7 @@ import {
28
28
  WorkItemCommentDrafts,
29
29
  WorkItemComments,
30
30
  WorkItems
31
- } from "./chunk-vmdn05vj.js";
31
+ } from "./chunk-c3xzrd3w.js";
32
32
  import"./chunk-y64skrwp.js";
33
33
  export {
34
34
  Api,
@@ -274,8 +274,8 @@ export declare const automationDocumentSchema: z.ZodObject<{
274
274
  key: z.ZodString;
275
275
  title: z.ZodOptional<z.ZodString>;
276
276
  scope: z.ZodEnum<{
277
- project: "project";
278
277
  workItem: "workItem";
278
+ project: "project";
279
279
  }>;
280
280
  rules: z.ZodArray<z.ZodObject<{
281
281
  event: z.ZodEnum<{
@@ -4,8 +4,8 @@ import {
4
4
  } from "../chunk-rt9tq4j6.js";
5
5
  import {
6
6
  createScarnClient
7
- } from "../chunk-738k8p1c.js";
8
- import"../chunk-vmdn05vj.js";
7
+ } from "../chunk-zjp1c7ye.js";
8
+ import"../chunk-c3xzrd3w.js";
9
9
  import"../chunk-y64skrwp.js";
10
10
 
11
11
  // src/defaults/auth-file.ts
@@ -37,7 +37,7 @@ declare const buildAutomationsClient: (automations: Automations) => {
37
37
  id: string;
38
38
  projectId: string;
39
39
  key: string;
40
- title: string | unknown;
40
+ title: string | null;
41
41
  scope: "workItem" | "project";
42
42
  enabled: boolean;
43
43
  latestVersion: {
@@ -49,7 +49,7 @@ declare const buildAutomationsClient: (automations: Automations) => {
49
49
  [key: string]: unknown;
50
50
  };
51
51
  publishedAt: string;
52
- } | unknown;
52
+ } | null;
53
53
  createdAt: string;
54
54
  updatedAt: string;
55
55
  }[]>;
@@ -64,7 +64,7 @@ declare const buildAutomationsClient: (automations: Automations) => {
64
64
  id: string;
65
65
  projectId: string;
66
66
  key: string;
67
- title: string | unknown;
67
+ title: string | null;
68
68
  scope: "workItem" | "project";
69
69
  enabled: boolean;
70
70
  latestVersion: {
@@ -76,7 +76,7 @@ declare const buildAutomationsClient: (automations: Automations) => {
76
76
  [key: string]: unknown;
77
77
  };
78
78
  publishedAt: string;
79
- } | unknown;
79
+ } | null;
80
80
  createdAt: string;
81
81
  updatedAt: string;
82
82
  };
@@ -85,7 +85,7 @@ declare const buildAutomationsClient: (automations: Automations) => {
85
85
  id: string;
86
86
  projectId: string;
87
87
  key: string;
88
- title: string | unknown;
88
+ title: string | null;
89
89
  scope: "workItem" | "project";
90
90
  enabled: boolean;
91
91
  latestVersion: {
@@ -97,7 +97,7 @@ declare const buildAutomationsClient: (automations: Automations) => {
97
97
  [key: string]: unknown;
98
98
  };
99
99
  publishedAt: string;
100
- } | unknown;
100
+ } | null;
101
101
  createdAt: string;
102
102
  updatedAt: string;
103
103
  }>;
@@ -105,7 +105,7 @@ declare const buildAutomationsClient: (automations: Automations) => {
105
105
  id: string;
106
106
  projectId: string;
107
107
  key: string;
108
- title: string | unknown;
108
+ title: string | null;
109
109
  scope: "workItem" | "project";
110
110
  enabled: boolean;
111
111
  latestVersion: {
@@ -117,7 +117,7 @@ declare const buildAutomationsClient: (automations: Automations) => {
117
117
  [key: string]: unknown;
118
118
  };
119
119
  publishedAt: string;
120
- } | unknown;
120
+ } | null;
121
121
  createdAt: string;
122
122
  updatedAt: string;
123
123
  }>;
@@ -127,7 +127,7 @@ declare const buildAutomationsClient: (automations: Automations) => {
127
127
  id: string;
128
128
  projectId: string;
129
129
  key: string;
130
- title: string | unknown;
130
+ title: string | null;
131
131
  scope: "workItem" | "project";
132
132
  enabled: boolean;
133
133
  latestVersion: {
@@ -139,7 +139,7 @@ declare const buildAutomationsClient: (automations: Automations) => {
139
139
  [key: string]: unknown;
140
140
  };
141
141
  publishedAt: string;
142
- } | unknown;
142
+ } | null;
143
143
  createdAt: string;
144
144
  updatedAt: string;
145
145
  };
@@ -152,7 +152,7 @@ declare const buildAutomationsClient: (automations: Automations) => {
152
152
  id: string;
153
153
  projectId: string;
154
154
  key: string;
155
- title: string | unknown;
155
+ title: string | null;
156
156
  scope: "workItem" | "project";
157
157
  enabled: boolean;
158
158
  latestVersion: {
@@ -164,7 +164,7 @@ declare const buildAutomationsClient: (automations: Automations) => {
164
164
  [key: string]: unknown;
165
165
  };
166
166
  publishedAt: string;
167
- } | unknown;
167
+ } | null;
168
168
  createdAt: string;
169
169
  updatedAt: string;
170
170
  };
@@ -172,7 +172,7 @@ declare const buildAutomationsClient: (automations: Automations) => {
172
172
  attachedAt: string;
173
173
  }>;
174
174
  detach: (workItemId: string, key: string, options?: RequestOptions) => Promise<{
175
- detached: boolean;
175
+ detached: true;
176
176
  }>;
177
177
  };
178
178
  export {};
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  AutomationsApiError,
4
4
  createAutomationsClient
5
- } from "../../chunk-npy0jxfg.js";
6
- import"../../chunk-vmdn05vj.js";
5
+ } from "../../chunk-aqsa0bpk.js";
6
+ import"../../chunk-c3xzrd3w.js";
7
7
  import"../../chunk-skzxcba3.js";
8
8
  import"../../chunk-y64skrwp.js";
9
9
  export {
@@ -5,8 +5,8 @@ import {
5
5
  WORK_ITEM_TOP_LEVEL_FIELDS,
6
6
  createPipelineDefinitionsClient,
7
7
  resolveWorkItemFieldPath
8
- } from "../../chunk-qy3508g1.js";
9
- import"../../chunk-vmdn05vj.js";
8
+ } from "../../chunk-nxsa7ksc.js";
9
+ import"../../chunk-c3xzrd3w.js";
10
10
  import"../../chunk-skzxcba3.js";
11
11
  import"../../chunk-y64skrwp.js";
12
12
  export {
@@ -38,7 +38,7 @@ declare const buildPipelineDefinitionsClient: (pipelineDefinitions: PipelineDefi
38
38
  projectId: string;
39
39
  key: string;
40
40
  name: string;
41
- archivedAt: string | unknown;
41
+ archivedAt: string | null;
42
42
  currentVersion: {
43
43
  id: string;
44
44
  pipelineDefinitionId: string;
@@ -53,7 +53,7 @@ declare const buildPipelineDefinitionsClient: (pipelineDefinitions: PipelineDefi
53
53
  stepDefinitionId: string;
54
54
  }>;
55
55
  createdAt: string;
56
- } | unknown;
56
+ } | null;
57
57
  createdAt: string;
58
58
  updatedAt: string;
59
59
  }[]>;
@@ -62,7 +62,7 @@ declare const buildPipelineDefinitionsClient: (pipelineDefinitions: PipelineDefi
62
62
  projectId: string;
63
63
  key: string;
64
64
  name: string;
65
- archivedAt: string | unknown;
65
+ archivedAt: string | null;
66
66
  currentVersion: {
67
67
  id: string;
68
68
  pipelineDefinitionId: string;
@@ -77,7 +77,7 @@ declare const buildPipelineDefinitionsClient: (pipelineDefinitions: PipelineDefi
77
77
  stepDefinitionId: string;
78
78
  }>;
79
79
  createdAt: string;
80
- } | unknown;
80
+ } | null;
81
81
  createdAt: string;
82
82
  updatedAt: string;
83
83
  }>;
@@ -92,7 +92,7 @@ declare const buildPipelineDefinitionsClient: (pipelineDefinitions: PipelineDefi
92
92
  projectId: string;
93
93
  key: string;
94
94
  name: string;
95
- archivedAt: string | unknown;
95
+ archivedAt: string | null;
96
96
  currentVersion: {
97
97
  id: string;
98
98
  pipelineDefinitionId: string;
@@ -107,7 +107,7 @@ declare const buildPipelineDefinitionsClient: (pipelineDefinitions: PipelineDefi
107
107
  stepDefinitionId: string;
108
108
  }>;
109
109
  createdAt: string;
110
- } | unknown;
110
+ } | null;
111
111
  createdAt: string;
112
112
  updatedAt: string;
113
113
  }>;
@@ -137,7 +137,7 @@ declare const buildPipelineDefinitionsClient: (pipelineDefinitions: PipelineDefi
137
137
  projectId: string;
138
138
  key: string;
139
139
  name: string;
140
- archivedAt: string | unknown;
140
+ archivedAt: string | null;
141
141
  currentVersion: {
142
142
  id: string;
143
143
  pipelineDefinitionId: string;
@@ -152,7 +152,7 @@ declare const buildPipelineDefinitionsClient: (pipelineDefinitions: PipelineDefi
152
152
  stepDefinitionId: string;
153
153
  }>;
154
154
  createdAt: string;
155
- } | unknown;
155
+ } | null;
156
156
  createdAt: string;
157
157
  updatedAt: string;
158
158
  };
@@ -162,7 +162,7 @@ declare const buildPipelineDefinitionsClient: (pipelineDefinitions: PipelineDefi
162
162
  projectId: string;
163
163
  key: string;
164
164
  name: string;
165
- archivedAt: string | unknown;
165
+ archivedAt: string | null;
166
166
  currentVersion: {
167
167
  id: string;
168
168
  pipelineDefinitionId: string;
@@ -177,7 +177,7 @@ declare const buildPipelineDefinitionsClient: (pipelineDefinitions: PipelineDefi
177
177
  stepDefinitionId: string;
178
178
  }>;
179
179
  createdAt: string;
180
- } | unknown;
180
+ } | null;
181
181
  createdAt: string;
182
182
  updatedAt: string;
183
183
  }>;
@@ -33,7 +33,7 @@ import {
33
33
  resolveMcpChecks,
34
34
  toStepHandle,
35
35
  toStepSpec
36
- } from "../../chunk-y2s9kpfp.js";
36
+ } from "../../chunk-d4e1kz6h.js";
37
37
  import"../../chunk-e1h021kq.js";
38
38
  import"../../chunk-63f90zky.js";
39
39
  import"../../chunk-jj9pezwb.js";
@@ -41,8 +41,8 @@ import"../../chunk-y11p1q7r.js";
41
41
  import"../../chunk-5zsavw98.js";
42
42
  import"../../chunk-4ggr8af6.js";
43
43
  import"../../chunk-k4y5qt4y.js";
44
- import"../../chunk-ejzfdm1z.js";
45
- import"../../chunk-vmdn05vj.js";
44
+ import"../../chunk-xzx08r6y.js";
45
+ import"../../chunk-c3xzrd3w.js";
46
46
  import"../../chunk-ngy1fdcx.js";
47
47
  import"../../chunk-y2pv8d6a.js";
48
48
  import"../../chunk-01nfqm18.js";
@@ -1,4 +1,4 @@
1
- import { type RepoConfigInput } from "../../repo-config";
1
+ import { type RepoConfigInput, type RepoGitCredentials } from "../../repo-config";
2
2
  import { type PromptInputProxy } from "./prompt-template";
3
3
  import type { RuntimeSpec } from "./runtime";
4
4
  /**
@@ -10,10 +10,19 @@ import type { RuntimeSpec } from "./runtime";
10
10
  export type NoneRepoSpec = {
11
11
  readonly mode: "none";
12
12
  };
13
+ type GitCredentialsOpt = {
14
+ /**
15
+ * Defaults to `"auto"`: git inside the container gets credentials (for
16
+ * private submodules or dependencies) through the worker's per-run
17
+ * credential relay, when the worker has it enabled. The credential may be
18
+ * able to push. `"none"` opts the step out.
19
+ */
20
+ readonly gitCredentials?: RepoGitCredentials;
21
+ };
13
22
  /** Clones and checks out the base branch; creates no branch, commits and pushes nothing. */
14
23
  export type ReadOnlyRepoSpec = {
15
24
  readonly mode: "readOnly";
16
- };
25
+ } & GitCredentialsOpt;
17
26
  export type ReadWriteRepoSpec = {
18
27
  readonly mode: "readWrite";
19
28
  /**
@@ -24,7 +33,7 @@ export type ReadWriteRepoSpec = {
24
33
  readonly message?: string;
25
34
  /** Defaults to `"fail"`: a failed push fails the step. */
26
35
  readonly onPushFailure?: "fail" | "warn";
27
- };
36
+ } & GitCredentialsOpt;
28
37
  export type RepoSpec = NoneRepoSpec | ReadOnlyRepoSpec | ReadWriteRepoSpec;
29
38
  /** What `Runtime.devcontainer()` and `Runtime.managed.<id>()` accept. */
30
39
  export type DevcontainerRepoSpec = ReadOnlyRepoSpec | ReadWriteRepoSpec;
@@ -43,6 +52,7 @@ export type RepoFn<TInput, TResult, TSpec extends RepoSpec> = (context: {
43
52
  workItem: PromptInputProxy<CommitMessageWorkItem>;
44
53
  }) => TSpec;
45
54
  export type RepoField<TInput, TResult, TSpec extends RepoSpec> = TSpec | RepoFn<TInput, TResult, TSpec>;
55
+ export type ReadOnlyRepoOpts = Omit<ReadOnlyRepoSpec, "mode">;
46
56
  export type ReadWriteRepoOpts = Omit<ReadWriteRepoSpec, "mode">;
47
57
  export declare const Repo: {
48
58
  /**
@@ -55,7 +65,7 @@ export declare const Repo: {
55
65
  * nothing, pushes nothing and reports no `workBranch`. A policy, not a
56
66
  * sandbox: edits the agent makes stay in the workspace and are discarded.
57
67
  */
58
- readonly readOnly: () => ReadOnlyRepoSpec;
68
+ readonly readOnly: (opts?: ReadOnlyRepoOpts) => ReadOnlyRepoSpec;
59
69
  /**
60
70
  * Creates a work branch, then commits and pushes it when the step succeeds.
61
71
  * This is the default for a devcontainer step.
@@ -73,3 +83,4 @@ export type CompileRepoContext = {
73
83
  * the `repoConfigInputSchema` rules.
74
84
  */
75
85
  export declare function compileRepo<TInput, TResult>(repo: RepoField<TInput, TResult, RepoSpec> | undefined, runtime: RuntimeSpec | undefined, ctx?: CompileRepoContext): RepoConfigInput | undefined;
86
+ export {};