@h-rig/contracts 0.0.6-alpha.9 → 0.0.6-alpha.90

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 (49) hide show
  1. package/dist/index.cjs +5277 -0
  2. package/dist/index.mjs +5234 -0
  3. package/dist/src/artifact.d.ts +13 -0
  4. package/dist/src/baseSchemas.d.ts +57 -0
  5. package/dist/src/cli-output.d.ts +234 -0
  6. package/dist/src/cli-output.js +154 -0
  7. package/dist/src/config.d.ts +316 -0
  8. package/dist/src/config.js +14 -2
  9. package/dist/src/conversation.d.ts +50 -0
  10. package/dist/src/editor.d.ts +25 -0
  11. package/dist/src/engine.d.ts +2789 -0
  12. package/dist/src/engine.js +4 -2
  13. package/dist/src/git.d.ts +144 -0
  14. package/dist/src/graph.d.ts +39 -0
  15. package/dist/src/index.d.ts +33 -0
  16. package/dist/src/index.js +1906 -1219
  17. package/dist/src/ipc.d.ts +247 -0
  18. package/dist/src/keybindings.d.ts +71 -0
  19. package/dist/src/model.d.ts +77 -0
  20. package/dist/src/orchestration.d.ts +3695 -0
  21. package/dist/src/pi-session.d.ts +113 -0
  22. package/dist/src/pi-session.js +1 -0
  23. package/dist/src/plugin-hooks.d.ts +51 -0
  24. package/dist/src/plugin-hooks.js +112 -0
  25. package/dist/src/plugin.d.ts +230 -0
  26. package/dist/src/policy.d.ts +16 -0
  27. package/dist/src/project.d.ts +71 -0
  28. package/dist/src/protocol-version.d.ts +21 -0
  29. package/dist/src/protocol-version.js +6 -0
  30. package/dist/src/provider.d.ts +105 -0
  31. package/dist/src/providerRuntime.d.ts +3949 -0
  32. package/dist/src/remote.d.ts +326 -0
  33. package/dist/src/remote.js +4 -2
  34. package/dist/src/review.d.ts +18 -0
  35. package/dist/src/rig.d.ts +753 -0
  36. package/dist/src/rig.js +32 -4
  37. package/dist/src/run-journal.d.ts +763 -0
  38. package/dist/src/run-journal.js +1506 -0
  39. package/dist/src/runtime.d.ts +103 -0
  40. package/dist/src/runtime.js +4 -2
  41. package/dist/src/server.d.ts +106 -0
  42. package/dist/src/serviceFabric.d.ts +62 -0
  43. package/dist/src/task-source.d.ts +28 -0
  44. package/dist/src/terminal.d.ts +130 -0
  45. package/dist/src/validation.d.ts +14 -0
  46. package/dist/src/workspace.d.ts +204 -0
  47. package/dist/src/ws.d.ts +733 -0
  48. package/dist/src/ws.js +27 -3
  49. package/package.json +6 -3
@@ -1069,12 +1069,14 @@ var RunStatus = Schema9.Literals([
1069
1069
  "running",
1070
1070
  "waiting-approval",
1071
1071
  "waiting-user-input",
1072
+ "paused",
1072
1073
  "validating",
1073
1074
  "reviewing",
1075
+ "closing-out",
1076
+ "needs-attention",
1074
1077
  "completed",
1075
1078
  "failed",
1076
- "cancelled",
1077
- "paused"
1079
+ "stopped"
1078
1080
  ]);
