@pome-sh/checks 0.1.2 → 0.1.4
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 +44 -0
- package/dist/_types/twin-github/src/seed.d.ts +42 -1
- package/dist/_types/twin-github/src/types.d.ts +37 -0
- package/dist/_types/twin-linear/src/types.d.ts +46 -4
- package/dist/{chunk-UCV6YLN2.js → chunk-JVCGWAZQ.js} +73 -1
- package/dist/github.js +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# @pome-sh/checks
|
|
2
2
|
|
|
3
|
+
## 0.1.4
|
|
4
|
+
|
|
5
|
+
Carries twin-github's widened seed schema to the grader (F-1421). One thing
|
|
6
|
+
moves in `dist/`: `@pome-sh/checks/github`'s re-exported `seedSchema` — and with
|
|
7
|
+
it `parseSeed` — now accepts five entity types it used to strip silently.
|
|
8
|
+
|
|
9
|
+
- `repositories[].milestones[]`, `repositories[].tags[]`,
|
|
10
|
+
`repositories[].releases[]`
|
|
11
|
+
- `repositories[].issues[].comments[]` and
|
|
12
|
+
`repositories[].pull_requests[].comments[]`
|
|
13
|
+
- `repositories[].pull_requests[].review_comments[]`
|
|
14
|
+
|
|
15
|
+
Every one is optional with a `[]` default, so a seed that parsed before parses
|
|
16
|
+
to the same value now. This is a widening, not a tightening: nothing a consumer
|
|
17
|
+
already sends can start failing.
|
|
18
|
+
|
|
19
|
+
Why it is owed a release rather than left to the twin: this package's job is to
|
|
20
|
+
carry the twins' seed schemas to a consumer that has no twin, and a consumer
|
|
21
|
+
validating a seed against 0.1.3 would strip exactly the keys twin-github 0.10.2
|
|
22
|
+
now honors — reporting a seed as accepted and a world as seeded while five
|
|
23
|
+
entities were dropped on the way. The two halves have to move together or the
|
|
24
|
+
copy on the grader's side becomes the one that decides what a seed may say.
|
|
25
|
+
|
|
26
|
+
No check declaration, template, polarity or vacuity sentinel changed, so no
|
|
27
|
+
existing criterion's verdict moves.
|
|
28
|
+
|
|
29
|
+
## 0.1.3
|
|
30
|
+
|
|
31
|
+
No change to the published surface — `dist/` is byte-identical to 0.1.2, so no
|
|
32
|
+
declaration moved and no consumer's verdict changes. The declaration layer has
|
|
33
|
+
not been touched since 0.1.2 was cut (`38acaf9`), which is the version-bump
|
|
34
|
+
gate doing its job rather than an absence of work.
|
|
35
|
+
|
|
36
|
+
What this version is for: it is the first release cut by following
|
|
37
|
+
[`RELEASING.md`](../../RELEASING.md) end to end since the `packages-v*` batch
|
|
38
|
+
flow was replaced by version-diff-on-push, and it exists to prove that runbook
|
|
39
|
+
is followable — bump, merge, `release.yml` publishes, pome-cloud pins. The
|
|
40
|
+
consumer half is the part that was actually owed: pome-cloud has been pinned at
|
|
41
|
+
0.1.1 since before 0.1.2 shipped, so F-1157's redaction-survival vocabulary has
|
|
42
|
+
not reached the grader.
|
|
43
|
+
|
|
44
|
+
Version-only bumps are accepted here rather than carrying an exception list,
|
|
45
|
+
per `cli/CHANGELOG.md` 0.21.7.
|
|
46
|
+
|
|
3
47
|
## 0.1.2
|
|
4
48
|
|
|
5
49
|
Carries F-1157 to the grader. Three things move in `dist/`:
|
|
@@ -26,6 +26,29 @@ export declare const seedSchema: z.ZodObject<{
|
|
|
26
26
|
content: z.ZodString;
|
|
27
27
|
branch: z.ZodOptional<z.ZodString>;
|
|
28
28
|
}, z.core.$strip>>>;
|
|
29
|
+
milestones: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
30
|
+
number: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
title: z.ZodString;
|
|
32
|
+
description: z.ZodDefault<z.ZodString>;
|
|
33
|
+
state: z.ZodDefault<z.ZodEnum<{
|
|
34
|
+
open: "open";
|
|
35
|
+
closed: "closed";
|
|
36
|
+
}>>;
|
|
37
|
+
due_on: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, z.core.$strip>>>;
|
|
39
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
40
|
+
name: z.ZodString;
|
|
41
|
+
target: z.ZodOptional<z.ZodString>;
|
|
42
|
+
}, z.core.$strip>>>;
|
|
43
|
+
releases: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
44
|
+
tag_name: z.ZodString;
|
|
45
|
+
name: z.ZodOptional<z.ZodString>;
|
|
46
|
+
body: z.ZodDefault<z.ZodString>;
|
|
47
|
+
target_commitish: z.ZodOptional<z.ZodString>;
|
|
48
|
+
draft: z.ZodDefault<z.ZodBoolean>;
|
|
49
|
+
prerelease: z.ZodDefault<z.ZodBoolean>;
|
|
50
|
+
author: z.ZodOptional<z.ZodString>;
|
|
51
|
+
}, z.core.$strip>>>;
|
|
29
52
|
issues: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
30
53
|
number: z.ZodOptional<z.ZodNumber>;
|
|
31
54
|
title: z.ZodString;
|
|
@@ -36,6 +59,10 @@ export declare const seedSchema: z.ZodObject<{
|
|
|
36
59
|
}>>;
|
|
37
60
|
labels: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
38
61
|
assignees: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
62
|
+
comments: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
63
|
+
body: z.ZodString;
|
|
64
|
+
author: z.ZodOptional<z.ZodString>;
|
|
65
|
+
}, z.core.$strip>>>;
|
|
39
66
|
}, z.core.$strip>>>;
|
|
40
67
|
pull_requests: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
41
68
|
number: z.ZodOptional<z.ZodNumber>;
|
|
@@ -61,12 +88,26 @@ export declare const seedSchema: z.ZodObject<{
|
|
|
61
88
|
context: z.ZodDefault<z.ZodString>;
|
|
62
89
|
state: z.ZodDefault<z.ZodEnum<{
|
|
63
90
|
error: "error";
|
|
91
|
+
success: "success";
|
|
64
92
|
failure: "failure";
|
|
65
93
|
pending: "pending";
|
|
66
|
-
success: "success";
|
|
67
94
|
}>>;
|
|
68
95
|
description: z.ZodDefault<z.ZodString>;
|
|
69
96
|
}, z.core.$strip>>>;
|
|
97
|
+
comments: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
98
|
+
body: z.ZodString;
|
|
99
|
+
author: z.ZodOptional<z.ZodString>;
|
|
100
|
+
}, z.core.$strip>>>;
|
|
101
|
+
review_comments: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
102
|
+
body: z.ZodString;
|
|
103
|
+
path: z.ZodString;
|
|
104
|
+
line: z.ZodDefault<z.ZodNumber>;
|
|
105
|
+
side: z.ZodDefault<z.ZodEnum<{
|
|
106
|
+
LEFT: "LEFT";
|
|
107
|
+
RIGHT: "RIGHT";
|
|
108
|
+
}>>;
|
|
109
|
+
author: z.ZodOptional<z.ZodString>;
|
|
110
|
+
}, z.core.$strip>>>;
|
|
70
111
|
}, z.core.$strip>>>;
|
|
71
112
|
}, z.core.$strip>>;
|
|
72
113
|
}, z.core.$strip>;
|
|
@@ -27,6 +27,26 @@ export type SeedRepository = {
|
|
|
27
27
|
content: string;
|
|
28
28
|
branch?: string;
|
|
29
29
|
}>;
|
|
30
|
+
milestones?: Array<{
|
|
31
|
+
number?: number;
|
|
32
|
+
title: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
state?: "open" | "closed";
|
|
35
|
+
due_on?: string;
|
|
36
|
+
}>;
|
|
37
|
+
tags?: Array<{
|
|
38
|
+
name: string;
|
|
39
|
+
target?: string;
|
|
40
|
+
}>;
|
|
41
|
+
releases?: Array<{
|
|
42
|
+
tag_name: string;
|
|
43
|
+
name?: string;
|
|
44
|
+
body?: string;
|
|
45
|
+
target_commitish?: string;
|
|
46
|
+
draft?: boolean;
|
|
47
|
+
prerelease?: boolean;
|
|
48
|
+
author?: string;
|
|
49
|
+
}>;
|
|
30
50
|
issues?: Array<{
|
|
31
51
|
number?: number;
|
|
32
52
|
title: string;
|
|
@@ -34,6 +54,7 @@ export type SeedRepository = {
|
|
|
34
54
|
state?: "open" | "closed";
|
|
35
55
|
labels?: string[];
|
|
36
56
|
assignees?: string[];
|
|
57
|
+
comments?: SeedComment[];
|
|
37
58
|
}>;
|
|
38
59
|
pull_requests?: Array<{
|
|
39
60
|
number?: number;
|
|
@@ -53,8 +74,24 @@ export type SeedRepository = {
|
|
|
53
74
|
state?: "error" | "failure" | "pending" | "success";
|
|
54
75
|
description?: string;
|
|
55
76
|
}>;
|
|
77
|
+
comments?: SeedComment[];
|
|
78
|
+
review_comments?: Array<{
|
|
79
|
+
body: string;
|
|
80
|
+
path: string;
|
|
81
|
+
line?: number;
|
|
82
|
+
side?: "LEFT" | "RIGHT";
|
|
83
|
+
author?: string;
|
|
84
|
+
}>;
|
|
56
85
|
}>;
|
|
57
86
|
};
|
|
87
|
+
/**
|
|
88
|
+
* A conversation comment on an issue OR a pull request — one shape, because
|
|
89
|
+
* they are one table and one route on GitHub too (F-1151).
|
|
90
|
+
*/
|
|
91
|
+
export type SeedComment = {
|
|
92
|
+
body: string;
|
|
93
|
+
author?: string;
|
|
94
|
+
};
|
|
58
95
|
export type RepoRow = {
|
|
59
96
|
id: number;
|
|
60
97
|
owner: string;
|
|
@@ -4,7 +4,44 @@ export type LinearWorkflowStateType = "backlog" | "unstarted" | "started" | "com
|
|
|
4
4
|
export type LinearTokenType = "personal" | "oauth_access" | "oauth_refresh" | "client_credentials";
|
|
5
5
|
export type LinearTokenActorType = "user" | "app";
|
|
6
6
|
export type LinearIssuePriority = 0 | 1 | 2 | 3 | 4;
|
|
7
|
+
/** Linear's `AgentActivityType` enum, member-for-member — the `content` discriminator. */
|
|
7
8
|
export type LinearAgentActivityType = "thought" | "elicitation" | "action" | "response" | "error" | "prompt";
|
|
9
|
+
/** Linear's `AgentActivitySignal` enum, member-for-member (F-1176). */
|
|
10
|
+
export type LinearAgentActivitySignal = "stop" | "continue" | "auth" | "select";
|
|
11
|
+
/**
|
|
12
|
+
* Linear's `AgentActivityContent` union, member-for-member (F-1176).
|
|
13
|
+
*
|
|
14
|
+
* Upstream this is a real GraphQL union discriminated on `type`, whose six
|
|
15
|
+
* members are `AgentActivity{Thought,Action,Response,Elicitation,Error,Prompt}
|
|
16
|
+
* Content`. Five of the six carry `body`; `action` carries `action` /
|
|
17
|
+
* `parameter` / `result` instead, which is why an activity's payload cannot be
|
|
18
|
+
* flattened back to the `{ type, body }` pair the twin used to accept.
|
|
19
|
+
*
|
|
20
|
+
* `bodyData` / `resultData` are upstream's structured companions to the text
|
|
21
|
+
* fields. The twin does not derive them, but it accepts and stores them rather
|
|
22
|
+
* than refusing an agent that was written against real Linear and sends them.
|
|
23
|
+
*/
|
|
24
|
+
export type LinearAgentActivityContent = {
|
|
25
|
+
type: "thought" | "response" | "elicitation";
|
|
26
|
+
body: string;
|
|
27
|
+
bodyData?: unknown;
|
|
28
|
+
} | {
|
|
29
|
+
type: "prompt";
|
|
30
|
+
body: string;
|
|
31
|
+
title?: string | null;
|
|
32
|
+
bodyData?: unknown;
|
|
33
|
+
} | {
|
|
34
|
+
type: "error";
|
|
35
|
+
body: string;
|
|
36
|
+
reasonCode?: string | null;
|
|
37
|
+
bodyData?: unknown;
|
|
38
|
+
} | {
|
|
39
|
+
type: "action";
|
|
40
|
+
action: string;
|
|
41
|
+
parameter: string;
|
|
42
|
+
result?: string | null;
|
|
43
|
+
resultData?: unknown;
|
|
44
|
+
};
|
|
8
45
|
/** Linear's `AgentSessionStatus` enum, member-for-member (F-1172). */
|
|
9
46
|
export type LinearAgentSessionStatus = "pending" | "active" | "awaitingInput" | "complete" | "error" | "stale";
|
|
10
47
|
/** One entry of Linear's `AgentSession.externalUrls` JSON payload. */
|
|
@@ -208,10 +245,15 @@ export type LinearAgentSession = {
|
|
|
208
245
|
};
|
|
209
246
|
export type LinearAgentActivity = {
|
|
210
247
|
id: string;
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
248
|
+
agentSessionId: string;
|
|
249
|
+
/**
|
|
250
|
+
* Non-null, matching Linear's `AgentActivity.user: User!`. The column is
|
|
251
|
+
* still nullable — its FK is `ON DELETE SET NULL` — so this is enforced at
|
|
252
|
+
* the read boundary, next to the status check, rather than assumed.
|
|
253
|
+
*/
|
|
254
|
+
userId: string;
|
|
255
|
+
content: LinearAgentActivityContent;
|
|
256
|
+
signal: LinearAgentActivitySignal | null;
|
|
215
257
|
ephemeral: boolean;
|
|
216
258
|
createdAt: string;
|
|
217
259
|
updatedAt: string;
|
|
@@ -863,13 +863,61 @@ var seedSchema = z.object({
|
|
|
863
863
|
description: z.string().default("")
|
|
864
864
|
})).default([]),
|
|
865
865
|
files: z.array(z.object({ path: z.string().min(1), content: z.string(), branch: z.string().optional() })).default([]),
|
|
866
|
+
// F-1421 — milestones, tags and releases are repository-level entities the
|
|
867
|
+
// twin already SERVES (`GET /milestones`, `/tags`, `/releases`,
|
|
868
|
+
// `/releases/latest`, `/releases/tags/:tag`) and the seed could not
|
|
869
|
+
// express. Zod strips unknown keys, so a seed naming one reached the
|
|
870
|
+
// domain as nothing at all and those routes could only ever answer `[]`
|
|
871
|
+
// — a shape of infidelity no shape-diff can see, because an empty array
|
|
872
|
+
// on both sides compares zero elements.
|
|
873
|
+
milestones: z.array(z.object({
|
|
874
|
+
// Assigned sequentially from 1 in seed order when omitted, the way
|
|
875
|
+
// `nextMilestoneNumber` hands them out. Honored when given, so a
|
|
876
|
+
// seed that pins `PATCH /milestones/2` addresses the milestone it
|
|
877
|
+
// named rather than one silently renumbered under it.
|
|
878
|
+
number: z.number().int().positive().optional(),
|
|
879
|
+
title: z.string().min(1),
|
|
880
|
+
description: z.string().default(""),
|
|
881
|
+
state: z.enum(["open", "closed"]).default("open"),
|
|
882
|
+
// GitHub's own spelling: an ISO 8601 timestamp. Absent means the
|
|
883
|
+
// milestone has no due date (`due_on: null` on the wire).
|
|
884
|
+
due_on: z.string().optional()
|
|
885
|
+
})).default([]),
|
|
886
|
+
// A tag names a commit. `target` is any ref the twin resolves — a branch
|
|
887
|
+
// name or a SHA — and defaults to the repository's default-branch head. A
|
|
888
|
+
// release whose `tag_name` matches an entry here reuses that tag rather
|
|
889
|
+
// than minting a second one: `createRelease` looks the tag up first.
|
|
890
|
+
tags: z.array(z.object({
|
|
891
|
+
name: z.string().min(1),
|
|
892
|
+
target: z.string().min(1).optional()
|
|
893
|
+
})).default([]),
|
|
894
|
+
releases: z.array(z.object({
|
|
895
|
+
tag_name: z.string().min(1),
|
|
896
|
+
// Nullable upstream, so an absent `name` means `null` — not `""`.
|
|
897
|
+
name: z.string().optional(),
|
|
898
|
+
body: z.string().default(""),
|
|
899
|
+
target_commitish: z.string().min(1).optional(),
|
|
900
|
+
draft: z.boolean().default(false),
|
|
901
|
+
prerelease: z.boolean().default(false),
|
|
902
|
+
author: z.string().min(1).optional()
|
|
903
|
+
})).default([]),
|
|
866
904
|
issues: z.array(z.object({
|
|
867
905
|
number: z.number().int().positive().optional(),
|
|
868
906
|
title: z.string().min(1),
|
|
869
907
|
body: z.string().default(""),
|
|
870
908
|
state: z.enum(["open", "closed"]).default("open"),
|
|
871
909
|
labels: z.array(z.string().min(1)).default([]),
|
|
872
|
-
assignees: z.array(z.string().min(1)).default([])
|
|
910
|
+
assignees: z.array(z.string().min(1)).default([]),
|
|
911
|
+
// The issue's conversation timeline, served at
|
|
912
|
+
// `GET /repos/:o/:r/issues/:n/comments` (F-1421). `author` is
|
|
913
|
+
// seeded honestly rather than taken from the write path, which
|
|
914
|
+
// stamps every comment `pome-agent`: a world in which the agent
|
|
915
|
+
// under test wrote every comment on the issue it is being asked to
|
|
916
|
+
// read is not one worth testing against.
|
|
917
|
+
comments: z.array(z.object({
|
|
918
|
+
body: z.string().min(1),
|
|
919
|
+
author: z.string().min(1).optional()
|
|
920
|
+
})).default([])
|
|
873
921
|
})).default([]),
|
|
874
922
|
pull_requests: z.array(z.object({
|
|
875
923
|
number: z.number().int().positive().optional(),
|
|
@@ -893,6 +941,30 @@ var seedSchema = z.object({
|
|
|
893
941
|
context: z.string().min(1).default("ci/build"),
|
|
894
942
|
state: z.enum(["error", "failure", "pending", "success"]).default("success"),
|
|
895
943
|
description: z.string().default("")
|
|
944
|
+
})).default([]),
|
|
945
|
+
// F-1421 — the PR's CONVERSATION timeline. Same table, same route
|
|
946
|
+
// and same number space as an issue's comments, because GitHub
|
|
947
|
+
// models a pull request as an issue (F-1151). This is the third
|
|
948
|
+
// thing a reader could call "a comment on the PR" and the seed
|
|
949
|
+
// keeps all three apart: `reviews[].body` is the prose on a review
|
|
950
|
+
// verdict, `review_comments[]` below is anchored to a file and
|
|
951
|
+
// line, and THIS one is the timeline.
|
|
952
|
+
comments: z.array(z.object({
|
|
953
|
+
body: z.string().min(1),
|
|
954
|
+
author: z.string().min(1).optional()
|
|
955
|
+
})).default([]),
|
|
956
|
+
// F-1421 — inline review comments, served at
|
|
957
|
+
// `GET /repos/:o/:r/pulls/:n/comments`. Seeded through the domain's
|
|
958
|
+
// own write path, so `path` must name a file the PR changes and
|
|
959
|
+
// `line` must exist in it: a seeded review comment is one
|
|
960
|
+
// `POST /pulls/:n/comments` could have produced, not a row only the
|
|
961
|
+
// seeder can make.
|
|
962
|
+
review_comments: z.array(z.object({
|
|
963
|
+
body: z.string().min(1),
|
|
964
|
+
path: z.string().min(1),
|
|
965
|
+
line: z.number().int().positive().default(1),
|
|
966
|
+
side: z.enum(["LEFT", "RIGHT"]).default("RIGHT"),
|
|
967
|
+
author: z.string().min(1).optional()
|
|
896
968
|
})).default([])
|
|
897
969
|
})).default([])
|
|
898
970
|
}))
|
package/dist/github.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { GITHUB_CHECKS, defaultSeedState, parseSeed, seedSchema } from './chunk-
|
|
1
|
+
export { GITHUB_CHECKS, defaultSeedState, parseSeed, seedSchema } from './chunk-JVCGWAZQ.js';
|
|
2
2
|
import './chunk-W2JNYULF.js';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './chunk-ZXE6LAM3.js';
|
|
2
|
-
import { GITHUB_CHECKS } from './chunk-
|
|
3
|
-
export { GITHUB_CHECKS, defaultSeedState as defaultGitHubSeed, seedSchema as githubSeedSchema, parseSeed as parseGitHubSeed } from './chunk-
|
|
2
|
+
import { GITHUB_CHECKS } from './chunk-JVCGWAZQ.js';
|
|
3
|
+
export { GITHUB_CHECKS, defaultSeedState as defaultGitHubSeed, seedSchema as githubSeedSchema, parseSeed as parseGitHubSeed } from './chunk-JVCGWAZQ.js';
|
|
4
4
|
import { GMAIL_CHECKS } from './chunk-SA23X6PB.js';
|
|
5
5
|
export { GMAIL_CHECKS, defaultSeedState as defaultGmailSeed, gmailSeedSchema, parseSeed as parseGmailSeed } from './chunk-SA23X6PB.js';
|
|
6
6
|
import { LINEAR_CHECKS } from './chunk-THOSO63W.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pome-sh/checks",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Pome's grading vocabulary — the check declarations, seed schemas and default seeds of all five digital twins, plus the check DSL they are written in. Declarations only: no twin server, no database, no routes, no tools.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|