@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.
- package/LICENSE +1 -1
- package/README.md +215 -11
- package/dist/agent.js +3 -2
- package/dist/agent.js.map +1 -1
- package/dist/api-error.js +6 -6
- package/dist/api-error.js.map +1 -1
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +860 -149
- package/dist/cli.js.map +1 -1
- package/dist/command-tree.d.ts +3 -0
- package/dist/command-tree.js +10 -0
- package/dist/command-tree.js.map +1 -0
- package/dist/commands/agents.d.ts +54 -17
- package/dist/commands/agents.js +246 -136
- package/dist/commands/agents.js.map +1 -1
- package/dist/commands/analytics.js +6 -5
- package/dist/commands/analytics.js.map +1 -1
- package/dist/commands/api.js +71 -86
- package/dist/commands/api.js.map +1 -1
- package/dist/commands/appearance.js +5 -6
- package/dist/commands/appearance.js.map +1 -1
- package/dist/commands/artifact.js +7 -6
- package/dist/commands/artifact.js.map +1 -1
- package/dist/commands/audit-log.js +2 -1
- package/dist/commands/audit-log.js.map +1 -1
- package/dist/commands/auth.js +26 -6
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/caps.js +11 -15
- package/dist/commands/caps.js.map +1 -1
- package/dist/commands/deploy.js +25 -10
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/dev.d.ts +10 -1
- package/dist/commands/dev.js +56 -25
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/doctor.d.ts +2 -0
- package/dist/commands/doctor.js +60 -0
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/embed-keys.js +4 -13
- package/dist/commands/embed-keys.js.map +1 -1
- package/dist/commands/env.js +4 -7
- package/dist/commands/env.js.map +1 -1
- package/dist/commands/files.js +3 -4
- package/dist/commands/files.js.map +1 -1
- package/dist/commands/fleet.d.ts +129 -0
- package/dist/commands/fleet.js +408 -0
- package/dist/commands/fleet.js.map +1 -0
- package/dist/commands/genui.d.ts +2 -0
- package/dist/commands/genui.js +53 -0
- package/dist/commands/genui.js.map +1 -0
- package/dist/commands/git-credential.js +2 -3
- package/dist/commands/git-credential.js.map +1 -1
- package/dist/commands/kartas.d.ts +9 -0
- package/dist/commands/kartas.js +33 -11
- package/dist/commands/kartas.js.map +1 -1
- package/dist/commands/keys.d.ts +17 -18
- package/dist/commands/keys.js +108 -19
- package/dist/commands/keys.js.map +1 -1
- package/dist/commands/login.js +2 -1
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/members.d.ts +10 -0
- package/dist/commands/members.js +20 -6
- package/dist/commands/members.js.map +1 -1
- package/dist/commands/model-connections.d.ts +44 -0
- package/dist/commands/model-connections.js +435 -0
- package/dist/commands/model-connections.js.map +1 -0
- package/dist/commands/open.d.ts +2 -2
- package/dist/commands/open.js +4 -3
- package/dist/commands/open.js.map +1 -1
- package/dist/commands/org.d.ts +9 -0
- package/dist/commands/org.js +42 -0
- package/dist/commands/org.js.map +1 -0
- package/dist/commands/organization.d.ts +16 -0
- package/dist/commands/organization.js +118 -0
- package/dist/commands/organization.js.map +1 -0
- package/dist/commands/parity.js +1 -3
- package/dist/commands/parity.js.map +1 -1
- package/dist/commands/repos.d.ts +4 -0
- package/dist/commands/repos.js +17 -0
- package/dist/commands/repos.js.map +1 -0
- package/dist/commands/rollback.js +2 -3
- package/dist/commands/rollback.js.map +1 -1
- package/dist/commands/schedules.js +26 -21
- package/dist/commands/schedules.js.map +1 -1
- package/dist/commands/scopes.js +8 -1
- package/dist/commands/scopes.js.map +1 -1
- package/dist/commands/sessions.js +9 -3
- package/dist/commands/sessions.js.map +1 -1
- package/dist/commands/setup.js +5 -4
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/update.d.ts +1 -0
- package/dist/commands/update.js +24 -11
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/webhooks.d.ts +4 -1
- package/dist/commands/webhooks.js +21 -16
- package/dist/commands/webhooks.js.map +1 -1
- package/dist/completions.js +24 -13
- package/dist/completions.js.map +1 -1
- package/dist/config.d.ts +12 -0
- package/dist/config.js +121 -7
- package/dist/config.js.map +1 -1
- package/dist/context.d.ts +2 -0
- package/dist/context.js +23 -7
- package/dist/context.js.map +1 -1
- package/dist/docs/cli-reference.d.ts +2 -0
- package/dist/docs/cli-reference.js +191 -0
- package/dist/docs/cli-reference.js.map +1 -0
- package/dist/exit-codes.d.ts +25 -0
- package/dist/exit-codes.js +107 -0
- package/dist/exit-codes.js.map +1 -0
- package/dist/genui.d.ts +178 -0
- package/dist/genui.js +1130 -0
- package/dist/genui.js.map +1 -0
- package/dist/harnesses.js +2 -1
- package/dist/harnesses.js.map +1 -1
- package/dist/jq.d.ts +4 -0
- package/dist/jq.js +91 -0
- package/dist/jq.js.map +1 -0
- package/dist/login-offer.js +6 -2
- package/dist/login-offer.js.map +1 -1
- package/dist/manifest.d.ts +12 -0
- package/dist/manifest.js +126 -0
- package/dist/manifest.js.map +1 -1
- package/dist/model-auth.d.ts +29 -0
- package/dist/model-auth.js +117 -0
- package/dist/model-auth.js.map +1 -0
- package/dist/model-settings.d.ts +23 -0
- package/dist/model-settings.js +186 -0
- package/dist/model-settings.js.map +1 -0
- package/dist/money.js +2 -1
- package/dist/money.js.map +1 -1
- package/dist/output.d.ts +6 -0
- package/dist/output.js +54 -0
- package/dist/output.js.map +1 -1
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +1 -1
- package/dist/scaffold.js +2 -1
- package/dist/scaffold.js.map +1 -1
- package/dist/validators.js +17 -11
- package/dist/validators.js.map +1 -1
- package/dist/version-check.d.ts +1 -1
- package/dist/version-check.js +1 -1
- package/dist/version-check.js.map +1 -1
- package/node_modules/@dharta/contracts/LICENSE +21 -0
- package/node_modules/@dharta/contracts/README.md +45 -0
- package/node_modules/@dharta/contracts/artifact-runtime.json +750 -0
- package/node_modules/@dharta/contracts/dist/activity.d.ts +62 -0
- package/node_modules/@dharta/contracts/dist/activity.d.ts.map +1 -0
- package/node_modules/@dharta/contracts/dist/activity.js +178 -0
- package/node_modules/@dharta/contracts/dist/activity.js.map +1 -0
- package/node_modules/@dharta/contracts/dist/artifact-runtime-formats.d.ts +20 -0
- package/node_modules/@dharta/contracts/dist/artifact-runtime-formats.d.ts.map +1 -0
- package/node_modules/@dharta/contracts/dist/artifact-runtime-formats.js +53 -0
- package/node_modules/@dharta/contracts/dist/artifact-runtime-formats.js.map +1 -0
- package/node_modules/@dharta/contracts/dist/artifact-runtime-validators.generated.d.ts +37 -0
- package/node_modules/@dharta/contracts/dist/artifact-runtime-validators.generated.d.ts.map +1 -0
- package/node_modules/@dharta/contracts/dist/artifact-runtime-validators.generated.js +5107 -0
- package/node_modules/@dharta/contracts/dist/artifact-runtime-validators.generated.js.map +1 -0
- package/node_modules/@dharta/contracts/dist/artifact-runtime.d.ts +154 -0
- package/node_modules/@dharta/contracts/dist/artifact-runtime.d.ts.map +1 -0
- package/node_modules/@dharta/contracts/dist/artifact-runtime.generated.d.ts +1670 -0
- package/node_modules/@dharta/contracts/dist/artifact-runtime.generated.d.ts.map +1 -0
- package/node_modules/@dharta/contracts/dist/artifact-runtime.generated.js +1903 -0
- package/node_modules/@dharta/contracts/dist/artifact-runtime.generated.js.map +1 -0
- package/node_modules/@dharta/contracts/dist/artifact-runtime.js +377 -0
- package/node_modules/@dharta/contracts/dist/artifact-runtime.js.map +1 -0
- package/node_modules/@dharta/contracts/dist/index.d.ts +6 -0
- package/node_modules/@dharta/contracts/dist/index.d.ts.map +1 -0
- package/node_modules/@dharta/contracts/dist/index.js +6 -0
- package/node_modules/@dharta/contracts/dist/index.js.map +1 -0
- package/node_modules/@dharta/contracts/dist/model-auth.d.ts +31 -0
- package/node_modules/@dharta/contracts/dist/model-auth.d.ts.map +1 -0
- package/node_modules/@dharta/contracts/dist/model-auth.js +45 -0
- package/node_modules/@dharta/contracts/dist/model-auth.js.map +1 -0
- package/node_modules/@dharta/contracts/dist/tasks.d.ts +44 -0
- package/node_modules/@dharta/contracts/dist/tasks.d.ts.map +1 -0
- package/node_modules/@dharta/contracts/dist/tasks.js +127 -0
- package/node_modules/@dharta/contracts/dist/tasks.js.map +1 -0
- package/node_modules/@dharta/contracts/dist/wire-events.d.ts +71 -0
- package/node_modules/@dharta/contracts/dist/wire-events.d.ts.map +1 -0
- package/node_modules/@dharta/contracts/dist/wire-events.js +48 -0
- package/node_modules/@dharta/contracts/dist/wire-events.js.map +1 -0
- package/node_modules/@dharta/contracts/model-auth-capabilities-v1.json +168 -0
- package/node_modules/@dharta/contracts/model-auth-reasons-v1.json +38 -0
- package/node_modules/@dharta/contracts/package.json +44 -0
- package/node_modules/@dharta/contracts/src/activity.ts +215 -0
- package/node_modules/@dharta/contracts/src/artifact-runtime-formats.ts +54 -0
- package/node_modules/@dharta/contracts/src/artifact-runtime-validators.generated.ts +29 -0
- package/node_modules/@dharta/contracts/src/artifact-runtime.generated.ts +2093 -0
- package/node_modules/@dharta/contracts/src/artifact-runtime.ts +520 -0
- package/node_modules/@dharta/contracts/src/index.ts +5 -0
- package/node_modules/@dharta/contracts/src/model-auth.ts +82 -0
- package/node_modules/@dharta/contracts/src/tasks.ts +142 -0
- package/node_modules/@dharta/contracts/src/wire-events.ts +150 -0
- package/node_modules/@dharta/contracts/wire-events.json +29 -0
- package/node_modules/@dharta/sdk/LICENSE +1 -1
- package/node_modules/@dharta/sdk/README.md +22 -8
- package/node_modules/@dharta/sdk/dist/errors.d.ts +9 -7
- package/node_modules/@dharta/sdk/dist/errors.d.ts.map +1 -1
- package/node_modules/@dharta/sdk/dist/errors.js +36 -18
- package/node_modules/@dharta/sdk/dist/errors.js.map +1 -1
- package/node_modules/@dharta/sdk/dist/fleet.d.ts +69 -0
- package/node_modules/@dharta/sdk/dist/fleet.d.ts.map +1 -0
- package/node_modules/@dharta/sdk/dist/fleet.js +240 -0
- package/node_modules/@dharta/sdk/dist/fleet.js.map +1 -0
- package/node_modules/@dharta/sdk/dist/http.d.ts +6 -2
- package/node_modules/@dharta/sdk/dist/http.d.ts.map +1 -1
- package/node_modules/@dharta/sdk/dist/http.js +71 -12
- package/node_modules/@dharta/sdk/dist/http.js.map +1 -1
- package/node_modules/@dharta/sdk/dist/idempotency.d.ts +12 -0
- package/node_modules/@dharta/sdk/dist/idempotency.d.ts.map +1 -0
- package/node_modules/@dharta/sdk/dist/idempotency.js +72 -0
- package/node_modules/@dharta/sdk/dist/idempotency.js.map +1 -0
- package/node_modules/@dharta/sdk/dist/index.d.ts +20 -6
- package/node_modules/@dharta/sdk/dist/index.d.ts.map +1 -1
- package/node_modules/@dharta/sdk/dist/index.js +27 -4
- package/node_modules/@dharta/sdk/dist/index.js.map +1 -1
- package/node_modules/@dharta/sdk/dist/resources.d.ts +108 -13
- package/node_modules/@dharta/sdk/dist/resources.d.ts.map +1 -1
- package/node_modules/@dharta/sdk/dist/resources.js +403 -57
- package/node_modules/@dharta/sdk/dist/resources.js.map +1 -1
- package/node_modules/@dharta/sdk/dist/types.d.ts +436 -16
- package/node_modules/@dharta/sdk/dist/types.d.ts.map +1 -1
- package/node_modules/@dharta/sdk/dist/types.js +31 -2
- package/node_modules/@dharta/sdk/dist/types.js.map +1 -1
- package/node_modules/@dharta/sdk/package.json +9 -3
- package/node_modules/@dharta/sdk/src/errors.ts +41 -18
- package/node_modules/@dharta/sdk/src/fleet.ts +339 -0
- package/node_modules/@dharta/sdk/src/http.ts +110 -17
- package/node_modules/@dharta/sdk/src/idempotency.ts +101 -0
- package/node_modules/@dharta/sdk/src/index.ts +50 -11
- package/node_modules/@dharta/sdk/src/resources.ts +549 -68
- package/node_modules/@dharta/sdk/src/types.ts +629 -20
- package/package.json +16 -6
- package/src/agent.ts +3 -2
- package/src/api-error.ts +6 -5
- package/src/cli.ts +978 -163
- package/src/command-tree.ts +13 -0
- package/src/commands/agents.ts +365 -167
- package/src/commands/analytics.ts +6 -5
- package/src/commands/api.ts +73 -92
- package/src/commands/appearance.ts +5 -6
- package/src/commands/artifact.ts +7 -6
- package/src/commands/audit-log.ts +2 -1
- package/src/commands/auth.ts +25 -5
- package/src/commands/caps.ts +11 -15
- package/src/commands/deploy.ts +18 -4
- package/src/commands/dev.ts +86 -25
- package/src/commands/doctor.ts +69 -0
- package/src/commands/embed-keys.ts +4 -14
- package/src/commands/env.ts +4 -7
- package/src/commands/files.ts +3 -4
- package/src/commands/fleet.ts +672 -0
- package/src/commands/genui.ts +59 -0
- package/src/commands/git-credential.ts +2 -3
- package/src/commands/kartas.ts +45 -11
- package/src/commands/keys.ts +152 -35
- package/src/commands/login.ts +2 -1
- package/src/commands/members.ts +31 -6
- package/src/commands/model-connections.ts +547 -0
- package/src/commands/open.ts +5 -4
- package/src/commands/org.ts +57 -0
- package/src/commands/organization.ts +153 -0
- package/src/commands/parity.ts +1 -3
- package/src/commands/repos.ts +23 -0
- package/src/commands/rollback.ts +2 -3
- package/src/commands/schedules.ts +33 -22
- package/src/commands/scopes.ts +8 -1
- package/src/commands/sessions.ts +9 -3
- package/src/commands/setup.ts +5 -4
- package/src/commands/update.ts +28 -12
- package/src/commands/webhooks.ts +30 -19
- package/src/completions.ts +25 -13
- package/src/config.ts +141 -9
- package/src/context.ts +34 -7
- package/src/docs/cli-reference.ts +206 -0
- package/src/exit-codes.ts +122 -0
- package/src/genui.ts +1398 -0
- package/src/harnesses.ts +2 -1
- package/src/jq.ts +109 -0
- package/src/login-offer.ts +6 -2
- package/src/manifest.ts +134 -0
- package/src/model-auth.ts +173 -0
- package/src/model-settings.ts +222 -0
- package/src/money.ts +5 -1
- package/src/output.ts +60 -0
- package/src/runtime.ts +1 -1
- package/src/scaffold.ts +2 -1
- package/src/validators.ts +18 -11
- package/src/version-check.ts +1 -1
- package/dist/commands/model-keys.d.ts +0 -22
- package/dist/commands/model-keys.js +0 -222
- package/dist/commands/model-keys.js.map +0 -1
- package/src/commands/model-keys.ts +0 -278
|
@@ -0,0 +1,750 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"contract_version": 2,
|
|
4
|
+
"manifest": {
|
|
5
|
+
"id_pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$",
|
|
6
|
+
"type_id_pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$",
|
|
7
|
+
"input_alias_pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$",
|
|
8
|
+
"workspace_source_pattern": "^workspace:(?!.*[\\uD800-\\uDFFF])(?!/)(?!.*\\\\)(?!.*//)(?!\\.\\.?(?:$|/))(?!.*[/]\\.\\.?(?:$|/))[^\\u0000/]+(?:/[^\\u0000/]+)*$",
|
|
9
|
+
"max_title_characters": 200,
|
|
10
|
+
"max_root_bytes": 1024,
|
|
11
|
+
"max_root_depth": 32,
|
|
12
|
+
"max_entry_bytes": 1024,
|
|
13
|
+
"max_entry_depth": 32,
|
|
14
|
+
"max_run_bytes": 16384,
|
|
15
|
+
"max_inputs": 64,
|
|
16
|
+
"max_input_source_bytes": 2048,
|
|
17
|
+
"freshness": ["pinned", "follow"],
|
|
18
|
+
"reserved_root_paths": [".dharta/inputs"]
|
|
19
|
+
},
|
|
20
|
+
"trees": {
|
|
21
|
+
"root": {"max_files": 20000, "max_bytes": 1000000000},
|
|
22
|
+
"input": {"max_files": 20000, "max_bytes": 1000000000},
|
|
23
|
+
"all_inputs": {"max_files": 50000, "max_bytes": 5000000000},
|
|
24
|
+
"static_share": {"max_files": 20000, "max_bytes": 1000000000},
|
|
25
|
+
"reject_symlinks_escaping_tree": true,
|
|
26
|
+
"reject_secret_paths": true
|
|
27
|
+
},
|
|
28
|
+
"runtime": {
|
|
29
|
+
"abi": "dharta.artifact.renderer/v1",
|
|
30
|
+
"shell": "/bin/sh",
|
|
31
|
+
"shell_arguments": ["-lc"],
|
|
32
|
+
"host": "127.0.0.1",
|
|
33
|
+
"environment": {
|
|
34
|
+
"DHARTA_ARTIFACT_PORT": {"secret": false, "value": "assigned loopback port"},
|
|
35
|
+
"DHARTA_ARTIFACT_INPUTS": {"secret": false, "value": "absolute mounted input directory"},
|
|
36
|
+
"DHARTA_ARTIFACT_TYPE_DIR": {"secret": false, "value": "absolute Type recipe directory when present"},
|
|
37
|
+
"DHARTA_ARTIFACT_RUN": {"secret": false, "value": "opaque declared shell command"}
|
|
38
|
+
},
|
|
39
|
+
"inherited_environment": "allowlist-only",
|
|
40
|
+
"secret_environment": [],
|
|
41
|
+
"startup_seconds": 30,
|
|
42
|
+
"idle_seconds": 300,
|
|
43
|
+
"absolute_seconds": 3600,
|
|
44
|
+
"teardown_seconds": 30
|
|
45
|
+
},
|
|
46
|
+
"portable_sharing": {
|
|
47
|
+
"format": "dharta.portable-artifact-execution-pack.v1",
|
|
48
|
+
"cost_owners": ["publisher", "viewer", "organization"],
|
|
49
|
+
"required_live_execution": true,
|
|
50
|
+
"capabilities": {
|
|
51
|
+
"network": "none",
|
|
52
|
+
"workspace": "none",
|
|
53
|
+
"model": false,
|
|
54
|
+
"credentials": [],
|
|
55
|
+
"connections": []
|
|
56
|
+
},
|
|
57
|
+
"exclude_producer_sources": true,
|
|
58
|
+
"exclude_snapshot_ids": true,
|
|
59
|
+
"exclude_credentials": true
|
|
60
|
+
},
|
|
61
|
+
"access": {
|
|
62
|
+
"public_token_pattern": "^sfl_[A-Za-z0-9_-]{32,96}$",
|
|
63
|
+
"execution_id_pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$",
|
|
64
|
+
"execution_id_max_characters": 128,
|
|
65
|
+
"artifact_version_id_pattern": "^[A-Za-z0-9_-]{1,64}$",
|
|
66
|
+
"artifact_version_id_max_characters": 64,
|
|
67
|
+
"audience_digest_pattern": "^[0-9a-f]{64}$",
|
|
68
|
+
"handoff_digest_pattern": "^[0-9a-f]{64}$",
|
|
69
|
+
"handoff_token_pattern": "^aat_[A-Za-z0-9_-]{39,1996}$",
|
|
70
|
+
"origin_label_pattern": "^a-[a-z2-7]{52}$"
|
|
71
|
+
},
|
|
72
|
+
"http": {
|
|
73
|
+
"root_path": "/",
|
|
74
|
+
"handoff_path": "/_dharta/artifact/handoff",
|
|
75
|
+
"authorize_path": "/_dharta/artifact/authorize",
|
|
76
|
+
"open_path": "/_dharta/artifact/open",
|
|
77
|
+
"access_cookie": "__Host-dharta_artifact_access",
|
|
78
|
+
"local_access_cookie": "dharta_artifact_access_dev",
|
|
79
|
+
"root_media_type_essence": "text/html",
|
|
80
|
+
"allow_media_type_parameters": true,
|
|
81
|
+
"methods": ["GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"],
|
|
82
|
+
"max_header_bytes": 65536,
|
|
83
|
+
"max_request_body_bytes": 16777216,
|
|
84
|
+
"max_response_body_bytes": 1000000000,
|
|
85
|
+
"max_websocket_frame_bytes": 1048576,
|
|
86
|
+
"max_websocket_queue_frames": 2,
|
|
87
|
+
"max_concurrent_requests": 32,
|
|
88
|
+
"supports_streaming": true,
|
|
89
|
+
"supports_ranges": true,
|
|
90
|
+
"supports_sse": true,
|
|
91
|
+
"supports_websocket": true
|
|
92
|
+
},
|
|
93
|
+
"schemas": {
|
|
94
|
+
"input_v2": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"additionalProperties": false,
|
|
97
|
+
"required": ["source", "freshness"],
|
|
98
|
+
"properties": {
|
|
99
|
+
"source": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"maxLength": 2048,
|
|
102
|
+
"pattern": "^workspace:(?!.*[\\uD800-\\uDFFF])(?!/)(?!.*\\\\)(?!.*//)(?!\\.\\.?(?:$|/))(?!.*[/]\\.\\.?(?:$|/))[^\\u0000/]+(?:/[^\\u0000/]+)*$",
|
|
103
|
+
"x-dharta-error": "artifact_input_source_invalid"
|
|
104
|
+
},
|
|
105
|
+
"freshness": {
|
|
106
|
+
"enum": ["pinned", "follow"],
|
|
107
|
+
"x-dharta-error": "artifact_input_freshness_required"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"x-dharta-error": "artifact_input_invalid"
|
|
111
|
+
},
|
|
112
|
+
"agent_activation_v1": {
|
|
113
|
+
"type": "object",
|
|
114
|
+
"additionalProperties": false,
|
|
115
|
+
"required": [
|
|
116
|
+
"authorities",
|
|
117
|
+
"budget_cents",
|
|
118
|
+
"lifetime_seconds",
|
|
119
|
+
"descendant_ceiling",
|
|
120
|
+
"activation_mode",
|
|
121
|
+
"visibility"
|
|
122
|
+
],
|
|
123
|
+
"properties": {
|
|
124
|
+
"authorities": {
|
|
125
|
+
"type": "array",
|
|
126
|
+
"maxItems": 32,
|
|
127
|
+
"uniqueItems": true,
|
|
128
|
+
"items": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"pattern": "^[a-z][a-z0-9_.:-]{0,127}$"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"budget_cents": {"type": "integer", "minimum": 0, "maximum": 10000},
|
|
134
|
+
"lifetime_seconds": {"type": "integer", "minimum": 1, "maximum": 86400},
|
|
135
|
+
"descendant_ceiling": {"type": "integer", "minimum": 0, "maximum": 8},
|
|
136
|
+
"activation_mode": {"enum": ["resume", "new"]},
|
|
137
|
+
"visibility": {"enum": ["headless", "inspectable", "user-facing"]}
|
|
138
|
+
},
|
|
139
|
+
"x-dharta-error": "artifact_agent_activation_invalid"
|
|
140
|
+
},
|
|
141
|
+
"artifact_v2": {
|
|
142
|
+
"type": "object",
|
|
143
|
+
"additionalProperties": false,
|
|
144
|
+
"required": ["contract_version", "id", "title", "root", "inputs"],
|
|
145
|
+
"allOf": [
|
|
146
|
+
{
|
|
147
|
+
"oneOf": [
|
|
148
|
+
{"required": ["entry"], "not": {"required": ["run"]}},
|
|
149
|
+
{"required": ["run"], "not": {"required": ["entry"]}}
|
|
150
|
+
],
|
|
151
|
+
"x-dharta-error": "artifact_presentation_invalid"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"if": {"required": ["agent_activation"]},
|
|
155
|
+
"then": {
|
|
156
|
+
"properties": {
|
|
157
|
+
"run": {
|
|
158
|
+
"const": "karta artifact run agent .",
|
|
159
|
+
"x-dharta-error": "artifact_agent_activation_runner_required"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"required": ["run"]
|
|
163
|
+
},
|
|
164
|
+
"x-dharta-error": "artifact_agent_activation_runner_required"
|
|
165
|
+
}
|
|
166
|
+
],
|
|
167
|
+
"properties": {
|
|
168
|
+
"contract_version": {"const": 2, "x-dharta-error": "artifact_contract_version_invalid"},
|
|
169
|
+
"id": {
|
|
170
|
+
"type": "string",
|
|
171
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$",
|
|
172
|
+
"x-dharta-error": "artifact_id_invalid"
|
|
173
|
+
},
|
|
174
|
+
"title": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"minLength": 1,
|
|
177
|
+
"maxLength": 200,
|
|
178
|
+
"pattern": "^(?!.*[\\uD800-\\uDFFF]).+$",
|
|
179
|
+
"x-dharta-error": "artifact_title_invalid"
|
|
180
|
+
},
|
|
181
|
+
"type_id": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$",
|
|
184
|
+
"x-dharta-error": "artifact_type_id_invalid"
|
|
185
|
+
},
|
|
186
|
+
"root": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"minLength": 1,
|
|
189
|
+
"maxLength": 1024,
|
|
190
|
+
"pattern": "^(?!.*[\\uD800-\\uDFFF])(?!/)(?!.*\\\\)(?!.*//)(?!\\.\\.?(?:$|/))(?!.*[/]\\.\\.?(?:$|/))(?!\\.dharta/inputs(?:/|$))[^\\u0000/]+(?:/[^\\u0000/]+)*$",
|
|
191
|
+
"x-dharta-error": "artifact_root_invalid"
|
|
192
|
+
},
|
|
193
|
+
"entry": {
|
|
194
|
+
"type": "string",
|
|
195
|
+
"minLength": 1,
|
|
196
|
+
"maxLength": 1024,
|
|
197
|
+
"pattern": "^(?!.*[\\uD800-\\uDFFF])(?!/)(?!.*\\\\)(?!.*//)(?!\\.\\.?(?:$|/))(?!.*[/]\\.\\.?(?:$|/))[^\\u0000/]+(?:/[^\\u0000/]+)*$",
|
|
198
|
+
"x-dharta-error": "artifact_entry_invalid"
|
|
199
|
+
},
|
|
200
|
+
"run": {
|
|
201
|
+
"type": "string",
|
|
202
|
+
"minLength": 1,
|
|
203
|
+
"maxLength": 16384,
|
|
204
|
+
"pattern": "^(?!.*[\\uD800-\\uDFFF])[^\\u0000]+$",
|
|
205
|
+
"x-dharta-error": "artifact_run_invalid"
|
|
206
|
+
},
|
|
207
|
+
"agent_activation": {"$ref": "#/$defs/agent_activation_v1"},
|
|
208
|
+
"inputs": {
|
|
209
|
+
"type": "object",
|
|
210
|
+
"maxProperties": 64,
|
|
211
|
+
"propertyNames": {
|
|
212
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$",
|
|
213
|
+
"x-dharta-error": "artifact_input_alias_invalid"
|
|
214
|
+
},
|
|
215
|
+
"additionalProperties": {"$ref": "#/$defs/input_v2"},
|
|
216
|
+
"x-dharta-error": "artifact_inputs_invalid"
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"x-dharta-error": "artifact_v2_invalid"
|
|
220
|
+
},
|
|
221
|
+
"artifact_v1": {
|
|
222
|
+
"type": "object",
|
|
223
|
+
"required": ["contract_version", "key", "kind", "title", "entrypoint", "dependencies"],
|
|
224
|
+
"properties": {
|
|
225
|
+
"contract_version": {"const": 1, "x-dharta-error": "artifact_contract_version_invalid"},
|
|
226
|
+
"key": {"type": "string", "minLength": 1},
|
|
227
|
+
"kind": {"type": "string", "minLength": 1},
|
|
228
|
+
"title": {"type": "string", "minLength": 1},
|
|
229
|
+
"entrypoint": {"type": "string", "minLength": 1},
|
|
230
|
+
"dependencies": {"type": "array", "items": {"type": "object"}},
|
|
231
|
+
"suggested_surface": {"type": "string", "minLength": 1}
|
|
232
|
+
},
|
|
233
|
+
"additionalProperties": true,
|
|
234
|
+
"x-dharta-error": "artifact_v1_invalid"
|
|
235
|
+
},
|
|
236
|
+
"manifest_document": {
|
|
237
|
+
"type": "object",
|
|
238
|
+
"additionalProperties": false,
|
|
239
|
+
"required": ["schema", "artifacts"],
|
|
240
|
+
"properties": {
|
|
241
|
+
"schema": {"const": 2, "x-dharta-error": "artifact_document_schema_invalid"},
|
|
242
|
+
"artifacts": {
|
|
243
|
+
"type": "array",
|
|
244
|
+
"maxItems": 256,
|
|
245
|
+
"items": {"oneOf": [{"$ref": "#/$defs/artifact_v1"}, {"$ref": "#/$defs/artifact_v2"}]},
|
|
246
|
+
"x-dharta-error": "artifact_document_invalid"
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
"x-dharta-error": "artifact_document_invalid"
|
|
250
|
+
},
|
|
251
|
+
"artifact_summary_input_v2": {
|
|
252
|
+
"type": "object",
|
|
253
|
+
"additionalProperties": false,
|
|
254
|
+
"required": ["alias", "source", "freshness", "snapshot_id", "kind", "files", "total_bytes"],
|
|
255
|
+
"properties": {
|
|
256
|
+
"alias": {"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"},
|
|
257
|
+
"source": {"type": "string", "maxLength": 2048},
|
|
258
|
+
"freshness": {"enum": ["pinned", "follow"]},
|
|
259
|
+
"snapshot_id": {"type": "string", "minLength": 1},
|
|
260
|
+
"kind": {"enum": ["file", "directory"]},
|
|
261
|
+
"files": {"type": "integer", "minimum": 0},
|
|
262
|
+
"total_bytes": {"type": "integer", "minimum": 0}
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
"artifact_summary_v1": {
|
|
266
|
+
"type": "object",
|
|
267
|
+
"additionalProperties": false,
|
|
268
|
+
"required": ["contract_version", "artifact_id", "artifact_version_id", "key", "kind", "title", "entrypoint", "renderer", "schema_version", "portability", "snapshot_id", "member_count", "total_bytes", "publish_audiences"],
|
|
269
|
+
"properties": {
|
|
270
|
+
"contract_version": {"const": 1},
|
|
271
|
+
"artifact_id": {"type": "string", "minLength": 1},
|
|
272
|
+
"artifact_version_id": {"type": "string", "minLength": 1},
|
|
273
|
+
"key": {"type": "string", "minLength": 1},
|
|
274
|
+
"kind": {"type": "string", "minLength": 1},
|
|
275
|
+
"title": {"type": "string", "minLength": 1},
|
|
276
|
+
"entrypoint": {"type": "string", "minLength": 1},
|
|
277
|
+
"renderer": {"type": "string", "minLength": 1},
|
|
278
|
+
"schema_version": {"type": "integer", "minimum": 1},
|
|
279
|
+
"portability": {"enum": ["static", "explainable", "forkable"]},
|
|
280
|
+
"snapshot_id": {"type": "string", "minLength": 1},
|
|
281
|
+
"member_count": {"type": "integer", "minimum": 0},
|
|
282
|
+
"total_bytes": {"type": "integer", "minimum": 0},
|
|
283
|
+
"publish_audiences": {"type": "array", "items": {"enum": ["public", "link", "organization", "named"]}}
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
"artifact_summary_v2": {
|
|
287
|
+
"type": "object",
|
|
288
|
+
"additionalProperties": false,
|
|
289
|
+
"required": ["contract_version", "artifact_id", "artifact_version_id", "id", "title", "root", "snapshot_id", "member_count", "total_bytes", "inputs", "publish_audiences"],
|
|
290
|
+
"allOf": [
|
|
291
|
+
{
|
|
292
|
+
"oneOf": [
|
|
293
|
+
{
|
|
294
|
+
"required": ["entry", "renderer", "presentation_availability"],
|
|
295
|
+
"not": {"anyOf": [{"required": ["run"]}, {"required": ["execution_availability"]}, {"required": ["execution_unavailable_reason"]}]}
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"required": ["run", "execution_availability"],
|
|
299
|
+
"not": {"anyOf": [{"required": ["entry"]}, {"required": ["renderer"]}, {"required": ["presentation_availability"]}, {"required": ["presentation_unavailable_reason"]}]}
|
|
300
|
+
}
|
|
301
|
+
]
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"if": {"required": ["agent_activation"]},
|
|
305
|
+
"then": {
|
|
306
|
+
"properties": {
|
|
307
|
+
"run": {"const": "karta artifact run agent ."}
|
|
308
|
+
},
|
|
309
|
+
"required": ["run"]
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
],
|
|
313
|
+
"properties": {
|
|
314
|
+
"contract_version": {"const": 2},
|
|
315
|
+
"artifact_id": {"type": "string", "minLength": 1},
|
|
316
|
+
"artifact_version_id": {"type": "string", "minLength": 1},
|
|
317
|
+
"id": {"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"},
|
|
318
|
+
"title": {"type": "string", "minLength": 1},
|
|
319
|
+
"root": {"type": "string", "minLength": 1},
|
|
320
|
+
"entry": {"type": "string", "minLength": 1},
|
|
321
|
+
"run": {"type": "string", "minLength": 1},
|
|
322
|
+
"agent_activation": {"$ref": "#/$defs/agent_activation_v1"},
|
|
323
|
+
"renderer": {"enum": ["builtin.text", "builtin.markdown", "builtin.code", "builtin.image", "builtin.audio", "builtin.video", "builtin.csv", "builtin.pdf", "builtin.html", "builtin.download"]},
|
|
324
|
+
"type_id": {"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"},
|
|
325
|
+
"snapshot_id": {"type": "string", "minLength": 1},
|
|
326
|
+
"member_count": {"type": "integer", "minimum": 0},
|
|
327
|
+
"total_bytes": {"type": "integer", "minimum": 0},
|
|
328
|
+
"inputs": {"type": "array", "items": {"$ref": "#/$defs/artifact_summary_input_v2"}},
|
|
329
|
+
"presentation_availability": {"enum": ["available", "unavailable"]},
|
|
330
|
+
"presentation_unavailable_reason": {"type": "string", "minLength": 1},
|
|
331
|
+
"execution_availability": {"enum": ["available", "unavailable"]},
|
|
332
|
+
"execution_unavailable_reason": {"type": "string", "minLength": 1},
|
|
333
|
+
"publish_audiences": {"type": "array", "items": {"enum": ["public", "link", "organization", "named"]}}
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
"portable_pack_input": {
|
|
337
|
+
"type": "object",
|
|
338
|
+
"additionalProperties": false,
|
|
339
|
+
"required": ["alias", "freshness", "kind", "tree_digest", "files", "bytes"],
|
|
340
|
+
"properties": {
|
|
341
|
+
"alias": {"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"},
|
|
342
|
+
"freshness": {"enum": ["pinned", "follow"]},
|
|
343
|
+
"kind": {"enum": ["file", "directory"]},
|
|
344
|
+
"tree_digest": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
|
|
345
|
+
"files": {"type": "integer", "minimum": 0},
|
|
346
|
+
"bytes": {"type": "integer", "minimum": 0}
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
"portable_pack_member": {
|
|
350
|
+
"type": "object",
|
|
351
|
+
"additionalProperties": false,
|
|
352
|
+
"required": ["scope", "path", "kind", "size", "mode"],
|
|
353
|
+
"properties": {
|
|
354
|
+
"scope": {"enum": ["root", "input", "type"]},
|
|
355
|
+
"alias": {"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"},
|
|
356
|
+
"path": {"type": "string", "minLength": 1, "maxLength": 1024},
|
|
357
|
+
"kind": {"enum": ["file", "symlink", "directory"]},
|
|
358
|
+
"digest": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
|
|
359
|
+
"size": {"type": "integer", "minimum": 0},
|
|
360
|
+
"mode": {"type": "integer", "minimum": 0, "maximum": 4095},
|
|
361
|
+
"target": {"type": "string", "minLength": 1, "maxLength": 4096},
|
|
362
|
+
"target_kind": {"enum": ["file", "directory"]},
|
|
363
|
+
"generation": {"type": "integer", "minimum": 0}
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
"portable_execution_capabilities": {
|
|
367
|
+
"type": "object",
|
|
368
|
+
"additionalProperties": false,
|
|
369
|
+
"required": ["network", "workspace", "model", "credentials", "connections"],
|
|
370
|
+
"properties": {
|
|
371
|
+
"network": {"const": "none"},
|
|
372
|
+
"workspace": {"const": "none"},
|
|
373
|
+
"model": {"const": false},
|
|
374
|
+
"credentials": {"type": "array", "maxItems": 0},
|
|
375
|
+
"connections": {"type": "array", "maxItems": 0}
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
"portable_execution_pack": {
|
|
379
|
+
"type": "object",
|
|
380
|
+
"additionalProperties": false,
|
|
381
|
+
"required": ["format", "artifact_id", "artifact_version_id", "run", "root", "inputs", "type_id", "type_package_digest", "cost_owner", "capabilities", "members"],
|
|
382
|
+
"properties": {
|
|
383
|
+
"format": {"const": "dharta.portable-artifact-execution-pack.v1"},
|
|
384
|
+
"artifact_id": {"type": "string", "minLength": 1, "maxLength": 128},
|
|
385
|
+
"artifact_version_id": {"type": "string", "minLength": 1, "maxLength": 128},
|
|
386
|
+
"run": {"type": "string", "minLength": 1, "maxLength": 16384},
|
|
387
|
+
"root": {
|
|
388
|
+
"type": "object",
|
|
389
|
+
"additionalProperties": false,
|
|
390
|
+
"required": ["kind", "tree_digest", "files", "bytes"],
|
|
391
|
+
"properties": {
|
|
392
|
+
"kind": {"enum": ["file", "directory"]},
|
|
393
|
+
"tree_digest": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
|
|
394
|
+
"files": {"type": "integer", "minimum": 0},
|
|
395
|
+
"bytes": {"type": "integer", "minimum": 0}
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
"inputs": {"type": "array", "maxItems": 64, "items": {"$ref": "#/$defs/portable_pack_input"}},
|
|
399
|
+
"type_id": {"type": ["string", "null"], "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"},
|
|
400
|
+
"type_package_digest": {"type": ["string", "null"], "pattern": "^[0-9a-f]{64}$"},
|
|
401
|
+
"cost_owner": {"enum": ["publisher", "viewer", "organization"]},
|
|
402
|
+
"capabilities": {"$ref": "#/$defs/portable_execution_capabilities"},
|
|
403
|
+
"members": {"type": "array", "maxItems": 20000, "items": {"$ref": "#/$defs/portable_pack_member"}}
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
"portable_execution_consent": {
|
|
407
|
+
"type": "object",
|
|
408
|
+
"additionalProperties": false,
|
|
409
|
+
"required": ["pack_id", "artifact_version_id", "run", "required_live_execution", "cost_owner", "capabilities", "root", "inputs", "type_id", "unique_files", "unique_bytes", "consent_digest"],
|
|
410
|
+
"properties": {
|
|
411
|
+
"pack_id": {"type": "string", "pattern": "^sp_[0-9a-f]{64}$"},
|
|
412
|
+
"artifact_version_id": {"type": "string", "minLength": 1, "maxLength": 128},
|
|
413
|
+
"run": {"type": "string", "minLength": 1, "maxLength": 16384},
|
|
414
|
+
"required_live_execution": {"const": true},
|
|
415
|
+
"cost_owner": {"enum": ["publisher", "viewer", "organization"]},
|
|
416
|
+
"capabilities": {"$ref": "#/$defs/portable_execution_capabilities"},
|
|
417
|
+
"root": {
|
|
418
|
+
"type": "object",
|
|
419
|
+
"additionalProperties": false,
|
|
420
|
+
"required": ["files", "bytes"],
|
|
421
|
+
"properties": {
|
|
422
|
+
"files": {"type": "integer", "minimum": 0},
|
|
423
|
+
"bytes": {"type": "integer", "minimum": 0}
|
|
424
|
+
}
|
|
425
|
+
},
|
|
426
|
+
"inputs": {
|
|
427
|
+
"type": "array",
|
|
428
|
+
"maxItems": 64,
|
|
429
|
+
"items": {
|
|
430
|
+
"type": "object",
|
|
431
|
+
"additionalProperties": false,
|
|
432
|
+
"required": ["alias", "freshness", "files", "bytes"],
|
|
433
|
+
"properties": {
|
|
434
|
+
"alias": {"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"},
|
|
435
|
+
"freshness": {"enum": ["pinned", "follow"]},
|
|
436
|
+
"files": {"type": "integer", "minimum": 0},
|
|
437
|
+
"bytes": {"type": "integer", "minimum": 0}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
"type_id": {"type": ["string", "null"], "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"},
|
|
442
|
+
"unique_files": {"type": "integer", "minimum": 0},
|
|
443
|
+
"unique_bytes": {"type": "integer", "minimum": 0},
|
|
444
|
+
"consent_digest": {"type": "string", "pattern": "^[0-9a-f]{64}$"}
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
"artifact_execution_session": {
|
|
448
|
+
"type": "object",
|
|
449
|
+
"additionalProperties": false,
|
|
450
|
+
"required": ["id", "url", "state", "lease_expires_at", "absolute_expires_at", "cost_microusd", "cost_state", "metered_seconds", "artifact_version_id", "renewal_token"],
|
|
451
|
+
"properties": {
|
|
452
|
+
"id": {"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"},
|
|
453
|
+
"url": {"type": "string", "format": "uri", "pattern": "^https://"},
|
|
454
|
+
"state": {"enum": ["active", "hidden"]},
|
|
455
|
+
"lease_expires_at": {"type": "string", "format": "date-time"},
|
|
456
|
+
"absolute_expires_at": {"type": "string", "format": "date-time"},
|
|
457
|
+
"cost_microusd": {"type": "integer", "minimum": 0},
|
|
458
|
+
"cost_state": {"enum": ["pending", "final"]},
|
|
459
|
+
"metered_seconds": {"type": "integer", "minimum": 0},
|
|
460
|
+
"artifact_version_id": {"type": "string", "pattern": "^[A-Za-z0-9_-]{1,64}$"},
|
|
461
|
+
"renewal_token": {"type": "string", "pattern": "^sfl_[A-Za-z0-9_-]{32,96}$"}
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
"artifact_execution_renewal": {
|
|
465
|
+
"type": "object",
|
|
466
|
+
"additionalProperties": false,
|
|
467
|
+
"required": ["id", "state", "lease_expires_at", "absolute_expires_at", "cost_microusd", "cost_state", "metered_seconds", "handoff"],
|
|
468
|
+
"properties": {
|
|
469
|
+
"id": {"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"},
|
|
470
|
+
"state": {"enum": ["active", "hidden"]},
|
|
471
|
+
"lease_expires_at": {"type": "string", "format": "date-time"},
|
|
472
|
+
"absolute_expires_at": {"type": "string", "format": "date-time"},
|
|
473
|
+
"cost_microusd": {"type": "integer", "minimum": 0},
|
|
474
|
+
"cost_state": {"enum": ["pending", "final"]},
|
|
475
|
+
"metered_seconds": {"type": "integer", "minimum": 0},
|
|
476
|
+
"handoff": {"type": "string", "pattern": "^aat_[A-Za-z0-9_-]{39,1996}$"}
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
"fixtures": [
|
|
481
|
+
{
|
|
482
|
+
"name": "generated-python-viewer",
|
|
483
|
+
"validator": "manifest",
|
|
484
|
+
"valid": true,
|
|
485
|
+
"value": {"schema": 2, "artifacts": [{"contract_version": 2, "id": "energy-landscape", "title": "Energy Landscape", "root": "outputs/energy-landscape", "run": "python energy-landscape-viewer.py", "inputs": {"landscape": {"source": "workspace:simulations/energy-landscape.sqlite", "freshness": "follow"}}}]}
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
"name": "developer-type-recipe",
|
|
489
|
+
"validator": "manifest",
|
|
490
|
+
"valid": true,
|
|
491
|
+
"value": {"schema": 2, "artifacts": [{"contract_version": 2, "id": "investment-report", "title": "Investment Report", "type_id": "investment-report", "root": "outputs/investment-report", "run": "python \"$DHARTA_ARTIFACT_TYPE_DIR/render.py\" report.sqlite", "inputs": {"evidence": {"source": "workspace:evidence", "freshness": "pinned"}}}]}
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
"name": "passive-pdf-entry",
|
|
495
|
+
"validator": "manifest",
|
|
496
|
+
"valid": true,
|
|
497
|
+
"value": {"schema": 2, "artifacts": [{"contract_version": 2, "id": "audit-report", "title": "Audit Report", "root": "outputs/audit-report", "entry": "report.pdf", "inputs": {"audit": {"source": "workspace:audit/source", "freshness": "pinned"}}}]}
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
"name": "static-html-entry",
|
|
501
|
+
"validator": "manifest",
|
|
502
|
+
"valid": true,
|
|
503
|
+
"value": {"schema": 2, "artifacts": [{"contract_version": 2, "id": "interactive-report", "title": "Interactive Report", "root": "outputs/interactive-report", "entry": "index.html", "inputs": {}}]}
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
"name": "interactive-post-websocket",
|
|
507
|
+
"validator": "manifest",
|
|
508
|
+
"valid": true,
|
|
509
|
+
"value": {"schema": 2, "artifacts": [{"contract_version": 2, "id": "simulation", "title": "Interactive Simulation", "root": "outputs/simulation", "run": "python server.py", "inputs": {}}]}
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
"name": "arbitrary-shell-command",
|
|
513
|
+
"validator": "manifest",
|
|
514
|
+
"valid": true,
|
|
515
|
+
"value": {"schema": 2, "artifacts": [{"contract_version": 2, "id": "generated-dashboard", "title": "Generated Dashboard", "root": "outputs/generated-dashboard", "run": "python preprocess.py && http-server index.html --port \"$DHARTA_ARTIFACT_PORT\"", "inputs": {}}]}
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
"name": "shared-sqlite-follow-input",
|
|
519
|
+
"validator": "manifest",
|
|
520
|
+
"valid": true,
|
|
521
|
+
"value": {"schema": 2, "artifacts": [{"contract_version": 2, "id": "landscape-map", "title": "Landscape Map", "root": "outputs/landscape-map", "run": "python map.py", "inputs": {"simulation": {"source": "workspace:simulations/shared.sqlite", "freshness": "follow"}}}, {"contract_version": 2, "id": "landscape-table", "title": "Landscape Table", "root": "outputs/landscape-table", "run": "python table.py", "inputs": {"simulation": {"source": "workspace:simulations/shared.sqlite", "freshness": "follow"}}}]}
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
"name": "generated-agent-app",
|
|
525
|
+
"validator": "manifest",
|
|
526
|
+
"valid": true,
|
|
527
|
+
"value": {"schema": 2, "artifacts": [{"contract_version": 2, "id": "scenario-analyst", "title": "Scenario Analyst", "root": "outputs/scenario-analyst", "run": "karta artifact run agent .", "agent_activation": {"authorities": ["model"], "budget_cents": 100, "lifetime_seconds": 3600, "descendant_ceiling": 0, "activation_mode": "resume", "visibility": "user-facing"}, "inputs": {}}]}
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
"name": "agent-activation-on-arbitrary-runner",
|
|
531
|
+
"validator": "artifact",
|
|
532
|
+
"valid": false,
|
|
533
|
+
"error": "artifact_agent_activation_runner_required",
|
|
534
|
+
"value": {"contract_version": 2, "id": "bad-agent", "title": "Bad Agent", "root": "outputs/bad-agent", "run": "python server.py", "agent_activation": {"authorities": [], "budget_cents": 0, "lifetime_seconds": 3600, "descendant_ceiling": 0, "activation_mode": "resume", "visibility": "headless"}, "inputs": {}}
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
"name": "mixed-v1-v2",
|
|
538
|
+
"validator": "manifest",
|
|
539
|
+
"valid": true,
|
|
540
|
+
"value": {"schema": 2, "artifacts": [{"contract_version": 1, "key": "legacy-report", "kind": "briefing", "title": "Legacy report", "entrypoint": "reports/legacy.md", "dependencies": [{"role": "render", "path": "reports/legacy.md"}], "suggested_surface": "artifact"}, {"contract_version": 2, "id": "new-report", "title": "New report", "root": "outputs/new-report", "entry": "report.md", "inputs": {}}]}
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
"name": "legacy-v1-extension-roundtrip",
|
|
544
|
+
"validator": "manifest",
|
|
545
|
+
"valid": true,
|
|
546
|
+
"value": {"schema": 2, "artifacts": [{"contract_version": 1, "key": "legacy-evidence", "kind": "audit", "title": "Legacy evidence", "entrypoint": "reports/evidence.md", "dependencies": [{"role": "render", "path": "reports/evidence.md"}], "provenance": {"snapshot_id": "snap-17", "sources": ["evidence/a.json"]}}]}
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
"name": "root-traversal",
|
|
550
|
+
"validator": "artifact",
|
|
551
|
+
"valid": false,
|
|
552
|
+
"error": "artifact_root_invalid",
|
|
553
|
+
"value": {"contract_version": 2, "id": "bad-root", "title": "Bad root", "root": "../secret", "run": "python viewer.py", "inputs": {}}
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
"name": "reserved-root-collision",
|
|
557
|
+
"validator": "artifact",
|
|
558
|
+
"valid": false,
|
|
559
|
+
"error": "artifact_root_invalid",
|
|
560
|
+
"value": {"contract_version": 2, "id": "reserved-root", "title": "Reserved root", "root": ".dharta/inputs/data", "run": "python viewer.py", "inputs": {}}
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
"name": "malicious-shell-nul",
|
|
564
|
+
"validator": "artifact",
|
|
565
|
+
"valid": false,
|
|
566
|
+
"error": "artifact_run_invalid",
|
|
567
|
+
"value": {"contract_version": 2, "id": "bad-shell", "title": "Bad shell", "root": "outputs/bad-shell", "run": "python viewer.py\u0000--escape", "inputs": {}}
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
"name": "empty-run",
|
|
571
|
+
"validator": "artifact",
|
|
572
|
+
"valid": false,
|
|
573
|
+
"error": "artifact_run_invalid",
|
|
574
|
+
"value": {"contract_version": 2, "id": "empty-run", "title": "Empty run", "root": "outputs/empty-run", "run": "", "inputs": {}}
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
"name": "missing-presentation",
|
|
578
|
+
"validator": "artifact",
|
|
579
|
+
"valid": false,
|
|
580
|
+
"error": "artifact_presentation_invalid",
|
|
581
|
+
"value": {"contract_version": 2, "id": "missing-presentation", "title": "Missing Presentation", "root": "outputs/missing-presentation", "inputs": {}}
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
"name": "entry-and-run",
|
|
585
|
+
"validator": "artifact",
|
|
586
|
+
"valid": false,
|
|
587
|
+
"error": "artifact_presentation_invalid",
|
|
588
|
+
"value": {"contract_version": 2, "id": "entry-and-run", "title": "Entry and Run", "root": "outputs/entry-and-run", "entry": "index.html", "run": "python server.py", "inputs": {}}
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
"name": "entry-traversal",
|
|
592
|
+
"validator": "artifact",
|
|
593
|
+
"valid": false,
|
|
594
|
+
"error": "artifact_entry_invalid",
|
|
595
|
+
"value": {"contract_version": 2, "id": "bad-entry", "title": "Bad Entry", "root": "outputs/bad-entry", "entry": "../secret.md", "inputs": {}}
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
"name": "empty-entry",
|
|
599
|
+
"validator": "artifact",
|
|
600
|
+
"valid": false,
|
|
601
|
+
"error": "artifact_entry_invalid",
|
|
602
|
+
"value": {"contract_version": 2, "id": "empty-entry", "title": "Empty Entry", "root": "outputs/empty-entry", "entry": "", "inputs": {}}
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
"name": "invalid-run-unicode",
|
|
606
|
+
"validator": "artifact",
|
|
607
|
+
"valid": false,
|
|
608
|
+
"error": "artifact_run_invalid",
|
|
609
|
+
"value": {"contract_version": 2, "id": "unicode-run", "title": "Unicode run", "root": "outputs/unicode-run", "run": "python __KARTA_UNPAIRED_SURROGATE__", "inputs": {}}
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
"name": "invalid-title-unicode",
|
|
613
|
+
"validator": "artifact",
|
|
614
|
+
"valid": false,
|
|
615
|
+
"error": "artifact_title_invalid",
|
|
616
|
+
"value": {"contract_version": 2, "id": "unicode-title", "title": "__KARTA_UNPAIRED_SURROGATE__", "root": "outputs/unicode-title", "run": "python viewer.py", "inputs": {}}
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
"name": "invalid-root-unicode",
|
|
620
|
+
"validator": "artifact",
|
|
621
|
+
"valid": false,
|
|
622
|
+
"error": "artifact_root_invalid",
|
|
623
|
+
"value": {"contract_version": 2, "id": "unicode-root", "title": "Unicode root", "root": "outputs/__KARTA_UNPAIRED_SURROGATE__", "run": "python viewer.py", "inputs": {}}
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
"name": "invalid-input-source-unicode",
|
|
627
|
+
"validator": "artifact",
|
|
628
|
+
"valid": false,
|
|
629
|
+
"error": "artifact_input_source_invalid",
|
|
630
|
+
"value": {"contract_version": 2, "id": "unicode-input", "title": "Unicode input", "root": "outputs/unicode-input", "run": "python viewer.py", "inputs": {"data": {"source": "workspace:data/__KARTA_UNPAIRED_SURROGATE__", "freshness": "pinned"}}}
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
"name": "invalid-type-id",
|
|
634
|
+
"validator": "artifact",
|
|
635
|
+
"valid": false,
|
|
636
|
+
"error": "artifact_type_id_invalid",
|
|
637
|
+
"value": {"contract_version": 2, "id": "bad-type", "title": "Bad Type", "type_id": "../report", "root": "outputs/bad-type", "run": "python viewer.py", "inputs": {}}
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
"name": "implicit-freshness",
|
|
641
|
+
"validator": "artifact",
|
|
642
|
+
"valid": false,
|
|
643
|
+
"error": "artifact_input_freshness_required",
|
|
644
|
+
"value": {"contract_version": 2, "id": "implicit-freshness", "title": "Implicit freshness", "root": "outputs/implicit", "run": "python viewer.py", "inputs": {"data": {"source": "workspace:data.sqlite"}}}
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
"name": "input-alias-traversal",
|
|
648
|
+
"validator": "artifact",
|
|
649
|
+
"valid": false,
|
|
650
|
+
"error": "artifact_input_alias_invalid",
|
|
651
|
+
"value": {"contract_version": 2, "id": "bad-alias", "title": "Bad alias", "root": "outputs/bad-alias", "run": "python viewer.py", "inputs": {"../data": {"source": "workspace:data.sqlite", "freshness": "pinned"}}}
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
"name": "workspace-source-traversal",
|
|
655
|
+
"validator": "artifact",
|
|
656
|
+
"valid": false,
|
|
657
|
+
"error": "artifact_input_source_invalid",
|
|
658
|
+
"value": {"contract_version": 2, "id": "bad-source", "title": "Bad source", "root": "outputs/bad-source", "run": "python viewer.py", "inputs": {"data": {"source": "workspace:../secret", "freshness": "pinned"}}}
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
"name": "unsupported-connection-v1",
|
|
662
|
+
"validator": "artifact",
|
|
663
|
+
"valid": false,
|
|
664
|
+
"error": "artifact_input_source_invalid",
|
|
665
|
+
"value": {"contract_version": 2, "id": "connection-input", "title": "Connection input", "root": "outputs/connection", "run": "python viewer.py", "inputs": {"market": {"source": "connection:market-production", "freshness": "follow"}}}
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
"name": "escaping-symlink",
|
|
669
|
+
"validator": "tree",
|
|
670
|
+
"valid": false,
|
|
671
|
+
"error": "artifact_tree_symlink_escape",
|
|
672
|
+
"value": {"scope": "root", "files": 3, "bytes": 200, "escaping_symlink": true, "secret_path": false, "reserved_path_collision": false}
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
"name": "malformed-tree-null",
|
|
676
|
+
"validator": "tree",
|
|
677
|
+
"valid": false,
|
|
678
|
+
"error": "artifact_tree_invalid",
|
|
679
|
+
"value": null
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
"name": "invalid-tree-scope",
|
|
683
|
+
"validator": "tree",
|
|
684
|
+
"valid": false,
|
|
685
|
+
"error": "artifact_tree_scope_invalid",
|
|
686
|
+
"value": {"scope": "bogus", "files": 0, "bytes": 0, "escaping_symlink": false, "secret_path": false, "reserved_path_collision": false}
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
"name": "bounded-root-tree",
|
|
690
|
+
"validator": "tree",
|
|
691
|
+
"valid": true,
|
|
692
|
+
"value": {"scope": "root", "files": 20000, "bytes": 1000000000, "escaping_symlink": false, "secret_path": false, "reserved_path_collision": false}
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
"name": "secret-input-path",
|
|
696
|
+
"validator": "tree",
|
|
697
|
+
"valid": false,
|
|
698
|
+
"error": "artifact_tree_secret_path",
|
|
699
|
+
"value": {"scope": "input", "files": 1, "bytes": 100, "escaping_symlink": false, "secret_path": true, "reserved_path_collision": false}
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
"name": "oversized-root-tree",
|
|
703
|
+
"validator": "tree",
|
|
704
|
+
"valid": false,
|
|
705
|
+
"error": "artifact_tree_files_exceeded",
|
|
706
|
+
"value": {"scope": "root", "files": 20001, "bytes": 100, "escaping_symlink": false, "secret_path": false, "reserved_path_collision": false}
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
"name": "oversized-input-tree",
|
|
710
|
+
"validator": "tree",
|
|
711
|
+
"valid": false,
|
|
712
|
+
"error": "artifact_tree_bytes_exceeded",
|
|
713
|
+
"value": {"scope": "input", "files": 1, "bytes": 1000000001, "escaping_symlink": false, "secret_path": false, "reserved_path_collision": false}
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
"name": "oversized-static-share",
|
|
717
|
+
"validator": "tree",
|
|
718
|
+
"valid": false,
|
|
719
|
+
"error": "artifact_tree_files_exceeded",
|
|
720
|
+
"value": {"scope": "static_share", "files": 20001, "bytes": 100, "escaping_symlink": false, "secret_path": false, "reserved_path_collision": false}
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
"name": "oversized-combined-inputs",
|
|
724
|
+
"validator": "tree",
|
|
725
|
+
"valid": false,
|
|
726
|
+
"error": "artifact_tree_bytes_exceeded",
|
|
727
|
+
"value": {"scope": "all_inputs", "files": 2, "bytes": 5000000001, "escaping_symlink": false, "secret_path": false, "reserved_path_collision": false}
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
"name": "reserved-input-mount-collision",
|
|
731
|
+
"validator": "tree",
|
|
732
|
+
"valid": false,
|
|
733
|
+
"error": "artifact_tree_reserved_path_collision",
|
|
734
|
+
"value": {"scope": "root", "files": 4, "bytes": 300, "escaping_symlink": false, "secret_path": false, "reserved_path_collision": true}
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
"name": "html-with-charset",
|
|
738
|
+
"validator": "content_type",
|
|
739
|
+
"valid": true,
|
|
740
|
+
"value": "text/html; charset=utf-8"
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
"name": "non-html-root",
|
|
744
|
+
"validator": "content_type",
|
|
745
|
+
"valid": false,
|
|
746
|
+
"error": "artifact_root_media_type_invalid",
|
|
747
|
+
"value": "audio/mpeg"
|
|
748
|
+
}
|
|
749
|
+
]
|
|
750
|
+
}
|