1079
1081
  var EngineSandboxMode = Schema9.Literals([
1080
1082
  "read-only",
@@ -0,0 +1,144 @@
1
+ import { Schema } from "effect";
2
+ export declare const GitStackedAction: Schema.Literals<readonly ["commit", "commit_push", "commit_push_pr"]>;
3
+ export type GitStackedAction = typeof GitStackedAction.Type;
4
+ export declare const GitBranch: Schema.Struct<{
5
+ readonly name: Schema.Trim;
6
+ readonly isRemote: Schema.optional<Schema.Boolean>;
7
+ readonly remoteName: Schema.optional<Schema.Trim>;
8
+ readonly current: Schema.Boolean;
9
+ readonly isDefault: Schema.Boolean;
10
+ readonly worktreePath: Schema.NullOr<Schema.Trim>;
11
+ }>;
12
+ export type GitBranch = typeof GitBranch.Type;
13
+ export declare const GitStatusInput: Schema.Struct<{
14
+ readonly cwd: Schema.Trim;
15
+ }>;
16
+ export type GitStatusInput = typeof GitStatusInput.Type;
17
+ export declare const GitPullInput: Schema.Struct<{
18
+ readonly cwd: Schema.Trim;
19
+ }>;
20
+ export type GitPullInput = typeof GitPullInput.Type;
21
+ export declare const GitReadWorkingTreePatchInput: Schema.Struct<{
22
+ readonly cwd: Schema.Trim;
23
+ readonly relativePath: Schema.optional<Schema.Trim>;
24
+ }>;
25
+ export type GitReadWorkingTreePatchInput = typeof GitReadWorkingTreePatchInput.Type;
26
+ export declare const GitRunStackedActionInput: Schema.Struct<{
27
+ readonly cwd: Schema.Trim;
28
+ readonly action: Schema.Literals<readonly ["commit", "commit_push", "commit_push_pr"]>;
29
+ readonly commitMessage: Schema.optional<Schema.Trim>;
30
+ readonly featureBranch: Schema.optional<Schema.Boolean>;
31
+ }>;
32
+ export type GitRunStackedActionInput = typeof GitRunStackedActionInput.Type;
33
+ export declare const GitListBranchesInput: Schema.Struct<{
34
+ readonly cwd: Schema.Trim;
35
+ }>;
36
+ export type GitListBranchesInput = typeof GitListBranchesInput.Type;
37
+ export declare const GitCreateWorktreeInput: Schema.Struct<{
38
+ readonly cwd: Schema.Trim;
39
+ readonly branch: Schema.Trim;
40
+ readonly newBranch: Schema.Trim;
41
+ readonly path: Schema.NullOr<Schema.Trim>;
42
+ }>;
43
+ export type GitCreateWorktreeInput = typeof GitCreateWorktreeInput.Type;
44
+ export declare const GitRemoveWorktreeInput: Schema.Struct<{
45
+ readonly cwd: Schema.Trim;
46
+ readonly path: Schema.Trim;
47
+ readonly force: Schema.optional<Schema.Boolean>;
48
+ }>;
49
+ export type GitRemoveWorktreeInput = typeof GitRemoveWorktreeInput.Type;
50
+ export declare const GitCreateBranchInput: Schema.Struct<{
51
+ readonly cwd: Schema.Trim;
52
+ readonly branch: Schema.Trim;
53
+ }>;
54
+ export type GitCreateBranchInput = typeof GitCreateBranchInput.Type;
55
+ export declare const GitCheckoutInput: Schema.Struct<{
56
+ readonly cwd: Schema.Trim;
57
+ readonly branch: Schema.Trim;
58
+ }>;
59
+ export type GitCheckoutInput = typeof GitCheckoutInput.Type;
60
+ export declare const GitInitInput: Schema.Struct<{
61
+ readonly cwd: Schema.Trim;
62
+ }>;
63
+ export type GitInitInput = typeof GitInitInput.Type;
64
+ export declare const GitStatusResult: Schema.Struct<{
65
+ readonly branch: Schema.NullOr<Schema.Trim>;
66
+ readonly hasWorkingTreeChanges: Schema.Boolean;
67
+ readonly workingTree: Schema.Struct<{
68
+ readonly files: Schema.$Array<Schema.Struct<{
69
+ readonly path: Schema.Trim;
70
+ readonly insertions: Schema.Int;
71
+ readonly deletions: Schema.Int;
72
+ }>>;
73
+ readonly insertions: Schema.Int;
74
+ readonly deletions: Schema.Int;
75
+ }>;
76
+ readonly hasUpstream: Schema.Boolean;
77
+ readonly aheadCount: Schema.Int;
78
+ readonly behindCount: Schema.Int;
79
+ readonly pr: Schema.NullOr<Schema.Struct<{
80
+ readonly number: Schema.Int;
81
+ readonly title: Schema.Trim;
82
+ readonly url: Schema.String;
83
+ readonly baseBranch: Schema.Trim;
84
+ readonly headBranch: Schema.Trim;
85
+ readonly state: Schema.Literals<readonly ["open", "closed", "merged"]>;
86
+ }>>;
87
+ }>;
88
+ export type GitStatusResult = typeof GitStatusResult.Type;
89
+ export declare const GitListBranchesResult: Schema.Struct<{
90
+ readonly branches: Schema.$Array<Schema.Struct<{
91
+ readonly name: Schema.Trim;
92
+ readonly isRemote: Schema.optional<Schema.Boolean>;
93
+ readonly remoteName: Schema.optional<Schema.Trim>;
94
+ readonly current: Schema.Boolean;
95
+ readonly isDefault: Schema.Boolean;
96
+ readonly worktreePath: Schema.NullOr<Schema.Trim>;
97
+ }>>;
98
+ readonly isRepo: Schema.Boolean;
99
+ }>;
100
+ export type GitListBranchesResult = typeof GitListBranchesResult.Type;
101
+ export declare const GitCreateWorktreeResult: Schema.Struct<{
102
+ readonly worktree: Schema.Struct<{
103
+ readonly path: Schema.Trim;
104
+ readonly branch: Schema.Trim;
105
+ }>;
106
+ }>;
107
+ export type GitCreateWorktreeResult = typeof GitCreateWorktreeResult.Type;
108
+ export declare const GitRunStackedActionResult: Schema.Struct<{
109
+ readonly action: Schema.Literals<readonly ["commit", "commit_push", "commit_push_pr"]>;
110
+ readonly branch: Schema.Struct<{
111
+ readonly status: Schema.Literals<readonly ["created", "skipped_not_requested"]>;
112
+ readonly name: Schema.optional<Schema.Trim>;
113
+ }>;
114
+ readonly commit: Schema.Struct<{
115
+ readonly status: Schema.Literals<readonly ["created", "skipped_no_changes"]>;
116
+ readonly commitSha: Schema.optional<Schema.Trim>;
117
+ readonly subject: Schema.optional<Schema.Trim>;
118
+ }>;
119
+ readonly push: Schema.Struct<{
120
+ readonly status: Schema.Literals<readonly ["pushed", "skipped_not_requested", "skipped_up_to_date"]>;
121
+ readonly branch: Schema.optional<Schema.Trim>;
122
+ readonly upstreamBranch: Schema.optional<Schema.Trim>;
123
+ readonly setUpstream: Schema.optional<Schema.Boolean>;
124
+ }>;
125
+ readonly pr: Schema.Struct<{
126
+ readonly status: Schema.Literals<readonly ["created", "opened_existing", "skipped_not_requested"]>;
127
+ readonly url: Schema.optional<Schema.String>;
128
+ readonly number: Schema.optional<Schema.Int>;
129
+ readonly baseBranch: Schema.optional<Schema.Trim>;
130
+ readonly headBranch: Schema.optional<Schema.Trim>;
131
+ readonly title: Schema.optional<Schema.Trim>;
132
+ }>;
133
+ }>;
134
+ export type GitRunStackedActionResult = typeof GitRunStackedActionResult.Type;
135
+ export declare const GitPullResult: Schema.Struct<{
136
+ readonly status: Schema.Literals<readonly ["pulled", "skipped_up_to_date"]>;
137
+ readonly branch: Schema.Trim;
138
+ readonly upstreamBranch: Schema.NullOr<Schema.Trim>;
139
+ }>;
140
+ export type GitPullResult = typeof GitPullResult.Type;
141
+ export declare const GitReadWorkingTreePatchResult: Schema.Struct<{
142
+ readonly diff: Schema.String;
143
+ }>;
144
+ export type GitReadWorkingTreePatchResult = typeof GitReadWorkingTreePatchResult.Type;
@@ -0,0 +1,39 @@
1
+ import { Schema } from "effect";
2
+ export declare const TaskStatus: Schema.Literals<readonly ["draft", "open", "ready", "queued", "running", "in_progress", "under_review", "blocked", "unknown", "completed", "failed", "cancelled", "closed"]>;
3
+ export type TaskStatus = typeof TaskStatus.Type;
4
+ export declare const GraphSummary: Schema.Struct<{
5
+ readonly id: Schema.brand<Schema.Trim, "GraphId">;
6
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
7
+ readonly title: Schema.Trim;
8
+ readonly description: Schema.NullOr<Schema.String>;
9
+ readonly createdAt: Schema.String;
10
+ readonly updatedAt: Schema.String;
11
+ }>;
12
+ export type GraphSummary = typeof GraphSummary.Type;
13
+ export declare const TaskSummary: Schema.Struct<{
14
+ readonly id: Schema.brand<Schema.Trim, "TaskId">;
15
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
16
+ readonly graphId: Schema.NullOr<Schema.brand<Schema.Trim, "GraphId">>;
17
+ readonly externalId: Schema.NullOr<Schema.Trim>;
18
+ readonly title: Schema.Trim;
19
+ readonly description: Schema.String;
20
+ readonly status: Schema.Literals<readonly ["draft", "open", "ready", "queued", "running", "in_progress", "under_review", "blocked", "unknown", "completed", "failed", "cancelled", "closed"]>;
21
+ readonly priority: Schema.NullOr<Schema.Int>;
22
+ readonly role: Schema.NullOr<Schema.Trim>;
23
+ readonly scope: Schema.$Array<Schema.Trim>;
24
+ readonly validationKeys: Schema.$Array<Schema.Trim>;
25
+ readonly sourceIssueId: Schema.optional<Schema.NullOr<Schema.Trim>>;
26
+ readonly dependencies: Schema.optional<Schema.$Array<Schema.Trim>>;
27
+ readonly parentChildDeps: Schema.optional<Schema.$Array<Schema.Trim>>;
28
+ readonly metadata: Schema.Unknown;
29
+ readonly createdAt: Schema.String;
30
+ readonly updatedAt: Schema.String;
31
+ }>;
32
+ export type TaskSummary = typeof TaskSummary.Type;
33
+ export declare const QueueEntry: Schema.Struct<{
34
+ readonly taskId: Schema.brand<Schema.Trim, "TaskId">;
35
+ readonly score: Schema.Int;
36
+ readonly unblockCount: Schema.Int;
37
+ readonly position: Schema.Int;
38
+ }>;
39
+ export type QueueEntry = typeof QueueEntry.Type;
@@ -0,0 +1,33 @@
1
+ export * from "./baseSchemas";
2
+ export * from "./workspace";
3
+ export * from "./graph";
4
+ export * from "./runtime";
5
+ export * from "./run-journal";
6
+ export * from "./conversation";
7
+ export * from "./plugin";
8
+ export * from "./plugin-hooks";
9
+ export * from "./config";
10
+ export * from "./policy";
11
+ export * from "./validation";
12
+ export * from "./review";
13
+ export * from "./artifact";
14
+ export * from "./engine";
15
+ export * from "./rig";
16
+ export * from "./remote";
17
+ export * from "./ipc";
18
+ export * from "./terminal";
19
+ export * from "./provider";
20
+ export * from "./providerRuntime";
21
+ export * from "./model";
22
+ export * from "./ws";
23
+ export * from "./keybindings";
24
+ export * from "./server";
25
+ export * from "./serviceFabric";
26
+ export * from "./git";
27
+ export * from "./orchestration";
28
+ export * from "./editor";
29
+ export * from "./project";
30
+ export * from "./task-source";
31
+ export * from "./cli-output";
32
+ export * from "./pi-session";
33
+ export * from "./protocol-version";