@dharta/cli 0.6.77 → 0.6.78

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 (293) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +215 -11
  3. package/dist/agent.js +3 -2
  4. package/dist/agent.js.map +1 -1
  5. package/dist/api-error.js +6 -6
  6. package/dist/api-error.js.map +1 -1
  7. package/dist/cli.d.ts +3 -0
  8. package/dist/cli.js +860 -149
  9. package/dist/cli.js.map +1 -1
  10. package/dist/command-tree.d.ts +3 -0
  11. package/dist/command-tree.js +10 -0
  12. package/dist/command-tree.js.map +1 -0
  13. package/dist/commands/agents.d.ts +54 -17
  14. package/dist/commands/agents.js +246 -136
  15. package/dist/commands/agents.js.map +1 -1
  16. package/dist/commands/analytics.js +6 -5
  17. package/dist/commands/analytics.js.map +1 -1
  18. package/dist/commands/api.js +71 -86
  19. package/dist/commands/api.js.map +1 -1
  20. package/dist/commands/appearance.js +5 -6
  21. package/dist/commands/appearance.js.map +1 -1
  22. package/dist/commands/artifact.js +7 -6
  23. package/dist/commands/artifact.js.map +1 -1
  24. package/dist/commands/audit-log.js +2 -1
  25. package/dist/commands/audit-log.js.map +1 -1
  26. package/dist/commands/auth.js +26 -6
  27. package/dist/commands/auth.js.map +1 -1
  28. package/dist/commands/caps.js +11 -15
  29. package/dist/commands/caps.js.map +1 -1
  30. package/dist/commands/deploy.js +25 -10
  31. package/dist/commands/deploy.js.map +1 -1
  32. package/dist/commands/dev.d.ts +10 -1
  33. package/dist/commands/dev.js +56 -25
  34. package/dist/commands/dev.js.map +1 -1
  35. package/dist/commands/doctor.d.ts +2 -0
  36. package/dist/commands/doctor.js +60 -0
  37. package/dist/commands/doctor.js.map +1 -1
  38. package/dist/commands/embed-keys.js +4 -13
  39. package/dist/commands/embed-keys.js.map +1 -1
  40. package/dist/commands/env.js +4 -7
  41. package/dist/commands/env.js.map +1 -1
  42. package/dist/commands/files.js +3 -4
  43. package/dist/commands/files.js.map +1 -1
  44. package/dist/commands/fleet.d.ts +129 -0
  45. package/dist/commands/fleet.js +408 -0
  46. package/dist/commands/fleet.js.map +1 -0
  47. package/dist/commands/genui.d.ts +2 -0
  48. package/dist/commands/genui.js +53 -0
  49. package/dist/commands/genui.js.map +1 -0
  50. package/dist/commands/git-credential.js +2 -3
  51. package/dist/commands/git-credential.js.map +1 -1
  52. package/dist/commands/kartas.d.ts +9 -0
  53. package/dist/commands/kartas.js +33 -11
  54. package/dist/commands/kartas.js.map +1 -1
  55. package/dist/commands/keys.d.ts +17 -18
  56. package/dist/commands/keys.js +108 -19
  57. package/dist/commands/keys.js.map +1 -1
  58. package/dist/commands/login.js +2 -1
  59. package/dist/commands/login.js.map +1 -1
  60. package/dist/commands/members.d.ts +10 -0
  61. package/dist/commands/members.js +20 -6
  62. package/dist/commands/members.js.map +1 -1
  63. package/dist/commands/model-connections.d.ts +44 -0
  64. package/dist/commands/model-connections.js +435 -0
  65. package/dist/commands/model-connections.js.map +1 -0
  66. package/dist/commands/open.d.ts +2 -2
  67. package/dist/commands/open.js +4 -3
  68. package/dist/commands/open.js.map +1 -1
  69. package/dist/commands/org.d.ts +9 -0
  70. package/dist/commands/org.js +42 -0
  71. package/dist/commands/org.js.map +1 -0
  72. package/dist/commands/organization.d.ts +16 -0
  73. package/dist/commands/organization.js +118 -0
  74. package/dist/commands/organization.js.map +1 -0
  75. package/dist/commands/parity.js +1 -3
  76. package/dist/commands/parity.js.map +1 -1
  77. package/dist/commands/repos.d.ts +4 -0
  78. package/dist/commands/repos.js +17 -0
  79. package/dist/commands/repos.js.map +1 -0
  80. package/dist/commands/rollback.js +2 -3
  81. package/dist/commands/rollback.js.map +1 -1
  82. package/dist/commands/schedules.js +26 -21
  83. package/dist/commands/schedules.js.map +1 -1
  84. package/dist/commands/scopes.js +8 -1
  85. package/dist/commands/scopes.js.map +1 -1
  86. package/dist/commands/sessions.js +9 -3
  87. package/dist/commands/sessions.js.map +1 -1
  88. package/dist/commands/setup.js +5 -4
  89. package/dist/commands/setup.js.map +1 -1
  90. package/dist/commands/update.d.ts +1 -0
  91. package/dist/commands/update.js +24 -11
  92. package/dist/commands/update.js.map +1 -1
  93. package/dist/commands/webhooks.d.ts +4 -1
  94. package/dist/commands/webhooks.js +21 -16
  95. package/dist/commands/webhooks.js.map +1 -1
  96. package/dist/completions.js +24 -13
  97. package/dist/completions.js.map +1 -1
  98. package/dist/config.d.ts +12 -0
  99. package/dist/config.js +121 -7
  100. package/dist/config.js.map +1 -1
  101. package/dist/context.d.ts +2 -0
  102. package/dist/context.js +23 -7
  103. package/dist/context.js.map +1 -1
  104. package/dist/docs/cli-reference.d.ts +2 -0
  105. package/dist/docs/cli-reference.js +191 -0
  106. package/dist/docs/cli-reference.js.map +1 -0
  107. package/dist/exit-codes.d.ts +25 -0
  108. package/dist/exit-codes.js +107 -0
  109. package/dist/exit-codes.js.map +1 -0
  110. package/dist/genui.d.ts +178 -0
  111. package/dist/genui.js +1130 -0
  112. package/dist/genui.js.map +1 -0
  113. package/dist/harnesses.js +2 -1
  114. package/dist/harnesses.js.map +1 -1
  115. package/dist/jq.d.ts +4 -0
  116. package/dist/jq.js +91 -0
  117. package/dist/jq.js.map +1 -0
  118. package/dist/login-offer.js +6 -2
  119. package/dist/login-offer.js.map +1 -1
  120. package/dist/manifest.d.ts +12 -0
  121. package/dist/manifest.js +126 -0
  122. package/dist/manifest.js.map +1 -1
  123. package/dist/model-auth.d.ts +29 -0
  124. package/dist/model-auth.js +117 -0
  125. package/dist/model-auth.js.map +1 -0
  126. package/dist/model-settings.d.ts +23 -0
  127. package/dist/model-settings.js +186 -0
  128. package/dist/model-settings.js.map +1 -0
  129. package/dist/money.js +2 -1
  130. package/dist/money.js.map +1 -1
  131. package/dist/output.d.ts +6 -0
  132. package/dist/output.js +54 -0
  133. package/dist/output.js.map +1 -1
  134. package/dist/runtime.d.ts +1 -1
  135. package/dist/runtime.js +1 -1
  136. package/dist/scaffold.js +2 -1
  137. package/dist/scaffold.js.map +1 -1
  138. package/dist/validators.js +17 -11
  139. package/dist/validators.js.map +1 -1
  140. package/dist/version-check.d.ts +1 -1
  141. package/dist/version-check.js +1 -1
  142. package/dist/version-check.js.map +1 -1
  143. package/node_modules/@dharta/contracts/LICENSE +21 -0
  144. package/node_modules/@dharta/contracts/README.md +45 -0
  145. package/node_modules/@dharta/contracts/artifact-runtime.json +750 -0
  146. package/node_modules/@dharta/contracts/dist/activity.d.ts +62 -0
  147. package/node_modules/@dharta/contracts/dist/activity.d.ts.map +1 -0
  148. package/node_modules/@dharta/contracts/dist/activity.js +178 -0
  149. package/node_modules/@dharta/contracts/dist/activity.js.map +1 -0
  150. package/node_modules/@dharta/contracts/dist/artifact-runtime-formats.d.ts +20 -0
  151. package/node_modules/@dharta/contracts/dist/artifact-runtime-formats.d.ts.map +1 -0
  152. package/node_modules/@dharta/contracts/dist/artifact-runtime-formats.js +53 -0
  153. package/node_modules/@dharta/contracts/dist/artifact-runtime-formats.js.map +1 -0
  154. package/node_modules/@dharta/contracts/dist/artifact-runtime-validators.generated.d.ts +37 -0
  155. package/node_modules/@dharta/contracts/dist/artifact-runtime-validators.generated.d.ts.map +1 -0
  156. package/node_modules/@dharta/contracts/dist/artifact-runtime-validators.generated.js +5107 -0
  157. package/node_modules/@dharta/contracts/dist/artifact-runtime-validators.generated.js.map +1 -0
  158. package/node_modules/@dharta/contracts/dist/artifact-runtime.d.ts +154 -0
  159. package/node_modules/@dharta/contracts/dist/artifact-runtime.d.ts.map +1 -0
  160. package/node_modules/@dharta/contracts/dist/artifact-runtime.generated.d.ts +1670 -0
  161. package/node_modules/@dharta/contracts/dist/artifact-runtime.generated.d.ts.map +1 -0
  162. package/node_modules/@dharta/contracts/dist/artifact-runtime.generated.js +1903 -0
  163. package/node_modules/@dharta/contracts/dist/artifact-runtime.generated.js.map +1 -0
  164. package/node_modules/@dharta/contracts/dist/artifact-runtime.js +377 -0
  165. package/node_modules/@dharta/contracts/dist/artifact-runtime.js.map +1 -0
  166. package/node_modules/@dharta/contracts/dist/index.d.ts +6 -0
  167. package/node_modules/@dharta/contracts/dist/index.d.ts.map +1 -0
  168. package/node_modules/@dharta/contracts/dist/index.js +6 -0
  169. package/node_modules/@dharta/contracts/dist/index.js.map +1 -0
  170. package/node_modules/@dharta/contracts/dist/model-auth.d.ts +31 -0
  171. package/node_modules/@dharta/contracts/dist/model-auth.d.ts.map +1 -0
  172. package/node_modules/@dharta/contracts/dist/model-auth.js +45 -0
  173. package/node_modules/@dharta/contracts/dist/model-auth.js.map +1 -0
  174. package/node_modules/@dharta/contracts/dist/tasks.d.ts +44 -0
  175. package/node_modules/@dharta/contracts/dist/tasks.d.ts.map +1 -0
  176. package/node_modules/@dharta/contracts/dist/tasks.js +127 -0
  177. package/node_modules/@dharta/contracts/dist/tasks.js.map +1 -0
  178. package/node_modules/@dharta/contracts/dist/wire-events.d.ts +71 -0
  179. package/node_modules/@dharta/contracts/dist/wire-events.d.ts.map +1 -0
  180. package/node_modules/@dharta/contracts/dist/wire-events.js +48 -0
  181. package/node_modules/@dharta/contracts/dist/wire-events.js.map +1 -0
  182. package/node_modules/@dharta/contracts/model-auth-capabilities-v1.json +168 -0
  183. package/node_modules/@dharta/contracts/model-auth-reasons-v1.json +38 -0
  184. package/node_modules/@dharta/contracts/package.json +44 -0
  185. package/node_modules/@dharta/contracts/src/activity.ts +215 -0
  186. package/node_modules/@dharta/contracts/src/artifact-runtime-formats.ts +54 -0
  187. package/node_modules/@dharta/contracts/src/artifact-runtime-validators.generated.ts +29 -0
  188. package/node_modules/@dharta/contracts/src/artifact-runtime.generated.ts +2093 -0
  189. package/node_modules/@dharta/contracts/src/artifact-runtime.ts +520 -0
  190. package/node_modules/@dharta/contracts/src/index.ts +5 -0
  191. package/node_modules/@dharta/contracts/src/model-auth.ts +82 -0
  192. package/node_modules/@dharta/contracts/src/tasks.ts +142 -0
  193. package/node_modules/@dharta/contracts/src/wire-events.ts +150 -0
  194. package/node_modules/@dharta/contracts/wire-events.json +29 -0
  195. package/node_modules/@dharta/sdk/LICENSE +1 -1
  196. package/node_modules/@dharta/sdk/README.md +22 -8
  197. package/node_modules/@dharta/sdk/dist/errors.d.ts +9 -7
  198. package/node_modules/@dharta/sdk/dist/errors.d.ts.map +1 -1
  199. package/node_modules/@dharta/sdk/dist/errors.js +36 -18
  200. package/node_modules/@dharta/sdk/dist/errors.js.map +1 -1
  201. package/node_modules/@dharta/sdk/dist/fleet.d.ts +69 -0
  202. package/node_modules/@dharta/sdk/dist/fleet.d.ts.map +1 -0
  203. package/node_modules/@dharta/sdk/dist/fleet.js +240 -0
  204. package/node_modules/@dharta/sdk/dist/fleet.js.map +1 -0
  205. package/node_modules/@dharta/sdk/dist/http.d.ts +6 -2
  206. package/node_modules/@dharta/sdk/dist/http.d.ts.map +1 -1
  207. package/node_modules/@dharta/sdk/dist/http.js +71 -12
  208. package/node_modules/@dharta/sdk/dist/http.js.map +1 -1
  209. package/node_modules/@dharta/sdk/dist/idempotency.d.ts +12 -0
  210. package/node_modules/@dharta/sdk/dist/idempotency.d.ts.map +1 -0
  211. package/node_modules/@dharta/sdk/dist/idempotency.js +72 -0
  212. package/node_modules/@dharta/sdk/dist/idempotency.js.map +1 -0
  213. package/node_modules/@dharta/sdk/dist/index.d.ts +20 -6
  214. package/node_modules/@dharta/sdk/dist/index.d.ts.map +1 -1
  215. package/node_modules/@dharta/sdk/dist/index.js +27 -4
  216. package/node_modules/@dharta/sdk/dist/index.js.map +1 -1
  217. package/node_modules/@dharta/sdk/dist/resources.d.ts +108 -13
  218. package/node_modules/@dharta/sdk/dist/resources.d.ts.map +1 -1
  219. package/node_modules/@dharta/sdk/dist/resources.js +403 -57
  220. package/node_modules/@dharta/sdk/dist/resources.js.map +1 -1
  221. package/node_modules/@dharta/sdk/dist/types.d.ts +436 -16
  222. package/node_modules/@dharta/sdk/dist/types.d.ts.map +1 -1
  223. package/node_modules/@dharta/sdk/dist/types.js +31 -2
  224. package/node_modules/@dharta/sdk/dist/types.js.map +1 -1
  225. package/node_modules/@dharta/sdk/package.json +9 -3
  226. package/node_modules/@dharta/sdk/src/errors.ts +41 -18
  227. package/node_modules/@dharta/sdk/src/fleet.ts +339 -0
  228. package/node_modules/@dharta/sdk/src/http.ts +110 -17
  229. package/node_modules/@dharta/sdk/src/idempotency.ts +101 -0
  230. package/node_modules/@dharta/sdk/src/index.ts +50 -11
  231. package/node_modules/@dharta/sdk/src/resources.ts +549 -68
  232. package/node_modules/@dharta/sdk/src/types.ts +629 -20
  233. package/package.json +16 -6
  234. package/src/agent.ts +3 -2
  235. package/src/api-error.ts +6 -5
  236. package/src/cli.ts +978 -163
  237. package/src/command-tree.ts +13 -0
  238. package/src/commands/agents.ts +365 -167
  239. package/src/commands/analytics.ts +6 -5
  240. package/src/commands/api.ts +73 -92
  241. package/src/commands/appearance.ts +5 -6
  242. package/src/commands/artifact.ts +7 -6
  243. package/src/commands/audit-log.ts +2 -1
  244. package/src/commands/auth.ts +25 -5
  245. package/src/commands/caps.ts +11 -15
  246. package/src/commands/deploy.ts +18 -4
  247. package/src/commands/dev.ts +86 -25
  248. package/src/commands/doctor.ts +69 -0
  249. package/src/commands/embed-keys.ts +4 -14
  250. package/src/commands/env.ts +4 -7
  251. package/src/commands/files.ts +3 -4
  252. package/src/commands/fleet.ts +672 -0
  253. package/src/commands/genui.ts +59 -0
  254. package/src/commands/git-credential.ts +2 -3
  255. package/src/commands/kartas.ts +45 -11
  256. package/src/commands/keys.ts +152 -35
  257. package/src/commands/login.ts +2 -1
  258. package/src/commands/members.ts +31 -6
  259. package/src/commands/model-connections.ts +547 -0
  260. package/src/commands/open.ts +5 -4
  261. package/src/commands/org.ts +57 -0
  262. package/src/commands/organization.ts +153 -0
  263. package/src/commands/parity.ts +1 -3
  264. package/src/commands/repos.ts +23 -0
  265. package/src/commands/rollback.ts +2 -3
  266. package/src/commands/schedules.ts +33 -22
  267. package/src/commands/scopes.ts +8 -1
  268. package/src/commands/sessions.ts +9 -3
  269. package/src/commands/setup.ts +5 -4
  270. package/src/commands/update.ts +28 -12
  271. package/src/commands/webhooks.ts +30 -19
  272. package/src/completions.ts +25 -13
  273. package/src/config.ts +141 -9
  274. package/src/context.ts +34 -7
  275. package/src/docs/cli-reference.ts +206 -0
  276. package/src/exit-codes.ts +122 -0
  277. package/src/genui.ts +1398 -0
  278. package/src/harnesses.ts +2 -1
  279. package/src/jq.ts +109 -0
  280. package/src/login-offer.ts +6 -2
  281. package/src/manifest.ts +134 -0
  282. package/src/model-auth.ts +173 -0
  283. package/src/model-settings.ts +222 -0
  284. package/src/money.ts +5 -1
  285. package/src/output.ts +60 -0
  286. package/src/runtime.ts +1 -1
  287. package/src/scaffold.ts +2 -1
  288. package/src/validators.ts +18 -11
  289. package/src/version-check.ts +1 -1
  290. package/dist/commands/model-keys.d.ts +0 -22
  291. package/dist/commands/model-keys.js +0 -222
  292. package/dist/commands/model-keys.js.map +0 -1
  293. package/src/commands/model-keys.ts +0 -278
