@foss.global/interfaces 0.6.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/changelog.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-07-21 - 0.8.0
4
+
5
+ ### Features
6
+
7
+ - add repository-scoped CI cache protocol contracts (ci-caches)
8
+ - Add exact cache key, declared restore path, save policy, and retention job specifications.
9
+ - Allow runners to advertise cache capability and return generation-fenced save metadata.
10
+ - Add export coverage for the new cache contract shapes.
11
+
12
+ ## 2026-07-21 - 0.7.0
13
+
14
+ ### Features
15
+
16
+ - add repository issue mutation contracts (repository-issues)
17
+ - Add public typed request contracts for issue creation, comment creation, and state updates.
18
+ - Constrain public issue state values to open or closed.
19
+ - Add test coverage for exported repository issue mutation request types.
20
+
3
21
  ## 2026-07-21 - 0.6.0
4
22
 
5
23
  ### Features
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@foss.global/interfaces',
6
- version: '0.6.0',
6
+ version: '0.8.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the foss.global Git platform ecosystem.'
8
8
  };
9
9
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx5QkFBeUI7SUFDL0IsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLHFHQUFxRztDQUNuSCxDQUFBIn0=
@@ -90,12 +90,13 @@ export interface IPublicIssueLabel {
90
90
  name: string;
91
91
  color: string;
92
92
  }
