@usine/orchestrator 0.1.0 → 0.2.1
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/README.md +46 -21
- package/dist/board/items.d.ts +18 -0
- package/dist/board/items.d.ts.map +1 -0
- package/dist/board/items.js +46 -0
- package/dist/board/items.js.map +1 -0
- package/dist/board/projection.d.ts +6 -5
- package/dist/board/projection.d.ts.map +1 -1
- package/dist/board/projection.js +25 -65
- package/dist/board/projection.js.map +1 -1
- package/dist/board/tasks.d.ts +8 -0
- package/dist/board/tasks.d.ts.map +1 -0
- package/dist/board/tasks.js +86 -0
- package/dist/board/tasks.js.map +1 -0
- package/dist/credentials.d.ts +6 -6
- package/dist/credentials.d.ts.map +1 -1
- package/dist/credentials.js +6 -6
- package/dist/credentials.js.map +1 -1
- package/dist/exe-dev.d.ts +5 -4
- package/dist/exe-dev.d.ts.map +1 -1
- package/dist/exe-dev.js +5 -4
- package/dist/exe-dev.js.map +1 -1
- package/dist/idle-triggers.d.ts +1 -1
- package/dist/idle-triggers.d.ts.map +1 -1
- package/dist/idle-triggers.js +3 -1
- package/dist/idle-triggers.js.map +1 -1
- package/dist/label-reconciler.d.ts +30 -0
- package/dist/label-reconciler.d.ts.map +1 -0
- package/dist/label-reconciler.js +119 -0
- package/dist/label-reconciler.js.map +1 -0
- package/dist/local.d.ts +17 -12
- package/dist/local.d.ts.map +1 -1
- package/dist/local.js +20 -13
- package/dist/local.js.map +1 -1
- package/dist/operator/attempt.d.ts +69 -0
- package/dist/operator/attempt.d.ts.map +1 -0
- package/dist/operator/attempt.js +62 -0
- package/dist/operator/attempt.js.map +1 -0
- package/dist/operator/board.d.ts +119 -0
- package/dist/operator/board.d.ts.map +1 -0
- package/dist/operator/board.js +101 -0
- package/dist/operator/board.js.map +1 -0
- package/dist/operator/http.d.ts +180 -0
- package/dist/operator/http.d.ts.map +1 -0
- package/dist/operator/http.js +150 -0
- package/dist/operator/http.js.map +1 -0
- package/dist/operator/need.d.ts +66 -0
- package/dist/operator/need.d.ts.map +1 -0
- package/dist/operator/need.js +70 -0
- package/dist/operator/need.js.map +1 -0
- package/dist/operator/operator.d.ts +68 -0
- package/dist/operator/operator.d.ts.map +1 -0
- package/dist/operator/operator.js +402 -0
- package/dist/operator/operator.js.map +1 -0
- package/dist/operator/overview.d.ts +51 -0
- package/dist/operator/overview.d.ts.map +1 -0
- package/dist/operator/overview.js +48 -0
- package/dist/operator/overview.js.map +1 -0
- package/dist/operator/projection.d.ts +12 -9
- package/dist/operator/projection.d.ts.map +1 -1
- package/dist/operator/projection.js +44 -17
- package/dist/operator/projection.js.map +1 -1
- package/dist/operator/run.d.ts +62 -0
- package/dist/operator/run.d.ts.map +1 -0
- package/dist/operator/run.js +61 -0
- package/dist/operator/run.js.map +1 -0
- package/dist/operator/transcript.d.ts +59 -0
- package/dist/operator/transcript.d.ts.map +1 -0
- package/dist/operator/transcript.js +66 -0
- package/dist/operator/transcript.js.map +1 -0
- package/dist/orchestrator.d.ts +3 -2
- package/dist/orchestrator.d.ts.map +1 -1
- package/dist/orchestrator.js +1 -1
- package/dist/orchestrator.js.map +1 -1
- package/dist/polling/cycle.d.ts +51 -0
- package/dist/polling/cycle.d.ts.map +1 -0
- package/dist/polling/cycle.js +44 -0
- package/dist/polling/cycle.js.map +1 -0
- package/dist/polling/hints.d.ts +20 -0
- package/dist/polling/hints.d.ts.map +1 -0
- package/dist/polling/hints.js +54 -0
- package/dist/polling/hints.js.map +1 -0
- package/dist/polling/loop-evaluation.d.ts +21 -0
- package/dist/polling/loop-evaluation.d.ts.map +1 -0
- package/dist/polling/loop-evaluation.js +131 -0
- package/dist/polling/loop-evaluation.js.map +1 -0
- package/dist/polling/polling.d.ts +36 -0
- package/dist/polling/polling.d.ts.map +1 -0
- package/dist/polling/polling.js +296 -0
- package/dist/polling/polling.js.map +1 -0
- package/dist/polling/repository-sync.d.ts +45 -0
- package/dist/polling/repository-sync.d.ts.map +1 -0
- package/dist/polling/repository-sync.js +169 -0
- package/dist/polling/repository-sync.js.map +1 -0
- package/dist/polling-triggers.d.ts +3 -39
- package/dist/polling-triggers.d.ts.map +1 -1
- package/dist/polling-triggers.js +3 -393
- package/dist/polling-triggers.js.map +1 -1
- package/dist/schedule-triggers.d.ts +17 -15
- package/dist/schedule-triggers.d.ts.map +1 -1
- package/dist/schedule-triggers.js +53 -43
- package/dist/schedule-triggers.js.map +1 -1
- package/dist/scheduler.d.ts +5 -5
- package/dist/scheduler.d.ts.map +1 -1
- package/dist/scheduler.js +30 -44
- package/dist/scheduler.js.map +1 -1
- package/dist/trigger-submission.d.ts +33 -24
- package/dist/trigger-submission.d.ts.map +1 -1
- package/dist/trigger-submission.js +30 -37
- package/dist/trigger-submission.js.map +1 -1
- package/package.json +50 -14
- package/dist/index.d.ts +0 -11
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -11
- package/dist/index.js.map +0 -1
- package/dist/operator/model.d.ts +0 -280
- package/dist/operator/model.d.ts.map +0 -1
- package/dist/operator/model.js +0 -242
- package/dist/operator/model.js.map +0 -1
- package/dist/operator/service.d.ts +0 -36
- package/dist/operator/service.d.ts.map +0 -1
- package/dist/operator/service.js +0 -248
- package/dist/operator/service.js.map +0 -1
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { RunView } from "./run.ts";
|
|
3
|
+
/** Identifies a lane within a Project's Board for operator moves. */
|
|
4
|
+
export declare const BoardLaneId: Schema.brand<Schema.NonEmptyString, "BoardLaneId">;
|
|
5
|
+
export type BoardLaneId = typeof BoardLaneId.Type;
|
|
6
|
+
/** Whether a lane came from authored settings, a proposal, or default grouping. */
|
|
7
|
+
export declare const BoardLaneOrigin: Schema.Literals<readonly ["authored", "proposed", "fallback"]>;
|
|
8
|
+
export type BoardLaneOrigin = typeof BoardLaneOrigin.Type;
|
|
9
|
+
declare const BoardItemLink_base: Schema.Class<BoardItemLink, Schema.Struct<{
|
|
10
|
+
readonly itemKey: Schema.brand<Schema.NonEmptyString, "ItemKey">;
|
|
11
|
+
readonly kind: Schema.Literals<readonly ["issue", "pr"]>;
|
|
12
|
+
readonly number: Schema.brand<Schema.Int, "ItemNumber">;
|
|
13
|
+
readonly title: Schema.String;
|
|
14
|
+
readonly url: Schema.NonEmptyString;
|
|
15
|
+
}>, {}>;
|
|
16
|
+
/** An Item linked to a Task, with its own title and external destination. */
|
|
17
|
+
export declare class BoardItemLink extends BoardItemLink_base {
|
|
18
|
+
}
|
|
19
|
+
declare const BoardTaskView_base: Schema.Class<BoardTaskView, Schema.Struct<{
|
|
20
|
+
readonly itemKey: Schema.brand<Schema.NonEmptyString, "ItemKey">;
|
|
21
|
+
readonly kind: Schema.Literals<readonly ["issue", "pr"]>;
|
|
22
|
+
readonly number: Schema.brand<Schema.Int, "ItemNumber">;
|
|
23
|
+
readonly title: Schema.String;
|
|
24
|
+
readonly url: Schema.NonEmptyString;
|
|
25
|
+
readonly state: Schema.Literals<readonly ["issue-open", "issue-closed", "pr-open", "pr-closed", "pr-merged"]>;
|
|
26
|
+
readonly labels: Schema.$Array<Schema.brand<Schema.String, "GitHubLabelName">>;
|
|
27
|
+
readonly items: Schema.$Array<typeof BoardItemLink>;
|
|
28
|
+
/** Every saved Run for the visible Items, ordered from earliest to latest. */
|
|
29
|
+
readonly runs: Schema.$Array<typeof RunView>;
|
|
30
|
+
readonly run: Schema.NullOr<typeof RunView>;
|
|
31
|
+
readonly needsYou: Schema.Boolean;
|
|
32
|
+
}>, {}>;
|
|
33
|
+
/** A Task projected from linked Items. The current Item determines the key, lane, labels, and move destination; the first issue supplies the Task title. */
|
|
34
|
+
export declare class BoardTaskView extends BoardTaskView_base {
|
|
35
|
+
}
|
|
36
|
+
declare const WritableBoardLaneView_base: Schema.Class<WritableBoardLaneView, Schema.TaggedStruct<"WritableBoardLane", {
|
|
37
|
+
readonly id: Schema.brand<Schema.NonEmptyString, "BoardLaneId">;
|
|
38
|
+
readonly name: Schema.brand<Schema.String, "LaneName">;
|
|
39
|
+
readonly sources: Schema.$Array<Schema.Union<readonly [typeof import("@usine/config/board").LabelLaneSource, typeof import("@usine/config/board").StateLaneSource]>>;
|
|
40
|
+
readonly items: Schema.$Array<typeof BoardTaskView>;
|
|
41
|
+
readonly origin: Schema.Literal<"authored">;
|
|
42
|
+
readonly labels: Schema.$Array<Schema.brand<Schema.String, "GitHubLabelName">>;
|
|
43
|
+
}>, {}>;
|
|
44
|
+
/** An authored lane the operator can move Items into by applying its configured GitHub labels. */
|
|
45
|
+
export declare class WritableBoardLaneView extends WritableBoardLaneView_base {
|
|
46
|
+
}
|
|
47
|
+
declare const ReadOnlyBoardLaneView_base: Schema.Class<ReadOnlyBoardLaneView, Schema.TaggedStruct<"ReadOnlyBoardLane", {
|
|
48
|
+
readonly id: Schema.brand<Schema.NonEmptyString, "BoardLaneId">;
|
|
49
|
+
readonly name: Schema.brand<Schema.String, "LaneName">;
|
|
50
|
+
readonly sources: Schema.$Array<Schema.Union<readonly [typeof import("@usine/config/board").LabelLaneSource, typeof import("@usine/config/board").StateLaneSource]>>;
|
|
51
|
+
readonly origin: Schema.Literals<readonly ["authored", "proposed", "fallback"]>;
|
|
52
|
+
readonly items: Schema.$Array<typeof BoardTaskView>;
|
|
53
|
+
}>, {}>;
|
|
54
|
+
/** A lane that groups Items without accepting label-based moves. */
|
|
55
|
+
export declare class ReadOnlyBoardLaneView extends ReadOnlyBoardLaneView_base {
|
|
56
|
+
}
|
|
57
|
+
/** A displayed lane whose variant determines whether operator moves are supported. */
|
|
58
|
+
export declare const BoardLaneView: Schema.Union<readonly [typeof WritableBoardLaneView, typeof ReadOnlyBoardLaneView]>;
|
|
59
|
+
export type BoardLaneView = typeof BoardLaneView.Type;
|
|
60
|
+
declare const BoardProjectionError_base: Schema.Class<BoardProjectionError, Schema.TaggedStruct<"BoardProjectionError", {
|
|
61
|
+
readonly repository: Schema.brand<Schema.String, "RepositoryName">;
|
|
62
|
+
readonly itemKey: Schema.brand<Schema.NonEmptyString, "ItemKey">;
|
|
63
|
+
readonly message: Schema.NonEmptyString;
|
|
64
|
+
}>, import("effect/Cause").YieldableError>;
|
|
65
|
+
/** An Item projection could not produce a Board card; other Items remain available. */
|
|
66
|
+
export declare class BoardProjectionError extends BoardProjectionError_base {
|
|
67
|
+
}
|
|
68
|
+
declare const BoardView_base: Schema.Class<BoardView, Schema.Struct<{
|
|
69
|
+
readonly lanes: Schema.$Array<Schema.Union<readonly [typeof WritableBoardLaneView, typeof ReadOnlyBoardLaneView]>>;
|
|
70
|
+
readonly failures: Schema.$Array<typeof BoardProjectionError>;
|
|
71
|
+
}>, {}>;
|
|
72
|
+
/** The Project's lanes and the Item failures encountered while constructing their cards. */
|
|
73
|
+
export declare class BoardView extends BoardView_base {
|
|
74
|
+
}
|
|
75
|
+
declare const LabelView_base: Schema.Class<LabelView, Schema.Struct<{
|
|
76
|
+
readonly name: Schema.brand<Schema.String, "GitHubLabelName">;
|
|
77
|
+
readonly color: Schema.NullOr<Schema.String>;
|
|
78
|
+
readonly description: Schema.NullOr<Schema.String>;
|
|
79
|
+
}>, {}>;
|
|
80
|
+
/** A repository label as GitHub shows it. Color is null for catalogs stored before colors were kept. */
|
|
81
|
+
export declare class LabelView extends LabelView_base {
|
|
82
|
+
}
|
|
83
|
+
declare const BoardMove_base: Schema.Class<BoardMove, Schema.Struct<{
|
|
84
|
+
readonly repository: Schema.brand<Schema.String, "RepositoryName">;
|
|
85
|
+
readonly item: Schema.brand<Schema.Int, "ItemNumber">;
|
|
86
|
+
readonly toLane: Schema.brand<Schema.NonEmptyString, "BoardLaneId">;
|
|
87
|
+
}>, {}>;
|
|
88
|
+
/** An operator request to move one Project Item into a destination lane. */
|
|
89
|
+
export declare class BoardMove extends BoardMove_base {
|
|
90
|
+
}
|
|
91
|
+
declare const BoardProjectNotFoundError_base: Schema.Class<BoardProjectNotFoundError, Schema.TaggedStruct<"BoardProjectNotFoundError", {
|
|
92
|
+
readonly repository: Schema.brand<Schema.String, "RepositoryName">;
|
|
93
|
+
}>, import("effect/Cause").YieldableError>;
|
|
94
|
+
/** The requested Project is absent from the operator overview. */
|
|
95
|
+
export declare class BoardProjectNotFoundError extends BoardProjectNotFoundError_base {
|
|
96
|
+
}
|
|
97
|
+
declare const BoardItemNotFoundError_base: Schema.Class<BoardItemNotFoundError, Schema.TaggedStruct<"BoardItemNotFoundError", {
|
|
98
|
+
readonly repository: Schema.brand<Schema.String, "RepositoryName">;
|
|
99
|
+
readonly item: Schema.brand<Schema.Int, "ItemNumber">;
|
|
100
|
+
}>, import("effect/Cause").YieldableError>;
|
|
101
|
+
/** The requested Item is absent from the Project's Board. */
|
|
102
|
+
export declare class BoardItemNotFoundError extends BoardItemNotFoundError_base {
|
|
103
|
+
}
|
|
104
|
+
declare const BoardLaneNotFoundError_base: Schema.Class<BoardLaneNotFoundError, Schema.TaggedStruct<"BoardLaneNotFoundError", {
|
|
105
|
+
readonly repository: Schema.brand<Schema.String, "RepositoryName">;
|
|
106
|
+
readonly lane: Schema.brand<Schema.NonEmptyString, "BoardLaneId">;
|
|
107
|
+
}>, import("effect/Cause").YieldableError>;
|
|
108
|
+
/** The requested destination lane is absent from the Project's Board. */
|
|
109
|
+
export declare class BoardLaneNotFoundError extends BoardLaneNotFoundError_base {
|
|
110
|
+
}
|
|
111
|
+
declare const BoardLaneReadOnlyError_base: Schema.Class<BoardLaneReadOnlyError, Schema.TaggedStruct<"BoardLaneReadOnlyError", {
|
|
112
|
+
readonly repository: Schema.brand<Schema.String, "RepositoryName">;
|
|
113
|
+
readonly lane: Schema.brand<Schema.NonEmptyString, "BoardLaneId">;
|
|
114
|
+
}>, import("effect/Cause").YieldableError>;
|
|
115
|
+
/** The requested destination lane does not accept label-based moves. */
|
|
116
|
+
export declare class BoardLaneReadOnlyError extends BoardLaneReadOnlyError_base {
|
|
117
|
+
}
|
|
118
|
+
export {};
|
|
119
|
+
//# sourceMappingURL=board.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3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EAAwE;AACxE,qBAAa,sBAAuB,SAAQ,2BAK1C;CAAG"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { ItemKey, ItemNumber } from "@usine/core/item";
|
|
2
|
+
import { RepositoryName } from "@usine/core/repository";
|
|
3
|
+
import { GitHubLabelName } from "@usine/config/label";
|
|
4
|
+
import { LaneItemState, LaneName, LaneSource } from "@usine/config/board";
|
|
5
|
+
import { Schema } from "effect";
|
|
6
|
+
import { RunView } from "./run.js";
|
|
7
|
+
/** Identifies a lane within a Project's Board for operator moves. */
|
|
8
|
+
export const BoardLaneId = Schema.NonEmptyString.pipe(Schema.brand("BoardLaneId"));
|
|
9
|
+
/** Whether a lane came from authored settings, a proposal, or default grouping. */
|
|
10
|
+
export const BoardLaneOrigin = Schema.Literals(["authored", "proposed", "fallback"]);
|
|
11
|
+
/** An Item linked to a Task, with its own title and external destination. */
|
|
12
|
+
export class BoardItemLink extends Schema.Class("@usine/orchestrator/BoardItemLink")({
|
|
13
|
+
itemKey: ItemKey,
|
|
14
|
+
kind: Schema.Literals(["issue", "pr"]),
|
|
15
|
+
number: ItemNumber,
|
|
16
|
+
title: Schema.String,
|
|
17
|
+
url: Schema.NonEmptyString,
|
|
18
|
+
}) {
|
|
19
|
+
}
|
|
20
|
+
/** A Task projected from linked Items. The current Item determines the key, lane, labels, and move destination; the first issue supplies the Task title. */
|
|
21
|
+
export class BoardTaskView extends Schema.Class("@usine/orchestrator/BoardTaskView")({
|
|
22
|
+
...BoardItemLink.fields,
|
|
23
|
+
state: LaneItemState,
|
|
24
|
+
labels: Schema.Array(GitHubLabelName),
|
|
25
|
+
items: Schema.Array(BoardItemLink).check(Schema.isNonEmpty()),
|
|
26
|
+
/** Every saved Run for the visible Items, ordered from earliest to latest. */
|
|
27
|
+
runs: Schema.Array(RunView),
|
|
28
|
+
run: Schema.NullOr(RunView),
|
|
29
|
+
needsYou: Schema.Boolean,
|
|
30
|
+
}) {
|
|
31
|
+
}
|
|
32
|
+
const BoardLaneViewFields = {
|
|
33
|
+
id: BoardLaneId,
|
|
34
|
+
name: LaneName,
|
|
35
|
+
sources: Schema.Array(LaneSource),
|
|
36
|
+
origin: BoardLaneOrigin,
|
|
37
|
+
items: Schema.Array(BoardTaskView),
|
|
38
|
+
};
|
|
39
|
+
/** An authored lane the operator can move Items into by applying its configured GitHub labels. */
|
|
40
|
+
export class WritableBoardLaneView extends Schema.TaggedClass("@usine/orchestrator/WritableBoardLaneView")("WritableBoardLane", {
|
|
41
|
+
...BoardLaneViewFields,
|
|
42
|
+
origin: Schema.Literal("authored"),
|
|
43
|
+
labels: Schema.Array(GitHubLabelName).check(Schema.isNonEmpty()),
|
|
44
|
+
}) {
|
|
45
|
+
}
|
|
46
|
+
/** A lane that groups Items without accepting label-based moves. */
|
|
47
|
+
export class ReadOnlyBoardLaneView extends Schema.TaggedClass("@usine/orchestrator/ReadOnlyBoardLaneView")("ReadOnlyBoardLane", BoardLaneViewFields) {
|
|
48
|
+
}
|
|
49
|
+
/** A displayed lane whose variant determines whether operator moves are supported. */
|
|
50
|
+
export const BoardLaneView = Schema.Union([WritableBoardLaneView, ReadOnlyBoardLaneView]);
|
|
51
|
+
/** An Item projection could not produce a Board card; other Items remain available. */
|
|
52
|
+
export class BoardProjectionError extends Schema.TaggedError("@usine/orchestrator/BoardProjectionError")("BoardProjectionError", {
|
|
53
|
+
repository: RepositoryName,
|
|
54
|
+
itemKey: ItemKey,
|
|
55
|
+
message: Schema.NonEmptyString,
|
|
56
|
+
}) {
|
|
57
|
+
}
|
|
58
|
+
/** The Project's lanes and the Item failures encountered while constructing their cards. */
|
|
59
|
+
export class BoardView extends Schema.Class("@usine/orchestrator/BoardView")({
|
|
60
|
+
lanes: Schema.Array(BoardLaneView),
|
|
61
|
+
failures: Schema.Array(BoardProjectionError),
|
|
62
|
+
}) {
|
|
63
|
+
}
|
|
64
|
+
/** A repository label as GitHub shows it. Color is null for catalogs stored before colors were kept. */
|
|
65
|
+
export class LabelView extends Schema.Class("@usine/orchestrator/LabelView")({
|
|
66
|
+
name: GitHubLabelName,
|
|
67
|
+
color: Schema.NullOr(Schema.String),
|
|
68
|
+
description: Schema.NullOr(Schema.String),
|
|
69
|
+
}) {
|
|
70
|
+
}
|
|
71
|
+
/** An operator request to move one Project Item into a destination lane. */
|
|
72
|
+
export class BoardMove extends Schema.Class("@usine/orchestrator/BoardMove")({
|
|
73
|
+
repository: RepositoryName,
|
|
74
|
+
item: ItemNumber,
|
|
75
|
+
toLane: BoardLaneId,
|
|
76
|
+
}) {
|
|
77
|
+
}
|
|
78
|
+
/** The requested Project is absent from the operator overview. */
|
|
79
|
+
export class BoardProjectNotFoundError extends Schema.TaggedError("@usine/orchestrator/BoardProjectNotFoundError")("BoardProjectNotFoundError", {
|
|
80
|
+
repository: RepositoryName,
|
|
81
|
+
}) {
|
|
82
|
+
}
|
|
83
|
+
/** The requested Item is absent from the Project's Board. */
|
|
84
|
+
export class BoardItemNotFoundError extends Schema.TaggedError("@usine/orchestrator/BoardItemNotFoundError")("BoardItemNotFoundError", {
|
|
85
|
+
repository: RepositoryName,
|
|
86
|
+
item: ItemNumber,
|
|
87
|
+
}) {
|
|
88
|
+
}
|
|
89
|
+
/** The requested destination lane is absent from the Project's Board. */
|
|
90
|
+
export class BoardLaneNotFoundError extends Schema.TaggedError("@usine/orchestrator/BoardLaneNotFoundError")("BoardLaneNotFoundError", {
|
|
91
|
+
repository: RepositoryName,
|
|
92
|
+
lane: BoardLaneId,
|
|
93
|
+
}) {
|
|
94
|
+
}
|
|
95
|
+
/** The requested destination lane does not accept label-based moves. */
|
|
96
|
+
export class BoardLaneReadOnlyError extends Schema.TaggedError("@usine/orchestrator/BoardLaneReadOnlyError")("BoardLaneReadOnlyError", {
|
|
97
|
+
repository: RepositoryName,
|
|
98
|
+
lane: BoardLaneId,
|
|
99
|
+
}) {
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=board.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,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CAC5D,4CAA4C,CAC7C,CAAC,wBAAwB,EAAE;IAC1B,UAAU,EAAE,cAAc;IAC1B,IAAI,EAAE,WAAW;CAClB,CAAC;CAAG"}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { HttpApi, HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware } from "effect/unstable/httpapi";
|
|
3
|
+
import { ColdTranscriptRequest, EarlierTranscriptRequest, TailTranscriptRequest } from "./transcript.ts";
|
|
4
|
+
import { RunDetailView, EditAndRetry, SessionIntervention } from "./run.ts";
|
|
5
|
+
declare const OperatorHttpError_base: Schema.Class<OperatorHttpError, Schema.Struct<{
|
|
6
|
+
readonly error: Schema.Literals<("AppPermissionError" | "AttemptCancellationError" | "BackendUnavailableError" | "BoardItemNotFoundError" | "BoardLaneNotFoundError" | "BoardLaneReadOnlyError" | "BoardProjectNotFoundError" | "CrossSiteRequestError" | "CycleBudgetResetRejectedError" | "EnginePersistenceError" | "GitHubApiError" | "GitHubRateLimitError" | "HttpBodyError" | "InstallationDiscoveryError" | "InvalidGitHubResponseError" | "InvalidRequestError" | "RosterAgentNotFoundError" | "RunInterventionRejectedError" | "RunNotFoundError" | "RunOperationRejectedError" | "SchemaError" | "TranscriptAttemptNotFoundError")[]>;
|
|
7
|
+
readonly message: Schema.String;
|
|
8
|
+
}>, import("effect/Cause").YieldableError>;
|
|
9
|
+
/**
|
|
10
|
+
* An operator request that could not be fulfilled. `error` preserves the domain
|
|
11
|
+
* failure's identity and `message` is safe to show to the operator; persistence
|
|
12
|
+
* details, credentials, and defect causes never travel in this envelope.
|
|
13
|
+
*/
|
|
14
|
+
export declare class OperatorHttpError extends OperatorHttpError_base {
|
|
15
|
+
/** The existing HTTP status associated with this refusal or failure. */
|
|
16
|
+
get status(): 400 | 403 | 404 | 409 | 500 | 502 | 503;
|
|
17
|
+
}
|
|
18
|
+
declare const OperatorHttpPolicy_base: HttpApiMiddleware.ServiceClass<OperatorHttpPolicy, "@usine/orchestrator/OperatorHttpPolicy", {
|
|
19
|
+
requires: never;
|
|
20
|
+
provides: never;
|
|
21
|
+
error: Schema.decodeTo<Schema.declareConstructor<OperatorHttpError, {
|
|
22
|
+
readonly error: "AppPermissionError" | "AttemptCancellationError" | "BackendUnavailableError" | "BoardItemNotFoundError" | "BoardLaneNotFoundError" | "BoardLaneReadOnlyError" | "BoardProjectNotFoundError" | "CrossSiteRequestError" | "CycleBudgetResetRejectedError" | "EnginePersistenceError" | "GitHubApiError" | "GitHubRateLimitError" | "HttpBodyError" | "InstallationDiscoveryError" | "InvalidGitHubResponseError" | "InvalidRequestError" | "RosterAgentNotFoundError" | "RunInterventionRejectedError" | "RunNotFoundError" | "RunOperationRejectedError" | "SchemaError" | "TranscriptAttemptNotFoundError";
|
|
23
|
+
readonly message: string;
|
|
24
|
+
}, readonly [Schema.Struct<{
|
|
25
|
+
readonly error: Schema.Literals<("AppPermissionError" | "AttemptCancellationError" | "BackendUnavailableError" | "BoardItemNotFoundError" | "BoardLaneNotFoundError" | "BoardLaneReadOnlyError" | "BoardProjectNotFoundError" | "CrossSiteRequestError" | "CycleBudgetResetRejectedError" | "EnginePersistenceError" | "GitHubApiError" | "GitHubRateLimitError" | "HttpBodyError" | "InstallationDiscoveryError" | "InvalidGitHubResponseError" | "InvalidRequestError" | "RosterAgentNotFoundError" | "RunInterventionRejectedError" | "RunNotFoundError" | "RunOperationRejectedError" | "SchemaError" | "TranscriptAttemptNotFoundError")[]>;
|
|
26
|
+
readonly message: Schema.String;
|
|
27
|
+
}>], {
|
|
28
|
+
readonly error: "AppPermissionError" | "AttemptCancellationError" | "BackendUnavailableError" | "BoardItemNotFoundError" | "BoardLaneNotFoundError" | "BoardLaneReadOnlyError" | "BoardProjectNotFoundError" | "CrossSiteRequestError" | "CycleBudgetResetRejectedError" | "EnginePersistenceError" | "GitHubApiError" | "GitHubRateLimitError" | "HttpBodyError" | "InstallationDiscoveryError" | "InvalidGitHubResponseError" | "InvalidRequestError" | "RosterAgentNotFoundError" | "RunInterventionRejectedError" | "RunNotFoundError" | "RunOperationRejectedError" | "SchemaError" | "TranscriptAttemptNotFoundError";
|
|
29
|
+
readonly message: string;
|
|
30
|
+
}>, Schema.Struct<{
|
|
31
|
+
readonly error: Schema.Literals<("AppPermissionError" | "AttemptCancellationError" | "BackendUnavailableError" | "BoardItemNotFoundError" | "BoardLaneNotFoundError" | "BoardLaneReadOnlyError" | "BoardProjectNotFoundError" | "CrossSiteRequestError" | "CycleBudgetResetRejectedError" | "EnginePersistenceError" | "GitHubApiError" | "GitHubRateLimitError" | "HttpBodyError" | "InstallationDiscoveryError" | "InvalidGitHubResponseError" | "InvalidRequestError" | "RosterAgentNotFoundError" | "RunInterventionRejectedError" | "RunNotFoundError" | "RunOperationRejectedError" | "SchemaError" | "TranscriptAttemptNotFoundError")[]>;
|
|
32
|
+
readonly message: Schema.String;
|
|
33
|
+
}>, never, never>[];
|
|
34
|
+
clientError: never;
|
|
35
|
+
requiredForClient: false;
|
|
36
|
+
security: never;
|
|
37
|
+
}, HttpApiMiddleware.HttpApiMiddleware<never, Schema.decodeTo<Schema.declareConstructor<OperatorHttpError, {
|
|
38
|
+
readonly error: "AppPermissionError" | "AttemptCancellationError" | "BackendUnavailableError" | "BoardItemNotFoundError" | "BoardLaneNotFoundError" | "BoardLaneReadOnlyError" | "BoardProjectNotFoundError" | "CrossSiteRequestError" | "CycleBudgetResetRejectedError" | "EnginePersistenceError" | "GitHubApiError" | "GitHubRateLimitError" | "HttpBodyError" | "InstallationDiscoveryError" | "InvalidGitHubResponseError" | "InvalidRequestError" | "RosterAgentNotFoundError" | "RunInterventionRejectedError" | "RunNotFoundError" | "RunOperationRejectedError" | "SchemaError" | "TranscriptAttemptNotFoundError";
|
|
39
|
+
readonly message: string;
|
|
40
|
+
}, readonly [Schema.Struct<{
|
|
41
|
+
readonly error: Schema.Literals<("AppPermissionError" | "AttemptCancellationError" | "BackendUnavailableError" | "BoardItemNotFoundError" | "BoardLaneNotFoundError" | "BoardLaneReadOnlyError" | "BoardProjectNotFoundError" | "CrossSiteRequestError" | "CycleBudgetResetRejectedError" | "EnginePersistenceError" | "GitHubApiError" | "GitHubRateLimitError" | "HttpBodyError" | "InstallationDiscoveryError" | "InvalidGitHubResponseError" | "InvalidRequestError" | "RosterAgentNotFoundError" | "RunInterventionRejectedError" | "RunNotFoundError" | "RunOperationRejectedError" | "SchemaError" | "TranscriptAttemptNotFoundError")[]>;
|
|
42
|
+
readonly message: Schema.String;
|
|
43
|
+
}>], {
|
|
44
|
+
readonly error: "AppPermissionError" | "AttemptCancellationError" | "BackendUnavailableError" | "BoardItemNotFoundError" | "BoardLaneNotFoundError" | "BoardLaneReadOnlyError" | "BoardProjectNotFoundError" | "CrossSiteRequestError" | "CycleBudgetResetRejectedError" | "EnginePersistenceError" | "GitHubApiError" | "GitHubRateLimitError" | "HttpBodyError" | "InstallationDiscoveryError" | "InvalidGitHubResponseError" | "InvalidRequestError" | "RosterAgentNotFoundError" | "RunInterventionRejectedError" | "RunNotFoundError" | "RunOperationRejectedError" | "SchemaError" | "TranscriptAttemptNotFoundError";
|
|
45
|
+
readonly message: string;
|
|
46
|
+
}>, Schema.Struct<{
|
|
47
|
+
readonly error: Schema.Literals<("AppPermissionError" | "AttemptCancellationError" | "BackendUnavailableError" | "BoardItemNotFoundError" | "BoardLaneNotFoundError" | "BoardLaneReadOnlyError" | "BoardProjectNotFoundError" | "CrossSiteRequestError" | "CycleBudgetResetRejectedError" | "EnginePersistenceError" | "GitHubApiError" | "GitHubRateLimitError" | "HttpBodyError" | "InstallationDiscoveryError" | "InvalidGitHubResponseError" | "InvalidRequestError" | "RosterAgentNotFoundError" | "RunInterventionRejectedError" | "RunNotFoundError" | "RunOperationRejectedError" | "SchemaError" | "TranscriptAttemptNotFoundError")[]>;
|
|
48
|
+
readonly message: Schema.String;
|
|
49
|
+
}>, never, never>[], never>>;
|
|
50
|
+
/**
|
|
51
|
+
* Server policy for the operator transport: refuse cross-site origins before
|
|
52
|
+
* decoding or executing requests, and translate failures into operator envelopes.
|
|
53
|
+
* A server must supply this middleware; generated clients need no middleware layer.
|
|
54
|
+
*/
|
|
55
|
+
export declare class OperatorHttpPolicy extends OperatorHttpPolicy_base {
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The operator's HTTP reads and interventions. Server handlers and generated
|
|
59
|
+
* clients derive URLs, request codecs, successful responses, and typed failures
|
|
60
|
+
* from this contract. Action acknowledgement means the request was accepted;
|
|
61
|
+
* subsequent observation reports execution and GitHub polling progress.
|
|
62
|
+
*
|
|
63
|
+
* This capability is platform-free (ADRs 0012 and 0020). Library consumers can
|
|
64
|
+
* continue using Operator directly without an HTTP server or client.
|
|
65
|
+
*/
|
|
66
|
+
export declare const OperatorApi: HttpApi.HttpApi<"OperatorApi", HttpApiGroup.HttpApiGroup<"operator", HttpApiEndpoint.HttpApiEndpoint<"agents", "GET", "/api/agents", never, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.brand<Schema.String, "AgentName">>>, never, OperatorHttpPolicy, never> | HttpApiEndpoint.HttpApiEndpoint<"detail", "GET", "/api/runs/:runId", Schema.toCodecStringTree<Schema.Struct<{
|
|
67
|
+
runId: Schema.brand<Schema.NonEmptyString, "RunId">;
|
|
68
|
+
}>>, Schema.toCodecStringTree<Schema.Union<readonly [Schema.decodeTo<Schema.toType<typeof ColdTranscriptRequest>, Schema.Struct<{
|
|
69
|
+
readonly after: Schema.optionalKey<Schema.Never>;
|
|
70
|
+
readonly before: Schema.optionalKey<Schema.Never>;
|
|
71
|
+
readonly attempt: Schema.optionalKey<Schema.Never>;
|
|
72
|
+
}>, never, never>, Schema.decodeTo<Schema.toType<typeof TailTranscriptRequest>, Schema.Struct<{
|
|
73
|
+
readonly after: Schema.compose<Schema.brand<Schema.Int, "TranscriptSequence">, Schema.compose<Schema.FiniteFromString, Schema.Union<readonly [Schema.String, Schema.decodeTo<Schema.String, Schema.NonEmptyArray<Schema.String>, never, never>]>>>;
|
|
74
|
+
readonly before: Schema.optionalKey<Schema.Never>;
|
|
75
|
+
readonly attempt: Schema.optionalKey<Schema.Never>;
|
|
76
|
+
}>, never, never>, Schema.decodeTo<Schema.toType<typeof EarlierTranscriptRequest>, Schema.Struct<{
|
|
77
|
+
readonly after: Schema.optionalKey<Schema.Never>;
|
|
78
|
+
readonly before: Schema.compose<Schema.brand<Schema.Int, "TranscriptSequence">, Schema.compose<Schema.FiniteFromString, Schema.Union<readonly [Schema.String, Schema.decodeTo<Schema.String, Schema.NonEmptyArray<Schema.String>, never, never>]>>>;
|
|
79
|
+
readonly attempt: Schema.compose<Schema.brand<Schema.NonEmptyString, "AttemptId">, Schema.Union<readonly [Schema.String, Schema.decodeTo<Schema.String, Schema.NonEmptyArray<Schema.String>, never, never>]>>;
|
|
80
|
+
}>, never, never>]>>, never, never, Schema.toCodecJson<typeof RunDetailView>, never, OperatorHttpPolicy, never> | HttpApiEndpoint.HttpApiEndpoint<"overview", "GET", "/api/overview", never, never, never, never, Schema.toCodecJson<Schema.Union<readonly [typeof import("./overview.ts").ReadyOverview, typeof import("./overview.ts").NeedsSetupOverview]>>, never, OperatorHttpPolicy, never> | HttpApiEndpoint.HttpApiEndpoint<"approve", "POST", "/api/runs/:runId/approve", Schema.toCodecStringTree<Schema.Struct<{
|
|
81
|
+
runId: Schema.brand<Schema.NonEmptyString, "RunId">;
|
|
82
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
83
|
+
readonly ok: Schema.Literal<true>;
|
|
84
|
+
}>>, never, OperatorHttpPolicy, never> | HttpApiEndpoint.HttpApiEndpoint<"cancel", "POST", "/api/runs/:runId/cancel", Schema.toCodecStringTree<Schema.Struct<{
|
|
85
|
+
runId: Schema.brand<Schema.NonEmptyString, "RunId">;
|
|
86
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
87
|
+
readonly ok: Schema.Literal<true>;
|
|
88
|
+
}>>, never, OperatorHttpPolicy, never> | HttpApiEndpoint.HttpApiEndpoint<"pause", "POST", "/api/loops/:loop/pause", Schema.toCodecStringTree<Schema.Struct<{
|
|
89
|
+
loop: Schema.brand<Schema.NonEmptyString, "LoopName">;
|
|
90
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
91
|
+
readonly ok: Schema.Literal<true>;
|
|
92
|
+
}>>, never, OperatorHttpPolicy, never> | HttpApiEndpoint.HttpApiEndpoint<"retry", "POST", "/api/runs/:runId/retry", Schema.toCodecStringTree<Schema.Struct<{
|
|
93
|
+
runId: Schema.brand<Schema.NonEmptyString, "RunId">;
|
|
94
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
95
|
+
readonly ok: Schema.Literal<true>;
|
|
96
|
+
}>>, never, OperatorHttpPolicy, never> | HttpApiEndpoint.HttpApiEndpoint<"unpause", "POST", "/api/loops/:loop/unpause", Schema.toCodecStringTree<Schema.Struct<{
|
|
97
|
+
loop: Schema.brand<Schema.NonEmptyString, "LoopName">;
|
|
98
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
99
|
+
readonly ok: Schema.Literal<true>;
|
|
100
|
+
}>>, never, OperatorHttpPolicy, never> | HttpApiEndpoint.HttpApiEndpoint<"resetCycleBudget", "POST", "/api/cycle-budgets/reset", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
101
|
+
readonly askId: Schema.brand<Schema.brand<Schema.NonEmptyString, "EventId">, "CycleBudgetAskId">;
|
|
102
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
103
|
+
readonly ok: Schema.Literal<true>;
|
|
104
|
+
}>>, never, OperatorHttpPolicy, never> | HttpApiEndpoint.HttpApiEndpoint<"moveBoardItem", "POST", "/api/projects/:owner/:repository/items/:item/lane", Schema.toCodecStringTree<Schema.Struct<{
|
|
105
|
+
owner: Schema.String;
|
|
106
|
+
repository: Schema.String;
|
|
107
|
+
item: Schema.compose<Schema.brand<Schema.Int, "ItemNumber">, Schema.FiniteFromString>;
|
|
108
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
109
|
+
readonly toLane: Schema.brand<Schema.NonEmptyString, "BoardLaneId">;
|
|
110
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
111
|
+
readonly ok: Schema.Literal<true>;
|
|
112
|
+
}>>, never, OperatorHttpPolicy, never> | HttpApiEndpoint.HttpApiEndpoint<"editAndRetry", "POST", "/api/runs/:runId/edit-and-retry", Schema.toCodecStringTree<Schema.Struct<{
|
|
113
|
+
runId: Schema.brand<Schema.NonEmptyString, "RunId">;
|
|
114
|
+
}>>, never, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<EditAndRetry, {
|
|
115
|
+
readonly task: string;
|
|
116
|
+
readonly agent: string;
|
|
117
|
+
}, readonly [Schema.Struct<{
|
|
118
|
+
readonly task: Schema.brand<Schema.String, "AttemptTask">;
|
|
119
|
+
readonly agent: Schema.brand<Schema.String, "AgentName">;
|
|
120
|
+
}>], {
|
|
121
|
+
readonly task: string & import("effect/Brand").Brand<"AttemptTask">;
|
|
122
|
+
readonly agent: string & import("effect/Brand").Brand<"AgentName">;
|
|
123
|
+
}>, Schema.Struct<{
|
|
124
|
+
readonly task: Schema.brand<Schema.String, "AttemptTask">;
|
|
125
|
+
readonly agent: Schema.brand<Schema.String, "AgentName">;
|
|
126
|
+
}>, never, never>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
127
|
+
readonly ok: Schema.Literal<true>;
|
|
128
|
+
}>>, never, OperatorHttpPolicy, never> | HttpApiEndpoint.HttpApiEndpoint<"intervene", "POST", "/api/runs/:runId/intervene", Schema.toCodecStringTree<Schema.Struct<{
|
|
129
|
+
runId: Schema.brand<Schema.NonEmptyString, "RunId">;
|
|
130
|
+
}>>, never, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<SessionIntervention, {
|
|
131
|
+
readonly attemptId: string;
|
|
132
|
+
readonly target?: {
|
|
133
|
+
readonly _tag: "Parent";
|
|
134
|
+
} | {
|
|
135
|
+
readonly _tag: "Child";
|
|
136
|
+
readonly sessionId: string;
|
|
137
|
+
};
|
|
138
|
+
readonly action: {
|
|
139
|
+
readonly _tag: "Steer";
|
|
140
|
+
readonly message: string;
|
|
141
|
+
} | {
|
|
142
|
+
readonly _tag: "Interrupt";
|
|
143
|
+
} | {
|
|
144
|
+
readonly _tag: "OperatorMessage";
|
|
145
|
+
readonly message: string;
|
|
146
|
+
} | {
|
|
147
|
+
readonly _tag: "Release";
|
|
148
|
+
};
|
|
149
|
+
}, readonly [Schema.Struct<{
|
|
150
|
+
readonly attemptId: Schema.brand<Schema.NonEmptyString, "AttemptId">;
|
|
151
|
+
readonly target: Schema.withDecodingDefaultKey<Schema.Union<readonly [typeof import("@usine/core/attempt/channel").ParentTarget, typeof import("@usine/core/attempt/channel").ChildTarget]>, never>;
|
|
152
|
+
readonly action: Schema.Union<readonly [typeof import("@usine/core/attempt/channel").Steer, typeof import("@usine/core/attempt/channel").Interrupt, typeof import("@usine/core/attempt/channel").OperatorMessage, typeof import("@usine/core/attempt/channel").Release]>;
|
|
153
|
+
}>], {
|
|
154
|
+
readonly attemptId: string & import("effect/Brand").Brand<"AttemptId">;
|
|
155
|
+
readonly target: {
|
|
156
|
+
readonly _tag: "Parent";
|
|
157
|
+
} | {
|
|
158
|
+
readonly _tag: "Child";
|
|
159
|
+
readonly sessionId: string & import("effect/Brand").Brand<"AgentSessionId">;
|
|
160
|
+
};
|
|
161
|
+
readonly action: {
|
|
162
|
+
readonly _tag: "Steer";
|
|
163
|
+
readonly message: string;
|
|
164
|
+
} | {
|
|
165
|
+
readonly _tag: "Interrupt";
|
|
166
|
+
} | {
|
|
167
|
+
readonly _tag: "OperatorMessage";
|
|
168
|
+
readonly message: string;
|
|
169
|
+
} | {
|
|
170
|
+
readonly _tag: "Release";
|
|
171
|
+
};
|
|
172
|
+
}>, Schema.Struct<{
|
|
173
|
+
readonly attemptId: Schema.brand<Schema.NonEmptyString, "AttemptId">;
|
|
174
|
+
readonly target: Schema.withDecodingDefaultKey<Schema.Union<readonly [typeof import("@usine/core/attempt/channel").ParentTarget, typeof import("@usine/core/attempt/channel").ChildTarget]>, never>;
|
|
175
|
+
readonly action: Schema.Union<readonly [typeof import("@usine/core/attempt/channel").Steer, typeof import("@usine/core/attempt/channel").Interrupt, typeof import("@usine/core/attempt/channel").OperatorMessage, typeof import("@usine/core/attempt/channel").Release]>;
|
|
176
|
+
}>, never, never>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
177
|
+
readonly ok: Schema.Literal<true>;
|
|
178
|
+
}>>, never, OperatorHttpPolicy, never>, false>>;
|
|
179
|
+
export {};
|
|
180
|
+
//# sourceMappingURL=http.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/operator/http.ts"],"names":[],"mappings":"AAOA,OAAO,EAAU,MAAM,EAAwB,MAAM,QAAQ,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEpG,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;;;;;AA2B5E;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,sBAE0C;IAC/E,wEAAwE;IACxE,IAAI,MAAM,4CAET;CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUD;;;;GAIG;AACH,qBAAa,kBAAmB,SAAQ,uBAGvC;CAAG;AAkEJ;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+CA2DvB,CAAC"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { AttemptId } from "@usine/core/attempt";
|
|
2
|
+
import { AgentName } from "@usine/core/agent";
|
|
3
|
+
import { CycleBudgetAskId } from "@usine/core/cycle-budget";
|
|
4
|
+
import { ItemNumber } from "@usine/core/item";
|
|
5
|
+
import { LoopName } from "@usine/core/loop";
|
|
6
|
+
import { RunId } from "@usine/core/run";
|
|
7
|
+
import { TranscriptSequence } from "@usine/engine/transcript";
|
|
8
|
+
import { Record, Schema, SchemaTransformation } from "effect";
|
|
9
|
+
import { HttpApi, HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware } from "effect/unstable/httpapi";
|
|
10
|
+
import { BoardLaneId } from "./board.js";
|
|
11
|
+
import { ColdTranscriptRequest, EarlierTranscriptRequest, TailTranscriptRequest, } from "./transcript.js";
|
|
12
|
+
import { FactoryOverview } from "./overview.js";
|
|
13
|
+
import { RunDetailView, EditAndRetry, SessionIntervention } from "./run.js";
|
|
14
|
+
const errorStatuses = {
|
|
15
|
+
SchemaError: 400,
|
|
16
|
+
InvalidRequestError: 400,
|
|
17
|
+
CrossSiteRequestError: 403,
|
|
18
|
+
RunNotFoundError: 404,
|
|
19
|
+
TranscriptAttemptNotFoundError: 404,
|
|
20
|
+
BoardProjectNotFoundError: 404,
|
|
21
|
+
BoardItemNotFoundError: 404,
|
|
22
|
+
BoardLaneNotFoundError: 404,
|
|
23
|
+
RunOperationRejectedError: 409,
|
|
24
|
+
RunInterventionRejectedError: 409,
|
|
25
|
+
RosterAgentNotFoundError: 404,
|
|
26
|
+
CycleBudgetResetRejectedError: 409,
|
|
27
|
+
BoardLaneReadOnlyError: 409,
|
|
28
|
+
EnginePersistenceError: 500,
|
|
29
|
+
AttemptCancellationError: 500,
|
|
30
|
+
HttpBodyError: 500,
|
|
31
|
+
GitHubApiError: 502,
|
|
32
|
+
InvalidGitHubResponseError: 502,
|
|
33
|
+
BackendUnavailableError: 503,
|
|
34
|
+
InstallationDiscoveryError: 503,
|
|
35
|
+
AppPermissionError: 503,
|
|
36
|
+
GitHubRateLimitError: 503,
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* An operator request that could not be fulfilled. `error` preserves the domain
|
|
40
|
+
* failure's identity and `message` is safe to show to the operator; persistence
|
|
41
|
+
* details, credentials, and defect causes never travel in this envelope.
|
|
42
|
+
*/
|
|
43
|
+
export class OperatorHttpError extends Schema.Error("@usine/orchestrator/OperatorHttpError")({ error: Schema.Literals(Record.keys(errorStatuses)), message: Schema.String }) {
|
|
44
|
+
/** The existing HTTP status associated with this refusal or failure. */
|
|
45
|
+
get status() {
|
|
46
|
+
return errorStatuses[this.error];
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
// The established envelope uses `error` as its discriminator. Schema.Error keeps
|
|
50
|
+
// that wire shape while giving browser callers an Error with a validated identity.
|
|
51
|
+
const errors = [...new Set(Object.values(errorStatuses))].map((status) => OperatorHttpError.check(Schema.makeFilter((error) => error.status === status)).annotate({
|
|
52
|
+
httpApiStatus: status,
|
|
53
|
+
}));
|
|
54
|
+
/**
|
|
55
|
+
* Server policy for the operator transport: refuse cross-site origins before
|
|
56
|
+
* decoding or executing requests, and translate failures into operator envelopes.
|
|
57
|
+
* A server must supply this middleware; generated clients need no middleware layer.
|
|
58
|
+
*/
|
|
59
|
+
export class OperatorHttpPolicy extends HttpApiMiddleware.Service()("@usine/orchestrator/OperatorHttpPolicy", { error: errors }) {
|
|
60
|
+
}
|
|
61
|
+
const absent = Schema.optionalKey(Schema.Never);
|
|
62
|
+
// URLSearchParams.get previously selected the first occurrence of a query key.
|
|
63
|
+
// Preserve that convention when HttpApi supplies repeated keys as arrays.
|
|
64
|
+
const queryValue = Schema.Union([
|
|
65
|
+
Schema.String,
|
|
66
|
+
Schema.NonEmptyArray(Schema.String).pipe(Schema.decodeTo(Schema.String, SchemaTransformation.transform({
|
|
67
|
+
decode: (values) => values[0],
|
|
68
|
+
encode: (value) => [value],
|
|
69
|
+
}))),
|
|
70
|
+
]);
|
|
71
|
+
const sequence = queryValue.pipe(Schema.decodeTo(Schema.FiniteFromString), Schema.decodeTo(TranscriptSequence));
|
|
72
|
+
// Each wire variant rules out the other cursors before decoding into the existing
|
|
73
|
+
// domain request. Unknown search keys remain ignored, as in the original API.
|
|
74
|
+
const transcriptQuery = Schema.Union([
|
|
75
|
+
Schema.Struct({ after: absent, before: absent, attempt: absent }).pipe(Schema.decodeTo(Schema.toType(ColdTranscriptRequest), SchemaTransformation.transform({
|
|
76
|
+
decode: () => new ColdTranscriptRequest(),
|
|
77
|
+
encode: () => ({}),
|
|
78
|
+
}))),
|
|
79
|
+
Schema.Struct({ after: sequence, before: absent, attempt: absent }).pipe(Schema.decodeTo(Schema.toType(TailTranscriptRequest), SchemaTransformation.transform({
|
|
80
|
+
decode: ({ after }) => new TailTranscriptRequest({ after }),
|
|
81
|
+
encode: ({ after }) => ({ after }),
|
|
82
|
+
}))),
|
|
83
|
+
Schema.Struct({
|
|
84
|
+
after: absent,
|
|
85
|
+
before: sequence,
|
|
86
|
+
attempt: queryValue.pipe(Schema.decodeTo(AttemptId)),
|
|
87
|
+
}).pipe(Schema.decodeTo(Schema.toType(EarlierTranscriptRequest), SchemaTransformation.transform({
|
|
88
|
+
decode: ({ before, attempt }) => new EarlierTranscriptRequest({ before, attemptId: attempt }),
|
|
89
|
+
encode: ({ before, attemptId }) => ({ before, attempt: attemptId }),
|
|
90
|
+
}))),
|
|
91
|
+
]);
|
|
92
|
+
const repositoryPart = Schema.String.check(Schema.isPattern(/^[A-Za-z0-9_.-]+$/u, { message: "Expected a repository path segment" }));
|
|
93
|
+
const acknowledged = Schema.Struct({ ok: Schema.Literal(true) });
|
|
94
|
+
const runParams = { runId: RunId };
|
|
95
|
+
const loopParams = { loop: LoopName };
|
|
96
|
+
/**
|
|
97
|
+
* The operator's HTTP reads and interventions. Server handlers and generated
|
|
98
|
+
* clients derive URLs, request codecs, successful responses, and typed failures
|
|
99
|
+
* from this contract. Action acknowledgement means the request was accepted;
|
|
100
|
+
* subsequent observation reports execution and GitHub polling progress.
|
|
101
|
+
*
|
|
102
|
+
* This capability is platform-free (ADRs 0012 and 0020). Library consumers can
|
|
103
|
+
* continue using Operator directly without an HTTP server or client.
|
|
104
|
+
*/
|
|
105
|
+
export const OperatorApi = HttpApi.make("OperatorApi").add(HttpApiGroup.make("operator")
|
|
106
|
+
.add(HttpApiEndpoint.get("overview", "/api/overview", { success: FactoryOverview }), HttpApiEndpoint.get("agents", "/api/agents", { success: Schema.Array(AgentName) }), HttpApiEndpoint.post("editAndRetry", "/api/runs/:runId/edit-and-retry", {
|
|
107
|
+
params: runParams,
|
|
108
|
+
payload: EditAndRetry.annotate({ parseOptions: { onExcessProperty: "error" } }),
|
|
109
|
+
success: acknowledged,
|
|
110
|
+
}), HttpApiEndpoint.post("intervene", "/api/runs/:runId/intervene", {
|
|
111
|
+
params: runParams,
|
|
112
|
+
payload: SessionIntervention.annotate({ parseOptions: { onExcessProperty: "error" } }),
|
|
113
|
+
success: acknowledged,
|
|
114
|
+
}), HttpApiEndpoint.post("resetCycleBudget", "/api/cycle-budgets/reset", {
|
|
115
|
+
payload: Schema.Struct({ askId: CycleBudgetAskId }).annotate({
|
|
116
|
+
parseOptions: { onExcessProperty: "error" },
|
|
117
|
+
}),
|
|
118
|
+
success: acknowledged,
|
|
119
|
+
}), HttpApiEndpoint.get("detail", "/api/runs/:runId", {
|
|
120
|
+
params: runParams,
|
|
121
|
+
query: transcriptQuery,
|
|
122
|
+
success: RunDetailView,
|
|
123
|
+
}), HttpApiEndpoint.post("approve", "/api/runs/:runId/approve", {
|
|
124
|
+
params: runParams,
|
|
125
|
+
success: acknowledged,
|
|
126
|
+
}), HttpApiEndpoint.post("retry", "/api/runs/:runId/retry", {
|
|
127
|
+
params: runParams,
|
|
128
|
+
success: acknowledged,
|
|
129
|
+
}), HttpApiEndpoint.post("cancel", "/api/runs/:runId/cancel", {
|
|
130
|
+
params: runParams,
|
|
131
|
+
success: acknowledged,
|
|
132
|
+
}), HttpApiEndpoint.post("moveBoardItem", "/api/projects/:owner/:repository/items/:item/lane", {
|
|
133
|
+
params: {
|
|
134
|
+
owner: repositoryPart,
|
|
135
|
+
repository: repositoryPart,
|
|
136
|
+
item: Schema.FiniteFromString.pipe(Schema.decodeTo(ItemNumber)),
|
|
137
|
+
},
|
|
138
|
+
payload: Schema.Struct({ toLane: BoardLaneId }).annotate({
|
|
139
|
+
parseOptions: { onExcessProperty: "error" },
|
|
140
|
+
}),
|
|
141
|
+
success: acknowledged,
|
|
142
|
+
}), HttpApiEndpoint.post("pause", "/api/loops/:loop/pause", {
|
|
143
|
+
params: loopParams,
|
|
144
|
+
success: acknowledged,
|
|
145
|
+
}), HttpApiEndpoint.post("unpause", "/api/loops/:loop/unpause", {
|
|
146
|
+
params: loopParams,
|
|
147
|
+
success: acknowledged,
|
|
148
|
+
}))
|
|
149
|
+
.middleware(OperatorHttpPolicy));
|
|
150
|
+
//# sourceMappingURL=http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/operator/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,yB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