@everfur/cli 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,74 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://everfur.com/contracts/cli-sandbox-create/v1",
4
+ "title": "Everfur CLI sandbox create document",
5
+ "description": "The committed output contract of `everfur sandbox create --json`. The load-bearing clause is `secretDisclosed: {const: false}`: this document may never carry a raw credential, and a machine reading it can assert that rather than trusting prose. Any change that made the field true would fail tests/contract before it shipped. `status: claim_unavailable` is a complete, valid document, not an error: the key WAS provisioned and there is simply no way to claim its secret, which exits 8.",
6
+ "type": "object",
7
+ "required": [
8
+ "schemaVersion",
9
+ "kind",
10
+ "generatedBy",
11
+ "status",
12
+ "requestId",
13
+ "clientId",
14
+ "keyId",
15
+ "label",
16
+ "createdAt",
17
+ "claimUrl",
18
+ "claimExpiresAt",
19
+ "secretDisclosed",
20
+ "secretDiscarded",
21
+ "orphanedKey",
22
+ "nextActions"
23
+ ],
24
+ "properties": {
25
+ "schemaVersion": { "const": 1 },
26
+ "kind": { "const": "everfur.sandbox-create" },
27
+ "generatedBy": {
28
+ "type": "object",
29
+ "required": ["name", "version"],
30
+ "properties": {
31
+ "name": { "type": "string", "minLength": 1 },
32
+ "version": { "type": "string", "minLength": 1 }
33
+ }
34
+ },
35
+ "status": { "enum": ["claim_issued", "claim_unavailable"] },
36
+ "requestId": { "oneOf": [{ "type": "null" }, { "type": "string", "minLength": 1 }] },
37
+ "clientId": { "type": "string" },
38
+ "keyId": { "type": "string", "minLength": 1 },
39
+ "label": { "oneOf": [{ "type": "null" }, { "type": "string" }] },
40
+ "createdAt": { "oneOf": [{ "type": "null" }, { "type": "string" }] },
41
+ "claimUrl": {
42
+ "description": "Where a human claims the secret in a browser. Null exactly when status is claim_unavailable.",
43
+ "oneOf": [{ "type": "null" }, { "type": "string", "minLength": 1 }]
44
+ },
45
+ "claimExpiresAt": { "oneOf": [{ "type": "null" }, { "type": "string" }] },
46
+ "secretDisclosed": {
47
+ "description": "Always false. The CLI does not print, log, or return a raw secret in any mode.",
48
+ "const": false
49
+ },
50
+ "secretDiscarded": {
51
+ "description": "True when the server returned a raw secret inline and the CLI discarded it unread, which leaves a live credential nobody holds.",
52
+ "type": "boolean"
53
+ },
54
+ "orphanedKey": {
55
+ "description": "What became of an unclaimable key. `not_needed` means a claim URL was issued and the key is wanted. `revoked` means the CLI minted an unclaimable key and revoked it again immediately, leaving nothing live behind. `revoke_failed` is the ONLY value that means a live credential nobody holds still exists.",
56
+ "enum": ["not_needed", "revoked", "revoke_failed"]
57
+ },
58
+ "nextActions": {
59
+ "type": "array",
60
+ "minItems": 1,
61
+ "items": { "type": "string", "minLength": 1 }
62
+ }
63
+ },
64
+ "allOf": [
65
+ {
66
+ "if": { "properties": { "status": { "const": "claim_unavailable" } }, "required": ["status"] },
67
+ "then": { "properties": { "claimUrl": { "type": "null" } } }
68
+ },
69
+ {
70
+ "if": { "properties": { "status": { "const": "claim_issued" } }, "required": ["status"] },
71
+ "then": { "properties": { "claimUrl": { "type": "string", "minLength": 1 } } }
72
+ }
73
+ ]
74
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://everfur.com/contracts/cli-verification/v1",
4
+ "title": "Everfur CLI verification document",
5
+ "description": "The committed output contract of `everfur verify --json`. Every step carries a result AND a reason, including a passing one: this command never reports a bare exit code as its result, and `reason` having minLength 1 on every step is that rule expressed where a machine can check it. `requestId` is null only for a step that made no call, which is what makes a SKIP legible in a support ticket.",
6
+ "type": "object",
7
+ "required": ["schemaVersion", "kind", "generatedBy", "status", "baseUrl", "summary", "steps"],
8
+ "properties": {
9
+ "schemaVersion": { "const": 1 },
10
+ "kind": { "const": "everfur.verification" },
11
+ "generatedBy": {
12
+ "type": "object",
13
+ "required": ["name", "version"],
14
+ "properties": {
15
+ "name": { "type": "string", "minLength": 1 },
16
+ "version": { "type": "string", "minLength": 1 }
17
+ }
18
+ },
19
+ "status": {
20
+ "description": "passed = every step PASSed. failed = at least one FAILed (exit 7). incomplete = nothing failed but a step was skipped (exit 3).",
21
+ "enum": ["passed", "failed", "incomplete"]
22
+ },
23
+ "baseUrl": { "type": "string", "minLength": 1 },
24
+ "summary": {
25
+ "type": "object",
26
+ "required": ["passed", "failed", "skipped"],
27
+ "properties": {
28
+ "passed": { "type": "integer", "minimum": 0 },
29
+ "failed": { "type": "integer", "minimum": 0 },
30
+ "skipped": { "type": "integer", "minimum": 0 }
31
+ }
32
+ },
33
+ "steps": {
34
+ "type": "array",
35
+ "minItems": 1,
36
+ "items": {
37
+ "type": "object",
38
+ "required": ["id", "title", "result", "reason", "requestId", "details"],
39
+ "properties": {
40
+ "id": { "type": "string", "minLength": 1 },
41
+ "title": { "type": "string", "minLength": 1 },
42
+ "result": { "enum": ["PASS", "FAIL", "SKIP"] },
43
+ "reason": {
44
+ "description": "Always populated, for every result. A bare PASS is not a report.",
45
+ "type": "string",
46
+ "minLength": 1
47
+ },
48
+ "requestId": { "oneOf": [{ "type": "null" }, { "type": "string", "minLength": 1 }] },
49
+ "details": { "type": "array", "items": { "type": "string" } }
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }