@claudexor/schema 1.0.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 (175) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +16 -0
  3. package/dist/agent-capabilities.d.ts +366 -0
  4. package/dist/agent-capabilities.d.ts.map +1 -0
  5. package/dist/agent-capabilities.js +125 -0
  6. package/dist/agent-capabilities.js.map +1 -0
  7. package/dist/apply-eligibility.d.ts +76 -0
  8. package/dist/apply-eligibility.d.ts.map +1 -0
  9. package/dist/apply-eligibility.js +37 -0
  10. package/dist/apply-eligibility.js.map +1 -0
  11. package/dist/attachment.d.ts +69 -0
  12. package/dist/attachment.d.ts.map +1 -0
  13. package/dist/attachment.js +54 -0
  14. package/dist/attachment.js.map +1 -0
  15. package/dist/budget.d.ts +75 -0
  16. package/dist/budget.d.ts.map +1 -0
  17. package/dist/budget.js +54 -0
  18. package/dist/budget.js.map +1 -0
  19. package/dist/config.d.ts +743 -0
  20. package/dist/config.d.ts.map +1 -0
  21. package/dist/config.js +194 -0
  22. package/dist/config.js.map +1 -0
  23. package/dist/context.d.ts +222 -0
  24. package/dist/context.d.ts.map +1 -0
  25. package/dist/context.js +70 -0
  26. package/dist/context.js.map +1 -0
  27. package/dist/control-run-detail.d.ts +1686 -0
  28. package/dist/control-run-detail.d.ts.map +1 -0
  29. package/dist/control-run-detail.js +107 -0
  30. package/dist/control-run-detail.js.map +1 -0
  31. package/dist/control-trust.d.ts +79 -0
  32. package/dist/control-trust.d.ts.map +1 -0
  33. package/dist/control-trust.js +39 -0
  34. package/dist/control-trust.js.map +1 -0
  35. package/dist/control.d.ts +4226 -0
  36. package/dist/control.d.ts.map +1 -0
  37. package/dist/control.js +1022 -0
  38. package/dist/control.js.map +1 -0
  39. package/dist/decision.d.ts +208 -0
  40. package/dist/decision.d.ts.map +1 -0
  41. package/dist/decision.js +98 -0
  42. package/dist/decision.js.map +1 -0
  43. package/dist/events.d.ts +70 -0
  44. package/dist/events.d.ts.map +1 -0
  45. package/dist/events.js +105 -0
  46. package/dist/events.js.map +1 -0
  47. package/dist/gate.d.ts +37 -0
  48. package/dist/gate.d.ts.map +1 -0
  49. package/dist/gate.js +20 -0
  50. package/dist/gate.js.map +1 -0
  51. package/dist/harness.d.ts +1418 -0
  52. package/dist/harness.d.ts.map +1 -0
  53. package/dist/harness.js +552 -0
  54. package/dist/harness.js.map +1 -0
  55. package/dist/index.d.ts +32 -0
  56. package/dist/index.d.ts.map +1 -0
  57. package/dist/index.js +32 -0
  58. package/dist/index.js.map +1 -0
  59. package/dist/orchestrate.d.ts +428 -0
  60. package/dist/orchestrate.d.ts.map +1 -0
  61. package/dist/orchestrate.js +246 -0
  62. package/dist/orchestrate.js.map +1 -0
  63. package/dist/primitives.d.ts +71 -0
  64. package/dist/primitives.d.ts.map +1 -0
  65. package/dist/primitives.js +114 -0
  66. package/dist/primitives.js.map +1 -0
  67. package/dist/review.d.ts +220 -0
  68. package/dist/review.d.ts.map +1 -0
  69. package/dist/review.js +91 -0
  70. package/dist/review.js.map +1 -0
  71. package/dist/route.d.ts +67 -0
  72. package/dist/route.d.ts.map +1 -0
  73. package/dist/route.js +33 -0
  74. package/dist/route.js.map +1 -0
  75. package/dist/spec.d.ts +561 -0
  76. package/dist/spec.d.ts.map +1 -0
  77. package/dist/spec.js +133 -0
  78. package/dist/spec.js.map +1 -0
  79. package/dist/surface-run-controls.d.ts +14 -0
  80. package/dist/surface-run-controls.d.ts.map +1 -0
  81. package/dist/surface-run-controls.js +142 -0
  82. package/dist/surface-run-controls.js.map +1 -0
  83. package/dist/task.d.ts +565 -0
  84. package/dist/task.d.ts.map +1 -0
  85. package/dist/task.js +186 -0
  86. package/dist/task.js.map +1 -0
  87. package/dist/telemetry.d.ts +660 -0
  88. package/dist/telemetry.d.ts.map +1 -0
  89. package/dist/telemetry.js +140 -0
  90. package/dist/telemetry.js.map +1 -0
  91. package/dist/thread.d.ts +348 -0
  92. package/dist/thread.d.ts.map +1 -0
  93. package/dist/thread.js +194 -0
  94. package/dist/thread.js.map +1 -0
  95. package/dist/workproduct.d.ts +31 -0
  96. package/dist/workproduct.d.ts.map +1 -0
  97. package/dist/workproduct.js +25 -0
  98. package/dist/workproduct.js.map +1 -0
  99. package/dist/workspace.d.ts +53 -0
  100. package/dist/workspace.d.ts.map +1 -0
  101. package/dist/workspace.js +30 -0
  102. package/dist/workspace.js.map +1 -0
  103. package/generated/AgentCapabilityCatalog.schema.json +389 -0
  104. package/generated/ApplyEligibility.schema.json +44 -0
  105. package/generated/BudgetLease.schema.json +95 -0
  106. package/generated/BudgetObservation.schema.json +76 -0
  107. package/generated/ConformanceReport.schema.json +107 -0
  108. package/generated/ContextPack.schema.json +186 -0
  109. package/generated/ControlApplyCheckRequest.schema.json +54 -0
  110. package/generated/ControlApplyRequest.schema.json +74 -0
  111. package/generated/ControlHarnessListResponse.schema.json +498 -0
  112. package/generated/ControlHarnessModelsResponse.schema.json +78 -0
  113. package/generated/ControlHarnessSettingsPatch.schema.json +130 -0
  114. package/generated/ControlInteractionAnswerRequest.schema.json +48 -0
  115. package/generated/ControlInteractionAnswerResponse.schema.json +35 -0
  116. package/generated/ControlPendingInteraction.schema.json +129 -0
  117. package/generated/ControlQueuedRunInfo.schema.json +44 -0
  118. package/generated/ControlRunControlRequest.schema.json +61 -0
  119. package/generated/ControlRunControlResponse.schema.json +40 -0
  120. package/generated/ControlRunDecisionRequest.schema.json +98 -0
  121. package/generated/ControlRunDecisionResponse.schema.json +40 -0
  122. package/generated/ControlRunDetail.schema.json +1925 -0
  123. package/generated/ControlRunStartInfo.schema.json +33 -0
  124. package/generated/ControlRunStartRequest.schema.json +429 -0
  125. package/generated/ControlRunSummary.schema.json +666 -0
  126. package/generated/ControlSecretListResponse.schema.json +57 -0
  127. package/generated/ControlSettingsSnapshot.schema.json +281 -0
  128. package/generated/ControlSettingsUpdateRequest.schema.json +212 -0
  129. package/generated/ControlSetupJob.schema.json +148 -0
  130. package/generated/ControlSetupJobConfirmRequest.schema.json +18 -0
  131. package/generated/ControlSetupJobCreateRequest.schema.json +38 -0
  132. package/generated/ControlSetupJobEvent.schema.json +58 -0
  133. package/generated/ControlSetupJobListResponse.schema.json +162 -0
  134. package/generated/ControlSpecFreezeRequest.schema.json +83 -0
  135. package/generated/ControlSpecQuestionsRequest.schema.json +80 -0
  136. package/generated/ControlThread.schema.json +129 -0
  137. package/generated/ControlThreadApplyRequest.schema.json +32 -0
  138. package/generated/ControlThreadApplyResponse.schema.json +47 -0
  139. package/generated/ControlThreadCreateRequest.schema.json +107 -0
  140. package/generated/ControlThreadDetail.schema.json +515 -0
  141. package/generated/ControlThreadListResponse.schema.json +141 -0
  142. package/generated/ControlThreadUpdateRequest.schema.json +46 -0
  143. package/generated/ControlTrustListResponse.schema.json +59 -0
  144. package/generated/ControlTrustState.schema.json +45 -0
  145. package/generated/ControlTrustUpdateRequest.schema.json +26 -0
  146. package/generated/DecisionRecord.schema.json +232 -0
  147. package/generated/GateResult.schema.json +81 -0
  148. package/generated/GlobalConfig.schema.json +313 -0
  149. package/generated/HarnessEvent.schema.json +360 -0
  150. package/generated/HarnessManifest.schema.json +350 -0
  151. package/generated/HarnessModel.schema.json +41 -0
  152. package/generated/HarnessStatusDto.schema.json +486 -0
  153. package/generated/McpRunToolResult.schema.json +91 -0
  154. package/generated/OrchestrateContract.schema.json +93 -0
  155. package/generated/OrchestratePlan.schema.json +244 -0
  156. package/generated/OrchestratePlanProgress.schema.json +103 -0
  157. package/generated/ProjectConfig.schema.json +95 -0
  158. package/generated/ReviewFinding.schema.json +226 -0
  159. package/generated/RouteFallbackPayload.schema.json +79 -0
  160. package/generated/RouteProof.schema.json +111 -0
  161. package/generated/RunControl.schema.json +51 -0
  162. package/generated/RunEvent.schema.json +103 -0
  163. package/generated/RunFailure.schema.json +98 -0
  164. package/generated/RunTelemetry.schema.json +433 -0
  165. package/generated/SecretMetadata.schema.json +34 -0
  166. package/generated/Session.schema.json +80 -0
  167. package/generated/SessionReboundLineage.schema.json +73 -0
  168. package/generated/SpecPack.schema.json +372 -0
  169. package/generated/TaskContract.schema.json +501 -0
  170. package/generated/Thread.schema.json +176 -0
  171. package/generated/ThreadTurn.schema.json +172 -0
  172. package/generated/TrustConfig.schema.json +44 -0
  173. package/generated/WorkProduct.schema.json +60 -0
  174. package/generated/WorkspaceEnvelope.schema.json +94 -0
  175. package/package.json +43 -0
