@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.
Files changed (122) hide show
  1. package/README.md +46 -21
  2. package/dist/board/items.d.ts +18 -0
  3. package/dist/board/items.d.ts.map +1 -0
  4. package/dist/board/items.js +46 -0
  5. package/dist/board/items.js.map +1 -0
  6. package/dist/board/projection.d.ts +6 -5
  7. package/dist/board/projection.d.ts.map +1 -1
  8. package/dist/board/projection.js +25 -65
  9. package/dist/board/projection.js.map +1 -1
  10. package/dist/board/tasks.d.ts +8 -0
  11. package/dist/board/tasks.d.ts.map +1 -0
  12. package/dist/board/tasks.js +86 -0
  13. package/dist/board/tasks.js.map +1 -0
  14. package/dist/credentials.d.ts +6 -6
  15. package/dist/credentials.d.ts.map +1 -1
  16. package/dist/credentials.js +6 -6
  17. package/dist/credentials.js.map +1 -1
  18. package/dist/exe-dev.d.ts +5 -4
  19. package/dist/exe-dev.d.ts.map +1 -1
  20. package/dist/exe-dev.js +5 -4
  21. package/dist/exe-dev.js.map +1 -1
  22. package/dist/idle-triggers.d.ts +1 -1
  23. package/dist/idle-triggers.d.ts.map +1 -1
  24. package/dist/idle-triggers.js +3 -1
  25. package/dist/idle-triggers.js.map +1 -1
  26. package/dist/label-reconciler.d.ts +30 -0
  27. package/dist/label-reconciler.d.ts.map +1 -0
  28. package/dist/label-reconciler.js +119 -0
  29. package/dist/label-reconciler.js.map +1 -0
  30. package/dist/local.d.ts +17 -12
  31. package/dist/local.d.ts.map +1 -1
  32. package/dist/local.js +20 -13
  33. package/dist/local.js.map +1 -1
  34. package/dist/operator/attempt.d.ts +69 -0
  35. package/dist/operator/attempt.d.ts.map +1 -0
  36. package/dist/operator/attempt.js +62 -0
  37. package/dist/operator/attempt.js.map +1 -0
  38. package/dist/operator/board.d.ts +119 -0
  39. package/dist/operator/board.d.ts.map +1 -0
  40. package/dist/operator/board.js +101 -0
  41. package/dist/operator/board.js.map +1 -0
  42. package/dist/operator/http.d.ts +180 -0
  43. package/dist/operator/http.d.ts.map +1 -0
  44. package/dist/operator/http.js +150 -0
  45. package/dist/operator/http.js.map +1 -0
  46. package/dist/operator/need.d.ts +66 -0
  47. package/dist/operator/need.d.ts.map +1 -0
  48. package/dist/operator/need.js +70 -0
  49. package/dist/operator/need.js.map +1 -0
  50. package/dist/operator/operator.d.ts +68 -0
  51. package/dist/operator/operator.d.ts.map +1 -0
  52. package/dist/operator/operator.js +402 -0
  53. package/dist/operator/operator.js.map +1 -0
  54. package/dist/operator/overview.d.ts +51 -0
  55. package/dist/operator/overview.d.ts.map +1 -0
  56. package/dist/operator/overview.js +48 -0
  57. package/dist/operator/overview.js.map +1 -0
  58. package/dist/operator/projection.d.ts +12 -9
  59. package/dist/operator/projection.d.ts.map +1 -1
  60. package/dist/operator/projection.js +44 -17
  61. package/dist/operator/projection.js.map +1 -1
  62. package/dist/operator/run.d.ts +62 -0
  63. package/dist/operator/run.d.ts.map +1 -0
  64. package/dist/operator/run.js +61 -0
  65. package/dist/operator/run.js.map +1 -0
  66. package/dist/operator/transcript.d.ts +59 -0
  67. package/dist/operator/transcript.d.ts.map +1 -0
  68. package/dist/operator/transcript.js +66 -0
  69. package/dist/operator/transcript.js.map +1 -0
  70. package/dist/orchestrator.d.ts +3 -2
  71. package/dist/orchestrator.d.ts.map +1 -1
  72. package/dist/orchestrator.js +1 -1
  73. package/dist/orchestrator.js.map +1 -1
  74. package/dist/polling/cycle.d.ts +51 -0
  75. package/dist/polling/cycle.d.ts.map +1 -0
  76. package/dist/polling/cycle.js +44 -0
  77. package/dist/polling/cycle.js.map +1 -0
  78. package/dist/polling/hints.d.ts +20 -0
  79. package/dist/polling/hints.d.ts.map +1 -0
  80. package/dist/polling/hints.js +54 -0
  81. package/dist/polling/hints.js.map +1 -0
  82. package/dist/polling/loop-evaluation.d.ts +21 -0
  83. package/dist/polling/loop-evaluation.d.ts.map +1 -0
  84. package/dist/polling/loop-evaluation.js +131 -0
  85. package/dist/polling/loop-evaluation.js.map +1 -0
  86. package/dist/polling/polling.d.ts +36 -0
  87. package/dist/polling/polling.d.ts.map +1 -0
  88. package/dist/polling/polling.js +296 -0
  89. package/dist/polling/polling.js.map +1 -0
  90. package/dist/polling/repository-sync.d.ts +45 -0
  91. package/dist/polling/repository-sync.d.ts.map +1 -0
  92. package/dist/polling/repository-sync.js +169 -0
  93. package/dist/polling/repository-sync.js.map +1 -0
  94. package/dist/polling-triggers.d.ts +3 -39
  95. package/dist/polling-triggers.d.ts.map +1 -1
  96. package/dist/polling-triggers.js +3 -393
  97. package/dist/polling-triggers.js.map +1 -1
  98. package/dist/schedule-triggers.d.ts +17 -15
  99. package/dist/schedule-triggers.d.ts.map +1 -1
  100. package/dist/schedule-triggers.js +53 -43
  101. package/dist/schedule-triggers.js.map +1 -1
  102. package/dist/scheduler.d.ts +5 -5
  103. package/dist/scheduler.d.ts.map +1 -1
  104. package/dist/scheduler.js +30 -44
  105. package/dist/scheduler.js.map +1 -1
  106. package/dist/trigger-submission.d.ts +33 -24
  107. package/dist/trigger-submission.d.ts.map +1 -1
  108. package/dist/trigger-submission.js +30 -37
  109. package/dist/trigger-submission.js.map +1 -1
  110. package/package.json +50 -14
  111. package/dist/index.d.ts +0 -11
  112. package/dist/index.d.ts.map +0 -1
  113. package/dist/index.js +0 -11
  114. package/dist/index.js.map +0 -1
  115. package/dist/operator/model.d.ts +0 -280
  116. package/dist/operator/model.d.ts.map +0 -1
  117. package/dist/operator/model.js +0 -242
  118. package/dist/operator/model.js.map +0 -1
  119. package/dist/operator/service.d.ts +0 -36
  120. package/dist/operator/service.d.ts.map +0 -1
  121. package/dist/operator/service.js +0 -248
  122. package/dist/operator/service.js.map +0 -1
