@usine/core 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/README.md +28 -22
  2. package/dist/agent/agent.d.ts +27 -0
  3. package/dist/agent/agent.d.ts.map +1 -0
  4. package/dist/agent/agent.js +26 -0
  5. package/dist/agent/agent.js.map +1 -0
  6. package/dist/agent/brain.d.ts +24 -0
  7. package/dist/agent/brain.d.ts.map +1 -0
  8. package/dist/agent/brain.js +19 -0
  9. package/dist/agent/brain.js.map +1 -0
  10. package/dist/agent/capability.d.ts +23 -0
  11. package/dist/agent/capability.d.ts.map +1 -0
  12. package/dist/agent/capability.js +19 -0
  13. package/dist/agent/capability.js.map +1 -0
  14. package/dist/{agent.d.ts → agent/session.d.ts} +34 -50
  15. package/dist/agent/session.d.ts.map +1 -0
  16. package/dist/agent/session.js +93 -0
  17. package/dist/agent/session.js.map +1 -0
  18. package/dist/attempt/attempt.d.ts +41 -0
  19. package/dist/attempt/attempt.d.ts.map +1 -0
  20. package/dist/attempt/attempt.js +36 -0
  21. package/dist/attempt/attempt.js.map +1 -0
  22. package/dist/{attempt-channel.d.ts → attempt/channel.d.ts} +28 -32
  23. package/dist/attempt/channel.d.ts.map +1 -0
  24. package/dist/{attempt-channel.js → attempt/channel.js} +25 -26
  25. package/dist/attempt/channel.js.map +1 -0
  26. package/dist/attempt/failure.d.ts +52 -0
  27. package/dist/attempt/failure.d.ts.map +1 -0
  28. package/dist/attempt/failure.js +48 -0
  29. package/dist/attempt/failure.js.map +1 -0
  30. package/dist/attempt/outcome.d.ts +20 -0
  31. package/dist/attempt/outcome.d.ts.map +1 -0
  32. package/dist/attempt/outcome.js +16 -0
  33. package/dist/attempt/outcome.js.map +1 -0
  34. package/dist/cycle-budget.d.ts +38 -0
  35. package/dist/cycle-budget.d.ts.map +1 -0
  36. package/dist/cycle-budget.js +46 -0
  37. package/dist/cycle-budget.js.map +1 -0
  38. package/dist/{lifecycle/event.d.ts → event.d.ts} +6 -11
  39. package/dist/event.d.ts.map +1 -0
  40. package/dist/event.js +21 -0
  41. package/dist/event.js.map +1 -0
  42. package/dist/instance.d.ts +3 -7
  43. package/dist/instance.d.ts.map +1 -1
  44. package/dist/instance.js +2 -6
  45. package/dist/instance.js.map +1 -1
  46. package/dist/item.d.ts +8 -0
  47. package/dist/item.d.ts.map +1 -0
  48. package/dist/item.js +6 -0
  49. package/dist/item.js.map +1 -0
  50. package/dist/loop.d.ts +9 -0
  51. package/dist/loop.d.ts.map +1 -0
  52. package/dist/loop.js +7 -0
  53. package/dist/loop.js.map +1 -0
  54. package/dist/repository.d.ts +12 -17
  55. package/dist/repository.d.ts.map +1 -1
  56. package/dist/repository.js +11 -16
  57. package/dist/repository.js.map +1 -1
  58. package/dist/run/run.d.ts +16 -0
  59. package/dist/run/run.d.ts.map +1 -0
  60. package/dist/run/run.js +16 -0
  61. package/dist/run/run.js.map +1 -0
  62. package/dist/run/state.d.ts +114 -0
  63. package/dist/run/state.d.ts.map +1 -0
  64. package/dist/run/state.js +102 -0
  65. package/dist/run/state.js.map +1 -0
  66. package/dist/{step-result.d.ts → step/result.d.ts} +7 -9
  67. package/dist/step/result.d.ts.map +1 -0
  68. package/dist/{step-result.js → step/result.js} +8 -10
  69. package/dist/step/result.js.map +1 -0
  70. package/dist/step/step.d.ts +21 -0
  71. package/dist/step/step.d.ts.map +1 -0
  72. package/dist/step/step.js +19 -0
  73. package/dist/step/step.js.map +1 -0
  74. package/dist/worker.d.ts +7 -7
  75. package/dist/worker.d.ts.map +1 -1
  76. package/dist/worker.js +5 -5
  77. package/dist/worker.js.map +1 -1
  78. package/package.json +76 -4
  79. package/dist/agent.d.ts.map +0 -1
  80. package/dist/agent.js +0 -105
  81. package/dist/agent.js.map +0 -1
  82. package/dist/attempt-channel.d.ts.map +0 -1
  83. package/dist/attempt-channel.js.map +0 -1
  84. package/dist/index.d.ts +0 -24
  85. package/dist/index.d.ts.map +0 -1
  86. package/dist/index.js +0 -24
  87. package/dist/index.js.map +0 -1
  88. package/dist/lifecycle/attempt-failure.d.ts +0 -51
  89. package/dist/lifecycle/attempt-failure.d.ts.map +0 -1
  90. package/dist/lifecycle/attempt-failure.js +0 -45
  91. package/dist/lifecycle/attempt-failure.js.map +0 -1
  92. package/dist/lifecycle/attempt.d.ts +0 -61
  93. package/dist/lifecycle/attempt.d.ts.map +0 -1
  94. package/dist/lifecycle/attempt.js +0 -52
  95. package/dist/lifecycle/attempt.js.map +0 -1
  96. package/dist/lifecycle/event.d.ts.map +0 -1
  97. package/dist/lifecycle/event.js +0 -26
  98. package/dist/lifecycle/event.js.map +0 -1
  99. package/dist/lifecycle/item.d.ts +0 -11
  100. package/dist/lifecycle/item.d.ts.map +0 -1
  101. package/dist/lifecycle/item.js +0 -9
  102. package/dist/lifecycle/item.js.map +0 -1
  103. package/dist/lifecycle/loop.d.ts +0 -17
  104. package/dist/lifecycle/loop.d.ts.map +0 -1
  105. package/dist/lifecycle/loop.js +0 -15
  106. package/dist/lifecycle/loop.js.map +0 -1
  107. package/dist/lifecycle/run-state.d.ts +0 -133
  108. package/dist/lifecycle/run-state.d.ts.map +0 -1
  109. package/dist/lifecycle/run-state.js +0 -126
  110. package/dist/lifecycle/run-state.js.map +0 -1
  111. package/dist/lifecycle/run.d.ts +0 -22
  112. package/dist/lifecycle/run.d.ts.map +0 -1
  113. package/dist/lifecycle/run.js +0 -22
  114. package/dist/lifecycle/run.js.map +0 -1
  115. package/dist/lifecycle/step.d.ts +0 -23
  116. package/dist/lifecycle/step.d.ts.map +0 -1
  117. package/dist/lifecycle/step.js +0 -21
  118. package/dist/lifecycle/step.js.map +0 -1
  119. package/dist/step-result.d.ts.map +0 -1
  120. package/dist/step-result.js.map +0 -1
