@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,29 @@
1
+ // Generated from artifact-runtime.json by generate-artifact-runtime-bindings.mjs.
2
+ // Do not edit.
3
+ //
4
+ // Ajv-standalone-compiled validators for the Artifact runtime catalog.
5
+ // Compiled at codegen time so browser bundles never carry the Ajv compiler;
6
+ // see compileStandaloneValidators() in the generator for the full rationale.
7
+ /* eslint-disable */
8
+ // @ts-nocheck
9
+ import { wireFormats } from "./artifact-runtime-formats.js";
10
+
11
+ // Inlined from ajv/dist/runtime/ucs2length.js (MIT): counts code points, not
12
+ // UTF-16 units, exactly as Ajv's own minLength/maxLength evaluation does.
13
+ function ucs2length(str) {
14
+ const len = str.length;
15
+ let length = 0;
16
+ let pos = 0;
17
+ let value;
18
+ while (pos < len) {
19
+ length++;
20
+ value = str.charCodeAt(pos++);
21
+ if (value >= 0xd800 && value <= 0xdbff && pos < len) {
22
+ value = str.charCodeAt(pos);
23
+ if ((value & 0xfc00) === 0xdc00) pos++;
24
+ }
25
+ }
26
+ return length;
27
+ }
28
+
29
+ "use strict";export const validateArtifactV1 = validate10;const schema11 = {"$id":"dharta://artifact-runtime/artifact_v1","$ref":"dharta://artifact-runtime#/$defs/artifact_v1"};const schema13 = {"type":"object","required":["contract_version","key","kind","title","entrypoint","dependencies"],"properties":{"contract_version":{"const":1,"x-dharta-error":"artifact_contract_version_invalid"},"key":{"type":"string","minLength":1},"kind":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"entrypoint":{"type":"string","minLength":1},"dependencies":{"type":"array","items":{"type":"object"}},"suggested_surface":{"type":"string","minLength":1}},"additionalProperties":true,"x-dharta-error":"artifact_v1_invalid"};const func2 = ucs2length;function validate10(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="dharta://artifact-runtime/artifact_v1" */;let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.contract_version === undefined){const err0 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_v1/required",keyword:"required",params:{missingProperty: "contract_version"}};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.key === undefined){const err1 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_v1/required",keyword:"required",params:{missingProperty: "key"}};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.kind === undefined){const err2 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_v1/required",keyword:"required",params:{missingProperty: "kind"}};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.title === undefined){const err3 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_v1/required",keyword:"required",params:{missingProperty: "title"}};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.entrypoint === undefined){const err4 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_v1/required",keyword:"required",params:{missingProperty: "entrypoint"}};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.dependencies === undefined){const err5 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_v1/required",keyword:"required",params:{missingProperty: "dependencies"}};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data.contract_version !== undefined){if(1 !== data.contract_version){const err6 = {instancePath:instancePath+"/contract_version",schemaPath:"dharta://artifact-runtime#/$defs/artifact_v1/properties/contract_version/const",keyword:"const",params:{allowedValue: 1}};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.key !== undefined){let data1 = data.key;if(typeof data1 === "string"){if(func2(data1) < 1){const err7 = {instancePath:instancePath+"/key",schemaPath:"dharta://artifact-runtime#/$defs/artifact_v1/properties/key/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}else {const err8 = {instancePath:instancePath+"/key",schemaPath:"dharta://artifact-runtime#/$defs/artifact_v1/properties/key/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.kind !== undefined){let data2 = data.kind;if(typeof data2 === "string"){if(func2(data2) < 1){const err9 = {instancePath:instancePath+"/kind",schemaPath:"dharta://artifact-runtime#/$defs/artifact_v1/properties/kind/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}else {const err10 = {instancePath:instancePath+"/kind",schemaPath:"dharta://artifact-runtime#/$defs/artifact_v1/properties/kind/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.title !== undefined){let data3 = data.title;if(typeof data3 === "string"){if(func2(data3) < 1){const err11 = {instancePath:instancePath+"/title",schemaPath:"dharta://artifact-runtime#/$defs/artifact_v1/properties/title/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/title",schemaPath:"dharta://artifact-runtime#/$defs/artifact_v1/properties/title/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data.entrypoint !== undefined){let data4 = data.entrypoint;if(typeof data4 === "string"){if(func2(data4) < 1){const err13 = {instancePath:instancePath+"/entrypoint",schemaPath:"dharta://artifact-runtime#/$defs/artifact_v1/properties/entrypoint/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}else {const err14 = {instancePath:instancePath+"/entrypoint",schemaPath:"dharta://artifact-runtime#/$defs/artifact_v1/properties/entrypoint/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data.dependencies !== undefined){let data5 = data.dependencies;if(Array.isArray(data5)){const len0 = data5.length;for(let i0=0; i0<len0; i0++){let data6 = data5[i0];if(!(data6 && typeof data6 == "object" && !Array.isArray(data6))){const err15 = {instancePath:instancePath+"/dependencies/" + i0,schemaPath:"dharta://artifact-runtime#/$defs/artifact_v1/properties/dependencies/items/type",keyword:"type",params:{type: "object"}};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}else {const err16 = {instancePath:instancePath+"/dependencies",schemaPath:"dharta://artifact-runtime#/$defs/artifact_v1/properties/dependencies/type",keyword:"type",params:{type: "array"}};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data.suggested_surface !== undefined){let data7 = data.suggested_surface;if(typeof data7 === "string"){if(func2(data7) < 1){const err17 = {instancePath:instancePath+"/suggested_surface",schemaPath:"dharta://artifact-runtime#/$defs/artifact_v1/properties/suggested_surface/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}else {const err18 = {instancePath:instancePath+"/suggested_surface",schemaPath:"dharta://artifact-runtime#/$defs/artifact_v1/properties/suggested_surface/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}}else {const err19 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_v1/type",keyword:"type",params:{type: "object"}};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}validate10.errors = vErrors;return errors === 0;}export const validateArtifactV2 = validate12;const schema14 = {"$id":"dharta://artifact-runtime/artifact_v2","$ref":"dharta://artifact-runtime#/$defs/artifact_v2"};const schema15 = {"type":"object","additionalProperties":false,"required":["contract_version","id","title","root","inputs"],"allOf":[{"oneOf":[{"required":["entry"],"not":{"required":["run"]}},{"required":["run"],"not":{"required":["entry"]}}],"x-dharta-error":"artifact_presentation_invalid"},{"if":{"required":["agent_activation"]},"then":{"properties":{"run":{"const":"karta artifact run agent .","x-dharta-error":"artifact_agent_activation_runner_required"}},"required":["run"]},"x-dharta-error":"artifact_agent_activation_runner_required"}],"properties":{"contract_version":{"const":2,"x-dharta-error":"artifact_contract_version_invalid"},"id":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$","x-dharta-error":"artifact_id_invalid"},"title":{"type":"string","minLength":1,"maxLength":200,"pattern":"^(?!.*[\\uD800-\\uDFFF]).+$","x-dharta-error":"artifact_title_invalid"},"type_id":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$","x-dharta-error":"artifact_type_id_invalid"},"root":{"type":"string","minLength":1,"maxLength":1024,"pattern":"^(?!.*[\\uD800-\\uDFFF])(?!/)(?!.*\\\\)(?!.*//)(?!\\.\\.?(?:$|/))(?!.*[/]\\.\\.?(?:$|/))(?!\\.dharta/inputs(?:/|$))[^\\u0000/]+(?:/[^\\u0000/]+)*$","x-dharta-error":"artifact_root_invalid"},"entry":{"type":"string","minLength":1,"maxLength":1024,"pattern":"^(?!.*[\\uD800-\\uDFFF])(?!/)(?!.*\\\\)(?!.*//)(?!\\.\\.?(?:$|/))(?!.*[/]\\.\\.?(?:$|/))[^\\u0000/]+(?:/[^\\u0000/]+)*$","x-dharta-error":"artifact_entry_invalid"},"run":{"type":"string","minLength":1,"maxLength":16384,"pattern":"^(?!.*[\\uD800-\\uDFFF])[^\\u0000]+$","x-dharta-error":"artifact_run_invalid"},"agent_activation":{"$ref":"#/$defs/agent_activation_v1"},"inputs":{"type":"object","maxProperties":64,"propertyNames":{"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$","x-dharta-error":"artifact_input_alias_invalid"},"additionalProperties":{"$ref":"#/$defs/input_v2"},"x-dharta-error":"artifact_inputs_invalid"}},"x-dharta-error":"artifact_v2_invalid"};const schema16 = {"type":"object","additionalProperties":false,"required":["authorities","budget_cents","lifetime_seconds","descendant_ceiling","activation_mode","visibility"],"properties":{"authorities":{"type":"array","maxItems":32,"uniqueItems":true,"items":{"type":"string","pattern":"^[a-z][a-z0-9_.:-]{0,127}$"}},"budget_cents":{"type":"integer","minimum":0,"maximum":10000},"lifetime_seconds":{"type":"integer","minimum":1,"maximum":86400},"descendant_ceiling":{"type":"integer","minimum":0,"maximum":8},"activation_mode":{"enum":["resume","new"]},"visibility":{"enum":["headless","inspectable","user-facing"]}},"x-dharta-error":"artifact_agent_activation_invalid"};const schema17 = {"type":"object","additionalProperties":false,"required":["source","freshness"],"properties":{"source":{"type":"string","maxLength":2048,"pattern":"^workspace:(?!.*[\\uD800-\\uDFFF])(?!/)(?!.*\\\\)(?!.*//)(?!\\.\\.?(?:$|/))(?!.*[/]\\.\\.?(?:$|/))[^\\u0000/]+(?:/[^\\u0000/]+)*$","x-dharta-error":"artifact_input_source_invalid"},"freshness":{"enum":["pinned","follow"],"x-dharta-error":"artifact_input_freshness_required"}},"x-dharta-error":"artifact_input_invalid"};const func7 = Object.prototype.hasOwnProperty;const pattern0 = new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$", "u");const pattern1 = new RegExp("^(?!.*[\\uD800-\\uDFFF]).+$", "u");const pattern2 = new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$", "u");const pattern3 = new RegExp("^(?!.*[\\uD800-\\uDFFF])(?!/)(?!.*\\\\)(?!.*//)(?!\\.\\.?(?:$|/))(?!.*[/]\\.\\.?(?:$|/))(?!\\.dharta/inputs(?:/|$))[^\\u0000/]+(?:/[^\\u0000/]+)*$", "u");const pattern4 = new RegExp("^(?!.*[\\uD800-\\uDFFF])(?!/)(?!.*\\\\)(?!.*//)(?!\\.\\.?(?:$|/))(?!.*[/]\\.\\.?(?:$|/))[^\\u0000/]+(?:/[^\\u0000/]+)*$", "u");const pattern5 = new RegExp("^(?!.*[\\uD800-\\uDFFF])[^\\u0000]+$", "u");const pattern6 = new RegExp("^[a-z][a-z0-9_.:-]{0,127}$", "u");const pattern8 = new RegExp("^workspace:(?!.*[\\uD800-\\uDFFF])(?!/)(?!.*\\\\)(?!.*//)(?!\\.\\.?(?:$|/))(?!.*[/]\\.\\.?(?:$|/))[^\\u0000/]+(?:/[^\\u0000/]+)*$", "u");function validate13(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs2 = errors;let valid1 = false;let passing0 = null;const _errs3 = errors;const _errs4 = errors;const _errs5 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.run === undefined) && (missing0 = "run")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}var valid2 = _errs5 === errors;if(valid2){const err1 = {instancePath,schemaPath:"#/allOf/0/oneOf/0/not",keyword:"not",params:{}};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}else {errors = _errs4;if(vErrors !== null){if(_errs4){vErrors.length = _errs4;}else {vErrors = null;}}}if(data && typeof data == "object" && !Array.isArray(data)){if(data.entry === undefined){const err2 = {instancePath,schemaPath:"#/allOf/0/oneOf/0/required",keyword:"required",params:{missingProperty: "entry"}};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}var _valid0 = _errs3 === errors;if(_valid0){valid1 = true;passing0 = 0;}const _errs6 = errors;const _errs7 = errors;const _errs8 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((data.entry === undefined) && (missing1 = "entry")){const err3 = {};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}var valid3 = _errs8 === errors;if(valid3){const err4 = {instancePath,schemaPath:"#/allOf/0/oneOf/1/not",keyword:"not",params:{}};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}else {errors = _errs7;if(vErrors !== null){if(_errs7){vErrors.length = _errs7;}else {vErrors = null;}}}if(data && typeof data == "object" && !Array.isArray(data)){if(data.run === undefined){const err5 = {instancePath,schemaPath:"#/allOf/0/oneOf/1/required",keyword:"required",params:{missingProperty: "run"}};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs6 === errors;if(_valid0 && valid1){valid1 = false;passing0 = [passing0, 1];}else {if(_valid0){valid1 = true;passing0 = 1;}}if(!valid1){const err6 = {instancePath,schemaPath:"#/allOf/0/oneOf",keyword:"oneOf",params:{passingSchemas: passing0}};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}}const _errs10 = errors;let valid4 = true;const _errs11 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing2;if((data.agent_activation === undefined) && (missing2 = "agent_activation")){const err7 = {};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}var _valid1 = _errs11 === errors;errors = _errs10;if(vErrors !== null){if(_errs10){vErrors.length = _errs10;}else {vErrors = null;}}if(_valid1){const _errs12 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.run === undefined){const err8 = {instancePath,schemaPath:"#/allOf/1/then/required",keyword:"required",params:{missingProperty: "run"}};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data.run !== undefined){if("karta artifact run agent ." !== data.run){const err9 = {instancePath:instancePath+"/run",schemaPath:"#/allOf/1/then/properties/run/const",keyword:"const",params:{allowedValue: "karta artifact run agent ."}};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}}var _valid1 = _errs12 === errors;valid4 = _valid1;}if(!valid4){const err10 = {instancePath,schemaPath:"#/allOf/1/if",keyword:"if",params:{failingKeyword: "then"}};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.contract_version === undefined){const err11 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "contract_version"}};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if(data.id === undefined){const err12 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"}};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(data.title === undefined){const err13 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "title"}};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}if(data.root === undefined){const err14 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "root"}};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}if(data.inputs === undefined){const err15 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "inputs"}};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}for(const key0 in data){if(!(func7.call(schema15.properties, key0))){const err16 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0}};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data.contract_version !== undefined){if(2 !== data.contract_version){const err17 = {instancePath:instancePath+"/contract_version",schemaPath:"#/properties/contract_version/const",keyword:"const",params:{allowedValue: 2}};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.id !== undefined){let data2 = data.id;if(typeof data2 === "string"){if(!pattern0.test(data2)){const err18 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"}};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}else {const err19 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}if(data.title !== undefined){let data3 = data.title;if(typeof data3 === "string"){if(func2(data3) > 200){const err20 = {instancePath:instancePath+"/title",schemaPath:"#/properties/title/maxLength",keyword:"maxLength",params:{limit: 200}};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}if(func2(data3) < 1){const err21 = {instancePath:instancePath+"/title",schemaPath:"#/properties/title/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}if(!pattern1.test(data3)){const err22 = {instancePath:instancePath+"/title",schemaPath:"#/properties/title/pattern",keyword:"pattern",params:{pattern: "^(?!.*[\\uD800-\\uDFFF]).+$"}};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}else {const err23 = {instancePath:instancePath+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}if(data.type_id !== undefined){let data4 = data.type_id;if(typeof data4 === "string"){if(!pattern2.test(data4)){const err24 = {instancePath:instancePath+"/type_id",schemaPath:"#/properties/type_id/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"}};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}else {const err25 = {instancePath:instancePath+"/type_id",schemaPath:"#/properties/type_id/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}if(data.root !== undefined){let data5 = data.root;if(typeof data5 === "string"){if(func2(data5) > 1024){const err26 = {instancePath:instancePath+"/root",schemaPath:"#/properties/root/maxLength",keyword:"maxLength",params:{limit: 1024}};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}if(func2(data5) < 1){const err27 = {instancePath:instancePath+"/root",schemaPath:"#/properties/root/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}if(!pattern3.test(data5)){const err28 = {instancePath:instancePath+"/root",schemaPath:"#/properties/root/pattern",keyword:"pattern",params:{pattern: "^(?!.*[\\uD800-\\uDFFF])(?!/)(?!.*\\\\)(?!.*//)(?!\\.\\.?(?:$|/))(?!.*[/]\\.\\.?(?:$|/))(?!\\.dharta/inputs(?:/|$))[^\\u0000/]+(?:/[^\\u0000/]+)*$"}};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}else {const err29 = {instancePath:instancePath+"/root",schemaPath:"#/properties/root/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}}if(data.entry !== undefined){let data6 = data.entry;if(typeof data6 === "string"){if(func2(data6) > 1024){const err30 = {instancePath:instancePath+"/entry",schemaPath:"#/properties/entry/maxLength",keyword:"maxLength",params:{limit: 1024}};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}if(func2(data6) < 1){const err31 = {instancePath:instancePath+"/entry",schemaPath:"#/properties/entry/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}if(!pattern4.test(data6)){const err32 = {instancePath:instancePath+"/entry",schemaPath:"#/properties/entry/pattern",keyword:"pattern",params:{pattern: "^(?!.*[\\uD800-\\uDFFF])(?!/)(?!.*\\\\)(?!.*//)(?!\\.\\.?(?:$|/))(?!.*[/]\\.\\.?(?:$|/))[^\\u0000/]+(?:/[^\\u0000/]+)*$"}};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}else {const err33 = {instancePath:instancePath+"/entry",schemaPath:"#/properties/entry/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}if(data.run !== undefined){let data7 = data.run;if(typeof data7 === "string"){if(func2(data7) > 16384){const err34 = {instancePath:instancePath+"/run",schemaPath:"#/properties/run/maxLength",keyword:"maxLength",params:{limit: 16384}};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}if(func2(data7) < 1){const err35 = {instancePath:instancePath+"/run",schemaPath:"#/properties/run/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}if(!pattern5.test(data7)){const err36 = {instancePath:instancePath+"/run",schemaPath:"#/properties/run/pattern",keyword:"pattern",params:{pattern: "^(?!.*[\\uD800-\\uDFFF])[^\\u0000]+$"}};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}else {const err37 = {instancePath:instancePath+"/run",schemaPath:"#/properties/run/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}if(data.agent_activation !== undefined){let data8 = data.agent_activation;if(data8 && typeof data8 == "object" && !Array.isArray(data8)){if(data8.authorities === undefined){const err38 = {instancePath:instancePath+"/agent_activation",schemaPath:"#/$defs/agent_activation_v1/required",keyword:"required",params:{missingProperty: "authorities"}};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}if(data8.budget_cents === undefined){const err39 = {instancePath:instancePath+"/agent_activation",schemaPath:"#/$defs/agent_activation_v1/required",keyword:"required",params:{missingProperty: "budget_cents"}};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}if(data8.lifetime_seconds === undefined){const err40 = {instancePath:instancePath+"/agent_activation",schemaPath:"#/$defs/agent_activation_v1/required",keyword:"required",params:{missingProperty: "lifetime_seconds"}};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}if(data8.descendant_ceiling === undefined){const err41 = {instancePath:instancePath+"/agent_activation",schemaPath:"#/$defs/agent_activation_v1/required",keyword:"required",params:{missingProperty: "descendant_ceiling"}};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}if(data8.activation_mode === undefined){const err42 = {instancePath:instancePath+"/agent_activation",schemaPath:"#/$defs/agent_activation_v1/required",keyword:"required",params:{missingProperty: "activation_mode"}};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}if(data8.visibility === undefined){const err43 = {instancePath:instancePath+"/agent_activation",schemaPath:"#/$defs/agent_activation_v1/required",keyword:"required",params:{missingProperty: "visibility"}};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}for(const key1 in data8){if(!((((((key1 === "authorities") || (key1 === "budget_cents")) || (key1 === "lifetime_seconds")) || (key1 === "descendant_ceiling")) || (key1 === "activation_mode")) || (key1 === "visibility"))){const err44 = {instancePath:instancePath+"/agent_activation",schemaPath:"#/$defs/agent_activation_v1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1}};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}if(data8.authorities !== undefined){let data9 = data8.authorities;if(Array.isArray(data9)){if(data9.length > 32){const err45 = {instancePath:instancePath+"/agent_activation/authorities",schemaPath:"#/$defs/agent_activation_v1/properties/authorities/maxItems",keyword:"maxItems",params:{limit: 32}};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}const len0 = data9.length;for(let i0=0; i0<len0; i0++){let data10 = data9[i0];if(typeof data10 === "string"){if(!pattern6.test(data10)){const err46 = {instancePath:instancePath+"/agent_activation/authorities/" + i0,schemaPath:"#/$defs/agent_activation_v1/properties/authorities/items/pattern",keyword:"pattern",params:{pattern: "^[a-z][a-z0-9_.:-]{0,127}$"}};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}else {const err47 = {instancePath:instancePath+"/agent_activation/authorities/" + i0,schemaPath:"#/$defs/agent_activation_v1/properties/authorities/items/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}let i1 = data9.length;let j0;if(i1 > 1){const indices0 = {};for(;i1--;){let item0 = data9[i1];if(typeof item0 !== "string"){continue;}if(typeof indices0[item0] == "number"){j0 = indices0[item0];const err48 = {instancePath:instancePath+"/agent_activation/authorities",schemaPath:"#/$defs/agent_activation_v1/properties/authorities/uniqueItems",keyword:"uniqueItems",params:{i: i1, j: j0}};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;break;}indices0[item0] = i1;}}}else {const err49 = {instancePath:instancePath+"/agent_activation/authorities",schemaPath:"#/$defs/agent_activation_v1/properties/authorities/type",keyword:"type",params:{type: "array"}};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}}if(data8.budget_cents !== undefined){let data11 = data8.budget_cents;if(!((typeof data11 == "number") && (!(data11 % 1) && !isNaN(data11)))){const err50 = {instancePath:instancePath+"/agent_activation/budget_cents",schemaPath:"#/$defs/agent_activation_v1/properties/budget_cents/type",keyword:"type",params:{type: "integer"}};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}if(typeof data11 == "number"){if(data11 > 10000 || isNaN(data11)){const err51 = {instancePath:instancePath+"/agent_activation/budget_cents",schemaPath:"#/$defs/agent_activation_v1/properties/budget_cents/maximum",keyword:"maximum",params:{comparison: "<=", limit: 10000}};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}if(data11 < 0 || isNaN(data11)){const err52 = {instancePath:instancePath+"/agent_activation/budget_cents",schemaPath:"#/$defs/agent_activation_v1/properties/budget_cents/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0}};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}}if(data8.lifetime_seconds !== undefined){let data12 = data8.lifetime_seconds;if(!((typeof data12 == "number") && (!(data12 % 1) && !isNaN(data12)))){const err53 = {instancePath:instancePath+"/agent_activation/lifetime_seconds",schemaPath:"#/$defs/agent_activation_v1/properties/lifetime_seconds/type",keyword:"type",params:{type: "integer"}};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}if(typeof data12 == "number"){if(data12 > 86400 || isNaN(data12)){const err54 = {instancePath:instancePath+"/agent_activation/lifetime_seconds",schemaPath:"#/$defs/agent_activation_v1/properties/lifetime_seconds/maximum",keyword:"maximum",params:{comparison: "<=", limit: 86400}};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}if(data12 < 1 || isNaN(data12)){const err55 = {instancePath:instancePath+"/agent_activation/lifetime_seconds",schemaPath:"#/$defs/agent_activation_v1/properties/lifetime_seconds/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1}};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}}}if(data8.descendant_ceiling !== undefined){let data13 = data8.descendant_ceiling;if(!((typeof data13 == "number") && (!(data13 % 1) && !isNaN(data13)))){const err56 = {instancePath:instancePath+"/agent_activation/descendant_ceiling",schemaPath:"#/$defs/agent_activation_v1/properties/descendant_ceiling/type",keyword:"type",params:{type: "integer"}};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}if(typeof data13 == "number"){if(data13 > 8 || isNaN(data13)){const err57 = {instancePath:instancePath+"/agent_activation/descendant_ceiling",schemaPath:"#/$defs/agent_activation_v1/properties/descendant_ceiling/maximum",keyword:"maximum",params:{comparison: "<=", limit: 8}};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}if(data13 < 0 || isNaN(data13)){const err58 = {instancePath:instancePath+"/agent_activation/descendant_ceiling",schemaPath:"#/$defs/agent_activation_v1/properties/descendant_ceiling/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0}};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}}}if(data8.activation_mode !== undefined){let data14 = data8.activation_mode;if(!((data14 === "resume") || (data14 === "new"))){const err59 = {instancePath:instancePath+"/agent_activation/activation_mode",schemaPath:"#/$defs/agent_activation_v1/properties/activation_mode/enum",keyword:"enum",params:{allowedValues: schema16.properties.activation_mode.enum}};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}}if(data8.visibility !== undefined){let data15 = data8.visibility;if(!(((data15 === "headless") || (data15 === "inspectable")) || (data15 === "user-facing"))){const err60 = {instancePath:instancePath+"/agent_activation/visibility",schemaPath:"#/$defs/agent_activation_v1/properties/visibility/enum",keyword:"enum",params:{allowedValues: schema16.properties.visibility.enum}};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}}}else {const err61 = {instancePath:instancePath+"/agent_activation",schemaPath:"#/$defs/agent_activation_v1/type",keyword:"type",params:{type: "object"}};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}}if(data.inputs !== undefined){let data16 = data.inputs;if(data16 && typeof data16 == "object" && !Array.isArray(data16)){if(Object.keys(data16).length > 64){const err62 = {instancePath:instancePath+"/inputs",schemaPath:"#/properties/inputs/maxProperties",keyword:"maxProperties",params:{limit: 64}};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}for(const key2 in data16){const _errs46 = errors;if(typeof key2 === "string"){if(!pattern2.test(key2)){const err63 = {instancePath:instancePath+"/inputs",schemaPath:"#/properties/inputs/propertyNames/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"},propertyName:key2};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}}var valid12 = _errs46 === errors;if(!valid12){const err64 = {instancePath:instancePath+"/inputs",schemaPath:"#/properties/inputs/propertyNames",keyword:"propertyNames",params:{propertyName: key2}};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}}for(const key3 in data16){let data17 = data16[key3];if(data17 && typeof data17 == "object" && !Array.isArray(data17)){if(data17.source === undefined){const err65 = {instancePath:instancePath+"/inputs/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/$defs/input_v2/required",keyword:"required",params:{missingProperty: "source"}};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}if(data17.freshness === undefined){const err66 = {instancePath:instancePath+"/inputs/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/$defs/input_v2/required",keyword:"required",params:{missingProperty: "freshness"}};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}for(const key4 in data17){if(!((key4 === "source") || (key4 === "freshness"))){const err67 = {instancePath:instancePath+"/inputs/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/$defs/input_v2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4}};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}}if(data17.source !== undefined){let data18 = data17.source;if(typeof data18 === "string"){if(func2(data18) > 2048){const err68 = {instancePath:instancePath+"/inputs/" + key3.replace(/~/g, "~0").replace(/\//g, "~1")+"/source",schemaPath:"#/$defs/input_v2/properties/source/maxLength",keyword:"maxLength",params:{limit: 2048}};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}if(!pattern8.test(data18)){const err69 = {instancePath:instancePath+"/inputs/" + key3.replace(/~/g, "~0").replace(/\//g, "~1")+"/source",schemaPath:"#/$defs/input_v2/properties/source/pattern",keyword:"pattern",params:{pattern: "^workspace:(?!.*[\\uD800-\\uDFFF])(?!/)(?!.*\\\\)(?!.*//)(?!\\.\\.?(?:$|/))(?!.*[/]\\.\\.?(?:$|/))[^\\u0000/]+(?:/[^\\u0000/]+)*$"}};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}}else {const err70 = {instancePath:instancePath+"/inputs/" + key3.replace(/~/g, "~0").replace(/\//g, "~1")+"/source",schemaPath:"#/$defs/input_v2/properties/source/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}}if(data17.freshness !== undefined){let data19 = data17.freshness;if(!((data19 === "pinned") || (data19 === "follow"))){const err71 = {instancePath:instancePath+"/inputs/" + key3.replace(/~/g, "~0").replace(/\//g, "~1")+"/freshness",schemaPath:"#/$defs/input_v2/properties/freshness/enum",keyword:"enum",params:{allowedValues: schema17.properties.freshness.enum}};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}}}else {const err72 = {instancePath:instancePath+"/inputs/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/$defs/input_v2/type",keyword:"type",params:{type: "object"}};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}}}else {const err73 = {instancePath:instancePath+"/inputs",schemaPath:"#/properties/inputs/type",keyword:"type",params:{type: "object"}};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}}}else {const err74 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"}};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}validate13.errors = vErrors;return errors === 0;}function validate12(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="dharta://artifact-runtime/artifact_v2" */;let vErrors = null;let errors = 0;if(!(validate13(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors);errors = vErrors.length;}validate12.errors = vErrors;return errors === 0;}export const validateArtifactManifestDocument = validate15;const schema18 = {"$id":"dharta://artifact-runtime/manifest_document","$ref":"dharta://artifact-runtime#/$defs/manifest_document"};const schema19 = {"type":"object","additionalProperties":false,"required":["schema","artifacts"],"properties":{"schema":{"const":2,"x-dharta-error":"artifact_document_schema_invalid"},"artifacts":{"type":"array","maxItems":256,"items":{"oneOf":[{"$ref":"#/$defs/artifact_v1"},{"$ref":"#/$defs/artifact_v2"}]},"x-dharta-error":"artifact_document_invalid"}},"x-dharta-error":"artifact_document_invalid"};function validate17(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs2 = errors;let valid1 = false;let passing0 = null;const _errs3 = errors;const _errs4 = errors;const _errs5 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.run === undefined) && (missing0 = "run")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}var valid2 = _errs5 === errors;if(valid2){const err1 = {instancePath,schemaPath:"#/allOf/0/oneOf/0/not",keyword:"not",params:{}};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}else {errors = _errs4;if(vErrors !== null){if(_errs4){vErrors.length = _errs4;}else {vErrors = null;}}}if(data && typeof data == "object" && !Array.isArray(data)){if(data.entry === undefined){const err2 = {instancePath,schemaPath:"#/allOf/0/oneOf/0/required",keyword:"required",params:{missingProperty: "entry"}};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}var _valid0 = _errs3 === errors;if(_valid0){valid1 = true;passing0 = 0;}const _errs6 = errors;const _errs7 = errors;const _errs8 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((data.entry === undefined) && (missing1 = "entry")){const err3 = {};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}var valid3 = _errs8 === errors;if(valid3){const err4 = {instancePath,schemaPath:"#/allOf/0/oneOf/1/not",keyword:"not",params:{}};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}else {errors = _errs7;if(vErrors !== null){if(_errs7){vErrors.length = _errs7;}else {vErrors = null;}}}if(data && typeof data == "object" && !Array.isArray(data)){if(data.run === undefined){const err5 = {instancePath,schemaPath:"#/allOf/0/oneOf/1/required",keyword:"required",params:{missingProperty: "run"}};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs6 === errors;if(_valid0 && valid1){valid1 = false;passing0 = [passing0, 1];}else {if(_valid0){valid1 = true;passing0 = 1;}}if(!valid1){const err6 = {instancePath,schemaPath:"#/allOf/0/oneOf",keyword:"oneOf",params:{passingSchemas: passing0}};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}}const _errs10 = errors;let valid4 = true;const _errs11 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing2;if((data.agent_activation === undefined) && (missing2 = "agent_activation")){const err7 = {};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}var _valid1 = _errs11 === errors;errors = _errs10;if(vErrors !== null){if(_errs10){vErrors.length = _errs10;}else {vErrors = null;}}if(_valid1){const _errs12 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.run === undefined){const err8 = {instancePath,schemaPath:"#/allOf/1/then/required",keyword:"required",params:{missingProperty: "run"}};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data.run !== undefined){if("karta artifact run agent ." !== data.run){const err9 = {instancePath:instancePath+"/run",schemaPath:"#/allOf/1/then/properties/run/const",keyword:"const",params:{allowedValue: "karta artifact run agent ."}};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}}var _valid1 = _errs12 === errors;valid4 = _valid1;}if(!valid4){const err10 = {instancePath,schemaPath:"#/allOf/1/if",keyword:"if",params:{failingKeyword: "then"}};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.contract_version === undefined){const err11 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "contract_version"}};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if(data.id === undefined){const err12 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"}};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(data.title === undefined){const err13 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "title"}};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}if(data.root === undefined){const err14 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "root"}};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}if(data.inputs === undefined){const err15 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "inputs"}};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}for(const key0 in data){if(!(func7.call(schema15.properties, key0))){const err16 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0}};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data.contract_version !== undefined){if(2 !== data.contract_version){const err17 = {instancePath:instancePath+"/contract_version",schemaPath:"#/properties/contract_version/const",keyword:"const",params:{allowedValue: 2}};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.id !== undefined){let data2 = data.id;if(typeof data2 === "string"){if(!pattern0.test(data2)){const err18 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"}};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}else {const err19 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}if(data.title !== undefined){let data3 = data.title;if(typeof data3 === "string"){if(func2(data3) > 200){const err20 = {instancePath:instancePath+"/title",schemaPath:"#/properties/title/maxLength",keyword:"maxLength",params:{limit: 200}};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}if(func2(data3) < 1){const err21 = {instancePath:instancePath+"/title",schemaPath:"#/properties/title/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}if(!pattern1.test(data3)){const err22 = {instancePath:instancePath+"/title",schemaPath:"#/properties/title/pattern",keyword:"pattern",params:{pattern: "^(?!.*[\\uD800-\\uDFFF]).+$"}};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}else {const err23 = {instancePath:instancePath+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}if(data.type_id !== undefined){let data4 = data.type_id;if(typeof data4 === "string"){if(!pattern2.test(data4)){const err24 = {instancePath:instancePath+"/type_id",schemaPath:"#/properties/type_id/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"}};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}else {const err25 = {instancePath:instancePath+"/type_id",schemaPath:"#/properties/type_id/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}if(data.root !== undefined){let data5 = data.root;if(typeof data5 === "string"){if(func2(data5) > 1024){const err26 = {instancePath:instancePath+"/root",schemaPath:"#/properties/root/maxLength",keyword:"maxLength",params:{limit: 1024}};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}if(func2(data5) < 1){const err27 = {instancePath:instancePath+"/root",schemaPath:"#/properties/root/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}if(!pattern3.test(data5)){const err28 = {instancePath:instancePath+"/root",schemaPath:"#/properties/root/pattern",keyword:"pattern",params:{pattern: "^(?!.*[\\uD800-\\uDFFF])(?!/)(?!.*\\\\)(?!.*//)(?!\\.\\.?(?:$|/))(?!.*[/]\\.\\.?(?:$|/))(?!\\.dharta/inputs(?:/|$))[^\\u0000/]+(?:/[^\\u0000/]+)*$"}};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}else {const err29 = {instancePath:instancePath+"/root",schemaPath:"#/properties/root/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}}if(data.entry !== undefined){let data6 = data.entry;if(typeof data6 === "string"){if(func2(data6) > 1024){const err30 = {instancePath:instancePath+"/entry",schemaPath:"#/properties/entry/maxLength",keyword:"maxLength",params:{limit: 1024}};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}if(func2(data6) < 1){const err31 = {instancePath:instancePath+"/entry",schemaPath:"#/properties/entry/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}if(!pattern4.test(data6)){const err32 = {instancePath:instancePath+"/entry",schemaPath:"#/properties/entry/pattern",keyword:"pattern",params:{pattern: "^(?!.*[\\uD800-\\uDFFF])(?!/)(?!.*\\\\)(?!.*//)(?!\\.\\.?(?:$|/))(?!.*[/]\\.\\.?(?:$|/))[^\\u0000/]+(?:/[^\\u0000/]+)*$"}};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}else {const err33 = {instancePath:instancePath+"/entry",schemaPath:"#/properties/entry/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}if(data.run !== undefined){let data7 = data.run;if(typeof data7 === "string"){if(func2(data7) > 16384){const err34 = {instancePath:instancePath+"/run",schemaPath:"#/properties/run/maxLength",keyword:"maxLength",params:{limit: 16384}};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}if(func2(data7) < 1){const err35 = {instancePath:instancePath+"/run",schemaPath:"#/properties/run/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}if(!pattern5.test(data7)){const err36 = {instancePath:instancePath+"/run",schemaPath:"#/properties/run/pattern",keyword:"pattern",params:{pattern: "^(?!.*[\\uD800-\\uDFFF])[^\\u0000]+$"}};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}else {const err37 = {instancePath:instancePath+"/run",schemaPath:"#/properties/run/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}if(data.agent_activation !== undefined){let data8 = data.agent_activation;if(data8 && typeof data8 == "object" && !Array.isArray(data8)){if(data8.authorities === undefined){const err38 = {instancePath:instancePath+"/agent_activation",schemaPath:"#/$defs/agent_activation_v1/required",keyword:"required",params:{missingProperty: "authorities"}};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}if(data8.budget_cents === undefined){const err39 = {instancePath:instancePath+"/agent_activation",schemaPath:"#/$defs/agent_activation_v1/required",keyword:"required",params:{missingProperty: "budget_cents"}};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}if(data8.lifetime_seconds === undefined){const err40 = {instancePath:instancePath+"/agent_activation",schemaPath:"#/$defs/agent_activation_v1/required",keyword:"required",params:{missingProperty: "lifetime_seconds"}};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}if(data8.descendant_ceiling === undefined){const err41 = {instancePath:instancePath+"/agent_activation",schemaPath:"#/$defs/agent_activation_v1/required",keyword:"required",params:{missingProperty: "descendant_ceiling"}};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}if(data8.activation_mode === undefined){const err42 = {instancePath:instancePath+"/agent_activation",schemaPath:"#/$defs/agent_activation_v1/required",keyword:"required",params:{missingProperty: "activation_mode"}};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}if(data8.visibility === undefined){const err43 = {instancePath:instancePath+"/agent_activation",schemaPath:"#/$defs/agent_activation_v1/required",keyword:"required",params:{missingProperty: "visibility"}};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}for(const key1 in data8){if(!((((((key1 === "authorities") || (key1 === "budget_cents")) || (key1 === "lifetime_seconds")) || (key1 === "descendant_ceiling")) || (key1 === "activation_mode")) || (key1 === "visibility"))){const err44 = {instancePath:instancePath+"/agent_activation",schemaPath:"#/$defs/agent_activation_v1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1}};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}if(data8.authorities !== undefined){let data9 = data8.authorities;if(Array.isArray(data9)){if(data9.length > 32){const err45 = {instancePath:instancePath+"/agent_activation/authorities",schemaPath:"#/$defs/agent_activation_v1/properties/authorities/maxItems",keyword:"maxItems",params:{limit: 32}};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}const len0 = data9.length;for(let i0=0; i0<len0; i0++){let data10 = data9[i0];if(typeof data10 === "string"){if(!pattern6.test(data10)){const err46 = {instancePath:instancePath+"/agent_activation/authorities/" + i0,schemaPath:"#/$defs/agent_activation_v1/properties/authorities/items/pattern",keyword:"pattern",params:{pattern: "^[a-z][a-z0-9_.:-]{0,127}$"}};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}else {const err47 = {instancePath:instancePath+"/agent_activation/authorities/" + i0,schemaPath:"#/$defs/agent_activation_v1/properties/authorities/items/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}let i1 = data9.length;let j0;if(i1 > 1){const indices0 = {};for(;i1--;){let item0 = data9[i1];if(typeof item0 !== "string"){continue;}if(typeof indices0[item0] == "number"){j0 = indices0[item0];const err48 = {instancePath:instancePath+"/agent_activation/authorities",schemaPath:"#/$defs/agent_activation_v1/properties/authorities/uniqueItems",keyword:"uniqueItems",params:{i: i1, j: j0}};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;break;}indices0[item0] = i1;}}}else {const err49 = {instancePath:instancePath+"/agent_activation/authorities",schemaPath:"#/$defs/agent_activation_v1/properties/authorities/type",keyword:"type",params:{type: "array"}};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}}if(data8.budget_cents !== undefined){let data11 = data8.budget_cents;if(!((typeof data11 == "number") && (!(data11 % 1) && !isNaN(data11)))){const err50 = {instancePath:instancePath+"/agent_activation/budget_cents",schemaPath:"#/$defs/agent_activation_v1/properties/budget_cents/type",keyword:"type",params:{type: "integer"}};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}if(typeof data11 == "number"){if(data11 > 10000 || isNaN(data11)){const err51 = {instancePath:instancePath+"/agent_activation/budget_cents",schemaPath:"#/$defs/agent_activation_v1/properties/budget_cents/maximum",keyword:"maximum",params:{comparison: "<=", limit: 10000}};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}if(data11 < 0 || isNaN(data11)){const err52 = {instancePath:instancePath+"/agent_activation/budget_cents",schemaPath:"#/$defs/agent_activation_v1/properties/budget_cents/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0}};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}}if(data8.lifetime_seconds !== undefined){let data12 = data8.lifetime_seconds;if(!((typeof data12 == "number") && (!(data12 % 1) && !isNaN(data12)))){const err53 = {instancePath:instancePath+"/agent_activation/lifetime_seconds",schemaPath:"#/$defs/agent_activation_v1/properties/lifetime_seconds/type",keyword:"type",params:{type: "integer"}};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}if(typeof data12 == "number"){if(data12 > 86400 || isNaN(data12)){const err54 = {instancePath:instancePath+"/agent_activation/lifetime_seconds",schemaPath:"#/$defs/agent_activation_v1/properties/lifetime_seconds/maximum",keyword:"maximum",params:{comparison: "<=", limit: 86400}};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}if(data12 < 1 || isNaN(data12)){const err55 = {instancePath:instancePath+"/agent_activation/lifetime_seconds",schemaPath:"#/$defs/agent_activation_v1/properties/lifetime_seconds/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1}};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}}}if(data8.descendant_ceiling !== undefined){let data13 = data8.descendant_ceiling;if(!((typeof data13 == "number") && (!(data13 % 1) && !isNaN(data13)))){const err56 = {instancePath:instancePath+"/agent_activation/descendant_ceiling",schemaPath:"#/$defs/agent_activation_v1/properties/descendant_ceiling/type",keyword:"type",params:{type: "integer"}};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}if(typeof data13 == "number"){if(data13 > 8 || isNaN(data13)){const err57 = {instancePath:instancePath+"/agent_activation/descendant_ceiling",schemaPath:"#/$defs/agent_activation_v1/properties/descendant_ceiling/maximum",keyword:"maximum",params:{comparison: "<=", limit: 8}};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}if(data13 < 0 || isNaN(data13)){const err58 = {instancePath:instancePath+"/agent_activation/descendant_ceiling",schemaPath:"#/$defs/agent_activation_v1/properties/descendant_ceiling/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0}};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}}}if(data8.activation_mode !== undefined){let data14 = data8.activation_mode;if(!((data14 === "resume") || (data14 === "new"))){const err59 = {instancePath:instancePath+"/agent_activation/activation_mode",schemaPath:"#/$defs/agent_activation_v1/properties/activation_mode/enum",keyword:"enum",params:{allowedValues: schema16.properties.activation_mode.enum}};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}}if(data8.visibility !== undefined){let data15 = data8.visibility;if(!(((data15 === "headless") || (data15 === "inspectable")) || (data15 === "user-facing"))){const err60 = {instancePath:instancePath+"/agent_activation/visibility",schemaPath:"#/$defs/agent_activation_v1/properties/visibility/enum",keyword:"enum",params:{allowedValues: schema16.properties.visibility.enum}};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}}}else {const err61 = {instancePath:instancePath+"/agent_activation",schemaPath:"#/$defs/agent_activation_v1/type",keyword:"type",params:{type: "object"}};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}}if(data.inputs !== undefined){let data16 = data.inputs;if(data16 && typeof data16 == "object" && !Array.isArray(data16)){if(Object.keys(data16).length > 64){const err62 = {instancePath:instancePath+"/inputs",schemaPath:"#/properties/inputs/maxProperties",keyword:"maxProperties",params:{limit: 64}};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}for(const key2 in data16){const _errs46 = errors;if(typeof key2 === "string"){if(!pattern2.test(key2)){const err63 = {instancePath:instancePath+"/inputs",schemaPath:"#/properties/inputs/propertyNames/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"},propertyName:key2};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}}var valid12 = _errs46 === errors;if(!valid12){const err64 = {instancePath:instancePath+"/inputs",schemaPath:"#/properties/inputs/propertyNames",keyword:"propertyNames",params:{propertyName: key2}};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}}for(const key3 in data16){let data17 = data16[key3];if(data17 && typeof data17 == "object" && !Array.isArray(data17)){if(data17.source === undefined){const err65 = {instancePath:instancePath+"/inputs/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/$defs/input_v2/required",keyword:"required",params:{missingProperty: "source"}};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}if(data17.freshness === undefined){const err66 = {instancePath:instancePath+"/inputs/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/$defs/input_v2/required",keyword:"required",params:{missingProperty: "freshness"}};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}for(const key4 in data17){if(!((key4 === "source") || (key4 === "freshness"))){const err67 = {instancePath:instancePath+"/inputs/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/$defs/input_v2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4}};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}}if(data17.source !== undefined){let data18 = data17.source;if(typeof data18 === "string"){if(func2(data18) > 2048){const err68 = {instancePath:instancePath+"/inputs/" + key3.replace(/~/g, "~0").replace(/\//g, "~1")+"/source",schemaPath:"#/$defs/input_v2/properties/source/maxLength",keyword:"maxLength",params:{limit: 2048}};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}if(!pattern8.test(data18)){const err69 = {instancePath:instancePath+"/inputs/" + key3.replace(/~/g, "~0").replace(/\//g, "~1")+"/source",schemaPath:"#/$defs/input_v2/properties/source/pattern",keyword:"pattern",params:{pattern: "^workspace:(?!.*[\\uD800-\\uDFFF])(?!/)(?!.*\\\\)(?!.*//)(?!\\.\\.?(?:$|/))(?!.*[/]\\.\\.?(?:$|/))[^\\u0000/]+(?:/[^\\u0000/]+)*$"}};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}}else {const err70 = {instancePath:instancePath+"/inputs/" + key3.replace(/~/g, "~0").replace(/\//g, "~1")+"/source",schemaPath:"#/$defs/input_v2/properties/source/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}}if(data17.freshness !== undefined){let data19 = data17.freshness;if(!((data19 === "pinned") || (data19 === "follow"))){const err71 = {instancePath:instancePath+"/inputs/" + key3.replace(/~/g, "~0").replace(/\//g, "~1")+"/freshness",schemaPath:"#/$defs/input_v2/properties/freshness/enum",keyword:"enum",params:{allowedValues: schema17.properties.freshness.enum}};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}}}else {const err72 = {instancePath:instancePath+"/inputs/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/$defs/input_v2/type",keyword:"type",params:{type: "object"}};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}}}else {const err73 = {instancePath:instancePath+"/inputs",schemaPath:"#/properties/inputs/type",keyword:"type",params:{type: "object"}};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}}}else {const err74 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"}};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}validate17.errors = vErrors;return errors === 0;}function validate16(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.schema === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schema"}};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.artifacts === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "artifacts"}};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "schema") || (key0 === "artifacts"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0}};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.schema !== undefined){if(2 !== data.schema){const err3 = {instancePath:instancePath+"/schema",schemaPath:"#/properties/schema/const",keyword:"const",params:{allowedValue: 2}};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.artifacts !== undefined){let data1 = data.artifacts;if(Array.isArray(data1)){if(data1.length > 256){const err4 = {instancePath:instancePath+"/artifacts",schemaPath:"#/properties/artifacts/maxItems",keyword:"maxItems",params:{limit: 256}};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}const len0 = data1.length;for(let i0=0; i0<len0; i0++){let data2 = data1[i0];const _errs6 = errors;let valid3 = false;let passing0 = null;const _errs7 = errors;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){if(data2.contract_version === undefined){const err5 = {instancePath:instancePath+"/artifacts/" + i0,schemaPath:"#/$defs/artifact_v1/required",keyword:"required",params:{missingProperty: "contract_version"}};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data2.key === undefined){const err6 = {instancePath:instancePath+"/artifacts/" + i0,schemaPath:"#/$defs/artifact_v1/required",keyword:"required",params:{missingProperty: "key"}};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data2.kind === undefined){const err7 = {instancePath:instancePath+"/artifacts/" + i0,schemaPath:"#/$defs/artifact_v1/required",keyword:"required",params:{missingProperty: "kind"}};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data2.title === undefined){const err8 = {instancePath:instancePath+"/artifacts/" + i0,schemaPath:"#/$defs/artifact_v1/required",keyword:"required",params:{missingProperty: "title"}};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data2.entrypoint === undefined){const err9 = {instancePath:instancePath+"/artifacts/" + i0,schemaPath:"#/$defs/artifact_v1/required",keyword:"required",params:{missingProperty: "entrypoint"}};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(data2.dependencies === undefined){const err10 = {instancePath:instancePath+"/artifacts/" + i0,schemaPath:"#/$defs/artifact_v1/required",keyword:"required",params:{missingProperty: "dependencies"}};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if(data2.contract_version !== undefined){if(1 !== data2.contract_version){const err11 = {instancePath:instancePath+"/artifacts/" + i0+"/contract_version",schemaPath:"#/$defs/artifact_v1/properties/contract_version/const",keyword:"const",params:{allowedValue: 1}};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data2.key !== undefined){let data4 = data2.key;if(typeof data4 === "string"){if(func2(data4) < 1){const err12 = {instancePath:instancePath+"/artifacts/" + i0+"/key",schemaPath:"#/$defs/artifact_v1/properties/key/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}else {const err13 = {instancePath:instancePath+"/artifacts/" + i0+"/key",schemaPath:"#/$defs/artifact_v1/properties/key/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data2.kind !== undefined){let data5 = data2.kind;if(typeof data5 === "string"){if(func2(data5) < 1){const err14 = {instancePath:instancePath+"/artifacts/" + i0+"/kind",schemaPath:"#/$defs/artifact_v1/properties/kind/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/artifacts/" + i0+"/kind",schemaPath:"#/$defs/artifact_v1/properties/kind/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data2.title !== undefined){let data6 = data2.title;if(typeof data6 === "string"){if(func2(data6) < 1){const err16 = {instancePath:instancePath+"/artifacts/" + i0+"/title",schemaPath:"#/$defs/artifact_v1/properties/title/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}else {const err17 = {instancePath:instancePath+"/artifacts/" + i0+"/title",schemaPath:"#/$defs/artifact_v1/properties/title/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data2.entrypoint !== undefined){let data7 = data2.entrypoint;if(typeof data7 === "string"){if(func2(data7) < 1){const err18 = {instancePath:instancePath+"/artifacts/" + i0+"/entrypoint",schemaPath:"#/$defs/artifact_v1/properties/entrypoint/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}else {const err19 = {instancePath:instancePath+"/artifacts/" + i0+"/entrypoint",schemaPath:"#/$defs/artifact_v1/properties/entrypoint/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}if(data2.dependencies !== undefined){let data8 = data2.dependencies;if(Array.isArray(data8)){const len1 = data8.length;for(let i1=0; i1<len1; i1++){let data9 = data8[i1];if(!(data9 && typeof data9 == "object" && !Array.isArray(data9))){const err20 = {instancePath:instancePath+"/artifacts/" + i0+"/dependencies/" + i1,schemaPath:"#/$defs/artifact_v1/properties/dependencies/items/type",keyword:"type",params:{type: "object"}};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}}else {const err21 = {instancePath:instancePath+"/artifacts/" + i0+"/dependencies",schemaPath:"#/$defs/artifact_v1/properties/dependencies/type",keyword:"type",params:{type: "array"}};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(data2.suggested_surface !== undefined){let data10 = data2.suggested_surface;if(typeof data10 === "string"){if(func2(data10) < 1){const err22 = {instancePath:instancePath+"/artifacts/" + i0+"/suggested_surface",schemaPath:"#/$defs/artifact_v1/properties/suggested_surface/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}else {const err23 = {instancePath:instancePath+"/artifacts/" + i0+"/suggested_surface",schemaPath:"#/$defs/artifact_v1/properties/suggested_surface/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}}else {const err24 = {instancePath:instancePath+"/artifacts/" + i0,schemaPath:"#/$defs/artifact_v1/type",keyword:"type",params:{type: "object"}};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}var _valid0 = _errs7 === errors;if(_valid0){valid3 = true;passing0 = 0;}const _errs26 = errors;if(!(validate17(data2, {instancePath:instancePath+"/artifacts/" + i0,parentData:data1,parentDataProperty:i0,rootData}))){vErrors = vErrors === null ? validate17.errors : vErrors.concat(validate17.errors);errors = vErrors.length;}var _valid0 = _errs26 === errors;if(_valid0 && valid3){valid3 = false;passing0 = [passing0, 1];}else {if(_valid0){valid3 = true;passing0 = 1;}}if(!valid3){const err25 = {instancePath:instancePath+"/artifacts/" + i0,schemaPath:"#/properties/artifacts/items/oneOf",keyword:"oneOf",params:{passingSchemas: passing0}};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}else {errors = _errs6;if(vErrors !== null){if(_errs6){vErrors.length = _errs6;}else {vErrors = null;}}}}}else {const err26 = {instancePath:instancePath+"/artifacts",schemaPath:"#/properties/artifacts/type",keyword:"type",params:{type: "array"}};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}}else {const err27 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"}};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}validate16.errors = vErrors;return errors === 0;}function validate15(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="dharta://artifact-runtime/manifest_document" */;let vErrors = null;let errors = 0;if(!(validate16(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate16.errors : vErrors.concat(validate16.errors);errors = vErrors.length;}validate15.errors = vErrors;return errors === 0;}export const validateArtifactSummaryV1 = validate20;const schema24 = {"$id":"dharta://artifact-runtime/artifact_summary_v1","$ref":"dharta://artifact-runtime#/$defs/artifact_summary_v1"};const schema25 = {"type":"object","additionalProperties":false,"required":["contract_version","artifact_id","artifact_version_id","key","kind","title","entrypoint","renderer","schema_version","portability","snapshot_id","member_count","total_bytes","publish_audiences"],"properties":{"contract_version":{"const":1},"artifact_id":{"type":"string","minLength":1},"artifact_version_id":{"type":"string","minLength":1},"key":{"type":"string","minLength":1},"kind":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"entrypoint":{"type":"string","minLength":1},"renderer":{"type":"string","minLength":1},"schema_version":{"type":"integer","minimum":1},"portability":{"enum":["static","explainable","forkable"]},"snapshot_id":{"type":"string","minLength":1},"member_count":{"type":"integer","minimum":0},"total_bytes":{"type":"integer","minimum":0},"publish_audiences":{"type":"array","items":{"enum":["public","link","organization","named"]}}}};function validate20(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="dharta://artifact-runtime/artifact_summary_v1" */;let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.contract_version === undefined){const err0 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/required",keyword:"required",params:{missingProperty: "contract_version"}};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.artifact_id === undefined){const err1 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/required",keyword:"required",params:{missingProperty: "artifact_id"}};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.artifact_version_id === undefined){const err2 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/required",keyword:"required",params:{missingProperty: "artifact_version_id"}};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.key === undefined){const err3 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/required",keyword:"required",params:{missingProperty: "key"}};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.kind === undefined){const err4 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/required",keyword:"required",params:{missingProperty: "kind"}};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.title === undefined){const err5 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/required",keyword:"required",params:{missingProperty: "title"}};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data.entrypoint === undefined){const err6 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/required",keyword:"required",params:{missingProperty: "entrypoint"}};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data.renderer === undefined){const err7 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/required",keyword:"required",params:{missingProperty: "renderer"}};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data.schema_version === undefined){const err8 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/required",keyword:"required",params:{missingProperty: "schema_version"}};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data.portability === undefined){const err9 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/required",keyword:"required",params:{missingProperty: "portability"}};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(data.snapshot_id === undefined){const err10 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/required",keyword:"required",params:{missingProperty: "snapshot_id"}};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if(data.member_count === undefined){const err11 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/required",keyword:"required",params:{missingProperty: "member_count"}};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if(data.total_bytes === undefined){const err12 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/required",keyword:"required",params:{missingProperty: "total_bytes"}};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(data.publish_audiences === undefined){const err13 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/required",keyword:"required",params:{missingProperty: "publish_audiences"}};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}for(const key0 in data){if(!(func7.call(schema25.properties, key0))){const err14 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0}};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data.contract_version !== undefined){if(1 !== data.contract_version){const err15 = {instancePath:instancePath+"/contract_version",schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/properties/contract_version/const",keyword:"const",params:{allowedValue: 1}};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data.artifact_id !== undefined){let data1 = data.artifact_id;if(typeof data1 === "string"){if(func2(data1) < 1){const err16 = {instancePath:instancePath+"/artifact_id",schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/properties/artifact_id/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}else {const err17 = {instancePath:instancePath+"/artifact_id",schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/properties/artifact_id/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.artifact_version_id !== undefined){let data2 = data.artifact_version_id;if(typeof data2 === "string"){if(func2(data2) < 1){const err18 = {instancePath:instancePath+"/artifact_version_id",schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/properties/artifact_version_id/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}else {const err19 = {instancePath:instancePath+"/artifact_version_id",schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/properties/artifact_version_id/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}if(data.key !== undefined){let data3 = data.key;if(typeof data3 === "string"){if(func2(data3) < 1){const err20 = {instancePath:instancePath+"/key",schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/properties/key/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}else {const err21 = {instancePath:instancePath+"/key",schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/properties/key/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(data.kind !== undefined){let data4 = data.kind;if(typeof data4 === "string"){if(func2(data4) < 1){const err22 = {instancePath:instancePath+"/kind",schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/properties/kind/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}else {const err23 = {instancePath:instancePath+"/kind",schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/properties/kind/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}if(data.title !== undefined){let data5 = data.title;if(typeof data5 === "string"){if(func2(data5) < 1){const err24 = {instancePath:instancePath+"/title",schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/properties/title/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}else {const err25 = {instancePath:instancePath+"/title",schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/properties/title/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}if(data.entrypoint !== undefined){let data6 = data.entrypoint;if(typeof data6 === "string"){if(func2(data6) < 1){const err26 = {instancePath:instancePath+"/entrypoint",schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/properties/entrypoint/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}else {const err27 = {instancePath:instancePath+"/entrypoint",schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/properties/entrypoint/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}}if(data.renderer !== undefined){let data7 = data.renderer;if(typeof data7 === "string"){if(func2(data7) < 1){const err28 = {instancePath:instancePath+"/renderer",schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/properties/renderer/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}else {const err29 = {instancePath:instancePath+"/renderer",schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/properties/renderer/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}}if(data.schema_version !== undefined){let data8 = data.schema_version;if(!((typeof data8 == "number") && (!(data8 % 1) && !isNaN(data8)))){const err30 = {instancePath:instancePath+"/schema_version",schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/properties/schema_version/type",keyword:"type",params:{type: "integer"}};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}if(typeof data8 == "number"){if(data8 < 1 || isNaN(data8)){const err31 = {instancePath:instancePath+"/schema_version",schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/properties/schema_version/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1}};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}}if(data.portability !== undefined){let data9 = data.portability;if(!(((data9 === "static") || (data9 === "explainable")) || (data9 === "forkable"))){const err32 = {instancePath:instancePath+"/portability",schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/properties/portability/enum",keyword:"enum",params:{allowedValues: schema25.properties.portability.enum}};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}if(data.snapshot_id !== undefined){let data10 = data.snapshot_id;if(typeof data10 === "string"){if(func2(data10) < 1){const err33 = {instancePath:instancePath+"/snapshot_id",schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/properties/snapshot_id/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}else {const err34 = {instancePath:instancePath+"/snapshot_id",schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/properties/snapshot_id/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}if(data.member_count !== undefined){let data11 = data.member_count;if(!((typeof data11 == "number") && (!(data11 % 1) && !isNaN(data11)))){const err35 = {instancePath:instancePath+"/member_count",schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/properties/member_count/type",keyword:"type",params:{type: "integer"}};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}if(typeof data11 == "number"){if(data11 < 0 || isNaN(data11)){const err36 = {instancePath:instancePath+"/member_count",schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/properties/member_count/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0}};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}}if(data.total_bytes !== undefined){let data12 = data.total_bytes;if(!((typeof data12 == "number") && (!(data12 % 1) && !isNaN(data12)))){const err37 = {instancePath:instancePath+"/total_bytes",schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/properties/total_bytes/type",keyword:"type",params:{type: "integer"}};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}if(typeof data12 == "number"){if(data12 < 0 || isNaN(data12)){const err38 = {instancePath:instancePath+"/total_bytes",schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/properties/total_bytes/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0}};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}}}if(data.publish_audiences !== undefined){let data13 = data.publish_audiences;if(Array.isArray(data13)){const len0 = data13.length;for(let i0=0; i0<len0; i0++){let data14 = data13[i0];if(!((((data14 === "public") || (data14 === "link")) || (data14 === "organization")) || (data14 === "named"))){const err39 = {instancePath:instancePath+"/publish_audiences/" + i0,schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/properties/publish_audiences/items/enum",keyword:"enum",params:{allowedValues: schema25.properties.publish_audiences.items.enum}};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}}}else {const err40 = {instancePath:instancePath+"/publish_audiences",schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/properties/publish_audiences/type",keyword:"type",params:{type: "array"}};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}}}else {const err41 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_summary_v1/type",keyword:"type",params:{type: "object"}};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}validate20.errors = vErrors;return errors === 0;}export const validateArtifactSummaryV2 = validate21;const schema26 = {"$id":"dharta://artifact-runtime/artifact_summary_v2","$ref":"dharta://artifact-runtime#/$defs/artifact_summary_v2"};const schema27 = {"type":"object","additionalProperties":false,"required":["contract_version","artifact_id","artifact_version_id","id","title","root","snapshot_id","member_count","total_bytes","inputs","publish_audiences"],"allOf":[{"oneOf":[{"required":["entry","renderer","presentation_availability"],"not":{"anyOf":[{"required":["run"]},{"required":["execution_availability"]},{"required":["execution_unavailable_reason"]}]}},{"required":["run","execution_availability"],"not":{"anyOf":[{"required":["entry"]},{"required":["renderer"]},{"required":["presentation_availability"]},{"required":["presentation_unavailable_reason"]}]}}]},{"if":{"required":["agent_activation"]},"then":{"properties":{"run":{"const":"karta artifact run agent ."}},"required":["run"]}}],"properties":{"contract_version":{"const":2},"artifact_id":{"type":"string","minLength":1},"artifact_version_id":{"type":"string","minLength":1},"id":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"},"title":{"type":"string","minLength":1},"root":{"type":"string","minLength":1},"entry":{"type":"string","minLength":1},"run":{"type":"string","minLength":1},"agent_activation":{"$ref":"#/$defs/agent_activation_v1"},"renderer":{"enum":["builtin.text","builtin.markdown","builtin.code","builtin.image","builtin.audio","builtin.video","builtin.csv","builtin.pdf","builtin.html","builtin.download"]},"type_id":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"},"snapshot_id":{"type":"string","minLength":1},"member_count":{"type":"integer","minimum":0},"total_bytes":{"type":"integer","minimum":0},"inputs":{"type":"array","items":{"$ref":"#/$defs/artifact_summary_input_v2"}},"presentation_availability":{"enum":["available","unavailable"]},"presentation_unavailable_reason":{"type":"string","minLength":1},"execution_availability":{"enum":["available","unavailable"]},"execution_unavailable_reason":{"type":"string","minLength":1},"publish_audiences":{"type":"array","items":{"enum":["public","link","organization","named"]}}}};const schema29 = {"type":"object","additionalProperties":false,"required":["alias","source","freshness","snapshot_id","kind","files","total_bytes"],"properties":{"alias":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"},"source":{"type":"string","maxLength":2048},"freshness":{"enum":["pinned","follow"]},"snapshot_id":{"type":"string","minLength":1},"kind":{"enum":["file","directory"]},"files":{"type":"integer","minimum":0},"total_bytes":{"type":"integer","minimum":0}}};function validate22(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs2 = errors;let valid1 = false;let passing0 = null;const _errs3 = errors;const _errs4 = errors;const _errs5 = errors;const _errs6 = errors;let valid3 = false;const _errs7 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.run === undefined) && (missing0 = "run")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}var _valid1 = _errs7 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs8 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((data.execution_availability === undefined) && (missing1 = "execution_availability")){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}var _valid1 = _errs8 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs9 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing2;if((data.execution_unavailable_reason === undefined) && (missing2 = "execution_unavailable_reason")){const err2 = {};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}var _valid1 = _errs9 === errors;valid3 = valid3 || _valid1;}}if(!valid3){const err3 = {};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}else {errors = _errs6;if(vErrors !== null){if(_errs6){vErrors.length = _errs6;}else {vErrors = null;}}}var valid2 = _errs5 === errors;if(valid2){const err4 = {instancePath,schemaPath:"#/allOf/0/oneOf/0/not",keyword:"not",params:{}};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}else {errors = _errs4;if(vErrors !== null){if(_errs4){vErrors.length = _errs4;}else {vErrors = null;}}}if(data && typeof data == "object" && !Array.isArray(data)){if(data.entry === undefined){const err5 = {instancePath,schemaPath:"#/allOf/0/oneOf/0/required",keyword:"required",params:{missingProperty: "entry"}};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data.renderer === undefined){const err6 = {instancePath,schemaPath:"#/allOf/0/oneOf/0/required",keyword:"required",params:{missingProperty: "renderer"}};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data.presentation_availability === undefined){const err7 = {instancePath,schemaPath:"#/allOf/0/oneOf/0/required",keyword:"required",params:{missingProperty: "presentation_availability"}};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}var _valid0 = _errs3 === errors;if(_valid0){valid1 = true;passing0 = 0;}const _errs10 = errors;const _errs11 = errors;const _errs12 = errors;const _errs13 = errors;let valid5 = false;const _errs14 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing3;if((data.entry === undefined) && (missing3 = "entry")){const err8 = {};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}var _valid2 = _errs14 === errors;valid5 = valid5 || _valid2;if(!valid5){const _errs15 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing4;if((data.renderer === undefined) && (missing4 = "renderer")){const err9 = {};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}var _valid2 = _errs15 === errors;valid5 = valid5 || _valid2;if(!valid5){const _errs16 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing5;if((data.presentation_availability === undefined) && (missing5 = "presentation_availability")){const err10 = {};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}var _valid2 = _errs16 === errors;valid5 = valid5 || _valid2;if(!valid5){const _errs17 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing6;if((data.presentation_unavailable_reason === undefined) && (missing6 = "presentation_unavailable_reason")){const err11 = {};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}var _valid2 = _errs17 === errors;valid5 = valid5 || _valid2;}}}if(!valid5){const err12 = {};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}else {errors = _errs13;if(vErrors !== null){if(_errs13){vErrors.length = _errs13;}else {vErrors = null;}}}var valid4 = _errs12 === errors;if(valid4){const err13 = {instancePath,schemaPath:"#/allOf/0/oneOf/1/not",keyword:"not",params:{}};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}else {errors = _errs11;if(vErrors !== null){if(_errs11){vErrors.length = _errs11;}else {vErrors = null;}}}if(data && typeof data == "object" && !Array.isArray(data)){if(data.run === undefined){const err14 = {instancePath,schemaPath:"#/allOf/0/oneOf/1/required",keyword:"required",params:{missingProperty: "run"}};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}if(data.execution_availability === undefined){const err15 = {instancePath,schemaPath:"#/allOf/0/oneOf/1/required",keyword:"required",params:{missingProperty: "execution_availability"}};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}var _valid0 = _errs10 === errors;if(_valid0 && valid1){valid1 = false;passing0 = [passing0, 1];}else {if(_valid0){valid1 = true;passing0 = 1;}}if(!valid1){const err16 = {instancePath,schemaPath:"#/allOf/0/oneOf",keyword:"oneOf",params:{passingSchemas: passing0}};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}else {errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}}const _errs19 = errors;let valid6 = true;const _errs20 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing7;if((data.agent_activation === undefined) && (missing7 = "agent_activation")){const err17 = {};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}var _valid3 = _errs20 === errors;errors = _errs19;if(vErrors !== null){if(_errs19){vErrors.length = _errs19;}else {vErrors = null;}}if(_valid3){const _errs21 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.run === undefined){const err18 = {instancePath,schemaPath:"#/allOf/1/then/required",keyword:"required",params:{missingProperty: "run"}};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(data.run !== undefined){if("karta artifact run agent ." !== data.run){const err19 = {instancePath:instancePath+"/run",schemaPath:"#/allOf/1/then/properties/run/const",keyword:"const",params:{allowedValue: "karta artifact run agent ."}};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}}var _valid3 = _errs21 === errors;valid6 = _valid3;}if(!valid6){const err20 = {instancePath,schemaPath:"#/allOf/1/if",keyword:"if",params:{failingKeyword: "then"}};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.contract_version === undefined){const err21 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "contract_version"}};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}if(data.artifact_id === undefined){const err22 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "artifact_id"}};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}if(data.artifact_version_id === undefined){const err23 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "artifact_version_id"}};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}if(data.id === undefined){const err24 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"}};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}if(data.title === undefined){const err25 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "title"}};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}if(data.root === undefined){const err26 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "root"}};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}if(data.snapshot_id === undefined){const err27 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "snapshot_id"}};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}if(data.member_count === undefined){const err28 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "member_count"}};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}if(data.total_bytes === undefined){const err29 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "total_bytes"}};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}if(data.inputs === undefined){const err30 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "inputs"}};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}if(data.publish_audiences === undefined){const err31 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "publish_audiences"}};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}for(const key0 in data){if(!(func7.call(schema27.properties, key0))){const err32 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0}};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}if(data.contract_version !== undefined){if(2 !== data.contract_version){const err33 = {instancePath:instancePath+"/contract_version",schemaPath:"#/properties/contract_version/const",keyword:"const",params:{allowedValue: 2}};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}if(data.artifact_id !== undefined){let data2 = data.artifact_id;if(typeof data2 === "string"){if(func2(data2) < 1){const err34 = {instancePath:instancePath+"/artifact_id",schemaPath:"#/properties/artifact_id/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}else {const err35 = {instancePath:instancePath+"/artifact_id",schemaPath:"#/properties/artifact_id/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}if(data.artifact_version_id !== undefined){let data3 = data.artifact_version_id;if(typeof data3 === "string"){if(func2(data3) < 1){const err36 = {instancePath:instancePath+"/artifact_version_id",schemaPath:"#/properties/artifact_version_id/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}else {const err37 = {instancePath:instancePath+"/artifact_version_id",schemaPath:"#/properties/artifact_version_id/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}if(data.id !== undefined){let data4 = data.id;if(typeof data4 === "string"){if(!pattern0.test(data4)){const err38 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"}};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}}else {const err39 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}}if(data.title !== undefined){let data5 = data.title;if(typeof data5 === "string"){if(func2(data5) < 1){const err40 = {instancePath:instancePath+"/title",schemaPath:"#/properties/title/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}}else {const err41 = {instancePath:instancePath+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}}if(data.root !== undefined){let data6 = data.root;if(typeof data6 === "string"){if(func2(data6) < 1){const err42 = {instancePath:instancePath+"/root",schemaPath:"#/properties/root/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}}else {const err43 = {instancePath:instancePath+"/root",schemaPath:"#/properties/root/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}}if(data.entry !== undefined){let data7 = data.entry;if(typeof data7 === "string"){if(func2(data7) < 1){const err44 = {instancePath:instancePath+"/entry",schemaPath:"#/properties/entry/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}else {const err45 = {instancePath:instancePath+"/entry",schemaPath:"#/properties/entry/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}if(data.run !== undefined){let data8 = data.run;if(typeof data8 === "string"){if(func2(data8) < 1){const err46 = {instancePath:instancePath+"/run",schemaPath:"#/properties/run/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}else {const err47 = {instancePath:instancePath+"/run",schemaPath:"#/properties/run/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}if(data.agent_activation !== undefined){let data9 = data.agent_activation;if(data9 && typeof data9 == "object" && !Array.isArray(data9)){if(data9.authorities === undefined){const err48 = {instancePath:instancePath+"/agent_activation",schemaPath:"#/$defs/agent_activation_v1/required",keyword:"required",params:{missingProperty: "authorities"}};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}if(data9.budget_cents === undefined){const err49 = {instancePath:instancePath+"/agent_activation",schemaPath:"#/$defs/agent_activation_v1/required",keyword:"required",params:{missingProperty: "budget_cents"}};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}if(data9.lifetime_seconds === undefined){const err50 = {instancePath:instancePath+"/agent_activation",schemaPath:"#/$defs/agent_activation_v1/required",keyword:"required",params:{missingProperty: "lifetime_seconds"}};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}if(data9.descendant_ceiling === undefined){const err51 = {instancePath:instancePath+"/agent_activation",schemaPath:"#/$defs/agent_activation_v1/required",keyword:"required",params:{missingProperty: "descendant_ceiling"}};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}if(data9.activation_mode === undefined){const err52 = {instancePath:instancePath+"/agent_activation",schemaPath:"#/$defs/agent_activation_v1/required",keyword:"required",params:{missingProperty: "activation_mode"}};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}if(data9.visibility === undefined){const err53 = {instancePath:instancePath+"/agent_activation",schemaPath:"#/$defs/agent_activation_v1/required",keyword:"required",params:{missingProperty: "visibility"}};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}for(const key1 in data9){if(!((((((key1 === "authorities") || (key1 === "budget_cents")) || (key1 === "lifetime_seconds")) || (key1 === "descendant_ceiling")) || (key1 === "activation_mode")) || (key1 === "visibility"))){const err54 = {instancePath:instancePath+"/agent_activation",schemaPath:"#/$defs/agent_activation_v1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1}};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}}if(data9.authorities !== undefined){let data10 = data9.authorities;if(Array.isArray(data10)){if(data10.length > 32){const err55 = {instancePath:instancePath+"/agent_activation/authorities",schemaPath:"#/$defs/agent_activation_v1/properties/authorities/maxItems",keyword:"maxItems",params:{limit: 32}};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}const len0 = data10.length;for(let i0=0; i0<len0; i0++){let data11 = data10[i0];if(typeof data11 === "string"){if(!pattern6.test(data11)){const err56 = {instancePath:instancePath+"/agent_activation/authorities/" + i0,schemaPath:"#/$defs/agent_activation_v1/properties/authorities/items/pattern",keyword:"pattern",params:{pattern: "^[a-z][a-z0-9_.:-]{0,127}$"}};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}}else {const err57 = {instancePath:instancePath+"/agent_activation/authorities/" + i0,schemaPath:"#/$defs/agent_activation_v1/properties/authorities/items/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}}let i1 = data10.length;let j0;if(i1 > 1){const indices0 = {};for(;i1--;){let item0 = data10[i1];if(typeof item0 !== "string"){continue;}if(typeof indices0[item0] == "number"){j0 = indices0[item0];const err58 = {instancePath:instancePath+"/agent_activation/authorities",schemaPath:"#/$defs/agent_activation_v1/properties/authorities/uniqueItems",keyword:"uniqueItems",params:{i: i1, j: j0}};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;break;}indices0[item0] = i1;}}}else {const err59 = {instancePath:instancePath+"/agent_activation/authorities",schemaPath:"#/$defs/agent_activation_v1/properties/authorities/type",keyword:"type",params:{type: "array"}};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}}if(data9.budget_cents !== undefined){let data12 = data9.budget_cents;if(!((typeof data12 == "number") && (!(data12 % 1) && !isNaN(data12)))){const err60 = {instancePath:instancePath+"/agent_activation/budget_cents",schemaPath:"#/$defs/agent_activation_v1/properties/budget_cents/type",keyword:"type",params:{type: "integer"}};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}if(typeof data12 == "number"){if(data12 > 10000 || isNaN(data12)){const err61 = {instancePath:instancePath+"/agent_activation/budget_cents",schemaPath:"#/$defs/agent_activation_v1/properties/budget_cents/maximum",keyword:"maximum",params:{comparison: "<=", limit: 10000}};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}if(data12 < 0 || isNaN(data12)){const err62 = {instancePath:instancePath+"/agent_activation/budget_cents",schemaPath:"#/$defs/agent_activation_v1/properties/budget_cents/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0}};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}}}if(data9.lifetime_seconds !== undefined){let data13 = data9.lifetime_seconds;if(!((typeof data13 == "number") && (!(data13 % 1) && !isNaN(data13)))){const err63 = {instancePath:instancePath+"/agent_activation/lifetime_seconds",schemaPath:"#/$defs/agent_activation_v1/properties/lifetime_seconds/type",keyword:"type",params:{type: "integer"}};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}if(typeof data13 == "number"){if(data13 > 86400 || isNaN(data13)){const err64 = {instancePath:instancePath+"/agent_activation/lifetime_seconds",schemaPath:"#/$defs/agent_activation_v1/properties/lifetime_seconds/maximum",keyword:"maximum",params:{comparison: "<=", limit: 86400}};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}if(data13 < 1 || isNaN(data13)){const err65 = {instancePath:instancePath+"/agent_activation/lifetime_seconds",schemaPath:"#/$defs/agent_activation_v1/properties/lifetime_seconds/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1}};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}}}if(data9.descendant_ceiling !== undefined){let data14 = data9.descendant_ceiling;if(!((typeof data14 == "number") && (!(data14 % 1) && !isNaN(data14)))){const err66 = {instancePath:instancePath+"/agent_activation/descendant_ceiling",schemaPath:"#/$defs/agent_activation_v1/properties/descendant_ceiling/type",keyword:"type",params:{type: "integer"}};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}if(typeof data14 == "number"){if(data14 > 8 || isNaN(data14)){const err67 = {instancePath:instancePath+"/agent_activation/descendant_ceiling",schemaPath:"#/$defs/agent_activation_v1/properties/descendant_ceiling/maximum",keyword:"maximum",params:{comparison: "<=", limit: 8}};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}if(data14 < 0 || isNaN(data14)){const err68 = {instancePath:instancePath+"/agent_activation/descendant_ceiling",schemaPath:"#/$defs/agent_activation_v1/properties/descendant_ceiling/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0}};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}}}if(data9.activation_mode !== undefined){let data15 = data9.activation_mode;if(!((data15 === "resume") || (data15 === "new"))){const err69 = {instancePath:instancePath+"/agent_activation/activation_mode",schemaPath:"#/$defs/agent_activation_v1/properties/activation_mode/enum",keyword:"enum",params:{allowedValues: schema16.properties.activation_mode.enum}};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}}if(data9.visibility !== undefined){let data16 = data9.visibility;if(!(((data16 === "headless") || (data16 === "inspectable")) || (data16 === "user-facing"))){const err70 = {instancePath:instancePath+"/agent_activation/visibility",schemaPath:"#/$defs/agent_activation_v1/properties/visibility/enum",keyword:"enum",params:{allowedValues: schema16.properties.visibility.enum}};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}}}else {const err71 = {instancePath:instancePath+"/agent_activation",schemaPath:"#/$defs/agent_activation_v1/type",keyword:"type",params:{type: "object"}};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}}if(data.renderer !== undefined){let data17 = data.renderer;if(!((((((((((data17 === "builtin.text") || (data17 === "builtin.markdown")) || (data17 === "builtin.code")) || (data17 === "builtin.image")) || (data17 === "builtin.audio")) || (data17 === "builtin.video")) || (data17 === "builtin.csv")) || (data17 === "builtin.pdf")) || (data17 === "builtin.html")) || (data17 === "builtin.download"))){const err72 = {instancePath:instancePath+"/renderer",schemaPath:"#/properties/renderer/enum",keyword:"enum",params:{allowedValues: schema27.properties.renderer.enum}};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}}if(data.type_id !== undefined){let data18 = data.type_id;if(typeof data18 === "string"){if(!pattern2.test(data18)){const err73 = {instancePath:instancePath+"/type_id",schemaPath:"#/properties/type_id/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"}};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}}else {const err74 = {instancePath:instancePath+"/type_id",schemaPath:"#/properties/type_id/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}}if(data.snapshot_id !== undefined){let data19 = data.snapshot_id;if(typeof data19 === "string"){if(func2(data19) < 1){const err75 = {instancePath:instancePath+"/snapshot_id",schemaPath:"#/properties/snapshot_id/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}}else {const err76 = {instancePath:instancePath+"/snapshot_id",schemaPath:"#/properties/snapshot_id/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}}if(data.member_count !== undefined){let data20 = data.member_count;if(!((typeof data20 == "number") && (!(data20 % 1) && !isNaN(data20)))){const err77 = {instancePath:instancePath+"/member_count",schemaPath:"#/properties/member_count/type",keyword:"type",params:{type: "integer"}};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}if(typeof data20 == "number"){if(data20 < 0 || isNaN(data20)){const err78 = {instancePath:instancePath+"/member_count",schemaPath:"#/properties/member_count/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0}};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}}}if(data.total_bytes !== undefined){let data21 = data.total_bytes;if(!((typeof data21 == "number") && (!(data21 % 1) && !isNaN(data21)))){const err79 = {instancePath:instancePath+"/total_bytes",schemaPath:"#/properties/total_bytes/type",keyword:"type",params:{type: "integer"}};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}if(typeof data21 == "number"){if(data21 < 0 || isNaN(data21)){const err80 = {instancePath:instancePath+"/total_bytes",schemaPath:"#/properties/total_bytes/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0}};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}}}if(data.inputs !== undefined){let data22 = data.inputs;if(Array.isArray(data22)){const len1 = data22.length;for(let i2=0; i2<len1; i2++){let data23 = data22[i2];if(data23 && typeof data23 == "object" && !Array.isArray(data23)){if(data23.alias === undefined){const err81 = {instancePath:instancePath+"/inputs/" + i2,schemaPath:"#/$defs/artifact_summary_input_v2/required",keyword:"required",params:{missingProperty: "alias"}};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}if(data23.source === undefined){const err82 = {instancePath:instancePath+"/inputs/" + i2,schemaPath:"#/$defs/artifact_summary_input_v2/required",keyword:"required",params:{missingProperty: "source"}};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}if(data23.freshness === undefined){const err83 = {instancePath:instancePath+"/inputs/" + i2,schemaPath:"#/$defs/artifact_summary_input_v2/required",keyword:"required",params:{missingProperty: "freshness"}};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;}if(data23.snapshot_id === undefined){const err84 = {instancePath:instancePath+"/inputs/" + i2,schemaPath:"#/$defs/artifact_summary_input_v2/required",keyword:"required",params:{missingProperty: "snapshot_id"}};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}if(data23.kind === undefined){const err85 = {instancePath:instancePath+"/inputs/" + i2,schemaPath:"#/$defs/artifact_summary_input_v2/required",keyword:"required",params:{missingProperty: "kind"}};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}if(data23.files === undefined){const err86 = {instancePath:instancePath+"/inputs/" + i2,schemaPath:"#/$defs/artifact_summary_input_v2/required",keyword:"required",params:{missingProperty: "files"}};if(vErrors === null){vErrors = [err86];}else {vErrors.push(err86);}errors++;}if(data23.total_bytes === undefined){const err87 = {instancePath:instancePath+"/inputs/" + i2,schemaPath:"#/$defs/artifact_summary_input_v2/required",keyword:"required",params:{missingProperty: "total_bytes"}};if(vErrors === null){vErrors = [err87];}else {vErrors.push(err87);}errors++;}for(const key2 in data23){if(!(((((((key2 === "alias") || (key2 === "source")) || (key2 === "freshness")) || (key2 === "snapshot_id")) || (key2 === "kind")) || (key2 === "files")) || (key2 === "total_bytes"))){const err88 = {instancePath:instancePath+"/inputs/" + i2,schemaPath:"#/$defs/artifact_summary_input_v2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2}};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;}}if(data23.alias !== undefined){let data24 = data23.alias;if(typeof data24 === "string"){if(!pattern2.test(data24)){const err89 = {instancePath:instancePath+"/inputs/" + i2+"/alias",schemaPath:"#/$defs/artifact_summary_input_v2/properties/alias/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"}};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}}else {const err90 = {instancePath:instancePath+"/inputs/" + i2+"/alias",schemaPath:"#/$defs/artifact_summary_input_v2/properties/alias/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}}if(data23.source !== undefined){let data25 = data23.source;if(typeof data25 === "string"){if(func2(data25) > 2048){const err91 = {instancePath:instancePath+"/inputs/" + i2+"/source",schemaPath:"#/$defs/artifact_summary_input_v2/properties/source/maxLength",keyword:"maxLength",params:{limit: 2048}};if(vErrors === null){vErrors = [err91];}else {vErrors.push(err91);}errors++;}}else {const err92 = {instancePath:instancePath+"/inputs/" + i2+"/source",schemaPath:"#/$defs/artifact_summary_input_v2/properties/source/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err92];}else {vErrors.push(err92);}errors++;}}if(data23.freshness !== undefined){let data26 = data23.freshness;if(!((data26 === "pinned") || (data26 === "follow"))){const err93 = {instancePath:instancePath+"/inputs/" + i2+"/freshness",schemaPath:"#/$defs/artifact_summary_input_v2/properties/freshness/enum",keyword:"enum",params:{allowedValues: schema29.properties.freshness.enum}};if(vErrors === null){vErrors = [err93];}else {vErrors.push(err93);}errors++;}}if(data23.snapshot_id !== undefined){let data27 = data23.snapshot_id;if(typeof data27 === "string"){if(func2(data27) < 1){const err94 = {instancePath:instancePath+"/inputs/" + i2+"/snapshot_id",schemaPath:"#/$defs/artifact_summary_input_v2/properties/snapshot_id/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err94];}else {vErrors.push(err94);}errors++;}}else {const err95 = {instancePath:instancePath+"/inputs/" + i2+"/snapshot_id",schemaPath:"#/$defs/artifact_summary_input_v2/properties/snapshot_id/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err95];}else {vErrors.push(err95);}errors++;}}if(data23.kind !== undefined){let data28 = data23.kind;if(!((data28 === "file") || (data28 === "directory"))){const err96 = {instancePath:instancePath+"/inputs/" + i2+"/kind",schemaPath:"#/$defs/artifact_summary_input_v2/properties/kind/enum",keyword:"enum",params:{allowedValues: schema29.properties.kind.enum}};if(vErrors === null){vErrors = [err96];}else {vErrors.push(err96);}errors++;}}if(data23.files !== undefined){let data29 = data23.files;if(!((typeof data29 == "number") && (!(data29 % 1) && !isNaN(data29)))){const err97 = {instancePath:instancePath+"/inputs/" + i2+"/files",schemaPath:"#/$defs/artifact_summary_input_v2/properties/files/type",keyword:"type",params:{type: "integer"}};if(vErrors === null){vErrors = [err97];}else {vErrors.push(err97);}errors++;}if(typeof data29 == "number"){if(data29 < 0 || isNaN(data29)){const err98 = {instancePath:instancePath+"/inputs/" + i2+"/files",schemaPath:"#/$defs/artifact_summary_input_v2/properties/files/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0}};if(vErrors === null){vErrors = [err98];}else {vErrors.push(err98);}errors++;}}}if(data23.total_bytes !== undefined){let data30 = data23.total_bytes;if(!((typeof data30 == "number") && (!(data30 % 1) && !isNaN(data30)))){const err99 = {instancePath:instancePath+"/inputs/" + i2+"/total_bytes",schemaPath:"#/$defs/artifact_summary_input_v2/properties/total_bytes/type",keyword:"type",params:{type: "integer"}};if(vErrors === null){vErrors = [err99];}else {vErrors.push(err99);}errors++;}if(typeof data30 == "number"){if(data30 < 0 || isNaN(data30)){const err100 = {instancePath:instancePath+"/inputs/" + i2+"/total_bytes",schemaPath:"#/$defs/artifact_summary_input_v2/properties/total_bytes/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0}};if(vErrors === null){vErrors = [err100];}else {vErrors.push(err100);}errors++;}}}}else {const err101 = {instancePath:instancePath+"/inputs/" + i2,schemaPath:"#/$defs/artifact_summary_input_v2/type",keyword:"type",params:{type: "object"}};if(vErrors === null){vErrors = [err101];}else {vErrors.push(err101);}errors++;}}}else {const err102 = {instancePath:instancePath+"/inputs",schemaPath:"#/properties/inputs/type",keyword:"type",params:{type: "array"}};if(vErrors === null){vErrors = [err102];}else {vErrors.push(err102);}errors++;}}if(data.presentation_availability !== undefined){let data31 = data.presentation_availability;if(!((data31 === "available") || (data31 === "unavailable"))){const err103 = {instancePath:instancePath+"/presentation_availability",schemaPath:"#/properties/presentation_availability/enum",keyword:"enum",params:{allowedValues: schema27.properties.presentation_availability.enum}};if(vErrors === null){vErrors = [err103];}else {vErrors.push(err103);}errors++;}}if(data.presentation_unavailable_reason !== undefined){let data32 = data.presentation_unavailable_reason;if(typeof data32 === "string"){if(func2(data32) < 1){const err104 = {instancePath:instancePath+"/presentation_unavailable_reason",schemaPath:"#/properties/presentation_unavailable_reason/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err104];}else {vErrors.push(err104);}errors++;}}else {const err105 = {instancePath:instancePath+"/presentation_unavailable_reason",schemaPath:"#/properties/presentation_unavailable_reason/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err105];}else {vErrors.push(err105);}errors++;}}if(data.execution_availability !== undefined){let data33 = data.execution_availability;if(!((data33 === "available") || (data33 === "unavailable"))){const err106 = {instancePath:instancePath+"/execution_availability",schemaPath:"#/properties/execution_availability/enum",keyword:"enum",params:{allowedValues: schema27.properties.execution_availability.enum}};if(vErrors === null){vErrors = [err106];}else {vErrors.push(err106);}errors++;}}if(data.execution_unavailable_reason !== undefined){let data34 = data.execution_unavailable_reason;if(typeof data34 === "string"){if(func2(data34) < 1){const err107 = {instancePath:instancePath+"/execution_unavailable_reason",schemaPath:"#/properties/execution_unavailable_reason/minLength",keyword:"minLength",params:{limit: 1}};if(vErrors === null){vErrors = [err107];}else {vErrors.push(err107);}errors++;}}else {const err108 = {instancePath:instancePath+"/execution_unavailable_reason",schemaPath:"#/properties/execution_unavailable_reason/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err108];}else {vErrors.push(err108);}errors++;}}if(data.publish_audiences !== undefined){let data35 = data.publish_audiences;if(Array.isArray(data35)){const len2 = data35.length;for(let i3=0; i3<len2; i3++){let data36 = data35[i3];if(!((((data36 === "public") || (data36 === "link")) || (data36 === "organization")) || (data36 === "named"))){const err109 = {instancePath:instancePath+"/publish_audiences/" + i3,schemaPath:"#/properties/publish_audiences/items/enum",keyword:"enum",params:{allowedValues: schema27.properties.publish_audiences.items.enum}};if(vErrors === null){vErrors = [err109];}else {vErrors.push(err109);}errors++;}}}else {const err110 = {instancePath:instancePath+"/publish_audiences",schemaPath:"#/properties/publish_audiences/type",keyword:"type",params:{type: "array"}};if(vErrors === null){vErrors = [err110];}else {vErrors.push(err110);}errors++;}}}else {const err111 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"}};if(vErrors === null){vErrors = [err111];}else {vErrors.push(err111);}errors++;}validate22.errors = vErrors;return errors === 0;}function validate21(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="dharta://artifact-runtime/artifact_summary_v2" */;let vErrors = null;let errors = 0;if(!(validate22(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors);errors = vErrors.length;}validate21.errors = vErrors;return errors === 0;}export const validateArtifactExecutionSession = validate24;const schema30 = {"$id":"dharta://artifact-runtime/artifact_execution_session","$ref":"dharta://artifact-runtime#/$defs/artifact_execution_session"};const schema31 = {"type":"object","additionalProperties":false,"required":["id","url","state","lease_expires_at","absolute_expires_at","cost_microusd","cost_state","metered_seconds","artifact_version_id","renewal_token"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"},"url":{"type":"string","format":"uri","pattern":"^https://"},"state":{"enum":["active","hidden"]},"lease_expires_at":{"type":"string","format":"date-time"},"absolute_expires_at":{"type":"string","format":"date-time"},"cost_microusd":{"type":"integer","minimum":0},"cost_state":{"enum":["pending","final"]},"metered_seconds":{"type":"integer","minimum":0},"artifact_version_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"renewal_token":{"type":"string","pattern":"^sfl_[A-Za-z0-9_-]{32,96}$"}}};const pattern23 = new RegExp("^https://", "u");const pattern24 = new RegExp("^[A-Za-z0-9_-]{1,64}$", "u");const pattern25 = new RegExp("^sfl_[A-Za-z0-9_-]{32,96}$", "u");const formats0 = wireFormats.uri;const formats2 = wireFormats["date-time"];function validate24(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="dharta://artifact-runtime/artifact_execution_session" */;let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/required",keyword:"required",params:{missingProperty: "id"}};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.url === undefined){const err1 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/required",keyword:"required",params:{missingProperty: "url"}};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.state === undefined){const err2 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/required",keyword:"required",params:{missingProperty: "state"}};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.lease_expires_at === undefined){const err3 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/required",keyword:"required",params:{missingProperty: "lease_expires_at"}};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.absolute_expires_at === undefined){const err4 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/required",keyword:"required",params:{missingProperty: "absolute_expires_at"}};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.cost_microusd === undefined){const err5 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/required",keyword:"required",params:{missingProperty: "cost_microusd"}};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data.cost_state === undefined){const err6 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/required",keyword:"required",params:{missingProperty: "cost_state"}};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data.metered_seconds === undefined){const err7 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/required",keyword:"required",params:{missingProperty: "metered_seconds"}};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data.artifact_version_id === undefined){const err8 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/required",keyword:"required",params:{missingProperty: "artifact_version_id"}};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data.renewal_token === undefined){const err9 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/required",keyword:"required",params:{missingProperty: "renewal_token"}};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}for(const key0 in data){if(!(func7.call(schema31.properties, key0))){const err10 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0}};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === "string"){if(!pattern0.test(data0)){const err11 = {instancePath:instancePath+"/id",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/properties/id/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"}};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/id",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/properties/id/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data.url !== undefined){let data1 = data.url;if(typeof data1 === "string"){if(!pattern23.test(data1)){const err13 = {instancePath:instancePath+"/url",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/properties/url/pattern",keyword:"pattern",params:{pattern: "^https://"}};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}if(!(formats0.validate(data1))){const err14 = {instancePath:instancePath+"/url",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/properties/url/format",keyword:"format",params:{format: "uri"}};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/url",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/properties/url/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data.state !== undefined){let data2 = data.state;if(!((data2 === "active") || (data2 === "hidden"))){const err16 = {instancePath:instancePath+"/state",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/properties/state/enum",keyword:"enum",params:{allowedValues: schema31.properties.state.enum}};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data.lease_expires_at !== undefined){let data3 = data.lease_expires_at;if(typeof data3 === "string"){if(!(formats2.validate(data3))){const err17 = {instancePath:instancePath+"/lease_expires_at",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/properties/lease_expires_at/format",keyword:"format",params:{format: "date-time"}};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}else {const err18 = {instancePath:instancePath+"/lease_expires_at",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/properties/lease_expires_at/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}if(data.absolute_expires_at !== undefined){let data4 = data.absolute_expires_at;if(typeof data4 === "string"){if(!(formats2.validate(data4))){const err19 = {instancePath:instancePath+"/absolute_expires_at",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/properties/absolute_expires_at/format",keyword:"format",params:{format: "date-time"}};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}else {const err20 = {instancePath:instancePath+"/absolute_expires_at",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/properties/absolute_expires_at/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(data.cost_microusd !== undefined){let data5 = data.cost_microusd;if(!((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5)))){const err21 = {instancePath:instancePath+"/cost_microusd",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/properties/cost_microusd/type",keyword:"type",params:{type: "integer"}};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}if(typeof data5 == "number"){if(data5 < 0 || isNaN(data5)){const err22 = {instancePath:instancePath+"/cost_microusd",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/properties/cost_microusd/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0}};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}}if(data.cost_state !== undefined){let data6 = data.cost_state;if(!((data6 === "pending") || (data6 === "final"))){const err23 = {instancePath:instancePath+"/cost_state",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/properties/cost_state/enum",keyword:"enum",params:{allowedValues: schema31.properties.cost_state.enum}};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}if(data.metered_seconds !== undefined){let data7 = data.metered_seconds;if(!((typeof data7 == "number") && (!(data7 % 1) && !isNaN(data7)))){const err24 = {instancePath:instancePath+"/metered_seconds",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/properties/metered_seconds/type",keyword:"type",params:{type: "integer"}};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}if(typeof data7 == "number"){if(data7 < 0 || isNaN(data7)){const err25 = {instancePath:instancePath+"/metered_seconds",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/properties/metered_seconds/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0}};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}}if(data.artifact_version_id !== undefined){let data8 = data.artifact_version_id;if(typeof data8 === "string"){if(!pattern24.test(data8)){const err26 = {instancePath:instancePath+"/artifact_version_id",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/properties/artifact_version_id/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z0-9_-]{1,64}$"}};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}else {const err27 = {instancePath:instancePath+"/artifact_version_id",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/properties/artifact_version_id/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}}if(data.renewal_token !== undefined){let data9 = data.renewal_token;if(typeof data9 === "string"){if(!pattern25.test(data9)){const err28 = {instancePath:instancePath+"/renewal_token",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/properties/renewal_token/pattern",keyword:"pattern",params:{pattern: "^sfl_[A-Za-z0-9_-]{32,96}$"}};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}else {const err29 = {instancePath:instancePath+"/renewal_token",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/properties/renewal_token/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}}}else {const err30 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_session/type",keyword:"type",params:{type: "object"}};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}validate24.errors = vErrors;return errors === 0;}export const validateArtifactExecutionRenewal = validate25;const schema32 = {"$id":"dharta://artifact-runtime/artifact_execution_renewal","$ref":"dharta://artifact-runtime#/$defs/artifact_execution_renewal"};const schema33 = {"type":"object","additionalProperties":false,"required":["id","state","lease_expires_at","absolute_expires_at","cost_microusd","cost_state","metered_seconds","handoff"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"},"state":{"enum":["active","hidden"]},"lease_expires_at":{"type":"string","format":"date-time"},"absolute_expires_at":{"type":"string","format":"date-time"},"cost_microusd":{"type":"integer","minimum":0},"cost_state":{"enum":["pending","final"]},"metered_seconds":{"type":"integer","minimum":0},"handoff":{"type":"string","pattern":"^aat_[A-Za-z0-9_-]{39,1996}$"}}};const pattern27 = new RegExp("^aat_[A-Za-z0-9_-]{39,1996}$", "u");function validate25(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="dharta://artifact-runtime/artifact_execution_renewal" */;let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_renewal/required",keyword:"required",params:{missingProperty: "id"}};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.state === undefined){const err1 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_renewal/required",keyword:"required",params:{missingProperty: "state"}};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.lease_expires_at === undefined){const err2 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_renewal/required",keyword:"required",params:{missingProperty: "lease_expires_at"}};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.absolute_expires_at === undefined){const err3 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_renewal/required",keyword:"required",params:{missingProperty: "absolute_expires_at"}};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.cost_microusd === undefined){const err4 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_renewal/required",keyword:"required",params:{missingProperty: "cost_microusd"}};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.cost_state === undefined){const err5 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_renewal/required",keyword:"required",params:{missingProperty: "cost_state"}};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data.metered_seconds === undefined){const err6 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_renewal/required",keyword:"required",params:{missingProperty: "metered_seconds"}};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data.handoff === undefined){const err7 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_renewal/required",keyword:"required",params:{missingProperty: "handoff"}};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}for(const key0 in data){if(!((((((((key0 === "id") || (key0 === "state")) || (key0 === "lease_expires_at")) || (key0 === "absolute_expires_at")) || (key0 === "cost_microusd")) || (key0 === "cost_state")) || (key0 === "metered_seconds")) || (key0 === "handoff"))){const err8 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_renewal/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0}};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === "string"){if(!pattern0.test(data0)){const err9 = {instancePath:instancePath+"/id",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_renewal/properties/id/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"}};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}else {const err10 = {instancePath:instancePath+"/id",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_renewal/properties/id/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.state !== undefined){let data1 = data.state;if(!((data1 === "active") || (data1 === "hidden"))){const err11 = {instancePath:instancePath+"/state",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_renewal/properties/state/enum",keyword:"enum",params:{allowedValues: schema33.properties.state.enum}};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.lease_expires_at !== undefined){let data2 = data.lease_expires_at;if(typeof data2 === "string"){if(!(formats2.validate(data2))){const err12 = {instancePath:instancePath+"/lease_expires_at",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_renewal/properties/lease_expires_at/format",keyword:"format",params:{format: "date-time"}};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}else {const err13 = {instancePath:instancePath+"/lease_expires_at",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_renewal/properties/lease_expires_at/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data.absolute_expires_at !== undefined){let data3 = data.absolute_expires_at;if(typeof data3 === "string"){if(!(formats2.validate(data3))){const err14 = {instancePath:instancePath+"/absolute_expires_at",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_renewal/properties/absolute_expires_at/format",keyword:"format",params:{format: "date-time"}};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/absolute_expires_at",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_renewal/properties/absolute_expires_at/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data.cost_microusd !== undefined){let data4 = data.cost_microusd;if(!((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4)))){const err16 = {instancePath:instancePath+"/cost_microusd",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_renewal/properties/cost_microusd/type",keyword:"type",params:{type: "integer"}};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}if(typeof data4 == "number"){if(data4 < 0 || isNaN(data4)){const err17 = {instancePath:instancePath+"/cost_microusd",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_renewal/properties/cost_microusd/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0}};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}}if(data.cost_state !== undefined){let data5 = data.cost_state;if(!((data5 === "pending") || (data5 === "final"))){const err18 = {instancePath:instancePath+"/cost_state",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_renewal/properties/cost_state/enum",keyword:"enum",params:{allowedValues: schema33.properties.cost_state.enum}};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}if(data.metered_seconds !== undefined){let data6 = data.metered_seconds;if(!((typeof data6 == "number") && (!(data6 % 1) && !isNaN(data6)))){const err19 = {instancePath:instancePath+"/metered_seconds",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_renewal/properties/metered_seconds/type",keyword:"type",params:{type: "integer"}};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}if(typeof data6 == "number"){if(data6 < 0 || isNaN(data6)){const err20 = {instancePath:instancePath+"/metered_seconds",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_renewal/properties/metered_seconds/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0}};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}}if(data.handoff !== undefined){let data7 = data.handoff;if(typeof data7 === "string"){if(!pattern27.test(data7)){const err21 = {instancePath:instancePath+"/handoff",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_renewal/properties/handoff/pattern",keyword:"pattern",params:{pattern: "^aat_[A-Za-z0-9_-]{39,1996}$"}};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}else {const err22 = {instancePath:instancePath+"/handoff",schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_renewal/properties/handoff/type",keyword:"type",params:{type: "string"}};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}}else {const err23 = {instancePath,schemaPath:"dharta://artifact-runtime#/$defs/artifact_execution_renewal/type",keyword:"type",params:{type: "object"}};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}validate25.errors = vErrors;return errors === 0;}