@@ -0,0 +1,2093 @@
1
+ // Generated from artifact-runtime.json by generate-artifact-runtime-bindings.mjs.
2
+ // Do not edit.
3
+ type DeepReadonly<T> = T extends (...args: never[]) => unknown
4
+ ? T
5
+ : T extends readonly (infer Item)[]
6
+ ? readonly DeepReadonly<Item>[]
7
+ : T extends object
8
+ ? { readonly [Key in keyof T]: DeepReadonly<T[Key]> }
9
+ : T;
10
+
11
+ function deepFreeze<T>(value: T): DeepReadonly<T> {
12
+ if (typeof value === "object" && value !== null) {
13
+ Object.freeze(value);
14
+ for (const child of Object.values(value)) deepFreeze(child);
15
+ }
16
+ return value as DeepReadonly<T>;
17
+ }
18
+
19
+ export const ARTIFACT_RUNTIME_CATALOG = deepFreeze({
20
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
21
+ "contract_version": 2,
22
+ "manifest": {
23
+ "id_pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$",
24
+ "type_id_pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$",
25
+ "input_alias_pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$",
26
+ "workspace_source_pattern": "^workspace:(?!.*[\\uD800-\\uDFFF])(?!/)(?!.*\\\\)(?!.*//)(?!\\.\\.?(?:$|/))(?!.*[/]\\.\\.?(?:$|/))[^\\u0000/]+(?:/[^\\u0000/]+)*$",
27
+ "max_title_characters": 200,
28
+ "max_root_bytes": 1024,
29
+ "max_root_depth": 32,
30
+ "max_entry_bytes": 1024,
31
+ "max_entry_depth": 32,
32
+ "max_run_bytes": 16384,
33
+ "max_inputs": 64,
34
+ "max_input_source_bytes": 2048,
35
+ "freshness": [
36
+ "pinned",
37
+ "follow"
38
+ ],
39
+ "reserved_root_paths": [
40
+ ".dharta/inputs"
41
+ ]
42
+ },
43
+ "trees": {
44
+ "root": {
45
+ "max_files": 20000,
46
+ "max_bytes": 1000000000
47
+ },
48
+ "input": {
49
+ "max_files": 20000,
50
+ "max_bytes": 1000000000
51
+ },
52
+ "all_inputs": {
53
+ "max_files": 50000,
54
+ "max_bytes": 5000000000
55
+ },
56
+ "static_share": {
57
+ "max_files": 20000,
58
+ "max_bytes": 1000000000
59
+ },
60
+ "reject_symlinks_escaping_tree": true,
61
+ "reject_secret_paths": true
62
+ },
63
+ "runtime": {
64
+ "abi": "dharta.artifact.renderer/v1",
65
+ "shell": "/bin/sh",
66
+ "shell_arguments": [
67
+ "-lc"
68
+ ],
69
+ "host": "127.0.0.1",
70
+ "environment": {
71
+ "DHARTA_ARTIFACT_PORT": {
72
+ "secret": false,
73
+ "value": "assigned loopback port"
74
+ },
75
+ "DHARTA_ARTIFACT_INPUTS": {
76
+ "secret": false,
77
+ "value": "absolute mounted input directory"
78
+ },
79
+ "DHARTA_ARTIFACT_TYPE_DIR": {
80
+ "secret": false,
81
+ "value": "absolute Type recipe directory when present"
82
+ },
83
+ "DHARTA_ARTIFACT_RUN": {
84
+ "secret": false,
85
+ "value": "opaque declared shell command"
86
+ }
87
+ },
88
+ "inherited_environment": "allowlist-only",
89
+ "secret_environment": [],
90
+ "startup_seconds": 30,
91
+ "idle_seconds": 300,
92
+ "absolute_seconds": 3600,
93
+ "teardown_seconds": 30
94
+ },
95
+ "portable_sharing": {
96
+ "format": "dharta.portable-artifact-execution-pack.v1",
97
+ "cost_owners": [
98
+ "publisher",
99
+ "viewer",
100
+ "organization"
101
+ ],
102
+ "required_live_execution": true,
103
+ "capabilities": {
104
+ "network": "none",
105
+ "workspace": "none",
106
+ "model": false,
107
+ "credentials": [],
108
+ "connections": []
109
+ },
110
+ "exclude_producer_sources": true,
111
+ "exclude_snapshot_ids": true,
112
+ "exclude_credentials": true
113
+ },
114
+ "access": {
115
+ "public_token_pattern": "^sfl_[A-Za-z0-9_-]{32,96}$",
116
+ "execution_id_pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$",
117
+ "execution_id_max_characters": 128,
118
+ "artifact_version_id_pattern": "^[A-Za-z0-9_-]{1,64}$",
119
+ "artifact_version_id_max_characters": 64,
120
+ "audience_digest_pattern": "^[0-9a-f]{64}$",
121
+ "handoff_digest_pattern": "^[0-9a-f]{64}$",
122
+ "handoff_token_pattern": "^aat_[A-Za-z0-9_-]{39,1996}$",
123
+ "origin_label_pattern": "^a-[a-z2-7]{52}$"
124
+ },
125
+ "http": {
126
+ "root_path": "/",
127
+ "handoff_path": "/_dharta/artifact/handoff",
128
+ "authorize_path": "/_dharta/artifact/authorize",
129
+ "open_path": "/_dharta/artifact/open",
130
+ "access_cookie": "__Host-dharta_artifact_access",
131
+ "local_access_cookie": "dharta_artifact_access_dev",
132
+ "root_media_type_essence": "text/html",
133
+ "allow_media_type_parameters": true,
134
+ "methods": [
135
+ "GET",
136
+ "HEAD",
137
+ "POST",
138
+ "PUT",
139
+ "PATCH",
140
+ "DELETE",
141
+ "OPTIONS"
142
+ ],
143
+ "max_header_bytes": 65536,
144
+ "max_request_body_bytes": 16777216,
145
+ "max_response_body_bytes": 1000000000,
146
+ "max_websocket_frame_bytes": 1048576,
147
+ "max_websocket_queue_frames": 2,
148
+ "max_concurrent_requests": 32,
149
+ "supports_streaming": true,
150
+ "supports_ranges": true,
151
+ "supports_sse": true,
152
+ "supports_websocket": true
153
+ },
154
+ "schemas": {
155
+ "input_v2": {
156
+ "type": "object",
157
+ "additionalProperties": false,
158
+ "required": [
159
+ "source",
160
+ "freshness"
161
+ ],
162
+ "properties": {
163
+ "source": {
164
+ "type": "string",
165
+ "maxLength": 2048,
166
+ "pattern": "^workspace:(?!.*[\\uD800-\\uDFFF])(?!/)(?!.*\\\\)(?!.*//)(?!\\.\\.?(?:$|/))(?!.*[/]\\.\\.?(?:$|/))[^\\u0000/]+(?:/[^\\u0000/]+)*$",
167
+ "x-dharta-error": "artifact_input_source_invalid"
168
+ },
169
+ "freshness": {
170
+ "enum": [
171
+ "pinned",
172
+ "follow"
173
+ ],
174
+ "x-dharta-error": "artifact_input_freshness_required"
175
+ }
176
+ },
177
+ "x-dharta-error": "artifact_input_invalid"
178
+ },
179
+ "agent_activation_v1": {
180
+ "type": "object",
181
+ "additionalProperties": false,
182
+ "required": [
183
+ "authorities",
184
+ "budget_cents",
185
+ "lifetime_seconds",
186
+ "descendant_ceiling",
187
+ "activation_mode",
188
+ "visibility"
189
+ ],
190
+ "properties": {
191
+ "authorities": {
192
+ "type": "array",
193
+ "maxItems": 32,
194
+ "uniqueItems": true,
195
+ "items": {
196
+ "type": "string",
197
+ "pattern": "^[a-z][a-z0-9_.:-]{0,127}$"
198
+ }
199
+ },
200
+ "budget_cents": {
201
+ "type": "integer",
202
+ "minimum": 0,
203
+ "maximum": 10000
204
+ },
205
+ "lifetime_seconds": {
206
+ "type": "integer",
207
+ "minimum": 1,
208
+ "maximum": 86400
209
+ },
210
+ "descendant_ceiling": {
211
+ "type": "integer",
212
+ "minimum": 0,
213
+ "maximum": 8
214
+ },
215
+ "activation_mode": {
216
+ "enum": [
217
+ "resume",
218
+ "new"
219
+ ]
220
+ },
221
+ "visibility": {
222
+ "enum": [
223
+ "headless",
224
+ "inspectable",
225
+ "user-facing"
226
+ ]
227
+ }
228
+ },
229
+ "x-dharta-error": "artifact_agent_activation_invalid"
230
+ },
231
+ "artifact_v2": {
232
+ "type": "object",
233
+ "additionalProperties": false,
234
+ "required": [
235
+ "contract_version",
236
+ "id",
237
+ "title",
238
+ "root",
239
+ "inputs"
240
+ ],
241
+ "allOf": [
242
+ {
243
+ "oneOf": [
244
+ {
245
+ "required": [
246
+ "entry"
247
+ ],
248
+ "not": {
249
+ "required": [
250
+ "run"
251
+ ]
252
+ }
253
+ },
254
+ {
255
+ "required": [
256
+ "run"
257
+ ],
258
+ "not": {
259
+ "required": [
260
+ "entry"
261
+ ]
262
+ }
263
+ }
264
+ ],
265
+ "x-dharta-error": "artifact_presentation_invalid"
266
+ },
267
+ {
268
+ "if": {
269
+ "required": [
270
+ "agent_activation"
271
+ ]
272
+ },
273
+ "then": {
274
+ "properties": {
275
+ "run": {
276
+ "const": "karta artifact run agent .",
277
+ "x-dharta-error": "artifact_agent_activation_runner_required"
278
+ }
279
+ },
280
+ "required": [
281
+ "run"
282
+ ]
283
+ },
284
+ "x-dharta-error": "artifact_agent_activation_runner_required"
285
+ }
286
+ ],
287
+ "properties": {
288
+ "contract_version": {
289
+ "const": 2,
290
+ "x-dharta-error": "artifact_contract_version_invalid"
291
+ },
292
+ "id": {
293
+ "type": "string",
294
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$",
295
+ "x-dharta-error": "artifact_id_invalid"
296
+ },
297
+ "title": {
298
+ "type": "string",
299
+ "minLength": 1,
300
+ "maxLength": 200,
301
+ "pattern": "^(?!.*[\\uD800-\\uDFFF]).+$",
302
+ "x-dharta-error": "artifact_title_invalid"
303
+ },
304
+ "type_id": {
305
+ "type": "string",
306
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$",
307
+ "x-dharta-error": "artifact_type_id_invalid"
308
+ },
309
+ "root": {
310
+ "type": "string",
311
+ "minLength": 1,
312
+ "maxLength": 1024,
313
+ "pattern": "^(?!.*[\\uD800-\\uDFFF])(?!/)(?!.*\\\\)(?!.*//)(?!\\.\\.?(?:$|/))(?!.*[/]\\.\\.?(?:$|/))(?!\\.dharta/inputs(?:/|$))[^\\u0000/]+(?:/[^\\u0000/]+)*$",
314
+ "x-dharta-error": "artifact_root_invalid"
315
+ },
316
+ "entry": {
317
+ "type": "string",
318
+ "minLength": 1,
319
+ "maxLength": 1024,
320
+ "pattern": "^(?!.*[\\uD800-\\uDFFF])(?!/)(?!.*\\\\)(?!.*//)(?!\\.\\.?(?:$|/))(?!.*[/]\\.\\.?(?:$|/))[^\\u0000/]+(?:/[^\\u0000/]+)*$",
321
+ "x-dharta-error": "artifact_entry_invalid"
322
+ },
323
+ "run": {
324
+ "type": "string",
325
+ "minLength": 1,
326
+ "maxLength": 16384,
327
+ "pattern": "^(?!.*[\\uD800-\\uDFFF])[^\\u0000]+$",
328
+ "x-dharta-error": "artifact_run_invalid"
329
+ },
330
+ "agent_activation": {
331
+ "$ref": "#/$defs/agent_activation_v1"
332
+ },
333
+ "inputs": {
334
+ "type": "object",
335
+ "maxProperties": 64,
336
+ "propertyNames": {
337
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$",
338
+ "x-dharta-error": "artifact_input_alias_invalid"
339
+ },
340
+ "additionalProperties": {
341
+ "$ref": "#/$defs/input_v2"
342
+ },
343
+ "x-dharta-error": "artifact_inputs_invalid"
344
+ }
345
+ },
346
+ "x-dharta-error": "artifact_v2_invalid"
347
+ },
348
+ "artifact_v1": {
349
+ "type": "object",
350
+ "required": [
351
+ "contract_version",
352
+ "key",
353
+ "kind",
354
+ "title",
355
+ "entrypoint",
356
+ "dependencies"
357
+ ],
358
+ "properties": {
359
+ "contract_version": {
360
+ "const": 1,
361
+ "x-dharta-error": "artifact_contract_version_invalid"
362
+ },
363
+ "key": {
364
+ "type": "string",
365
+ "minLength": 1
366
+ },
367
+ "kind": {
368
+ "type": "string",
369
+ "minLength": 1
370
+ },
371
+ "title": {
372
+ "type": "string",
373
+ "minLength": 1
374
+ },
375
+ "entrypoint": {
376
+ "type": "string",
377
+ "minLength": 1
378
+ },
379
+ "dependencies": {
380
+ "type": "array",
381
+ "items": {
382
+ "type": "object"
383
+ }
384
+ },
385
+ "suggested_surface": {
386
+ "type": "string",
387
+ "minLength": 1
388
+ }
389
+ },
390
+ "additionalProperties": true,
391
+ "x-dharta-error": "artifact_v1_invalid"
392
+ },
393
+ "manifest_document": {
394
+ "type": "object",
395
+ "additionalProperties": false,
396
+ "required": [
397
+ "schema",
398
+ "artifacts"
399
+ ],
400
+ "properties": {
401
+ "schema": {
402
+ "const": 2,
403
+ "x-dharta-error": "artifact_document_schema_invalid"
404
+ },
405
+ "artifacts": {
406
+ "type": "array",
407
+ "maxItems": 256,
408
+ "items": {
409
+ "oneOf": [
410
+ {
411
+ "$ref": "#/$defs/artifact_v1"
412
+ },
413
+ {
414
+ "$ref": "#/$defs/artifact_v2"
415
+ }
416
+ ]
417
+ },
418
+ "x-dharta-error": "artifact_document_invalid"
419
+ }
420
+ },
421
+ "x-dharta-error": "artifact_document_invalid"
422
+ },
423
+ "artifact_summary_input_v2": {
424
+ "type": "object",
425
+ "additionalProperties": false,
426
+ "required": [
427
+ "alias",
428
+ "source",
429
+ "freshness",
430
+ "snapshot_id",
431
+ "kind",
432
+ "files",
433
+ "total_bytes"
434
+ ],
435
+ "properties": {
436
+ "alias": {
437
+ "type": "string",
438
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"
439
+ },
440
+ "source": {
441
+ "type": "string",
442
+ "maxLength": 2048
443
+ },
444
+ "freshness": {
445
+ "enum": [
446
+ "pinned",
447
+ "follow"
448
+ ]
449
+ },
450
+ "snapshot_id": {
451
+ "type": "string",
452
+ "minLength": 1
453
+ },
454
+ "kind": {
455
+ "enum": [
456
+ "file",
457
+ "directory"
458
+ ]
459
+ },
460
+ "files": {
461
+ "type": "integer",
462
+ "minimum": 0
463
+ },
464
+ "total_bytes": {
465
+ "type": "integer",
466
+ "minimum": 0
467
+ }
468
+ }
469
+ },
470
+ "artifact_summary_v1": {
471
+ "type": "object",
472
+ "additionalProperties": false,
473
+ "required": [
474
+ "contract_version",
475
+ "artifact_id",
476
+ "artifact_version_id",
477
+ "key",
478
+ "kind",
479
+ "title",
480
+ "entrypoint",
481
+ "renderer",
482
+ "schema_version",
483
+ "portability",
484
+ "snapshot_id",
485
+ "member_count",
486
+ "total_bytes",
487
+ "publish_audiences"
488
+ ],
489
+ "properties": {
490
+ "contract_version": {
491
+ "const": 1
492
+ },
493
+ "artifact_id": {
494
+ "type": "string",
495
+ "minLength": 1
496
+ },
497
+ "artifact_version_id": {
498
+ "type": "string",
499
+ "minLength": 1
500
+ },
501
+ "key": {
502
+ "type": "string",
503
+ "minLength": 1
504
+ },
505
+ "kind": {
506
+ "type": "string",
507
+ "minLength": 1
508
+ },
509
+ "title": {
510
+ "type": "string",
511
+ "minLength": 1
512
+ },
513
+ "entrypoint": {
514
+ "type": "string",
515
+ "minLength": 1
516
+ },
517
+ "renderer": {
518
+ "type": "string",
519
+ "minLength": 1
520
+ },
521
+ "schema_version": {
522
+ "type": "integer",
523
+ "minimum": 1
524
+ },
525
+ "portability": {
526
+ "enum": [
527
+ "static",
528
+ "explainable",
529
+ "forkable"
530
+ ]
531
+ },
532
+ "snapshot_id": {
533
+ "type": "string",
534
+ "minLength": 1
535
+ },
536
+ "member_count": {
537
+ "type": "integer",
538
+ "minimum": 0
539
+ },
540
+ "total_bytes": {
541
+ "type": "integer",
542
+ "minimum": 0
543
+ },
544
+ "publish_audiences": {
545
+ "type": "array",
546
+ "items": {
547
+ "enum": [
548
+ "public",
549
+ "link",
550
+ "organization",
551
+ "named"
552
+ ]
553
+ }
554
+ }
555
+ }
556
+ },
557
+ "artifact_summary_v2": {
558
+ "type": "object",
559
+ "additionalProperties": false,
560
+ "required": [
561
+ "contract_version",
562
+ "artifact_id",
563
+ "artifact_version_id",
564
+ "id",
565
+ "title",
566
+ "root",
567
+ "snapshot_id",
568
+ "member_count",
569
+ "total_bytes",
570
+ "inputs",
571
+ "publish_audiences"
572
+ ],
573
+ "allOf": [
574
+ {
575
+ "oneOf": [
576
+ {
577
+ "required": [
578
+ "entry",
579
+ "renderer",
580
+ "presentation_availability"
581
+ ],
582
+ "not": {
583
+ "anyOf": [
584
+ {
585
+ "required": [
586
+ "run"
587
+ ]
588
+ },
589
+ {
590
+ "required": [
591
+ "execution_availability"
592
+ ]
593
+ },
594
+ {
595
+ "required": [
596
+ "execution_unavailable_reason"
597
+ ]
598
+ }
599
+ ]
600
+ }
601
+ },
602
+ {
603
+ "required": [
604
+ "run",
605
+ "execution_availability"
606
+ ],
607
+ "not": {
608
+ "anyOf": [
609
+ {
610
+ "required": [
611
+ "entry"
612
+ ]
613
+ },
614
+ {
615
+ "required": [
616
+ "renderer"
617
+ ]
618
+ },
619
+ {
620
+ "required": [
621
+ "presentation_availability"
622
+ ]
623
+ },
624
+ {
625
+ "required": [
626
+ "presentation_unavailable_reason"
627
+ ]
628
+ }
629
+ ]
630
+ }
631
+ }
632
+ ]
633
+ },
634
+ {
635
+ "if": {
636
+ "required": [
637
+ "agent_activation"
638
+ ]
639
+ },
640
+ "then": {
641
+ "properties": {
642
+ "run": {
643
+ "const": "karta artifact run agent ."
644
+ }
645
+ },
646
+ "required": [
647
+ "run"
648
+ ]
649
+ }
650
+ }
651
+ ],
652
+ "properties": {
653
+ "contract_version": {
654
+ "const": 2
655
+ },
656
+ "artifact_id": {
657
+ "type": "string",
658
+ "minLength": 1
659
+ },
660
+ "artifact_version_id": {
661
+ "type": "string",
662
+ "minLength": 1
663
+ },
664
+ "id": {
665
+ "type": "string",
666
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
667
+ },
668
+ "title": {
669
+ "type": "string",
670
+ "minLength": 1
671
+ },
672
+ "root": {
673
+ "type": "string",
674
+ "minLength": 1
675
+ },
676
+ "entry": {
677
+ "type": "string",
678
+ "minLength": 1
679
+ },
680
+ "run": {
681
+ "type": "string",
682
+ "minLength": 1
683
+ },
684
+ "agent_activation": {
685
+ "$ref": "#/$defs/agent_activation_v1"
686
+ },
687
+ "renderer": {
688
+ "enum": [
689
+ "builtin.text",
690
+ "builtin.markdown",
691
+ "builtin.code",
692
+ "builtin.image",
693
+ "builtin.audio",
694
+ "builtin.video",
695
+ "builtin.csv",
696
+ "builtin.pdf",
697
+ "builtin.html",
698
+ "builtin.download"
699
+ ]
700
+ },
701
+ "type_id": {
702
+ "type": "string",
703
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"
704
+ },
705
+ "snapshot_id": {
706
+ "type": "string",
707
+ "minLength": 1
708
+ },
709
+ "member_count": {
710
+ "type": "integer",
711
+ "minimum": 0
712
+ },
713
+ "total_bytes": {
714
+ "type": "integer",
715
+ "minimum": 0
716
+ },
717
+ "inputs": {
718
+ "type": "array",
719
+ "items": {
720
+ "$ref": "#/$defs/artifact_summary_input_v2"
721
+ }
722
+ },
723
+ "presentation_availability": {
724
+ "enum": [
725
+ "available",
726
+ "unavailable"
727
+ ]
728
+ },
729
+ "presentation_unavailable_reason": {
730
+ "type": "string",
731
+ "minLength": 1
732
+ },
733
+ "execution_availability": {
734
+ "enum": [
735
+ "available",
736
+ "unavailable"
737
+ ]
738
+ },
739
+ "execution_unavailable_reason": {
740
+ "type": "string",
741
+ "minLength": 1
742
+ },
743
+ "publish_audiences": {
744
+ "type": "array",
745
+ "items": {
746
+ "enum": [
747
+ "public",
748
+ "link",
749
+ "organization",
750
+ "named"
751
+ ]
752
+ }
753
+ }
754
+ }
755
+ },
756
+ "portable_pack_input": {
757
+ "type": "object",
758
+ "additionalProperties": false,
759
+ "required": [
760
+ "alias",
761
+ "freshness",
762
+ "kind",
763
+ "tree_digest",
764
+ "files",
765
+ "bytes"
766
+ ],
767
+ "properties": {
768
+ "alias": {
769
+ "type": "string",
770
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"
771
+ },
772
+ "freshness": {
773
+ "enum": [
774
+ "pinned",
775
+ "follow"
776
+ ]
777
+ },
778
+ "kind": {
779
+ "enum": [
780
+ "file",
781
+ "directory"
782
+ ]
783
+ },
784
+ "tree_digest": {
785
+ "type": "string",
786
+ "pattern": "^[0-9a-f]{64}$"
787
+ },
788
+ "files": {
789
+ "type": "integer",
790
+ "minimum": 0
791
+ },
792
+ "bytes": {
793
+ "type": "integer",
794
+ "minimum": 0
795
+ }
796
+ }
797
+ },
798
+ "portable_pack_member": {
799
+ "type": "object",
800
+ "additionalProperties": false,
801
+ "required": [
802
+ "scope",
803
+ "path",
804
+ "kind",
805
+ "size",
806
+ "mode"
807
+ ],
808
+ "properties": {
809
+ "scope": {
810
+ "enum": [
811
+ "root",
812
+ "input",
813
+ "type"
814
+ ]
815
+ },
816
+ "alias": {
817
+ "type": "string",
818
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"
819
+ },
820
+ "path": {
821
+ "type": "string",
822
+ "minLength": 1,
823
+ "maxLength": 1024
824
+ },
825
+ "kind": {
826
+ "enum": [
827
+ "file",
828
+ "symlink",
829
+ "directory"
830
+ ]
831
+ },
832
+ "digest": {
833
+ "type": "string",
834
+ "pattern": "^[0-9a-f]{64}$"
835
+ },
836
+ "size": {
837
+ "type": "integer",
838
+ "minimum": 0
839
+ },
840
+ "mode": {
841
+ "type": "integer",
842
+ "minimum": 0,
843
+ "maximum": 4095
844
+ },
845
+ "target": {
846
+ "type": "string",
847
+ "minLength": 1,
848
+ "maxLength": 4096
849
+ },
850
+ "target_kind": {
851
+ "enum": [
852
+ "file",
853
+ "directory"
854
+ ]
855
+ },
856
+ "generation": {
857
+ "type": "integer",
858
+ "minimum": 0
859
+ }
860
+ }
861
+ },
862
+ "portable_execution_capabilities": {
863
+ "type": "object",
864
+ "additionalProperties": false,
865
+ "required": [
866
+ "network",
867
+ "workspace",
868
+ "model",
869
+ "credentials",
870
+ "connections"
871
+ ],
872
+ "properties": {
873
+ "network": {
874
+ "const": "none"
875
+ },
876
+ "workspace": {
877
+ "const": "none"
878
+ },
879
+ "model": {
880
+ "const": false
881
+ },
882
+ "credentials": {
883
+ "type": "array",
884
+ "maxItems": 0
885
+ },
886
+ "connections": {
887
+ "type": "array",
888
+ "maxItems": 0
889
+ }
890
+ }
891
+ },
892
+ "portable_execution_pack": {
893
+ "type": "object",
894
+ "additionalProperties": false,
895
+ "required": [
896
+ "format",
897
+ "artifact_id",
898
+ "artifact_version_id",
899
+ "run",
900
+ "root",
901
+ "inputs",
902
+ "type_id",
903
+ "type_package_digest",
904
+ "cost_owner",
905
+ "capabilities",
906
+ "members"
907
+ ],
908
+ "properties": {
909
+ "format": {
910
+ "const": "dharta.portable-artifact-execution-pack.v1"
911
+ },
912
+ "artifact_id": {
913
+ "type": "string",
914
+ "minLength": 1,
915
+ "maxLength": 128
916
+ },
917
+ "artifact_version_id": {
918
+ "type": "string",
919
+ "minLength": 1,
920
+ "maxLength": 128
921
+ },
922
+ "run": {
923
+ "type": "string",
924
+ "minLength": 1,
925
+ "maxLength": 16384
926
+ },
927
+ "root": {
928
+ "type": "object",
929
+ "additionalProperties": false,
930
+ "required": [
931
+ "kind",
932
+ "tree_digest",
933
+ "files",
934
+ "bytes"
935
+ ],
936
+ "properties": {
937
+ "kind": {
938
+ "enum": [
939
+ "file",
940
+ "directory"
941
+ ]
942
+ },
943
+ "tree_digest": {
944
+ "type": "string",
945
+ "pattern": "^[0-9a-f]{64}$"
946
+ },
947
+ "files": {
948
+ "type": "integer",
949
+ "minimum": 0
950
+ },
951
+ "bytes": {
952
+ "type": "integer",
953
+ "minimum": 0
954
+ }
955
+ }
956
+ },
957
+ "inputs": {
958
+ "type": "array",
959
+ "maxItems": 64,
960
+ "items": {
961
+ "$ref": "#/$defs/portable_pack_input"
962
+ }
963
+ },
964
+ "type_id": {
965
+ "type": [
966
+ "string",
967
+ "null"
968
+ ],
969
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"
970
+ },
971
+ "type_package_digest": {
972
+ "type": [
973
+ "string",
974
+ "null"
975
+ ],
976
+ "pattern": "^[0-9a-f]{64}$"
977
+ },
978
+ "cost_owner": {
979
+ "enum": [
980
+ "publisher",
981
+ "viewer",
982
+ "organization"
983
+ ]
984
+ },
985
+ "capabilities": {
986
+ "$ref": "#/$defs/portable_execution_capabilities"
987
+ },
988
+ "members": {
989
+ "type": "array",
990
+ "maxItems": 20000,
991
+ "items": {
992
+ "$ref": "#/$defs/portable_pack_member"
993
+ }
994
+ }
995
+ }
996
+ },
997
+ "portable_execution_consent": {
998
+ "type": "object",
999
+ "additionalProperties": false,
1000
+ "required": [
1001
+ "pack_id",
1002
+ "artifact_version_id",
1003
+ "run",
1004
+ "required_live_execution",
1005
+ "cost_owner",
1006
+ "capabilities",
1007
+ "root",
1008
+ "inputs",
1009
+ "type_id",
1010
+ "unique_files",
1011
+ "unique_bytes",
1012
+ "consent_digest"
1013
+ ],
1014
+ "properties": {
1015
+ "pack_id": {
1016
+ "type": "string",
1017
+ "pattern": "^sp_[0-9a-f]{64}$"
1018
+ },
1019
+ "artifact_version_id": {
1020
+ "type": "string",
1021
+ "minLength": 1,
1022
+ "maxLength": 128
1023
+ },
1024
+ "run": {
1025
+ "type": "string",
1026
+ "minLength": 1,
1027
+ "maxLength": 16384
1028
+ },
1029
+ "required_live_execution": {
1030
+ "const": true
1031
+ },
1032
+ "cost_owner": {
1033
+ "enum": [
1034
+ "publisher",
1035
+ "viewer",
1036
+ "organization"
1037
+ ]
1038
+ },
1039
+ "capabilities": {
1040
+ "$ref": "#/$defs/portable_execution_capabilities"
1041
+ },
1042
+ "root": {
1043
+ "type": "object",
1044
+ "additionalProperties": false,
1045
+ "required": [
1046
+ "files",
1047
+ "bytes"
1048
+ ],
1049
+ "properties": {
1050
+ "files": {
1051
+ "type": "integer",
1052
+ "minimum": 0
1053
+ },
1054
+ "bytes": {
1055
+ "type": "integer",
1056
+ "minimum": 0
1057
+ }
1058
+ }
1059
+ },
1060
+ "inputs": {
1061
+ "type": "array",
1062
+ "maxItems": 64,
1063
+ "items": {
1064
+ "type": "object",
1065
+ "additionalProperties": false,
1066
+ "required": [
1067
+ "alias",
1068
+ "freshness",
1069
+ "files",
1070
+ "bytes"
1071
+ ],
1072
+ "properties": {
1073
+ "alias": {
1074
+ "type": "string",
1075
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"
1076
+ },
1077
+ "freshness": {
1078
+ "enum": [
1079
+ "pinned",
1080
+ "follow"
1081
+ ]
1082
+ },
1083
+ "files": {
1084
+ "type": "integer",
1085
+ "minimum": 0
1086
+ },
1087
+ "bytes": {
1088
+ "type": "integer",
1089
+ "minimum": 0
1090
+ }
1091
+ }
1092
+ }
1093
+ },
1094
+ "type_id": {
1095
+ "type": [
1096
+ "string",
1097
+ "null"
1098
+ ],
1099
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"
1100
+ },
1101
+ "unique_files": {
1102
+ "type": "integer",
1103
+ "minimum": 0
1104
+ },
1105
+ "unique_bytes": {
1106
+ "type": "integer",
1107
+ "minimum": 0
1108
+ },
1109
+ "consent_digest": {
1110
+ "type": "string",
1111
+ "pattern": "^[0-9a-f]{64}$"
1112
+ }
1113
+ }
1114
+ },
1115
+ "artifact_execution_session": {
1116
+ "type": "object",
1117
+ "additionalProperties": false,
1118
+ "required": [
1119
+ "id",
1120
+ "url",
1121
+ "state",
1122
+ "lease_expires_at",
1123
+ "absolute_expires_at",
1124
+ "cost_microusd",
1125
+ "cost_state",
1126
+ "metered_seconds",
1127
+ "artifact_version_id",
1128
+ "renewal_token"
1129
+ ],
1130
+ "properties": {
1131
+ "id": {
1132
+ "type": "string",
1133
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
1134
+ },
1135
+ "url": {
1136
+ "type": "string",
1137
+ "format": "uri",
1138
+ "pattern": "^https://"
1139
+ },
1140
+ "state": {
1141
+ "enum": [
1142
+ "active",
1143
+ "hidden"
1144
+ ]
1145
+ },
1146
+ "lease_expires_at": {
1147
+ "type": "string",
1148
+ "format": "date-time"
1149
+ },
1150
+ "absolute_expires_at": {
1151
+ "type": "string",
1152
+ "format": "date-time"
1153
+ },
1154
+ "cost_microusd": {
1155
+ "type": "integer",
1156
+ "minimum": 0
1157
+ },
1158
+ "cost_state": {
1159
+ "enum": [
1160
+ "pending",
1161
+ "final"
1162
+ ]
1163
+ },
1164
+ "metered_seconds": {
1165
+ "type": "integer",
1166
+ "minimum": 0
1167
+ },
1168
+ "artifact_version_id": {
1169
+ "type": "string",
1170
+ "pattern": "^[A-Za-z0-9_-]{1,64}$"
1171
+ },
1172
+ "renewal_token": {
1173
+ "type": "string",
1174
+ "pattern": "^sfl_[A-Za-z0-9_-]{32,96}$"
1175
+ }
1176
+ }
1177
+ },
1178
+ "artifact_execution_renewal": {
1179
+ "type": "object",
1180
+ "additionalProperties": false,
1181
+ "required": [
1182
+ "id",
1183
+ "state",
1184
+ "lease_expires_at",
1185
+ "absolute_expires_at",
1186
+ "cost_microusd",
1187
+ "cost_state",
1188
+ "metered_seconds",
1189
+ "handoff"
1190
+ ],
1191
+ "properties": {
1192
+ "id": {
1193
+ "type": "string",
1194
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
1195
+ },
1196
+ "state": {
1197
+ "enum": [
1198
+ "active",
1199
+ "hidden"
1200
+ ]
1201
+ },
1202
+ "lease_expires_at": {
1203
+ "type": "string",
1204
+ "format": "date-time"
1205
+ },
1206
+ "absolute_expires_at": {
1207
+ "type": "string",
1208
+ "format": "date-time"
1209
+ },
1210
+ "cost_microusd": {
1211
+ "type": "integer",
1212
+ "minimum": 0
1213
+ },
1214
+ "cost_state": {
1215
+ "enum": [
1216
+ "pending",
1217
+ "final"
1218
+ ]
1219
+ },
1220
+ "metered_seconds": {
1221
+ "type": "integer",
1222
+ "minimum": 0
1223
+ },
1224
+ "handoff": {
1225
+ "type": "string",
1226
+ "pattern": "^aat_[A-Za-z0-9_-]{39,1996}$"
1227
+ }
1228
+ }
1229
+ }
1230
+ },
1231
+ "fixtures": [
1232
+ {
1233
+ "name": "generated-python-viewer",
1234
+ "validator": "manifest",
1235
+ "valid": true,
1236
+ "value": {
1237
+ "schema": 2,
1238
+ "artifacts": [
1239
+ {
1240
+ "contract_version": 2,
1241
+ "id": "energy-landscape",
1242
+ "title": "Energy Landscape",
1243
+ "root": "outputs/energy-landscape",
1244
+ "run": "python energy-landscape-viewer.py",
1245
+ "inputs": {
1246
+ "landscape": {
1247
+ "source": "workspace:simulations/energy-landscape.sqlite",
1248
+ "freshness": "follow"
1249
+ }
1250
+ }
1251
+ }
1252
+ ]
1253
+ }
1254
+ },
1255
+ {
1256
+ "name": "developer-type-recipe",
1257
+ "validator": "manifest",
1258
+ "valid": true,
1259
+ "value": {
1260
+ "schema": 2,
1261
+ "artifacts": [
1262
+ {
1263
+ "contract_version": 2,
1264
+ "id": "investment-report",
1265
+ "title": "Investment Report",
1266
+ "type_id": "investment-report",
1267
+ "root": "outputs/investment-report",
1268
+ "run": "python \"$DHARTA_ARTIFACT_TYPE_DIR/render.py\" report.sqlite",
1269
+ "inputs": {
1270
+ "evidence": {
1271
+ "source": "workspace:evidence",
1272
+ "freshness": "pinned"
1273
+ }
1274
+ }
1275
+ }
1276
+ ]
1277
+ }
1278
+ },
1279
+ {
1280
+ "name": "passive-pdf-entry",
1281
+ "validator": "manifest",
1282
+ "valid": true,
1283
+ "value": {
1284
+ "schema": 2,
1285
+ "artifacts": [
1286
+ {
1287
+ "contract_version": 2,
1288
+ "id": "audit-report",
1289
+ "title": "Audit Report",
1290
+ "root": "outputs/audit-report",
1291
+ "entry": "report.pdf",
1292
+ "inputs": {
1293
+ "audit": {
1294
+ "source": "workspace:audit/source",
1295
+ "freshness": "pinned"
1296
+ }
1297
+ }
1298
+ }
1299
+ ]
1300
+ }
1301
+ },
1302
+ {
1303
+ "name": "static-html-entry",
1304
+ "validator": "manifest",
1305
+ "valid": true,
1306
+ "value": {
1307
+ "schema": 2,
1308
+ "artifacts": [
1309
+ {
1310
+ "contract_version": 2,
1311
+ "id": "interactive-report",
1312
+ "title": "Interactive Report",
1313
+ "root": "outputs/interactive-report",
1314
+ "entry": "index.html",
1315
+ "inputs": {}
1316
+ }
1317
+ ]
1318
+ }
1319
+ },
1320
+ {
1321
+ "name": "interactive-post-websocket",
1322
+ "validator": "manifest",
1323
+ "valid": true,
1324
+ "value": {
1325
+ "schema": 2,
1326
+ "artifacts": [
1327
+ {
1328
+ "contract_version": 2,
1329
+ "id": "simulation",
1330
+ "title": "Interactive Simulation",
1331
+ "root": "outputs/simulation",
1332
+ "run": "python server.py",
1333
+ "inputs": {}
1334
+ }
1335
+ ]
1336
+ }
1337
+ },
1338
+ {
1339
+ "name": "arbitrary-shell-command",
1340
+ "validator": "manifest",
1341
+ "valid": true,
1342
+ "value": {
1343
+ "schema": 2,
1344
+ "artifacts": [
1345
+ {
1346
+ "contract_version": 2,
1347
+ "id": "generated-dashboard",
1348
+ "title": "Generated Dashboard",
1349
+ "root": "outputs/generated-dashboard",
1350
+ "run": "python preprocess.py && http-server index.html --port \"$DHARTA_ARTIFACT_PORT\"",
1351
+ "inputs": {}
1352
+ }
1353
+ ]
1354
+ }
1355
+ },
1356
+ {
1357
+ "name": "shared-sqlite-follow-input",
1358
+ "validator": "manifest",
1359
+ "valid": true,
1360
+ "value": {
1361
+ "schema": 2,
1362
+ "artifacts": [
1363
+ {
1364
+ "contract_version": 2,
1365
+ "id": "landscape-map",
1366
+ "title": "Landscape Map",
1367
+ "root": "outputs/landscape-map",
1368
+ "run": "python map.py",
1369
+ "inputs": {
1370
+ "simulation": {
1371
+ "source": "workspace:simulations/shared.sqlite",
1372
+ "freshness": "follow"
1373
+ }
1374
+ }
1375
+ },
1376
+ {
1377
+ "contract_version": 2,
1378
+ "id": "landscape-table",
1379
+ "title": "Landscape Table",
1380
+ "root": "outputs/landscape-table",
1381
+ "run": "python table.py",
1382
+ "inputs": {
1383
+ "simulation": {
1384
+ "source": "workspace:simulations/shared.sqlite",
1385
+ "freshness": "follow"
1386
+ }
1387
+ }
1388
+ }
1389
+ ]
1390
+ }
1391
+ },
1392
+ {
1393
+ "name": "generated-agent-app",
1394
+ "validator": "manifest",
1395
+ "valid": true,
1396
+ "value": {
1397
+ "schema": 2,
1398
+ "artifacts": [
1399
+ {
1400
+ "contract_version": 2,
1401
+ "id": "scenario-analyst",
1402
+ "title": "Scenario Analyst",
1403
+ "root": "outputs/scenario-analyst",
1404
+ "run": "karta artifact run agent .",
1405
+ "agent_activation": {
1406
+ "authorities": [
1407
+ "model"
1408
+ ],
1409
+ "budget_cents": 100,
1410
+ "lifetime_seconds": 3600,
1411
+ "descendant_ceiling": 0,
1412
+ "activation_mode": "resume",
1413
+ "visibility": "user-facing"
1414
+ },
1415
+ "inputs": {}
1416
+ }
1417
+ ]
1418
+ }
1419
+ },
1420
+ {
1421
+ "name": "agent-activation-on-arbitrary-runner",
1422
+ "validator": "artifact",
1423
+ "valid": false,
1424
+ "error": "artifact_agent_activation_runner_required",
1425
+ "value": {
1426
+ "contract_version": 2,
1427
+ "id": "bad-agent",
1428
+ "title": "Bad Agent",
1429
+ "root": "outputs/bad-agent",
1430
+ "run": "python server.py",
1431
+ "agent_activation": {
1432
+ "authorities": [],
1433
+ "budget_cents": 0,
1434
+ "lifetime_seconds": 3600,
1435
+ "descendant_ceiling": 0,
1436
+ "activation_mode": "resume",
1437
+ "visibility": "headless"
1438
+ },
1439
+ "inputs": {}
1440
+ }
1441
+ },
1442
+ {
1443
+ "name": "mixed-v1-v2",
1444
+ "validator": "manifest",
1445
+ "valid": true,
1446
+ "value": {
1447
+ "schema": 2,
1448
+ "artifacts": [
1449
+ {
1450
+ "contract_version": 1,
1451
+ "key": "legacy-report",
1452
+ "kind": "briefing",
1453
+ "title": "Legacy report",
1454
+ "entrypoint": "reports/legacy.md",
1455
+ "dependencies": [
1456
+ {
1457
+ "role": "render",
1458
+ "path": "reports/legacy.md"
1459
+ }
1460
+ ],
1461
+ "suggested_surface": "artifact"
1462
+ },
1463
+ {
1464
+ "contract_version": 2,
1465
+ "id": "new-report",
1466
+ "title": "New report",
1467
+ "root": "outputs/new-report",
1468
+ "entry": "report.md",
1469
+ "inputs": {}
1470
+ }
1471
+ ]
1472
+ }
1473
+ },
1474
+ {
1475
+ "name": "legacy-v1-extension-roundtrip",
1476
+ "validator": "manifest",
1477
+ "valid": true,
1478
+ "value": {
1479
+ "schema": 2,
1480
+ "artifacts": [
1481
+ {
1482
+ "contract_version": 1,
1483
+ "key": "legacy-evidence",
1484
+ "kind": "audit",
1485
+ "title": "Legacy evidence",
1486
+ "entrypoint": "reports/evidence.md",
1487
+ "dependencies": [
1488
+ {
1489
+ "role": "render",
1490
+ "path": "reports/evidence.md"
1491
+ }
1492
+ ],
1493
+ "provenance": {
1494
+ "snapshot_id": "snap-17",
1495
+ "sources": [
1496
+ "evidence/a.json"
1497
+ ]
1498
+ }
1499
+ }
1500
+ ]
1501
+ }
1502
+ },
1503
+ {
1504
+ "name": "root-traversal",
1505
+ "validator": "artifact",
1506
+ "valid": false,
1507
+ "error": "artifact_root_invalid",
1508
+ "value": {
1509
+ "contract_version": 2,
1510
+ "id": "bad-root",
1511
+ "title": "Bad root",
1512
+ "root": "../secret",
1513
+ "run": "python viewer.py",
1514
+ "inputs": {}
1515
+ }
1516
+ },
1517
+ {
1518
+ "name": "reserved-root-collision",
1519
+ "validator": "artifact",
1520
+ "valid": false,
1521
+ "error": "artifact_root_invalid",
1522
+ "value": {
1523
+ "contract_version": 2,
1524
+ "id": "reserved-root",
1525
+ "title": "Reserved root",
1526
+ "root": ".dharta/inputs/data",
1527
+ "run": "python viewer.py",
1528
+ "inputs": {}
1529
+ }
1530
+ },
1531
+ {
1532
+ "name": "malicious-shell-nul",
1533
+ "validator": "artifact",
1534
+ "valid": false,
1535
+ "error": "artifact_run_invalid",
1536
+ "value": {
1537
+ "contract_version": 2,
1538
+ "id": "bad-shell",
1539
+ "title": "Bad shell",
1540
+ "root": "outputs/bad-shell",
1541
+ "run": "python viewer.py\u0000--escape",
1542
+ "inputs": {}
1543
+ }
1544
+ },
1545
+ {
1546
+ "name": "empty-run",
1547
+ "validator": "artifact",
1548
+ "valid": false,
1549
+ "error": "artifact_run_invalid",
1550
+ "value": {
1551
+ "contract_version": 2,
1552
+ "id": "empty-run",
1553
+ "title": "Empty run",
1554
+ "root": "outputs/empty-run",
1555
+ "run": "",
1556
+ "inputs": {}
1557
+ }
1558
+ },
1559
+ {
1560
+ "name": "missing-presentation",
1561
+ "validator": "artifact",
1562
+ "valid": false,
1563
+ "error": "artifact_presentation_invalid",
1564
+ "value": {
1565
+ "contract_version": 2,
1566
+ "id": "missing-presentation",
1567
+ "title": "Missing Presentation",
1568
+ "root": "outputs/missing-presentation",
1569
+ "inputs": {}
1570
+ }
1571
+ },
1572
+ {
1573
+ "name": "entry-and-run",
1574
+ "validator": "artifact",
1575
+ "valid": false,
1576
+ "error": "artifact_presentation_invalid",
1577
+ "value": {
1578
+ "contract_version": 2,
1579
+ "id": "entry-and-run",
1580
+ "title": "Entry and Run",
1581
+ "root": "outputs/entry-and-run",
1582
+ "entry": "index.html",
1583
+ "run": "python server.py",
1584
+ "inputs": {}
1585
+ }
1586
+ },
1587
+ {
1588
+ "name": "entry-traversal",
1589
+ "validator": "artifact",
1590
+ "valid": false,
1591
+ "error": "artifact_entry_invalid",
1592
+ "value": {
1593
+ "contract_version": 2,
1594
+ "id": "bad-entry",
1595
+ "title": "Bad Entry",
1596
+ "root": "outputs/bad-entry",
1597
+ "entry": "../secret.md",
1598
+ "inputs": {}
1599
+ }
1600
+ },
1601
+ {
1602
+ "name": "empty-entry",
1603
+ "validator": "artifact",
1604
+ "valid": false,
1605
+ "error": "artifact_entry_invalid",
1606
+ "value": {
1607
+ "contract_version": 2,
1608
+ "id": "empty-entry",
1609
+ "title": "Empty Entry",
1610
+ "root": "outputs/empty-entry",
1611
+ "entry": "",
1612
+ "inputs": {}
1613
+ }
1614
+ },
1615
+ {
1616
+ "name": "invalid-run-unicode",
1617
+ "validator": "artifact",
1618
+ "valid": false,
1619
+ "error": "artifact_run_invalid",
1620
+ "value": {
1621
+ "contract_version": 2,
1622
+ "id": "unicode-run",
1623
+ "title": "Unicode run",
1624
+ "root": "outputs/unicode-run",
1625
+ "run": "python __KARTA_UNPAIRED_SURROGATE__",
1626
+ "inputs": {}
1627
+ }
1628
+ },
1629
+ {
1630
+ "name": "invalid-title-unicode",
1631
+ "validator": "artifact",
1632
+ "valid": false,
1633
+ "error": "artifact_title_invalid",
1634
+ "value": {
1635
+ "contract_version": 2,
1636
+ "id": "unicode-title",
1637
+ "title": "__KARTA_UNPAIRED_SURROGATE__",
1638
+ "root": "outputs/unicode-title",
1639
+ "run": "python viewer.py",
1640
+ "inputs": {}
1641
+ }
1642
+ },
1643
+ {
1644
+ "name": "invalid-root-unicode",
1645
+ "validator": "artifact",
1646
+ "valid": false,
1647
+ "error": "artifact_root_invalid",
1648
+ "value": {
1649
+ "contract_version": 2,
1650
+ "id": "unicode-root",
1651
+ "title": "Unicode root",
1652
+ "root": "outputs/__KARTA_UNPAIRED_SURROGATE__",
1653
+ "run": "python viewer.py",
1654
+ "inputs": {}
1655
+ }
1656
+ },
1657
+ {
1658
+ "name": "invalid-input-source-unicode",
1659
+ "validator": "artifact",
1660
+ "valid": false,
1661
+ "error": "artifact_input_source_invalid",
1662
+ "value": {
1663
+ "contract_version": 2,
1664
+ "id": "unicode-input",
1665
+ "title": "Unicode input",
1666
+ "root": "outputs/unicode-input",
1667
+ "run": "python viewer.py",
1668
+ "inputs": {
1669
+ "data": {
1670
+ "source": "workspace:data/__KARTA_UNPAIRED_SURROGATE__",
1671
+ "freshness": "pinned"
1672
+ }
1673
+ }
1674
+ }
1675
+ },
1676
+ {
1677
+ "name": "invalid-type-id",
1678
+ "validator": "artifact",
1679
+ "valid": false,
1680
+ "error": "artifact_type_id_invalid",
1681
+ "value": {
1682
+ "contract_version": 2,
1683
+ "id": "bad-type",
1684
+ "title": "Bad Type",
1685
+ "type_id": "../report",
1686
+ "root": "outputs/bad-type",
1687
+ "run": "python viewer.py",
1688
+ "inputs": {}
1689
+ }
1690
+ },
1691
+ {
1692
+ "name": "implicit-freshness",
1693
+ "validator": "artifact",
1694
+ "valid": false,
1695
+ "error": "artifact_input_freshness_required",
1696
+ "value": {
1697
+ "contract_version": 2,
1698
+ "id": "implicit-freshness",
1699
+ "title": "Implicit freshness",
1700
+ "root": "outputs/implicit",
1701
+ "run": "python viewer.py",
1702
+ "inputs": {
1703
+ "data": {
1704
+ "source": "workspace:data.sqlite"
1705
+ }
1706
+ }
1707
+ }
1708
+ },
1709
+ {
1710
+ "name": "input-alias-traversal",
1711
+ "validator": "artifact",
1712
+ "valid": false,
1713
+ "error": "artifact_input_alias_invalid",
1714
+ "value": {
1715
+ "contract_version": 2,
1716
+ "id": "bad-alias",
1717
+ "title": "Bad alias",
1718
+ "root": "outputs/bad-alias",
1719
+ "run": "python viewer.py",
1720
+ "inputs": {
1721
+ "../data": {
1722
+ "source": "workspace:data.sqlite",
1723
+ "freshness": "pinned"
1724
+ }
1725
+ }
1726
+ }
1727
+ },
1728
+ {
1729
+ "name": "workspace-source-traversal",
1730
+ "validator": "artifact",
1731
+ "valid": false,
1732
+ "error": "artifact_input_source_invalid",
1733
+ "value": {
1734
+ "contract_version": 2,
1735
+ "id": "bad-source",
1736
+ "title": "Bad source",
1737
+ "root": "outputs/bad-source",
1738
+ "run": "python viewer.py",
1739
+ "inputs": {
1740
+ "data": {
1741
+ "source": "workspace:../secret",
1742
+ "freshness": "pinned"
1743
+ }
1744
+ }
1745
+ }
1746
+ },
1747
+ {
1748
+ "name": "unsupported-connection-v1",
1749
+ "validator": "artifact",
1750
+ "valid": false,
1751
+ "error": "artifact_input_source_invalid",
1752
+ "value": {
1753
+ "contract_version": 2,
1754
+ "id": "connection-input",
1755
+ "title": "Connection input",
1756
+ "root": "outputs/connection",
1757
+ "run": "python viewer.py",
1758
+ "inputs": {
1759
+ "market": {
1760
+ "source": "connection:market-production",
1761
+ "freshness": "follow"
1762
+ }
1763
+ }
1764
+ }
1765
+ },
1766
+ {
1767
+ "name": "escaping-symlink",
1768
+ "validator": "tree",
1769
+ "valid": false,
1770
+ "error": "artifact_tree_symlink_escape",
1771
+ "value": {
1772
+ "scope": "root",
1773
+ "files": 3,
1774
+ "bytes": 200,
1775
+ "escaping_symlink": true,
1776
+ "secret_path": false,
1777
+ "reserved_path_collision": false
1778
+ }
1779
+ },
1780
+ {
1781
+ "name": "malformed-tree-null",
1782
+ "validator": "tree",
1783
+ "valid": false,
1784
+ "error": "artifact_tree_invalid",
1785
+ "value": null
1786
+ },
1787
+ {
1788
+ "name": "invalid-tree-scope",
1789
+ "validator": "tree",
1790
+ "valid": false,
1791
+ "error": "artifact_tree_scope_invalid",
1792
+ "value": {
1793
+ "scope": "bogus",
1794
+ "files": 0,
1795
+ "bytes": 0,
1796
+ "escaping_symlink": false,
1797
+ "secret_path": false,
1798
+ "reserved_path_collision": false
1799
+ }
1800
+ },
1801
+ {
1802
+ "name": "bounded-root-tree",
1803
+ "validator": "tree",
1804
+ "valid": true,
1805
+ "value": {
1806
+ "scope": "root",
1807
+ "files": 20000,
1808
+ "bytes": 1000000000,
1809
+ "escaping_symlink": false,
1810
+ "secret_path": false,
1811
+ "reserved_path_collision": false
1812
+ }
1813
+ },
1814
+ {
1815
+ "name": "secret-input-path",
1816
+ "validator": "tree",
1817
+ "valid": false,
1818
+ "error": "artifact_tree_secret_path",
1819
+ "value": {
1820
+ "scope": "input",
1821
+ "files": 1,
1822
+ "bytes": 100,
1823
+ "escaping_symlink": false,
1824
+ "secret_path": true,
1825
+ "reserved_path_collision": false
1826
+ }
1827
+ },
1828
+ {
1829
+ "name": "oversized-root-tree",
1830
+ "validator": "tree",
1831
+ "valid": false,
1832
+ "error": "artifact_tree_files_exceeded",
1833
+ "value": {
1834
+ "scope": "root",
1835
+ "files": 20001,
1836
+ "bytes": 100,
1837
+ "escaping_symlink": false,
1838
+ "secret_path": false,
1839
+ "reserved_path_collision": false
1840
+ }
1841
+ },
1842
+ {
1843
+ "name": "oversized-input-tree",
1844
+ "validator": "tree",
1845
+ "valid": false,
1846
+ "error": "artifact_tree_bytes_exceeded",
1847
+ "value": {
1848
+ "scope": "input",
1849
+ "files": 1,
1850
+ "bytes": 1000000001,
1851
+ "escaping_symlink": false,
1852
+ "secret_path": false,
1853
+ "reserved_path_collision": false
1854
+ }
1855
+ },
1856
+ {
1857
+ "name": "oversized-static-share",
1858
+ "validator": "tree",
1859
+ "valid": false,
1860
+ "error": "artifact_tree_files_exceeded",
1861
+ "value": {
1862
+ "scope": "static_share",
1863
+ "files": 20001,
1864
+ "bytes": 100,
1865
+ "escaping_symlink": false,
1866
+ "secret_path": false,
1867
+ "reserved_path_collision": false
1868
+ }
1869
+ },
1870
+ {
1871
+ "name": "oversized-combined-inputs",
1872
+ "validator": "tree",
1873
+ "valid": false,
1874
+ "error": "artifact_tree_bytes_exceeded",
1875
+ "value": {
1876
+ "scope": "all_inputs",
1877
+ "files": 2,
1878
+ "bytes": 5000000001,
1879
+ "escaping_symlink": false,
1880
+ "secret_path": false,
1881
+ "reserved_path_collision": false
1882
+ }
1883
+ },
1884
+ {
1885
+ "name": "reserved-input-mount-collision",
1886
+ "validator": "tree",
1887
+ "valid": false,
1888
+ "error": "artifact_tree_reserved_path_collision",
1889
+ "value": {
1890
+ "scope": "root",
1891
+ "files": 4,
1892
+ "bytes": 300,
1893
+ "escaping_symlink": false,
1894
+ "secret_path": false,
1895
+ "reserved_path_collision": true
1896
+ }
1897
+ },
1898
+ {
1899
+ "name": "html-with-charset",
1900
+ "validator": "content_type",
1901
+ "valid": true,
1902
+ "value": "text/html; charset=utf-8"
1903
+ },
1904
+ {
1905
+ "name": "non-html-root",
1906
+ "validator": "content_type",
1907
+ "valid": false,
1908
+ "error": "artifact_root_media_type_invalid",
1909
+ "value": "audio/mpeg"
1910
+ }
1911
+ ]
1912
+ } as const);
1913
+
1914
+ export type ArtifactInputFreshness = "pinned" | "follow";
1915
+
1916
+ export interface ArtifactInputV2 {
1917
+ source: string;
1918
+ freshness: "pinned" | "follow";
1919
+ }
1920
+
1921
+ export interface AgentArtifactActivationRequestV1 {
1922
+ authorities: Array<string>;
1923
+ budget_cents: number;
1924
+ lifetime_seconds: number;
1925
+ descendant_ceiling: number;
1926
+ activation_mode: "resume" | "new";
1927
+ visibility: "headless" | "inspectable" | "user-facing";
1928
+ }
1929
+
1930
+ export interface ArtifactDeclarationV1 {
1931
+ contract_version: 1;
1932
+ key: string;
1933
+ kind: string;
1934
+ title: string;
1935
+ entrypoint: string;
1936
+ dependencies: Array<Record<string, unknown>>;
1937
+ suggested_surface?: string;
1938
+ [key: string]: unknown;
1939
+ }
1940
+
1941
+ export interface ArtifactDeclarationV2 {
1942
+ contract_version: 2;
1943
+ id: string;
1944
+ title: string;
1945
+ type_id?: string;
1946
+ root: string;
1947
+ entry?: string;
1948
+ run?: string;
1949
+ agent_activation?: AgentArtifactActivationRequestV1;
1950
+ inputs: Record<string, ArtifactInputV2>;
1951
+ }
1952
+
1953
+ export interface ArtifactSummaryInputV2 {
1954
+ alias: string;
1955
+ source: string;
1956
+ freshness: "pinned" | "follow";
1957
+ snapshot_id: string;
1958
+ kind: "file" | "directory";
1959
+ files: number;
1960
+ total_bytes: number;
1961
+ }
1962
+
1963
+ export interface ArtifactSummaryV1 {
1964
+ contract_version: 1;
1965
+ artifact_id: string;
1966
+ artifact_version_id: string;
1967
+ key: string;
1968
+ kind: string;
1969
+ title: string;
1970
+ entrypoint: string;
1971
+ renderer: string;
1972
+ schema_version: number;
1973
+ portability: "static" | "explainable" | "forkable";
1974
+ snapshot_id: string;
1975
+ member_count: number;
1976
+ total_bytes: number;
1977
+ publish_audiences: Array<"public" | "link" | "organization" | "named">;
1978
+ }
1979
+
1980
+ export interface ArtifactSummaryV2 {
1981
+ contract_version: 2;
1982
+ artifact_id: string;
1983
+ artifact_version_id: string;
1984
+ id: string;
1985
+ title: string;
1986
+ root: string;
1987
+ entry?: string;
1988
+ run?: string;
1989
+ agent_activation?: AgentArtifactActivationRequestV1;
1990
+ renderer?: "builtin.text" | "builtin.markdown" | "builtin.code" | "builtin.image" | "builtin.audio" | "builtin.video" | "builtin.csv" | "builtin.pdf" | "builtin.html" | "builtin.download";
1991
+ type_id?: string;
1992
+ snapshot_id: string;
1993
+ member_count: number;
1994
+ total_bytes: number;
1995
+ inputs: Array<ArtifactSummaryInputV2>;
1996
+ presentation_availability?: "available" | "unavailable";
1997
+ presentation_unavailable_reason?: string;
1998
+ execution_availability?: "available" | "unavailable";
1999
+ execution_unavailable_reason?: string;
2000
+ publish_audiences: Array<"public" | "link" | "organization" | "named">;
2001
+ }
2002
+
2003
+ export interface PortableArtifactInputWire {
2004
+ alias: string;
2005
+ freshness: "pinned" | "follow";
2006
+ kind: "file" | "directory";
2007
+ tree_digest: string;
2008
+ files: number;
2009
+ bytes: number;
2010
+ }
2011
+
2012
+ export interface PortableArtifactMemberWire {
2013
+ scope: "root" | "input" | "type";
2014
+ alias?: string;
2015
+ path: string;
2016
+ kind: "file" | "symlink" | "directory";
2017
+ digest?: string;
2018
+ size: number;
2019
+ mode: number;
2020
+ target?: string;
2021
+ target_kind?: "file" | "directory";
2022
+ generation?: number;
2023
+ }
2024
+
2025
+ export interface PortableExecutionCapabilitiesWire {
2026
+ network: "none";
2027
+ workspace: "none";
2028
+ model: false;
2029
+ credentials: Array<unknown>;
2030
+ connections: Array<unknown>;
2031
+ }
2032
+
2033
+ export interface PortableExecutionPackWire {
2034
+ format: "dharta.portable-artifact-execution-pack.v1";
2035
+ artifact_id: string;
2036
+ artifact_version_id: string;
2037
+ run: string;
2038
+ root: Record<string, unknown>;
2039
+ inputs: Array<PortableArtifactInputWire>;
2040
+ type_id: string | null;
2041
+ type_package_digest: string | null;
2042
+ cost_owner: "publisher" | "viewer" | "organization";
2043
+ capabilities: PortableExecutionCapabilitiesWire;
2044
+ members: Array<PortableArtifactMemberWire>;
2045
+ }
2046
+
2047
+ export interface PortableExecutionConsentWire {
2048
+ pack_id: string;
2049
+ artifact_version_id: string;
2050
+ run: string;
2051
+ required_live_execution: true;
2052
+ cost_owner: "publisher" | "viewer" | "organization";
2053
+ capabilities: PortableExecutionCapabilitiesWire;
2054
+ root: Record<string, unknown>;
2055
+ inputs: Array<Record<string, unknown>>;
2056
+ type_id: string | null;
2057
+ unique_files: number;
2058
+ unique_bytes: number;
2059
+ consent_digest: string;
2060
+ }
2061
+
2062
+ export interface ArtifactExecutionSessionWire {
2063
+ id: string;
2064
+ url: string;
2065
+ state: "active" | "hidden";
2066
+ lease_expires_at: string;
2067
+ absolute_expires_at: string;
2068
+ cost_microusd: number;
2069
+ cost_state: "pending" | "final";
2070
+ metered_seconds: number;
2071
+ artifact_version_id: string;
2072
+ renewal_token: string;
2073
+ }
2074
+
2075
+ export interface ArtifactExecutionRenewalWire {
2076
+ id: string;
2077
+ state: "active" | "hidden";
2078
+ lease_expires_at: string;
2079
+ absolute_expires_at: string;
2080
+ cost_microusd: number;
2081
+ cost_state: "pending" | "final";
2082
+ metered_seconds: number;
2083
+ handoff: string;
2084
+ }
2085
+
2086
+ export type ArtifactDeclaration = ArtifactDeclarationV1 | ArtifactDeclarationV2;
2087
+
2088
+ export type ArtifactSummaryWire = ArtifactSummaryV1 | ArtifactSummaryV2;
2089
+
2090
+ export interface ArtifactManifestDocumentV2 {
2091
+ schema: 2;
2092
+ artifacts: Array<ArtifactDeclarationV1 | ArtifactDeclarationV2>;
2093
+ }