@@ -0,0 +1,172 @@
1
+ {
2
+ "$ref": "#/definitions/ThreadTurn",
3
+ "definitions": {
4
+ "ThreadTurn": {
5
+ "type": "object",
6
+ "properties": {
7
+ "id": {
8
+ "type": "string",
9
+ "minLength": 1,
10
+ "description": "Turn id."
11
+ },
12
+ "thread_id": {
13
+ "type": "string",
14
+ "minLength": 1,
15
+ "description": "Thread the turn belongs to."
16
+ },
17
+ "run_id": {
18
+ "anyOf": [
19
+ {
20
+ "type": "string",
21
+ "minLength": 1,
22
+ "description": "Non-empty identifier string."
23
+ },
24
+ {
25
+ "type": "null"
26
+ }
27
+ ],
28
+ "description": "Run backing this turn; null while unbound.",
29
+ "default": null
30
+ },
31
+ "parent_run_id": {
32
+ "anyOf": [
33
+ {
34
+ "$ref": "#/definitions/ThreadTurn/properties/run_id/anyOf/0"
35
+ },
36
+ {
37
+ "type": "null"
38
+ }
39
+ ],
40
+ "description": "Run this turn follows up on, when any.",
41
+ "default": null
42
+ },
43
+ "plan_run_id": {
44
+ "anyOf": [
45
+ {
46
+ "$ref": "#/definitions/ThreadTurn/properties/run_id/anyOf/0"
47
+ },
48
+ {
49
+ "type": "null"
50
+ }
51
+ ],
52
+ "description": "Set when this turn implements an approved plan from an earlier plan run.",
53
+ "default": null
54
+ },
55
+ "kind": {
56
+ "type": "string",
57
+ "enum": [
58
+ "initial",
59
+ "followup",
60
+ "decision"
61
+ ],
62
+ "description": "Kind of thread turn: the initial message, a followup, or an operator decision turn.",
63
+ "default": "followup"
64
+ },
65
+ "prompt": {
66
+ "type": "string",
67
+ "default": "",
68
+ "description": "The user's message for this turn."
69
+ },
70
+ "attachments": {
71
+ "type": "array",
72
+ "items": {
73
+ "type": "object",
74
+ "properties": {
75
+ "id": {
76
+ "type": "string",
77
+ "minLength": 1,
78
+ "description": "Attachment id."
79
+ },
80
+ "kind": {
81
+ "type": "string",
82
+ "enum": [
83
+ "image",
84
+ "file"
85
+ ],
86
+ "description": "Kind of attachment: image (vision input) or file (generic bytes).",
87
+ "default": "file"
88
+ },
89
+ "mime": {
90
+ "type": "string",
91
+ "default": "application/octet-stream",
92
+ "description": "MIME type of the attachment content."
93
+ },
94
+ "name": {
95
+ "type": "string",
96
+ "default": "",
97
+ "description": "Original file name as provided by the user or agent."
98
+ },
99
+ "path": {
100
+ "type": "string",
101
+ "description": "Resolved local path in the scoped attachment store (kept outside any worktree)."
102
+ }
103
+ },
104
+ "required": [
105
+ "id",
106
+ "path"
107
+ ],
108
+ "additionalProperties": false,
109
+ "description": "A user- or agent-provided file/image attached to a turn, stored in the scoped attachment store and forwarded to harnesses in their native shape."
110
+ },
111
+ "default": [],
112
+ "description": "Files/images the user attached to this turn (resolved scoped paths)."
113
+ },
114
+ "enqueue_error": {
115
+ "anyOf": [
116
+ {
117
+ "type": "object",
118
+ "properties": {
119
+ "message": {
120
+ "type": "string",
121
+ "description": "Human-readable refusal message."
122
+ },
123
+ "code": {
124
+ "type": [
125
+ "string",
126
+ "null"
127
+ ],
128
+ "default": null,
129
+ "description": "Machine-readable refusal code carried from the throwing gate; null when the failure had no typed code."
130
+ },
131
+ "retryable": {
132
+ "type": "boolean",
133
+ "default": true,
134
+ "description": "True when retry can replay this turn (a job was recorded before the failure); false when no job exists to replay."
135
+ },
136
+ "failed_at": {
137
+ "type": "string",
138
+ "minLength": 1,
139
+ "description": "When the enqueue failed."
140
+ }
141
+ },
142
+ "required": [
143
+ "message",
144
+ "failed_at"
145
+ ],
146
+ "additionalProperties": false,
147
+ "description": "Typed record of a turn whose run could not be enqueued/started, persisted on the turn so every surface renders the refusal inline; cleared when a retry binds a run."
148
+ },
149
+ {
150
+ "type": "null"
151
+ }
152
+ ],
153
+ "description": "Why this turn has no run (enqueue/preflight refusal); null once a run binds.",
154
+ "default": null
155
+ },
156
+ "created_at": {
157
+ "type": "string",
158
+ "minLength": 1,
159
+ "description": "When the turn was created."
160
+ }
161
+ },
162
+ "required": [
163
+ "id",
164
+ "thread_id",
165
+ "created_at"
166
+ ],
167
+ "additionalProperties": false,
168
+ "description": "One follow-up unit within a thread; a run is its backing execution."
169
+ }
170
+ },
171
+ "$schema": "http://json-schema.org/draft-07/schema#"
172
+ }
@@ -0,0 +1,44 @@
1
+ {
2
+ "$ref": "#/definitions/TrustConfig",
3
+ "definitions": {
4
+ "TrustConfig": {
5
+ "type": "object",
6
+ "properties": {
7
+ "version": {
8
+ "type": "number",
9
+ "const": 1,
10
+ "default": 1,
11
+ "description": "Config format version."
12
+ },
13
+ "access_default": {
14
+ "type": "string",
15
+ "enum": [
16
+ "readonly",
17
+ "workspace_write",
18
+ "full",
19
+ "external_sandbox_full",
20
+ "inherit_native"
21
+ ],
22
+ "description": "Default access profile for runs in this repo.",
23
+ "default": "workspace_write"
24
+ },
25
+ "allow_full_access": {
26
+ "type": "boolean",
27
+ "default": false,
28
+ "description": "Per-repo allow required before any run may use the full access profile."
29
+ },
30
+ "repo_root": {
31
+ "type": [
32
+ "string",
33
+ "null"
34
+ ],
35
+ "default": null,
36
+ "description": "Provenance only: repo root this trust file was written for; never gates anything. Null on legacy files written before this field."
37
+ }
38
+ },
39
+ "additionalProperties": false,
40
+ "description": "Sensitive per-repo trust settings — only valid in global/user-local trust files, never in the versioned repo config."
41
+ }
42
+ },
43
+ "$schema": "http://json-schema.org/draft-07/schema#"
44
+ }
@@ -0,0 +1,60 @@
1
+ {
2
+ "$ref": "#/definitions/WorkProduct",
3
+ "definitions": {
4
+ "WorkProduct": {
5
+ "type": "object",
6
+ "properties": {
7
+ "id": {
8
+ "type": "string",
9
+ "minLength": 1,
10
+ "description": "Work product id."
11
+ },
12
+ "kind": {
13
+ "type": "string",
14
+ "enum": [
15
+ "patch",
16
+ "new_repo",
17
+ "report"
18
+ ],
19
+ "description": "Kind of work product a run produces: a patch against the base tree, a newly created repository, or a report document."
20
+ },
21
+ "source_task_id": {
22
+ "type": "string",
23
+ "minLength": 1,
24
+ "description": "Task the work product came from."
25
+ },
26
+ "producer_attempt_id": {
27
+ "type": "string",
28
+ "minLength": 1,
29
+ "description": "Attempt that produced it, when known."
30
+ },
31
+ "evidence_dir": {
32
+ "type": "string",
33
+ "description": "Directory holding run evidence artifacts."
34
+ },
35
+ "files": {
36
+ "type": "object",
37
+ "additionalProperties": {
38
+ "type": "string"
39
+ },
40
+ "default": {},
41
+ "description": "Kind-specific file payload, e.g. artifact name to path (validated loosely here; specialized per kind by callers)."
42
+ },
43
+ "meta": {
44
+ "type": "object",
45
+ "additionalProperties": {},
46
+ "default": {},
47
+ "description": "Kind-specific metadata."
48
+ }
49
+ },
50
+ "required": [
51
+ "id",
52
+ "kind",
53
+ "source_task_id"
54
+ ],
55
+ "additionalProperties": false,
56
+ "description": "The deliverable a run produced (patch, new repo, or report), referenced by apply/delivery verbs."
57
+ }
58
+ },
59
+ "$schema": "http://json-schema.org/draft-07/schema#"
60
+ }
@@ -0,0 +1,94 @@
1
+ {
2
+ "$ref": "#/definitions/WorkspaceEnvelope",
3
+ "definitions": {
4
+ "WorkspaceEnvelope": {
5
+ "type": "object",
6
+ "properties": {
7
+ "id": {
8
+ "type": "string",
9
+ "minLength": 1,
10
+ "description": "Envelope id."
11
+ },
12
+ "task_id": {
13
+ "type": "string",
14
+ "minLength": 1,
15
+ "description": "Task the envelope belongs to."
16
+ },
17
+ "attempt_id": {
18
+ "type": "string",
19
+ "minLength": 1,
20
+ "description": "Attempt the envelope belongs to."
21
+ },
22
+ "repo_root": {
23
+ "type": "string",
24
+ "description": "Absolute path of the source repository root."
25
+ },
26
+ "base_ref": {
27
+ "type": "string",
28
+ "description": "Git ref the worktree was created from."
29
+ },
30
+ "base_sha": {
31
+ "type": [
32
+ "string",
33
+ "null"
34
+ ],
35
+ "default": null,
36
+ "description": "Resolved base commit SHA; null when not recorded."
37
+ },
38
+ "worktree_path": {
39
+ "type": "string",
40
+ "description": "Absolute path of the isolated git worktree."
41
+ },
42
+ "branch_name": {
43
+ "type": "string",
44
+ "description": "Branch created for the worktree."
45
+ },
46
+ "home_dir": {
47
+ "type": "string",
48
+ "description": "Scoped HOME directory for the harness process (kept outside the worktree)."
49
+ },
50
+ "harness_config_dirs": {
51
+ "type": "object",
52
+ "additionalProperties": {
53
+ "type": "string"
54
+ },
55
+ "default": {},
56
+ "description": "Scoped per-harness config directories keyed by harness id (kept outside the worktree)."
57
+ },
58
+ "policy_profile": {
59
+ "type": "string",
60
+ "default": "workspace_write",
61
+ "description": "Access profile the envelope enforces."
62
+ },
63
+ "dirty_policy": {
64
+ "type": "string",
65
+ "enum": [
66
+ "refuse",
67
+ "snapshot"
68
+ ],
69
+ "description": "How a dirty working tree is handled when creating an envelope: snapshot captures the dirty state as the base SHA without touching the live tree; refuse fails loudly.",
70
+ "default": "refuse"
71
+ },
72
+ "created_at": {
73
+ "type": "string",
74
+ "minLength": 1,
75
+ "description": "When the envelope was created."
76
+ }
77
+ },
78
+ "required": [
79
+ "id",
80
+ "task_id",
81
+ "attempt_id",
82
+ "repo_root",
83
+ "base_ref",
84
+ "worktree_path",
85
+ "branch_name",
86
+ "home_dir",
87
+ "created_at"
88
+ ],
89
+ "additionalProperties": false,
90
+ "description": "An isolated execution envelope: a git worktree for files plus scoped env/HOME/harness-config isolation."
91
+ }
92
+ },
93
+ "$schema": "http://json-schema.org/draft-07/schema#"
94
+ }
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@claudexor/schema",
3
+ "version": "1.0.0",
4
+ "license": "MIT",
5
+ "description": "Single source of truth for all Claudexor data shapes (Zod + generated JSON Schema).",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "default": "./dist/index.js"
13
+ },
14
+ "./generated/*.schema.json": "./generated/*.schema.json"
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "generated"
19
+ ],
20
+ "dependencies": {
21
+ "zod": "^3.24.1",
22
+ "zod-to-json-schema": "^3.24.1"
23
+ },
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git+https://github.com/razzant/claudexor.git",
27
+ "directory": "packages/schema"
28
+ },
29
+ "homepage": "https://github.com/razzant/claudexor#readme",
30
+ "bugs": {
31
+ "url": "https://github.com/razzant/claudexor/issues"
32
+ },
33
+ "engines": {
34
+ "node": ">=20.19"
35
+ },
36
+ "publishConfig": {
37
+ "access": "public"
38
+ },
39
+ "scripts": {
40
+ "build": "tsc",
41
+ "typecheck": "tsc --noEmit"
42
+ }
43
+ }