@@ -1,20 +1,23 @@
1
- import {} from "@usine/config";
2
- import { Agent, AttemptChannel, Event, Item, Loop, Repository } from "@usine/core";
3
- import { Submission } from "@usine/engine";
1
+ import { Agent, resolveParentModel, AgentName } from "@usine/core/agent";
2
+ import { ModelId } from "@usine/core/agent/brain";
3
+ import { AttemptTask } from "@usine/core/attempt";
4
+ import { Event, DedupKey, EventId } from "@usine/core/event";
5
+ import { CycleGeneration } from "@usine/core/cycle-budget";
6
+ import { ItemKey } from "@usine/core/item";
7
+ import { LoopName } from "@usine/core/loop";
8
+ import { RepositoryRevision } from "@usine/core/repository";
9
+ import { Submission } from "@usine/engine/engine";
4
10
  import { Effect, Match, Option, Result, Schema } from "effect";
5
- /**
6
- * The worker fetch target until per-loop revisions exist: `git fetch origin
7
- * HEAD` resolves the remote's current default branch at prepare time.
8
- */
9
- const DEFAULT_BRANCH_REVISION = Repository.Revision.make("HEAD");
10
- /** A loaded loop lost the roster member its authored agent name refers to. */
11
+ /** Issue and schedule Attempts resolve the remote's default branch at prepare time. */
12
+ export const DEFAULT_BRANCH_REVISION = RepositoryRevision.make("HEAD");
13
+ /** The agent a loaded loop names is no longer in the roster. */
11
14
  export class LoopAgentResolutionError extends Schema.TaggedError("@usine/orchestrator/LoopAgentResolutionError")("LoopAgentResolutionError", {
12
- loop: Loop.LoopName,
13
- agent: Agent.Name,
15
+ loop: LoopName,
16
+ agent: AgentName,
14
17
  message: Schema.NonEmptyString,
15
18
  }) {
16
19
  }
17
- /** Snapshot one authored loop's roster member and effective parent model. */
20
+ /** Resolves one loop's roster agent and effective parent model. */
18
21
  export const resolveTriggerLoop = Effect.fn("TriggerRouting.resolveLoop")(function* (instance, loop) {
19
22
  yield* Effect.annotateCurrentSpan({ loop: loop.name, agent: loop.agent });
20
23
  const roster = new Map(instance.agents.map((agent) => [agent.name, agent]));
@@ -26,27 +29,18 @@ export const resolveTriggerLoop = Effect.fn("TriggerRouting.resolveLoop")(functi
26
29
  message: `Loop ${loop.name} references missing Agent ${loop.agent}`,
27
30
  });
28
31
  }
29
- const agent = new Agent.Agent({
30
- name: loaded.name,
31
- brain: new Agent.BrainSpec({
32
- harness: loaded.harness,
33
- model: loaded.model,
34
- effort: loaded.effort,
35
- }),
36
- parentModel: loaded.parentModel,
37
- persona: loaded.persona,
38
- });
32
+ const agent = loaded.agent;
39
33
  return {
40
34
  agent,
41
35
  loop,
42
- parentModel: Agent.resolveParentModel(agent, instance.config.settings.parentModel),
36
+ parentModel: resolveParentModel(agent, instance.config.settings.parentModel),
43
37
  };
44
38
  });
45
39
  /**
46
- * Snapshot the validated instance roster. `InstanceFolder.load` quarantines
47
- * loops naming unknown Agents, so a miss here is config drift on a
48
- * hand-assembled instance: the loop is skipped with a log every cycle while
49
- * its siblings keep polling — the same isolation the schedule path applies.
40
+ * Resolves every loaded loop's agent. `InstanceFolder.load` already quarantines
41
+ * loops that name unknown agents, so a miss here means a hand-assembled
42
+ * instance drifted: the loop is skipped with a log each cycle and its siblings
43
+ * keep running.
50
44
  */