93
+ export type TRepositoryIssueState = 'open' | 'closed';
93
94
  export interface IPublicIssue {
94
95
  number: number;
95
96
  title: string;
96
97
  body: string;
97
98
  htmlUrl: string;
98
- state: string;
99
+ state: TRepositoryIssueState;
99
100
  comments: number;
100
101
  createdAt: string;
101
102
  updatedAt: string;
@@ -4,6 +4,7 @@ export type TOciRuntime = 'docker' | 'podman';
4
4
  export type TJobNetwork = 'none' | 'bridge';
5
5
  export type TLogStream = 'stdout' | 'stderr' | 'runner';
6
6
  export type TJobArtifactWhen = 'always' | 'success' | 'failure';
7
+ export type TJobCacheSaveWhen = 'always' | 'success';
7
8
  export type TJobCompletionStatus = 'succeeded' | 'failed' | 'canceled' | 'timed_out' | 'system_error';
8
9
  export type TCiJobState = 'queued' | 'running' | TJobCompletionStatus;
9
10
  export interface IRunnerCredential {
@@ -17,7 +18,7 @@ export interface IRunnerCapabilities {
17
18
  networks: TJobNetwork[];
18
19
  sourceArchives: ['tar.gz'];
19
20
  artifacts: boolean;
20
- caches: false;
21
+ caches: boolean;
21
22
  serviceContainers: false;
22
23
  }
23
24
  export interface IRegisterRunnerRequest {
@@ -71,6 +72,13 @@ export interface IJobArtifactSpec {
71
72
  required?: boolean;
72
73
  retentionDays?: number;
73
74
  }
75
+ export interface IJobCacheSpec {
76
+ name: string;
77
+ key: string;
78
+ paths: string[];
79
+ saveWhen?: TJobCacheSaveWhen;
80
+ retentionDays?: number;
81
+ }
74
82
  export interface IJobSpec {
75
83
  image: string;
76
84
  command: string[];
@@ -81,6 +89,7 @@ export interface IJobSpec {
81
89
  resources?: IJobResources;
82
90
  source?: IJobSourceArchive;
83
91
  artifacts?: IJobArtifactSpec[];
92
+ caches?: IJobCacheSpec[];
84
93
  }
85
94
  export interface IJobLease {
86
95
  jobId: string;
@@ -135,6 +144,16 @@ export interface ICiArtifactUploadResponse {
135
144
  createdAt: string;
136
145
  expiresAt: string;
137
146
  }
147
+ export interface ICiCacheSaveResponse {
148
+ name: string;
149
+ key: string;
150
+ generation: number;
151
+ sha256: string;
152
+ sizeBytes: number;
153
+ createdAt: string;
154
+ updatedAt: string;
155
+ expiresAt: string;
156
+ }
138
157
  export interface ICompleteJobRequest extends IJobMutationIdentity {
139
158
  status: TJobCompletionStatus;
140
159
  exitCode: number | null;
@@ -131,3 +131,42 @@ export interface IReq_RepositoryCiArtifacts extends plugins.typedrequestInterfac
131
131
  };
132
132
  response: data.IRepositoryCiArtifactListView;
133
133
  }
134
+ export interface IReq_RepositoryIssueCreate extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_RepositoryIssueCreate> {
135
+ method: 'repositoryIssueCreate';
136
+ request: {
137
+ org: string;
138
+ repo: string;
139
+ title: string;
140
+ body: string;
141
+ accessToken: string;
142
+ };
143
+ response: {
144
+ issue: data.IPublicIssue;
145
+ };
146
+ }
147
+ export interface IReq_RepositoryIssueCommentCreate extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_RepositoryIssueCommentCreate> {
148
+ method: 'repositoryIssueCommentCreate';
149
+ request: {
150
+ org: string;
151
+ repo: string;
152
+ issueNumber: number;
153
+ body: string;
154
+ accessToken: string;
155
+ };
156
+ response: {
157
+ comment: data.IPublicIssueComment;
158
+ };
159
+ }
160
+ export interface IReq_RepositoryIssueStateUpdate extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_RepositoryIssueStateUpdate> {
161
+ method: 'repositoryIssueStateUpdate';
162
+ request: {
163
+ org: string;
164
+ repo: string;
165
+ issueNumber: number;
166
+ state: data.TRepositoryIssueState;
167
+ accessToken: string;
168
+ };
169
+ response: {
170
+ issue: data.IPublicIssue;
171
+ };
172
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foss.global/interfaces",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "private": false,
5
5
  "description": "Shared TypeScript interfaces and TypedRequest contracts for the foss.global Git platform ecosystem.",
6
6
  "exports": {
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@foss.global/interfaces',
6
- version: '0.6.0',
6
+ version: '0.8.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the foss.global Git platform ecosystem.'
8
8
  }
package/ts/data/public.ts CHANGED
@@ -111,12 +111,14 @@ export interface IPublicIssueLabel {
111
111
  color: string;
112
112
  }
113
113
 
114
+ export type TRepositoryIssueState = 'open' | 'closed';
115
+
114
116
  export interface IPublicIssue {
115
117
  number: number;
116
118
  title: string;
117
119
  body: string;
118
120
  htmlUrl: string;
119
- state: string;
121
+ state: TRepositoryIssueState;
120
122
  comments: number;
121
123
  createdAt: string;
122
124
  updatedAt: string;
package/ts/data/runner.ts CHANGED
@@ -5,6 +5,7 @@ export type TOciRuntime = 'docker' | 'podman';
5
5
  export type TJobNetwork = 'none' | 'bridge';
6
6
  export type TLogStream = 'stdout' | 'stderr' | 'runner';
7
7
  export type TJobArtifactWhen = 'always' | 'success' | 'failure';
8
+ export type TJobCacheSaveWhen = 'always' | 'success';
8
9
  export type TJobCompletionStatus =
9
10
  | 'succeeded'
10
11
  | 'failed'
@@ -25,7 +26,7 @@ export interface IRunnerCapabilities {
25
26
  networks: TJobNetwork[];
26
27
  sourceArchives: ['tar.gz'];
27
28
  artifacts: boolean;
28
- caches: false;
29
+ caches: boolean;
29
30
  serviceContainers: false;
30
31
  }
31
32
 
@@ -89,6 +90,14 @@ export interface IJobArtifactSpec {
89
90
  retentionDays?: number;
90
91
  }
91
92
 
93
+ export interface IJobCacheSpec {
94
+ name: string;
95
+ key: string;
96
+ paths: string[];
97
+ saveWhen?: TJobCacheSaveWhen;
98
+ retentionDays?: number;
99
+ }
100
+
92
101
  export interface IJobSpec {
93
102
  image: string;
94
103
  command: string[];
@@ -99,6 +108,7 @@ export interface IJobSpec {
99
108
  resources?: IJobResources;
100
109
  source?: IJobSourceArchive;
101
110
  artifacts?: IJobArtifactSpec[];
111
+ caches?: IJobCacheSpec[];
102
112
  }
103
113
 
104
114
  export interface IJobLease {
@@ -162,6 +172,17 @@ export interface ICiArtifactUploadResponse {
162
172
  expiresAt: string;
163
173
  }
164
174
 
175
+ export interface ICiCacheSaveResponse {
176
+ name: string;
177
+ key: string;
178
+ generation: number;
179
+ sha256: string;
180
+ sizeBytes: number;
181
+ createdAt: string;
182
+ updatedAt: string;
183
+ expiresAt: string;
184
+ }
185
+
165
186
  export interface ICompleteJobRequest extends IJobMutationIdentity {
166
187
  status: TJobCompletionStatus;
167
188
  exitCode: number | null;
@@ -181,3 +181,57 @@ export interface IReq_RepositoryCiArtifacts
181
181
  };
182
182
  response: data.IRepositoryCiArtifactListView;
183
183
  }
184
+
185
+ export interface IReq_RepositoryIssueCreate
186
+ extends plugins.typedrequestInterfaces.implementsTR<
187
+ plugins.typedrequestInterfaces.ITypedRequest,
188
+ IReq_RepositoryIssueCreate
189
+ > {
190
+ method: 'repositoryIssueCreate';
191
+ request: {
192
+ org: string;
193
+ repo: string;
194
+ title: string;
195
+ body: string;
196
+ accessToken: string;
197
+ };
198
+ response: {
199
+ issue: data.IPublicIssue;
200
+ };
201
+ }
202
+
203
+ export interface IReq_RepositoryIssueCommentCreate
204
+ extends plugins.typedrequestInterfaces.implementsTR<
205
+ plugins.typedrequestInterfaces.ITypedRequest,
206
+ IReq_RepositoryIssueCommentCreate
207
+ > {
208
+ method: 'repositoryIssueCommentCreate';
209
+ request: {
210
+ org: string;
211
+ repo: string;
212
+ issueNumber: number;
213
+ body: string;
214
+ accessToken: string;
215
+ };
216
+ response: {
217
+ comment: data.IPublicIssueComment;
218
+ };
219
+ }
220
+
221
+ export interface IReq_RepositoryIssueStateUpdate
222
+ extends plugins.typedrequestInterfaces.implementsTR<
223
+ plugins.typedrequestInterfaces.ITypedRequest,
224
+ IReq_RepositoryIssueStateUpdate
225
+ > {
226
+ method: 'repositoryIssueStateUpdate';
227
+ request: {
228
+ org: string;
229
+ repo: string;
230
+ issueNumber: number;
231
+ state: data.TRepositoryIssueState;
232
+ accessToken: string;
233
+ };
234
+ response: {
235
+ issue: data.IPublicIssue;
236
+ };
237
+ }