package/dist/worker.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { Schema } from "effect";
2
- /** The engine-owned Worker adapters available to an instance. */
3
- export const KINDS = ["local", "exe.dev"];
4
- export const Kind = Schema.Literals(KINDS);
5
- /** Value object: the name-keyed identity of a configured Worker. */
6
- export const Name = Schema.String.check(Schema.isPattern(/^[a-z0-9]+(?:-[a-z0-9]+)*$/u, {
2
+ /** Kebab-case name of a configured Worker. */
3
+ export const WorkerName = Schema.String.check(Schema.isPattern(/^[a-z0-9]+(?:-[a-z0-9]+)*$/u, {
7
4
  message: "Expected a kebab-case Worker name",
8
5
  })).pipe(Schema.brand("WorkerName"));
6
+ /** The Worker adapters the engine ships. */
7
+ export const WORKER_KINDS = ["local", "exe.dev"];
8
+ export const WorkerKind = Schema.Literals(WORKER_KINDS);
9
9
  //# sourceMappingURL=worker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"worker.js","sourceRoot":"","sources":["../src/worker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,iEAAiE;AACjE,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,SAAS,CAAU,CAAC;AACnD,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAG3C,oEAAoE;AACpE,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CACrC,MAAM,CAAC,SAAS,CAAC,6BAA6B,EAAE;IAC9C,OAAO,EAAE,mCAAmC;CAC7C,CAAC,CACH,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"worker.js","sourceRoot":"","sources":["../src/worker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,8CAA8C;AAC9C,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAC3C,MAAM,CAAC,SAAS,CAAC,6BAA6B,EAAE;IAC9C,OAAO,EAAE,mCAAmC;CAC7C,CAAC,CACH,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;AAInC,4CAA4C;AAC5C,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,SAAS,CAAU,CAAC;AAC1D,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usine/core",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Domain model for usine: Event → Run → Step → Attempt, branded ids, the run state machine, and the typed attempt-failure taxonomy.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -14,9 +14,81 @@
14
14
  "type": "module",
15
15
  "sideEffects": false,
16
16
  "exports": {
17
- ".": {
18
- "types": "./dist/index.d.ts",
19
- "default": "./dist/index.js"
17
+ "./cycle-budget": {
18
+ "types": "./dist/cycle-budget.d.ts",
19
+ "default": "./dist/cycle-budget.js"
20
+ },
21
+ "./agent": {
22
+ "types": "./dist/agent/agent.d.ts",
23
+ "default": "./dist/agent/agent.js"
24
+ },
25
+ "./agent/brain": {
26
+ "types": "./dist/agent/brain.d.ts",
27
+ "default": "./dist/agent/brain.js"
28
+ },
29
+ "./agent/session": {
30
+ "types": "./dist/agent/session.d.ts",
31
+ "default": "./dist/agent/session.js"
32
+ },
33
+ "./attempt": {
34
+ "types": "./dist/attempt/attempt.d.ts",
35
+ "default": "./dist/attempt/attempt.js"
36
+ },
37
+ "./attempt/channel": {
38
+ "types": "./dist/attempt/channel.d.ts",
39
+ "default": "./dist/attempt/channel.js"
40
+ },
41
+ "./attempt/failure": {
42
+ "types": "./dist/attempt/failure.d.ts",
43
+ "default": "./dist/attempt/failure.js"
44
+ },
45
+ "./attempt/outcome": {
46
+ "types": "./dist/attempt/outcome.d.ts",
47
+ "default": "./dist/attempt/outcome.js"
48
+ },
49
+ "./event": {
50
+ "types": "./dist/event.d.ts",
51
+ "default": "./dist/event.js"
52
+ },
53
+ "./instance": {
54
+ "types": "./dist/instance.d.ts",
55
+ "default": "./dist/instance.js"
56
+ },
57
+ "./item": {
58
+ "types": "./dist/item.d.ts",
59
+ "default": "./dist/item.js"
60
+ },
61
+ "./loop": {
62
+ "types": "./dist/loop.d.ts",
63
+ "default": "./dist/loop.js"
64
+ },
65
+ "./repository": {
66
+ "types": "./dist/repository.d.ts",
67
+ "default": "./dist/repository.js"
68
+ },
69
+ "./run": {
70
+ "types": "./dist/run/run.d.ts",
71
+ "default": "./dist/run/run.js"
72
+ },
73
+ "./run/state": {
74
+ "types": "./dist/run/state.d.ts",
75
+ "default": "./dist/run/state.js"
76
+ },
77
+ "./step": {
78
+ "types": "./dist/step/step.d.ts",
79
+ "default": "./dist/step/step.js"
80
+ },
81
+ "./step/result": {
82
+ "types": "./dist/step/result.d.ts",
83
+ "default": "./dist/step/result.js"
84
+ },
85
+ "./worker": {
86
+ "types": "./dist/worker.d.ts",
87
+ "default": "./dist/worker.js"
88
+ },
89
+ "./agent/capability": {
90
+ "types": "./dist/agent/capability.d.ts",
91
+ "default": "./dist/agent/capability.js"
20
92
  }
21
93
  },
22
94
  "publishConfig": {
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAKxC,uEAAuE;AACvE,eAAO,MAAM,IAAI,0CAIgB,CAAC;AAClC,MAAM,MAAM,IAAI,GAAG,OAAO,IAAI,CAAC,IAAI,CAAC;AAEpC,uDAAuD;AACvD,eAAO,MAAM,OAAO,wCAEnB,CAAC;AACF,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAC;AAE1C,kEAAkE;AAClE,eAAO,MAAM,OAAO,6CAEnB,CAAC;AACF,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAC;AAE1C,eAAO,MAAM,SAA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AAG;;;;;;;AAEL,qBAAa,kBAAmB,SAAQ,uBAOtC;CAAG;;;;;;AAEL,2EAA2E;AAC3E,qBAAa,qBAAsB,SAAQ,0BAMzC;CAAG;AAEL,uEAAuE;AACvE,eAAO,MAAM,YAAY,kKAOvB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC,IAAI,CAAC;AAEpD,gFAAgF;AAChF,eAAO,MAAM,kBAAkB,UACtB,KAAK,mBACK,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,KACtC,MAAM,CAAC,MAAM,CAAC,OAAO,CAA6D,CAAC"}
package/dist/agent.js DELETED
@@ -1,105 +0,0 @@
1
- import { Option, Schema } from "effect";
2
- const nonBlankString = (message) => Schema.String.check(Schema.isPattern(/\S/u, { message }));
3
- /** Value object: the filename-keyed identity of one rostered Agent. */
4
- export const Name = Schema.String.check(Schema.isPattern(/^[a-z0-9]+(?:-[a-z0-9]+)*$/u, {
5
- message: "Expected a kebab-case Agent name",
6
- })).pipe(Schema.brand("AgentName"));
7
- /** Value object: an opaque vendor model identifier. */
8
- export const ModelId = nonBlankString("Expected a non-blank model id").pipe(Schema.brand("ModelId"));
9
- /** Value object: standing Markdown instructions for one Agent. */
10
- export const Persona = nonBlankString("Expected a non-blank Agent persona").pipe(Schema.brand("AgentPersona"));
11
- export const HARNESSES = ["claude", "codex", "pi"];
12
- export const Harness = Schema.Literals(HARNESSES);
13
- export const EFFORTS = ["off", "minimal", "low", "medium", "high", "xhigh", "max"];
14
- export const Effort = Schema.Literals(EFFORTS);
15
- /** Value object: the harness child that a run is declared to spawn. */
16
- export class BrainSpec extends Schema.Class("Agent/BrainSpec")({
17
- harness: Harness,
18
- model: ModelId,
19
- effort: Effort,
20
- }) {
21
- }
22
- /** Entity: one named member of the instance's authored team roster. */
23
- export class Agent extends Schema.Class("Agent")({
24
- name: Name,
25
- brain: BrainSpec,
26
- parentModel: Schema.OptionFromNullOr(ModelId),
27
- persona: Persona,
28
- }) {
29
- }
30
- /** Value object: SDK-local identity of one parent or child agent session. */
31
- export const SessionId = Schema.NonEmptyString.pipe(Schema.brand("AgentSessionId"));
32
- /** Parent session descriptor. It cannot name a parent, so recursive nesting is unrepresentable. */
33
- export class ParentSession extends Schema.TaggedClass("Agent/ParentSession")("ParentSession", {
34
- id: SessionId,
35
- agent: Name,
36
- brain: BrainSpec,
37
- }) {
38
- }
39
- /** Child session descriptor. Exactly one parent id keeps session nesting one level deep. */
40
- export class ChildSession extends Schema.TaggedClass("Agent/ChildSession")("ChildSession", {
41
- id: SessionId,
42
- parentId: SessionId,
43
- agent: Name,
44
- brain: BrainSpec,
45
- }) {
46
- }
47
- export const Session = Schema.Union([ParentSession, ChildSession]);
48
- export class SessionStarted extends Schema.TaggedClass("Agent/SessionStarted")("SessionStarted", { session: Session }) {
49
- }
50
- export class TextOutput extends Schema.TaggedClass("Agent/TextOutput")("TextOutput", {
51
- session: Session,
52
- text: Schema.NonEmptyString,
53
- }) {
54
- }
55
- export class ToolStarted extends Schema.TaggedClass("Agent/ToolStarted")("ToolStarted", {
56
- session: Session,
57
- callId: Schema.NonEmptyString,
58
- tool: Schema.NonEmptyString,
59
- input: Schema.Json,
60
- }) {
61
- }
62
- export class ToolFinished extends Schema.TaggedClass("Agent/ToolFinished")("ToolFinished", {
63
- session: Session,
64
- callId: Schema.NonEmptyString,
65
- tool: Schema.NonEmptyString,
66
- output: Schema.Json,
67
- isError: Schema.Boolean,
68
- }) {
69
- }
70
- export class SessionFinished extends Schema.TaggedClass("Agent/SessionFinished")("SessionFinished", { session: Session }) {
71
- }
72
- /** Billing source whose native meter produced a usage or health observation. */
73
- export const Pool = Schema.Literals(["apiKeys", "claudePlan", "chatgptPlan"]);
74
- export class RateLimitWindow extends Schema.Class("Agent/RateLimitWindow")({
75
- usedPercent: Schema.Number,
76
- windowDurationMinutes: Schema.OptionFromNullOr(Schema.Number),
77
- resetsAt: Schema.OptionFromNullOr(Schema.DateTimeUtcFromString),
78
- }) {
79
- }
80
- export class RateLimitsSnapshot extends Schema.Class("Agent/RateLimitsSnapshot")({
81
- limitId: Schema.OptionFromNullOr(Schema.String),
82
- limitName: Schema.OptionFromNullOr(Schema.String),
83
- primary: Schema.OptionFromNullOr(RateLimitWindow),
84
- secondary: Schema.OptionFromNullOr(RateLimitWindow),
85
- }) {
86
- }
87
- /** Latest native billing-pool rate windows observed during one session. */
88
- export class PoolRateLimitsUpdated extends Schema.TaggedClass("Agent/PoolRateLimitsUpdated")("PoolRateLimitsUpdated", {
89
- session: Session,
90
- pool: Pool,
91
- rateLimits: RateLimitsSnapshot,
92
- }) {
93
- }
94
- /** Normalized events emitted by every parent and child SDK backend. */
95
- export const SessionEvent = Schema.Union([
96
- SessionStarted,
97
- TextOutput,
98
- ToolStarted,
99
- ToolFinished,
100
- PoolRateLimitsUpdated,
101
- SessionFinished,
102
- ]);
103
- /** Pure deriver: a per-Agent parent override wins over the instance default. */
104
- export const resolveParentModel = (agent, instanceDefault) => Option.firstSomeOf([agent.parentModel, instanceDefault]);
105
- //# sourceMappingURL=agent.js.map
package/dist/agent.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAExC,MAAM,cAAc,GAAG,CAAC,OAAe,EAAE,EAAE,CACzC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;AAE5D,uEAAuE;AACvE,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CACrC,MAAM,CAAC,SAAS,CAAC,6BAA6B,EAAE;IAC9C,OAAO,EAAE,kCAAkC;CAC5C,CAAC,CACH,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;AAGlC,uDA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,MAAM,EAAE,YAAY,QAAQ,CAAC,YAAY,cAAc,QAAQ,CAAC,QAAQ,EAAE;SAC3E,CAAC,CAAC;IACL,CAAC;IACD,IAAI,QAAQ,CAAC,KAAK,KAAK,UAAU,EAAE,CAAC;QAClC,OAAO,MAAM,CAAC,IAAI,CAAC;YACjB,OAAO,EAAE,8DAA8D;YACvE,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI;SAC9B,CAAC,CAAC;IACL,CAAC;IACD,IACE,QAAQ,CAAC,KAAK,KAAK,iBAAiB;QACpC,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAK,SAAS;QACnC,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAK,QAAQ,EAClC,CAAC;QACD,OAAO,MAAM,CAAC,IAAI,CAAC;YACjB,OAAO,EAAE,8DAA8D;YACvE,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI;SAC9B,CAAC,CAAC;IACL,CAAC;IACD,IAAI,QAAQ,CAAC,KAAK,KAAK,SAAS,IAAI,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QACxE,OAAO,MAAM,CAAC,IAAI,CAAC;YACjB,OAAO,EAAE,qDAAqD;YAC9D,MAAM,EAAE,4BAA4B;SACrC,CAAC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC,OAAO,CAAC;QACpB,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS;QAC5D,YAAY,EAAE,QAAQ,CAAC,YAAY,GAAG,CAAC;KACxC,CAAC,CAAC;AACL,CAAC,CAAC"}
package/dist/index.d.ts DELETED
@@ -1,24 +0,0 @@
1
- /**
2
- * @usine/core — domain model for usine (ADR 0002, ADR 0013).
3
- *
4
- * `lifecycle/` is the run-lifecycle cluster: how one piece of work moves
5
- * through the engine — a deduplicated Event opens a Run, the Run's named Step
6
- * is tried as Attempts, and the state machine closes it. Entities are the
7
- * ledger rows (Event, Run, Step, Attempt); everything else is value objects,
8
- * typed errors, and pure derivers — each module docblock names its kind.
9
- */
10
- export * as Instance from "./instance.ts";
11
- export * as Agent from "./agent.ts";
12
- export * as Repository from "./repository.ts";
13
- export * as AttemptChannel from "./attempt-channel.ts";
14
- export * as StepResult from "./step-result.ts";
15
- export * as Worker from "./worker.ts";
16
- export * as Attempt from "./lifecycle/attempt.ts";
17
- export * as AttemptFailure from "./lifecycle/attempt-failure.ts";
18
- export * as Event from "./lifecycle/event.ts";
19
- export * as Item from "./lifecycle/item.ts";
20
- export * as Loop from "./lifecycle/loop.ts";
21
- export * as Run from "./lifecycle/run.ts";
22
- export * as RunState from "./lifecycle/run-state.ts";
23
- export * as Step from "./lifecycle/step.ts";
24
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,cAAc,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAC;AAClD,OAAO,KAAK,cAAc,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAC;AAC9C,OAAO,KAAK,IAAI,MAAM,qBAAqB,CAAC;AAC5C,OAAO,KAAK,IAAI,MAAM,qBAAqB,CAAC;AAC5C,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAC1C,OAAO,KAAK,QAAQ,MAAM,0BAA0B,CAAC;AACrD,OAAO,KAAK,IAAI,MAAM,qBAAqB,CAAC"}
package/dist/index.js DELETED
@@ -1,24 +0,0 @@
1
- /**
2
- * @usine/core — domain model for usine (ADR 0002, ADR 0013).
3
- *
4
- * `lifecycle/` is the run-lifecycle cluster: how one piece of work moves
5
- * through the engine — a deduplicated Event opens a Run, the Run's named Step
6
- * is tried as Attempts, and the state machine closes it. Entities are the
7
- * ledger rows (Event, Run, Step, Attempt); everything else is value objects,
8
- * typed errors, and pure derivers — each module docblock names its kind.
9
- */
10
- export * as Instance from "./instance.js";
11
- export * as Agent from "./agent.js";
12
- export * as Repository from "./repository.js";
13
- export * as AttemptChannel from "./attempt-channel.js";
14
- export * as StepResult from "./step-result.js";
15
- export * as Worker from "./worker.js";
16
- export * as Attempt from "./lifecycle/attempt.js";
17
- export * as AttemptFailure from "./lifecycle/attempt-failure.js";
18
- export * as Event from "./lifecycle/event.js";
19
- export * as Item from "./lifecycle/item.js";
20
- export * as Loop from "./lifecycle/loop.js";
21
- export * as Run from "./lifecycle/run.js";
22
- export * as RunState from "./lifecycle/run-state.js";
23
- export * as Step from "./lifecycle/step.js";
24
- //# 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;;;;;;;;GAQG;AACH,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,cAAc,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAC;AAClD,OAAO,KAAK,cAAc,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAC;AAC9C,OAAO,KAAK,IAAI,MAAM,qBAAqB,CAAC;AAC5C,OAAO,KAAK,IAAI,MAAM,qBAAqB,CAAC;AAC5C,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAC1C,OAAO,KAAK,QAAQ,MAAM,0BAA0B,CAAC;AACrD,OAAO,KAAK,IAAI,MAAM,qBAAqB,CAAC"}
@@ -1,51 +0,0 @@
1
- /**
2
- * Why an attempt failed — the typed taxonomy the retry law dispatches on
3
- * (ADR 0002, ADR 0013). Typed errors; three classes, deliberately distinct:
4
- *
5
- * - `InfraFailure` — the only class the engine may retry on its own, capped.
6
- * - `AgentFailure` — always waits for the operator.
7
- * - `RunawayFailure` — never auto-retried; only the operator restarts it.
8
- */
9
- import { Schema } from "effect";
10
- declare const InfraFailure_base: Schema.Class<InfraFailure, Schema.TaggedStruct<"InfraFailure", {
11
- readonly message: Schema.String;
12
- readonly cause: Schema.Defect;
13
- }>, import("effect/Cause").YieldableError>;
14
- /**
15
- * Typed error: infrastructure failed around the agent — worker unreachable,
16
- * checkout failed, run host died. Auto-retryable, capped.
17
- */
18
- export declare class InfraFailure extends InfraFailure_base {
19
- }
20
- declare const AgentFailure_base: Schema.Class<AgentFailure, Schema.TaggedStruct<"AgentFailure", {
21
- readonly message: Schema.String;
22
- }>, import("effect/Cause").YieldableError>;
23
- /**
24
- * Typed error: the agent ran and failed the work itself. Never auto-retried —
25
- * an agent that failed once would fail the same way again; the operator
26
- * decides what changes before the next attempt.
27
- */
28
- export declare class AgentFailure extends AgentFailure_base {
29
- }
30
- /** Which per-attempt ceiling the runaway guard tripped. */
31
- export declare const RunawayCeiling: Schema.Literals<readonly ["wall-clock", "tokens"]>;
32
- export type RunawayCeiling = typeof RunawayCeiling.Type;
33
- declare const RunawayFailure_base: Schema.Class<RunawayFailure, Schema.TaggedStruct<"RunawayFailure", {
34
- readonly ceiling: Schema.Literals<readonly ["wall-clock", "tokens"]>;
35
- }>, import("effect/Cause").YieldableError>;
36
- /**
37
- * Typed error: the runaway guard interrupted an attempt burning without
38
- * progress. Its own class so auto-retry can never touch it (ADR 0013).
39
- */
40
- export declare class RunawayFailure extends RunawayFailure_base {
41
- }
42
- export declare const AttemptFailure: Schema.Union<readonly [typeof InfraFailure, typeof AgentFailure, typeof RunawayFailure]>;
43
- export type AttemptFailure = typeof AttemptFailure.Type;
44
- /**
45
- * The class half of the auto-retry law (ADR 0002): only infra failures are
46
- * ever auto-retried. This deliberately ignores the attempt cap — the full
47
- * capped decision is `Attempt.shouldAutoRetry`.
48
- */
49
- export declare const isAutoRetryable: <I>(input: I) => input is I & InfraFailure;
50
- export {};
51
- //# sourceMappingURL=attempt-failure.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"attempt-failure.d.ts","sourceRoot":"","sources":["../../src/lifecycle/attempt-failure.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;;;;;AAEhC;;;GAGG;AACH,qBAAa,YAAa,SAAQ,iBAMjC;CAAG;;;;AAEJ;;;;GAIG;AACH,qBAAa,YAAa,SAAQ,iBAKjC;CAAG;AAEJ,2DAA2D;AAC3D,eAAO,MAAM,cAAc,oDAA4C,CAAC;AACxE,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC,IAAI,CAAC;;;;AAExD;;;GAGG;AACH,qBAAa,cAAe,SAAQ,mBAIlC;CAAG;AAEL,eAAO,MAAM,cAAc,0FAA6D,CAAC;AACzF,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC,IAAI,CAAC;AAExD;;;;GAIG;AACH,eAAO,MAAM,eAAe,4CAA0B,CAAC"}
@@ -1,45 +0,0 @@
1
- /**
2
- * Why an attempt failed — the typed taxonomy the retry law dispatches on
3
- * (ADR 0002, ADR 0013). Typed errors; three classes, deliberately distinct:
4
- *
5
- * - `InfraFailure` — the only class the engine may retry on its own, capped.
6
- * - `AgentFailure` — always waits for the operator.
7
- * - `RunawayFailure` — never auto-retried; only the operator restarts it.
8
- */
9
- import { Schema } from "effect";
10
- /**
11
- * Typed error: infrastructure failed around the agent — worker unreachable,
12
- * checkout failed, run host died. Auto-retryable, capped.
13
- */
14
- export class InfraFailure extends Schema.TaggedError("AttemptFailure/InfraFailure")("InfraFailure", {
15
- message: Schema.String,
16
- cause: Schema.Defect(),
17
- }) {
18
- }
19
- /**
20
- * Typed error: the agent ran and failed the work itself. Never auto-retried —
21
- * an agent that failed once would fail the same way again; the operator
22
- * decides what changes before the next attempt.
23
- */
24
- export class AgentFailure extends Schema.TaggedError("AttemptFailure/AgentFailure")("AgentFailure", {
25
- message: Schema.String,
26
- }) {
27
- }
28
- /** Which per-attempt ceiling the runaway guard tripped. */
29
- export const RunawayCeiling = Schema.Literals(["wall-clock", "tokens"]);
30
- /**
31
- * Typed error: the runaway guard interrupted an attempt burning without
32
- * progress. Its own class so auto-retry can never touch it (ADR 0013).
33
- */
34
- export class RunawayFailure extends Schema.TaggedError("AttemptFailure/RunawayFailure")("RunawayFailure", {
35
- ceiling: RunawayCeiling,
36
- }) {
37
- }
38
- export const AttemptFailure = Schema.Union([InfraFailure, AgentFailure, RunawayFailure]);
39
- /**
40
- * The class half of the auto-retry law (ADR 0002): only infra failures are
41
- * ever auto-retried. This deliberately ignores the attempt cap — the full
42
- * capped decision is `Attempt.shouldAutoRetry`.
43
- */
44
- export const isAutoRetryable = Schema.is(InfraFailure);
45
- //# sourceMappingURL=attempt-failure.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"attempt-failure.js","sourceRoot":"","sources":["../../src/lifecycle/attempt-failure.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC;;;GAGG;AACH,MAAM,OAAO,YAAa,SAAQ,MAAM,CAAC,WAAW,CAAe,6BAA6B,CAAC,CAC/F,cAAc,EACd;IACE,OAAO,EAAE,MAAM,CAAC,MAAM;IACtB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE;CACvB,CACF;CAAG;AAEJ;;;;GAIG;AACH,MAAM,OAAO,YAAa,SAAQ,MAAM,CAAC,WAAW,CAAe,6BAA6B,CAAC,CAC/F,cAAc,EACd;IACE,OAAO,EAAE,MAAM,CAAC,MAAM;CACvB,CACF;CAAG;AAEJ,2DAA2D;AAC3D,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC;AAGxE;;;GAGG;AACH,MAAM,OAAO,cAAe,SAAQ,MAAM,CAAC,WAAW,CACpD,+BAA+B,CAChC,CAAC,gBAAgB,EAAE;IAClB,OAAO,EAAE,cAAc;CACxB,CAAC;CAAG;AAEL,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,YAAY,EAAE,YAAY,EAAE,cAAc,CAAC,CAAC,CAAC;AAGzF;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC"}
@@ -1,61 +0,0 @@
1
- import { Schema } from "effect";
2
- import { AttemptFailure } from "./attempt-failure.ts";
3
- import { BrainSpec } from "../agent.ts";
4
- /**
5
- * Value object (branded id): identity of one Attempt.
6
- */
7
- export declare const AttemptId: Schema.brand<Schema.NonEmptyString, "AttemptId">;
8
- export type AttemptId = typeof AttemptId.Type;
9
- /**
10
- * Value object: 1-based position of a try under its step — retries are
11
- * attempt N+1 under the same step, never new runs. Also the unit of the
12
- * auto-retry cap: a cap of 3 means at most three attempts in total.
13
- */
14
- export declare const AttemptNumber: Schema.brand<Schema.Int, "AttemptNumber">;
15
- export type AttemptNumber = typeof AttemptNumber.Type;
16
- declare const Succeeded_base: Schema.Class<Succeeded, Schema.TaggedStruct<"Succeeded", {}>, {}>;
17
- /** Outcome — value object: the attempt finished; the step result is stored on the Step. */
18
- export declare class Succeeded extends Succeeded_base {
19
- }
20
- declare const Failed_base: Schema.Class<Failed, Schema.TaggedStruct<"Failed", {
21
- readonly failure: Schema.Union<readonly [typeof import("./attempt-failure.ts").InfraFailure, typeof import("./attempt-failure.ts").AgentFailure, typeof import("./attempt-failure.ts").RunawayFailure]>;
22
- }>, {}>;
23
- /** Outcome — value object: the attempt failed, with the typed failure that closed it. */
24
- export declare class Failed extends Failed_base {
25
- }
26
- declare const Canceled_base: Schema.Class<Canceled, Schema.TaggedStruct<"Canceled", {}>, {}>;
27
- /** Outcome — value object: the operator canceled the Run during this Attempt. */
28
- export declare class Canceled extends Canceled_base {
29
- }
30
- export declare const Outcome: Schema.Union<readonly [typeof Succeeded, typeof Failed, typeof Canceled]>;
31
- export type Outcome = typeof Outcome.Type;
32
- declare const Attempt_base: Schema.Class<Attempt, Schema.Struct<{
33
- readonly id: Schema.brand<Schema.NonEmptyString, "AttemptId">;
34
- readonly runId: Schema.brand<Schema.NonEmptyString, "RunId">;
35
- readonly stepName: Schema.brand<Schema.NonEmptyString, "StepName">;
36
- readonly worker: Schema.brand<Schema.String, "WorkerName">;
37
- readonly number: Schema.brand<Schema.Int, "AttemptNumber">;
38
- readonly brain: typeof BrainSpec;
39
- readonly parentModel: Schema.OptionFromNullOr<Schema.brand<Schema.String, "ModelId">>;
40
- readonly startedAt: Schema.DateTimeUtc;
41
- readonly outcome: Schema.Option<Schema.Union<readonly [typeof Succeeded, typeof Failed, typeof Canceled]>>;
42
- }>, {}>;
43
- /**
44
- * Entity — ledger row: one try of a step on a worker. `outcome` is none while
45
- * the attempt is in flight.
46
- */
47
- export declare class Attempt extends Attempt_base {
48
- }
49
- /**
50
- * Deriver — the full auto-retry law over one failed attempt (ADR 0002,
51
- * ADR 0013): the class rule (`AttemptFailure.isAutoRetryable` — infra only)
52
- * capped by the attempt count. `maxAutoAttempts` counts total attempts:
53
- * attempt N may auto-retry into attempt N+1 only while N < maxAutoAttempts.
54
- */
55
- export declare const shouldAutoRetry: (options: {
56
- readonly failure: AttemptFailure;
57
- readonly number: AttemptNumber;
58
- readonly maxAutoAttempts: AttemptNumber;
59
- }) => boolean;
60
- export {};
61
- //# sourceMappingURL=attempt.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"attempt.d.ts","sourceRoot":"","sources":["../../src/lifecycle/attempt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,cAAc,EAAmB,MAAM,sBAAsB,CAAC;AAGvE,OAAO,EAAE,SAAS,EAAW,MAAM,aAAa,CAAC;AAGjD;;GAEG;AACH,eAAO,MAAM,SAAS,kDAAwD,CAAC;AAC/E,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,IAAI,CAAC;AAE9C;;;;GAIG;AACH,eAAO,MAAM,aAAa,2CAEzB,CAAC;AACF,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC,IAAI,CAAC;;AAEtD,2FAA2F;AAC3F,qBAAa,SAAU,SAAQ,cAG9B;CAAG;;;;AAEJ,yFAAyF;AACzF,qBAAa,MAAO,SAAQ,WAE1B;CAAG;;AAEL,iFAAiF;AACjF,qBAAa,QAAS,SAAQ,aAG7B;CAAG;AAEJ,eAAO,MAAM,OAAO,2EAA8C,CAAC;AACnE,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAC;;;;;;;;;;;;AAE1C;;;GAGG;AACH,qBAAa,OAAQ,SAAQ,YAU3B;CAAG;AAEL;;;;;GAKG;AACH,eAAO,MAAM,eAAe,YAAa;IACvC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,eAAe,EAAE,aAAa,CAAC;CACzC,KAAG,OAAuF,CAAC"}
@@ -1,52 +0,0 @@
1
- import { Schema } from "effect";
2
- import { AttemptFailure, isAutoRetryable } from "./attempt-failure.js";
3
- import { RunId } from "./run.js";
4
- import { StepName } from "./step.js";
5
- import { BrainSpec, ModelId } from "../agent.js";
6
- import { Name as WorkerName } from "../worker.js";
7
- /**
8
- * Value object (branded id): identity of one Attempt.
9
- */
10
- export const AttemptId = Schema.NonEmptyString.pipe(Schema.brand("AttemptId"));
11
- /**
12
- * Value object: 1-based position of a try under its step — retries are
13
- * attempt N+1 under the same step, never new runs. Also the unit of the
14
- * auto-retry cap: a cap of 3 means at most three attempts in total.
15
- */
16
- export const AttemptNumber = Schema.Int.check(Schema.isGreaterThanOrEqualTo(1)).pipe(Schema.brand("AttemptNumber"));
17
- /** Outcome — value object: the attempt finished; the step result is stored on the Step. */
18
- export class Succeeded extends Schema.TaggedClass("AttemptOutcome/Succeeded")("Succeeded", {}) {
19
- }
20
- /** Outcome — value object: the attempt failed, with the typed failure that closed it. */
21
- export class Failed extends Schema.TaggedClass("AttemptOutcome/Failed")("Failed", {
22
- failure: AttemptFailure,
23
- }) {
24
- }
25
- /** Outcome — value object: the operator canceled the Run during this Attempt. */
26
- export class Canceled extends Schema.TaggedClass("AttemptOutcome/Canceled")("Canceled", {}) {
27
- }
28
- export const Outcome = Schema.Union([Succeeded, Failed, Canceled]);
29
- /**
30
- * Entity — ledger row: one try of a step on a worker. `outcome` is none while
31
- * the attempt is in flight.
32
- */
33
- export class Attempt extends Schema.Class("Attempt")({
34
- id: AttemptId,
35
- runId: RunId,
36
- stepName: StepName,
37
- worker: WorkerName,
38
- number: AttemptNumber,
39
- brain: BrainSpec,
40
- parentModel: Schema.OptionFromNullOr(ModelId),
41
- startedAt: Schema.DateTimeUtc,
42
- outcome: Schema.Option(Outcome),
43
- }) {
44
- }
45
- /**
46
- * Deriver — the full auto-retry law over one failed attempt (ADR 0002,
47
- * ADR 0013): the class rule (`AttemptFailure.isAutoRetryable` — infra only)
48
- * capped by the attempt count. `maxAutoAttempts` counts total attempts:
49
- * attempt N may auto-retry into attempt N+1 only while N < maxAutoAttempts.
50
- */
51
- export const shouldAutoRetry = (options) => isAutoRetryable(options.failure) && options.number < options.maxAutoAttempts;
52
- //# sourceMappingURL=attempt.js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AAQ,CAAC,CAAC,CAAC;AAGnE;;;GAGG;AACH,MAAM,OAAO,OAAQ,SAAQ,MAAM,CAAC,KAAK,CAAU,SAAS,CAAC,CAAC;IAC5D,EAAE,EAAE,SAAS;IACb,KAAK,EAAE,KAAK;IACZ,QAAQ,EAAE,QAAQ;IAClB,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,aAAa;IACrB,KAAK,EAAE,SAAS;IAChB,WAAW,EAAE,MAAM,CAAC,gBAAgB,CAAC,OAAO,CAAC;IAC7C,SAAS,EAAE,MAAM,CAAC,WAAW;IAC7B,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;CAChC,CAAC;CAAG;AAEL;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAI/B,EAAW,EAAE,CAAC,eAAe,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../src/lifecycle/event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC;;GAEG;AACH,eAAO,MAAM,OAAO,gDAAsD,CAAC;AAC3E,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAC;AAE1C;;;;GAIG;AACH,eAAO,MAAM,QAAQ,iDAAuD,CAAC;AAC7E,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC,IAAI,CAAC;;;;;;;AAE5C;;;;;;GAMG;AACH,qBAAa,KAAM,SAAQ,UAKzB;CAAG"}
@@ -1,26 +0,0 @@
1
- import { Schema } from "effect";
2
- /**
3
- * Value object (branded id): identity of one Event in the ledger.
4
- */
5
- export const EventId = Schema.NonEmptyString.pipe(Schema.brand("EventId"));
6
- /**
7
- * Value object: the engine-derived, never-expiring idempotency key — timestamps aside, the
8
- * same watched state is the same Event, forever. Derived per trigger type,
9
- * never authored in a loop file (ADR 0002).
10
- */
11
- export const DedupKey = Schema.NonEmptyString.pipe(Schema.brand("DedupKey"));
12
- /**
13
- * Entity — ledger row: one deduplicated fact the engine may react to — a trigger matching watched
14
- * state, or an operator approval. An Event owns at most one open Run, ever.
15
- *
16
- * The payload is the stream's payload slice — GitHub's own shapes, kept opaque
17
- * here; the expression and loop-file blocks range over it.
18
- */
19
- export class Event extends Schema.Class("Event")({
20
- id: EventId,
21
- dedupKey: DedupKey,
22
- payload: Schema.Json,
23
- receivedAt: Schema.DateTimeUtc,
24
- }) {
25
- }
26
- //# sourceMappingURL=event.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"event.js","sourceRoot":"","sources":["../../src/lifecycle/event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;AAG3E;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;AAG7E;;;;;;GAMG;AACH,MAAM,OAAO,KAAM,SAAQ,MAAM,CAAC,KAAK,CAAQ,OAAO,CAAC,CAAC;IACtD,EAAE,EAAE,OAAO;IACX,QAAQ,EAAE,QAAQ;IAClB,OAAO,EAAE,MAAM,CAAC,IAAI;IACpB,UAAU,EAAE,MAAM,CAAC,WAAW;CAC/B,CAAC;CAAG"}
@@ -1,11 +0,0 @@
1
- import { Schema } from "effect";
2
- /**
3
- * Value object: stable identity of one piece of software-work state inside a
4
- * loop. Several content-distinct Events may concern the same Item.
5
- */
6
- export declare const ItemKey: Schema.brand<Schema.NonEmptyString, "ItemKey">;
7
- export type ItemKey = typeof ItemKey.Type;
8
- /** Positive repository-local number for an issue-like Item. */
9
- export declare const Number: Schema.brand<Schema.Int, "ItemNumber">;
10
- export type Number = typeof Number.Type;
11
- //# sourceMappingURL=item.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../src/lifecycle/item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC;;;GAGG;AACH,eAAO,MAAM,OAAO,gDAAsD,CAAC;AAC3E,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAC;AAE1C,+DAA+D;AAC/D,eAAO,MAAM,MAAM,wCAElB,CAAC;AACF,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,IAAI,CAAC"}
@@ -1,9 +0,0 @@
1
- import { Schema } from "effect";
2
- /**
3
- * Value object: stable identity of one piece of software-work state inside a
4
- * loop. Several content-distinct Events may concern the same Item.
5
- */
6
- export const ItemKey = Schema.NonEmptyString.pipe(Schema.brand("ItemKey"));
7
- /** Positive repository-local number for an issue-like Item. */
8
- export const Number = Schema.Int.check(Schema.isGreaterThanOrEqualTo(1)).pipe(Schema.brand("ItemNumber"));
9
- //# sourceMappingURL=item.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"item.js","sourceRoot":"","sources":["../../src/lifecycle/item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC;;;GAGG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;AAG3E,+DAA+D;AAC/D,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAC3E,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,CAC3B,CAAC"}
@@ -1,17 +0,0 @@
1
- import { Schema } from "effect";
2
- /**
3
- * Value object (branded id): loop identity — the loop file's name in the instance repo. Filename is
4
- * identity — renaming the file retires one loop and creates another
5
- * (ADR 0001).
6
- */
7
- export declare const LoopName: Schema.brand<Schema.NonEmptyString, "LoopName">;
8
- export type LoopName = typeof LoopName.Type;
9
- /**
10
- * Value object: whether a loop parks new runs until an approval Event arrives
11
- * (ADR 0004's `approval:` field, default none). One owner for the literal set
12
- * the config parser accepts and the engine routes on.
13
- */
14
- export declare const APPROVAL_REQUIREMENTS: readonly ["none", "required"];
15
- export declare const ApprovalRequirement: Schema.Literals<readonly ["none", "required"]>;
16
- export type ApprovalRequirement = typeof ApprovalRequirement.Type;
17
- //# sourceMappingURL=loop.d.ts.map