51
45
  export const resolveTriggerLoops = Effect.fn("TriggerRouting.resolveLoops")(function* (instance) {
52
46
  const resolved = [];
@@ -65,35 +59,34 @@ export const resolveTriggerLoops = Effect.fn("TriggerRouting.resolveLoops")(func
65
59
  }
66
60
  return resolved;
67
61
  });
68
- /** The one routing contract shared by every trigger stream. */
62
+ /** Builds the Submission every trigger stream hands to the engine. */
69
63
  export const triggerSubmission = (options) => new Submission({
70
- event: new Event.Event({
71
- id: Event.EventId.make(options.dedupKey),
64
+ event: new Event({
65
+ id: EventId.make(options.dedupKey),
72
66
  dedupKey: options.dedupKey,
73
67
  payload: options.payload,
74
68
  receivedAt: options.receivedAt,
75
69
  }),
76
70
  itemKey: options.itemKey,
71
+ cycleGeneration: options.cycleGeneration,
77
72
  loop: options.loop.name,
78
73
  step: options.loop.step,
79
74
  approval: options.loop.approval,
75
+ cycleLimit: options.loop.trigger.on === "schedule" ? Option.none() : Option.some(options.loop.maxCycles),
80
76
  repository: options.repository.name,
81
- revision: DEFAULT_BRANCH_REVISION,
77
+ revision: options.revision,
82
78
  task: options.task,
83
79
  agent: options.agent,
84
80
  parentModel: options.parentModel,
85
81
  });
86
- /**
87
- * What each submission outcome contributes to its log line: the run for a
88
- * claim, the ignore reason for a superseded or revoked Event — never a
89
- * sentinel value.
90
- */
82
+ /** The log fields for a submission outcome: the run id for a claim, the reason for an ignore. */
91
83
  export const submissionLogFields = (submission) => Match.valueTags(submission, {
92
84
  Claimed: ({ runId }) => ({ runId }),
93
85
  Queued: () => ({}),
94
86
  Ignored: ({ reason }) => ({ reason }),
87
+ CycleBlocked: ({ ask }) => ({ askId: ask.id, reason: "cycle-budget-exhausted" }),
95
88
  });
96
- /** Safe structured context for a config-owned trigger failure. */
89
+ /** Log fields for a config failure met while triggering. */
97
90
  export const configFileErrorLogFields = (error) => Option.match(error.expression, {
98
91
  onNone: () => ({ configFile: error.file, configStage: error.stage }),
99
92
  onSome: (expression) => ({
@@ -1 +1 @@
1
- {"version":3,"file":"trigger-submission.js","sourceRoot":"","sources":["../src/trigger-submission.ts"],"names":[],"mappings":"AAAA,OAAO,EAKN,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACnF,OAAO,EAAE,UAAU,EAAyB,MAAM,eAAe,CAAC;AAClE,OAAO,EAAiB,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE9E;;;GAGG;AACH,MAAM,uBAAuB,GAAG,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAQjE,8EAA8E;AAC9E,MAAM,OAAO,wBAAyB,SAAQ,MAAM,CAAC,WAAW,CAC9D,8CAA8C,CAC/C,CAAC,0BAA0B,EAAE;IAC5B,IAAI,EAAE,IAAI,CAAC,QAAQ;IACnB,KAAK,EAAE,KAAK,CAAC,IAAI;IACjB,OAAO,EAAE,MAAM,CAAC,cAAc;CAC/B,CAAC;CAAG;AAEL,6EAA6E;AAC7E,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,EAAE,CAAC,4BAA4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,CAAC,CAAC;AAEL,iGAAiG;AACjG,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,UAA4B,EAA0B,EAAE,CAC1F,KAAK,CAAC,SAAS,CAAC,UAAU,EAAE;IAC1B,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC;IACnC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;IAClB,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC;IACrC,YAAY,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,wBAAwB,EAAE,CAAC;CACjF,CAAC,CAAC;AAEL,4DAA4D;AAC5D,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,KAAsB,EAAE,EAAE,CACjE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE;IAC7B,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;IACpE,MAAM,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QACvB,UAAU,EAAE,KAAK,CAAC,IAAI;QACtB,WAAW,EAAE,KAAK,CAAC,KAAK;QACxB,UAAU;KACX,CAAC;CACH,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usine/orchestrator",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "description": "The embeddable usine composition: the full engine as an Effect layer, startable in-process.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -14,17 +14,53 @@
14
14
  "type": "module",
15
15
  "sideEffects": false,
16
16
  "exports": {
17
- ".": {
18
- "types": "./dist/index.d.ts",
19
- "default": "./dist/index.js"
17
+ "./board/projection": {
18
+ "types": "./dist/board/projection.d.ts",
19
+ "default": "./dist/board/projection.js"
20
20
  },
21
- "./local": {
22
- "types": "./dist/local.d.ts",
23
- "default": "./dist/local.js"
21
+ "./credentials": {
22
+ "types": "./dist/credentials.d.ts",
23
+ "default": "./dist/credentials.js"
24
24
  },
25
25
  "./exe-dev": {
26
26
  "types": "./dist/exe-dev.d.ts",
27
27
  "default": "./dist/exe-dev.js"
28
+ },
29
+ "./idle-triggers": {
30
+ "types": "./dist/idle-triggers.d.ts",
31
+ "default": "./dist/idle-triggers.js"
32
+ },
33
+ "./label-reconciler": {
34
+ "types": "./dist/label-reconciler.d.ts",
35
+ "default": "./dist/label-reconciler.js"
36
+ },
37
+ "./local": {
38
+ "types": "./dist/local.d.ts",
39
+ "default": "./dist/local.js"
40
+ },
41
+ "./orchestrator": {
42
+ "types": "./dist/orchestrator.d.ts",
43
+ "default": "./dist/orchestrator.js"
44
+ },
45
+ "./polling-triggers": {
46
+ "types": "./dist/polling-triggers.d.ts",
47
+ "default": "./dist/polling-triggers.js"
48
+ },
49
+ "./schedule-triggers": {
50
+ "types": "./dist/schedule-triggers.d.ts",
51
+ "default": "./dist/schedule-triggers.js"
52
+ },
53
+ "./scheduler": {
54
+ "types": "./dist/scheduler.d.ts",
55
+ "default": "./dist/scheduler.js"
56
+ },
57
+ "./operator": {
58
+ "types": "./dist/operator/operator.d.ts",
59
+ "default": "./dist/operator/operator.js"
60
+ },
61
+ "./operator/http": {
62
+ "types": "./dist/operator/http.d.ts",
63
+ "default": "./dist/operator/http.js"
28
64
  }
29
65
  },
30
66
  "publishConfig": {
@@ -32,13 +68,13 @@
32
68
  },
33
69
  "dependencies": {
34
70
  "@effect/platform-node": "4.0.0-rc.111",
35
- "@usine/config": "0.1.0",
36
- "@usine/core": "0.1.0",
37
- "@usine/engine": "0.1.0",
38
- "@usine/expression": "0.1.0",
39
- "@usine/executor": "0.1.0",
40
- "@usine/github": "0.1.0",
41
- "@usine/run-host": "0.1.0"
71
+ "@usine/config": "0.2.1",
72
+ "@usine/core": "0.3.0",
73
+ "@usine/engine": "0.3.0",
74
+ "@usine/executor": "0.2.1",
75
+ "@usine/expression": "0.2.0",
76
+ "@usine/github": "0.1.2",
77
+ "@usine/run-host": "0.3.0"
42
78
  },
43
79
  "devDependencies": {
44
80
  "@effect/vitest": "4.0.0-rc.111",
package/dist/index.d.ts DELETED
@@ -1,11 +0,0 @@
1
- /** @usine/orchestrator — embeddable trigger-to-run and worker composition. */
2
- export * from "./operator/model.ts";
3
- export * from "./operator/service.ts";
4
- export { labelMutationForBoardMove, projectBoard } from "./board/projection.ts";
5
- export * from "./orchestrator.ts";
6
- export { idleTriggersLayer } from "./idle-triggers.ts";
7
- export { PollCycle, PollingTriggers, RepositoryPollFailure } from "./polling-triggers.ts";
8
- export { ScheduleAgentFailure, ScheduleCronFailure, ScheduleCycle, ScheduleFailure, ScheduleTickFailure, ScheduleTriggers, } from "./schedule-triggers.ts";
9
- export { stepExecutorLayer, UnsupportedWorkerError } from "./scheduler.ts";
10
- export { gitHubCredentialLayer } from "./credentials.ts";
11
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,yBAAyB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChF,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC1F,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC"}
package/dist/index.js DELETED
@@ -1,11 +0,0 @@
1
- /** @usine/orchestrator — embeddable trigger-to-run and worker composition. */
2
- export * from "./operator/model.js";
3
- export * from "./operator/service.js";
4
- export { labelMutationForBoardMove, projectBoard } from "./board/projection.js";
5
- export * from "./orchestrator.js";
6
- export { idleTriggersLayer } from "./idle-triggers.js";
7
- export { PollCycle, PollingTriggers, RepositoryPollFailure } from "./polling-triggers.js";
8
- export { ScheduleAgentFailure, ScheduleCronFailure, ScheduleCycle, ScheduleFailure, ScheduleTickFailure, ScheduleTriggers, } from "./schedule-triggers.js";
9
- export { stepExecutorLayer, UnsupportedWorkerError } from "./scheduler.js";
10
- export { gitHubCredentialLayer } from "./credentials.js";
11
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,yBAAyB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChF,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC1F,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,280 +0,0 @@
1
- import { Agent, AttemptChannel } from "@usine/core";
2
- import { TranscriptSequence } from "@usine/engine";
3
- import { Schema } from "effect";
4
- import { RepositoryPollFailure } from "../polling-triggers.ts";
5
- /** Cursor for tailing the append-only transcript without replaying older events. */
6
- export declare const TranscriptCursor: Schema.brand<Schema.Int, "TranscriptSequence">;
7
- export type TranscriptCursor = TranscriptSequence;
8
- export declare const ProjectStatus: Schema.Literals<readonly ["clear", "active", "needs-you"]>;
9
- export type ProjectStatus = typeof ProjectStatus.Type;
10
- export declare const RunStateTag: Schema.Literals<readonly ["Pending", "Waiting", "Running", "Succeeded", "Failed", "Canceled"]>;
11
- export type RunStateTag = typeof RunStateTag.Type;
12
- declare const InfraFailureView_base: Schema.Class<InfraFailureView, Schema.TaggedStruct<"InfraFailure", {
13
- readonly message: Schema.String;
14
- }>, {}>;
15
- /** Operator-safe failure variants. Infrastructure defect causes never cross this boundary. */
16
- export declare class InfraFailureView extends InfraFailureView_base {
17
- }
18
- declare const AgentFailureView_base: Schema.Class<AgentFailureView, Schema.TaggedStruct<"AgentFailure", {
19
- readonly message: Schema.String;
20
- }>, {}>;
21
- export declare class AgentFailureView extends AgentFailureView_base {
22
- }
23
- declare const RunawayFailureView_base: Schema.Class<RunawayFailureView, Schema.TaggedStruct<"RunawayFailure", {
24
- readonly ceiling: Schema.Literals<readonly ["wall-clock", "tokens"]>;
25
- }>, {}>;
26
- export declare class RunawayFailureView extends RunawayFailureView_base {
27
- }
28
- export declare const FailureView: Schema.Union<readonly [typeof InfraFailureView, typeof AgentFailureView, typeof RunawayFailureView]>;
29
- export type FailureView = typeof FailureView.Type;
30
- declare const SucceededAttemptView_base: Schema.Class<SucceededAttemptView, Schema.TaggedStruct<"Succeeded", {}>, {}>;
31
- export declare class SucceededAttemptView extends SucceededAttemptView_base {
32
- }
33
- declare const FailedAttemptView_base: Schema.Class<FailedAttemptView, Schema.TaggedStruct<"Failed", {
34
- readonly failure: Schema.Union<readonly [typeof InfraFailureView, typeof AgentFailureView, typeof RunawayFailureView]>;
35
- }>, {}>;
36
- export declare class FailedAttemptView extends FailedAttemptView_base {
37
- }
38
- declare const CanceledAttemptView_base: Schema.Class<CanceledAttemptView, Schema.TaggedStruct<"Canceled", {}>, {}>;
39
- export declare class CanceledAttemptView extends CanceledAttemptView_base {
40
- }
41
- export declare const AttemptOutcomeView: Schema.Union<readonly [typeof SucceededAttemptView, typeof FailedAttemptView, typeof CanceledAttemptView]>;
42
- export type AttemptOutcomeView = typeof AttemptOutcomeView.Type;
43
- declare const AttemptView_base: Schema.Class<AttemptView, Schema.Struct<{
44
- readonly id: Schema.brand<Schema.NonEmptyString, "AttemptId">;
45
- readonly number: Schema.brand<Schema.Int, "AttemptNumber">;
46
- readonly worker: Schema.brand<Schema.String, "WorkerName">;
47
- readonly brain: typeof Agent.BrainSpec;
48
- readonly startedAt: Schema.String;
49
- readonly outcome: Schema.NullOr<Schema.Union<readonly [typeof SucceededAttemptView, typeof FailedAttemptView, typeof CanceledAttemptView]>>;
50
- }>, {}>;
51
- export declare class AttemptView extends AttemptView_base {
52
- }
53
- declare const RunView_base: Schema.Class<RunView, Schema.Struct<{
54
- readonly id: Schema.brand<Schema.NonEmptyString, "RunId">;
55
- readonly itemKey: Schema.brand<Schema.NonEmptyString, "ItemKey">;
56
- readonly loop: Schema.brand<Schema.NonEmptyString, "LoopName">;
57
- readonly repository: Schema.brand<Schema.String, "RepoName">;
58
- readonly agent: Schema.brand<Schema.String, "AgentName">;
59
- readonly state: Schema.Literals<readonly ["Pending", "Waiting", "Running", "Succeeded", "Failed", "Canceled"]>;
60
- readonly loopPaused: Schema.Boolean;
61
- readonly openedAt: Schema.String;
62
- readonly task: Schema.String;
63
- readonly attempts: Schema.$Array<typeof AttemptView>;
64
- readonly resultMessage: Schema.NullOr<Schema.String>;
65
- readonly pullRequestUrl: Schema.NullOr<Schema.String>;
66
- readonly canApprove: Schema.Boolean;
67
- readonly canRetry: Schema.Boolean;
68
- readonly canCancel: Schema.Boolean;
69
- }>, {}>;
70
- export declare class RunView extends RunView_base {
71
- }
72
- export declare const BoardLaneId: Schema.brand<Schema.NonEmptyString, "BoardLaneId">;
73
- export type BoardLaneId = typeof BoardLaneId.Type;
74
- export declare const BoardLaneOrigin: Schema.Literals<readonly ["authored", "proposed", "fallback"]>;
75
- export type BoardLaneOrigin = typeof BoardLaneOrigin.Type;
76
- declare const BoardItemView_base: Schema.Class<BoardItemView, Schema.Struct<{
77
- readonly itemKey: Schema.brand<Schema.NonEmptyString, "ItemKey">;
78
- readonly kind: Schema.Literals<readonly ["issue", "pr"]>;
79
- readonly number: Schema.brand<Schema.Int, "ItemNumber">;
80
- readonly title: Schema.String;
81
- readonly url: Schema.NonEmptyString;
82
- readonly state: Schema.Literals<readonly ["issue-open", "issue-closed", "pr-open", "pr-closed", "pr-merged"]>;
83
- readonly labels: Schema.$Array<Schema.brand<Schema.String, "GitHubLabelName">>;
84
- /** All runs retained for a card, including every action the operator can take. */
85
- readonly runs: Schema.$Array<typeof RunView>;
86
- readonly run: Schema.NullOr<typeof RunView>;
87
- readonly needsYou: Schema.Boolean;
88
- }>, {}>;
89
- export declare class BoardItemView extends BoardItemView_base {
90
- }
91
- declare const WritableBoardLaneView_base: Schema.Class<WritableBoardLaneView, Schema.TaggedStruct<"WritableBoardLane", {
92
- readonly id: Schema.brand<Schema.NonEmptyString, "BoardLaneId">;
93
- readonly name: Schema.brand<Schema.String, "LaneName">;
94
- readonly sources: Schema.$Array<Schema.Union<readonly [typeof import("@usine/config").LabelLaneSource, typeof import("@usine/config").StateLaneSource]>>;
95
- readonly origin: Schema.Literals<readonly ["authored", "proposed", "fallback"]>;
96
- readonly items: Schema.$Array<typeof BoardItemView>;
97
- readonly labels: Schema.$Array<Schema.brand<Schema.String, "GitHubLabelName">>;
98
- }>, {}>;
99
- export declare class WritableBoardLaneView extends WritableBoardLaneView_base {
100
- }
101
- declare const ReadOnlyBoardLaneView_base: Schema.Class<ReadOnlyBoardLaneView, Schema.TaggedStruct<"ReadOnlyBoardLane", {
102
- readonly id: Schema.brand<Schema.NonEmptyString, "BoardLaneId">;
103
- readonly name: Schema.brand<Schema.String, "LaneName">;
104
- readonly sources: Schema.$Array<Schema.Union<readonly [typeof import("@usine/config").LabelLaneSource, typeof import("@usine/config").StateLaneSource]>>;
105
- readonly origin: Schema.Literals<readonly ["authored", "proposed", "fallback"]>;
106
- readonly items: Schema.$Array<typeof BoardItemView>;
107
- }>, {}>;
108
- export declare class ReadOnlyBoardLaneView extends ReadOnlyBoardLaneView_base {
109
- }
110
- export declare const BoardLaneView: Schema.Union<readonly [typeof WritableBoardLaneView, typeof ReadOnlyBoardLaneView]>;
111
- export type BoardLaneView = typeof BoardLaneView.Type;
112
- declare const BoardProjectionError_base: Schema.Class<BoardProjectionError, Schema.TaggedStruct<"BoardProjectionError", {
113
- readonly repository: Schema.brand<Schema.String, "RepoName">;
114
- readonly itemKey: Schema.brand<Schema.NonEmptyString, "ItemKey">;
115
- readonly message: Schema.NonEmptyString;
116
- }>, import("effect/Cause").YieldableError>;
117
- export declare class BoardProjectionError extends BoardProjectionError_base {
118
- }
119
- declare const BoardView_base: Schema.Class<BoardView, Schema.Struct<{
120
- readonly lanes: Schema.$Array<Schema.Union<readonly [typeof WritableBoardLaneView, typeof ReadOnlyBoardLaneView]>>;
121
- readonly failures: Schema.$Array<typeof BoardProjectionError>;
122
- }>, {}>;
123
- export declare class BoardView extends BoardView_base {
124
- }
125
- declare const ProjectView_base: Schema.Class<ProjectView, Schema.Struct<{
126
- readonly repository: Schema.brand<Schema.String, "RepoName">;
127
- readonly status: Schema.Literals<readonly ["clear", "active", "needs-you"]>;
128
- readonly runs: Schema.$Array<typeof RunView>;
129
- readonly board: typeof BoardView;
130
- }>, {}>;
131
- export declare class ProjectView extends ProjectView_base {
132
- }
133
- declare const BoardMove_base: Schema.Class<BoardMove, Schema.Struct<{
134
- readonly repository: Schema.brand<Schema.String, "RepoName">;
135
- readonly item: Schema.brand<Schema.Int, "ItemNumber">;
136
- readonly toLane: Schema.brand<Schema.NonEmptyString, "BoardLaneId">;
137
- }>, {}>;
138
- export declare class BoardMove extends BoardMove_base {
139
- }
140
- declare const BoardProjectNotFoundError_base: Schema.Class<BoardProjectNotFoundError, Schema.TaggedStruct<"BoardProjectNotFoundError", {
141
- readonly repository: Schema.brand<Schema.String, "RepoName">;
142
- }>, import("effect/Cause").YieldableError>;
143
- export declare class BoardProjectNotFoundError extends BoardProjectNotFoundError_base {
144
- }
145
- declare const BoardItemNotFoundError_base: Schema.Class<BoardItemNotFoundError, Schema.TaggedStruct<"BoardItemNotFoundError", {
146
- readonly repository: Schema.brand<Schema.String, "RepoName">;
147
- readonly item: Schema.brand<Schema.Int, "ItemNumber">;
148
- }>, import("effect/Cause").YieldableError>;
149
- export declare class BoardItemNotFoundError extends BoardItemNotFoundError_base {
150
- }
151
- declare const BoardLaneNotFoundError_base: Schema.Class<BoardLaneNotFoundError, Schema.TaggedStruct<"BoardLaneNotFoundError", {
152
- readonly repository: Schema.brand<Schema.String, "RepoName">;
153
- readonly lane: Schema.brand<Schema.NonEmptyString, "BoardLaneId">;
154
- }>, import("effect/Cause").YieldableError>;
155
- export declare class BoardLaneNotFoundError extends BoardLaneNotFoundError_base {
156
- }
157
- declare const BoardLaneReadOnlyError_base: Schema.Class<BoardLaneReadOnlyError, Schema.TaggedStruct<"BoardLaneReadOnlyError", {
158
- readonly repository: Schema.brand<Schema.String, "RepoName">;
159
- readonly lane: Schema.brand<Schema.NonEmptyString, "BoardLaneId">;
160
- }>, import("effect/Cause").YieldableError>;
161
- export declare class BoardLaneReadOnlyError extends BoardLaneReadOnlyError_base {
162
- }
163
- declare const LoopView_base: Schema.Class<LoopView, Schema.Struct<{
164
- readonly name: Schema.brand<Schema.NonEmptyString, "LoopName">;
165
- readonly trigger: Schema.String;
166
- readonly agent: Schema.brand<Schema.String, "AgentName">;
167
- readonly paused: Schema.Boolean;
168
- }>, {}>;
169
- export declare class LoopView extends LoopView_base {
170
- }
171
- declare const ApprovalNeed_base: Schema.Class<ApprovalNeed, Schema.TaggedStruct<"ApprovalNeed", {
172
- readonly id: Schema.String;
173
- readonly repository: Schema.brand<Schema.String, "RepoName">;
174
- readonly runId: Schema.brand<Schema.NonEmptyString, "RunId">;
175
- readonly loop: Schema.brand<Schema.NonEmptyString, "LoopName">;
176
- }>, {}>;
177
- export declare class ApprovalNeed extends ApprovalNeed_base {
178
- }
179
- declare const RunFailureNeed_base: Schema.Class<RunFailureNeed, Schema.TaggedStruct<"RunFailureNeed", {
180
- readonly id: Schema.String;
181
- readonly repository: Schema.brand<Schema.String, "RepoName">;
182
- readonly runId: Schema.brand<Schema.NonEmptyString, "RunId">;
183
- readonly loop: Schema.brand<Schema.NonEmptyString, "LoopName">;
184
- readonly failure: Schema.Union<readonly [typeof InfraFailureView, typeof AgentFailureView, typeof RunawayFailureView]>;
185
- }>, {}>;
186
- export declare class RunFailureNeed extends RunFailureNeed_base {
187
- }
188
- declare const PollFailureNeed_base: Schema.Class<PollFailureNeed, Schema.TaggedStruct<"PollFailureNeed", {
189
- readonly id: Schema.String;
190
- readonly failure: typeof RepositoryPollFailure;
191
- }>, {}>;
192
- export declare class PollFailureNeed extends PollFailureNeed_base {
193
- }
194
- declare const BoardProjectionNeed_base: Schema.Class<BoardProjectionNeed, Schema.TaggedStruct<"BoardProjectionNeed", {
195
- readonly id: Schema.String;
196
- readonly failure: typeof BoardProjectionError;
197
- }>, {}>;
198
- export declare class BoardProjectionNeed extends BoardProjectionNeed_base {
199
- }
200
- declare const ScheduleFailureNeed_base: Schema.Class<ScheduleFailureNeed, Schema.TaggedStruct<"ScheduleFailureNeed", {
201
- readonly id: Schema.String;
202
- readonly failure: Schema.Union<readonly [typeof import("../schedule-triggers.ts").ScheduleAgentFailure, typeof import("../schedule-triggers.ts").ScheduleCronFailure, typeof import("../schedule-triggers.ts").ScheduleTickFailure]>;
203
- }>, {}>;
204
- export declare class ScheduleFailureNeed extends ScheduleFailureNeed_base {
205
- }
206
- export declare const NeedView: Schema.Union<readonly [typeof ApprovalNeed, typeof BoardProjectionNeed, typeof RunFailureNeed, typeof PollFailureNeed, typeof ScheduleFailureNeed]>;
207
- export type NeedView = typeof NeedView.Type;
208
- declare const FailedTranscriptView_base: Schema.Class<FailedTranscriptView, Schema.TaggedStruct<"Failed", {
209
- readonly failure: Schema.Union<readonly [typeof InfraFailureView, typeof AgentFailureView, typeof RunawayFailureView]>;
210
- }>, {}>;
211
- export declare class FailedTranscriptView extends FailedTranscriptView_base {
212
- }
213
- export declare const TranscriptPayload: Schema.Union<readonly [typeof AttemptChannel.Started, typeof AttemptChannel.SessionEvent, typeof AttemptChannel.Final, typeof FailedTranscriptView, typeof AttemptChannel.Interrupted, typeof AttemptChannel.Steer, typeof AttemptChannel.Interrupt]>;
214
- export type TranscriptPayload = typeof TranscriptPayload.Type;
215
- declare const TranscriptEventView_base: Schema.Class<TranscriptEventView, Schema.Struct<{
216
- readonly sequence: Schema.brand<Schema.Int, "TranscriptSequence">;
217
- readonly attemptId: Schema.brand<Schema.NonEmptyString, "AttemptId">;
218
- readonly receivedAt: Schema.String;
219
- readonly direction: Schema.Literals<readonly ["inbound", "outbound"]>;
220
- readonly payload: Schema.Union<readonly [typeof AttemptChannel.Started, typeof AttemptChannel.SessionEvent, typeof AttemptChannel.Final, typeof FailedTranscriptView, typeof AttemptChannel.Interrupted, typeof AttemptChannel.Steer, typeof AttemptChannel.Interrupt]>;
221
- }>, {}>;
222
- export declare class TranscriptEventView extends TranscriptEventView_base {
223
- }
224
- declare const TranscriptPageCursor_base: Schema.Class<TranscriptPageCursor, Schema.Struct<{
225
- readonly attemptId: Schema.brand<Schema.NonEmptyString, "AttemptId">;
226
- readonly before: Schema.brand<Schema.Int, "TranscriptSequence">;
227
- }>, {}>;
228
- /** Cursor for loading one earlier page without mixing Attempts across Runs. */
229
- export declare class TranscriptPageCursor extends TranscriptPageCursor_base {
230
- }
231
- declare const ColdTranscriptRequest_base: Schema.Class<ColdTranscriptRequest, Schema.TaggedStruct<"ColdTranscriptRequest", {}>, {}>;
232
- export declare class ColdTranscriptRequest extends ColdTranscriptRequest_base {
233
- }
234
- declare const TailTranscriptRequest_base: Schema.Class<TailTranscriptRequest, Schema.TaggedStruct<"TailTranscriptRequest", {
235
- readonly after: Schema.brand<Schema.Int, "TranscriptSequence">;
236
- }>, {}>;
237
- export declare class TailTranscriptRequest extends TailTranscriptRequest_base {
238
- }
239
- declare const EarlierTranscriptRequest_base: Schema.Class<EarlierTranscriptRequest, Schema.TaggedStruct<"EarlierTranscriptRequest", {
240
- readonly attemptId: Schema.brand<Schema.NonEmptyString, "AttemptId">;
241
- readonly before: Schema.brand<Schema.Int, "TranscriptSequence">;
242
- }>, {}>;
243
- export declare class EarlierTranscriptRequest extends EarlierTranscriptRequest_base {
244
- }
245
- export declare const TranscriptRequest: Schema.Union<readonly [typeof ColdTranscriptRequest, typeof TailTranscriptRequest, typeof EarlierTranscriptRequest]>;
246
- export type TranscriptRequest = typeof TranscriptRequest.Type;
247
- declare const TranscriptAttemptNotFoundError_base: Schema.Class<TranscriptAttemptNotFoundError, Schema.TaggedStruct<"TranscriptAttemptNotFoundError", {
248
- readonly runId: Schema.brand<Schema.NonEmptyString, "RunId">;
249
- readonly attemptId: Schema.brand<Schema.NonEmptyString, "AttemptId">;
250
- }>, import("effect/Cause").YieldableError>;
251
- export declare class TranscriptAttemptNotFoundError extends TranscriptAttemptNotFoundError_base {
252
- }
253
- declare const RunDetailView_base: Schema.Class<RunDetailView, Schema.Struct<{
254
- readonly run: typeof RunView;
255
- readonly eventDedupKey: Schema.String;
256
- readonly eventPayload: Schema.Codec<Schema.Json, Schema.Json, never, never>;
257
- readonly transcript: Schema.$Array<typeof TranscriptEventView>;
258
- readonly earlierTranscript: Schema.$Array<typeof TranscriptPageCursor>;
259
- }>, {}>;
260
- export declare class RunDetailView extends RunDetailView_base {
261
- }
262
- declare const ReadyOverview_base: Schema.Class<ReadyOverview, Schema.TaggedStruct<"Ready", {
263
- readonly projects: Schema.$Array<typeof ProjectView>;
264
- readonly loops: Schema.$Array<typeof LoopView>;
265
- readonly needsYou: Schema.$Array<Schema.Union<readonly [typeof ApprovalNeed, typeof BoardProjectionNeed, typeof RunFailureNeed, typeof PollFailureNeed, typeof ScheduleFailureNeed]>>;
266
- }>, {}>;
267
- export declare class ReadyOverview extends ReadyOverview_base {
268
- }
269
- declare const NeedsSetupOverview_base: Schema.Class<NeedsSetupOverview, Schema.TaggedStruct<"NeedsSetup", {
270
- readonly errorTag: Schema.NonEmptyString;
271
- readonly projects: Schema.$Array<typeof ProjectView>;
272
- readonly loops: Schema.$Array<typeof LoopView>;
273
- readonly needsYou: Schema.$Array<Schema.Union<readonly [typeof ApprovalNeed, typeof BoardProjectionNeed, typeof RunFailureNeed, typeof PollFailureNeed, typeof ScheduleFailureNeed]>>;
274
- }>, {}>;
275
- export declare class NeedsSetupOverview extends NeedsSetupOverview_base {
276
- }
277
- export declare const FactoryOverview: Schema.Union<readonly [typeof ReadyOverview, typeof NeedsSetupOverview]>;
278
- export type FactoryOverview = typeof FactoryOverview.Type;
279
- export {};
280
- //# sourceMappingURL=model.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/operator/model.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EAEL,cAAc,EAQf,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAG/D,oFAAoF;AACpF,eAAO,MAAM,gBAAgB,gDAAqB,CAAC;AACnD,MAAM,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AAElD,eAAO,MAAM,aAAa,4DAAoD,CAAC;AAC/E,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC,IAAI,CAAC;AAEtD,eAAO,MAAM,WAAW,gGAAuC,CAAC;A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