archctx-contracts 0.11.3 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/fixtures/valid/archctx-capabilities.json +1 -1
  2. package/fixtures/valid/dependency-constraint-evaluation.json +17 -0
  3. package/fixtures/valid/product-version-manifest.json +5 -9
  4. package/package.json +1 -1
  5. package/schemas/runtime/dependency-constraint-evaluation.schema.json +207 -0
  6. package/schemas/runtime/product-version-manifest.schema.json +2 -6
  7. package/src/architecture.ts +16 -0
  8. package/src/failure.ts +0 -8
  9. package/src/index.ts +1 -2
  10. package/src/ports.ts +0 -35
  11. package/src/product-version.ts +1 -9
  12. package/src/review-guards.ts +90 -0
  13. package/src/schema.ts +0 -2
  14. package/fixtures/boundary/attestation-v2-error.json +0 -43
  15. package/fixtures/boundary/check-delivery-dead-letter.json +0 -14
  16. package/fixtures/boundary/review-challenge-v2-organization.json +0 -15
  17. package/fixtures/boundary/runner-identity-organization-scope.json +0 -16
  18. package/fixtures/invalid/attestation-v2-finding-field.json +0 -39
  19. package/fixtures/invalid/check-delivery-legacy-check-name.json +0 -14
  20. package/fixtures/invalid/review-challenge-v2-private-field.json +0 -16
  21. package/fixtures/valid/attestation-v2.json +0 -38
  22. package/fixtures/valid/attestation.json +0 -25
  23. package/fixtures/valid/check-delivery.json +0 -14
  24. package/fixtures/valid/device-identity.json +0 -10
  25. package/fixtures/valid/governance-key-status.json +0 -11
  26. package/fixtures/valid/org-runner-identity.json +0 -10
  27. package/fixtures/valid/review-challenge-v2.json +0 -15
  28. package/fixtures/valid/runner-identity.json +0 -13
  29. package/schemas/cloud/attestation-v2.schema.json +0 -85
  30. package/schemas/cloud/attestation.schema.json +0 -49
  31. package/schemas/cloud/check-delivery.schema.json +0 -25
  32. package/schemas/cloud/device-identity.schema.json +0 -18
  33. package/schemas/cloud/governance-key-status.schema.json +0 -19
  34. package/schemas/cloud/org-runner-identity.schema.json +0 -21
  35. package/schemas/cloud/review-challenge-v2.schema.json +0 -23
  36. package/schemas/cloud/runner-identity.schema.json +0 -42
  37. package/src/control-plane-routes.ts +0 -35
  38. package/src/github-governance.ts +0 -850
@@ -1,39 +0,0 @@
1
- {
2
- "schemaVersion": "archcontext.attestation/v2",
3
- "attestationId": "att_bad_finding",
4
- "challengeId": "chal_20260620_0001",
5
- "installationId": 10001,
6
- "repositoryId": 20002,
7
- "pullRequestNumber": 42,
8
- "headSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
9
- "baseSha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
10
- "mergeBaseSha": "cccccccccccccccccccccccccccccccccccccccc",
11
- "headTreeOid": "tree_aaaaaaaa",
12
- "worktreeDigest": "sha256:0000000000000000000000000000000000000000000000000000000000000000",
13
- "modelDigest": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
14
- "policyDigest": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
15
- "codeFactsDigest": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
16
- "reviewDigest": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
17
- "result": "pass",
18
- "execution": {
19
- "trustLevel": "developer",
20
- "source": "clean-commit-worktree",
21
- "principalId": "device_0001",
22
- "publicKeyId": "key_device_0001"
23
- },
24
- "runtime": {
25
- "version": "0.2.1",
26
- "buildDigest": "sha256:5555555555555555555555555555555555555555555555555555555555555555",
27
- "codeGraphVersion": "1.0.1",
28
- "capabilitiesDigest": "sha256:6666666666666666666666666666666666666666666666666666666666666666"
29
- },
30
- "nonce": "nonce_base64url_0001",
31
- "startedAt": "2026-06-20T09:03:00Z",
32
- "completedAt": "2026-06-20T09:04:00Z",
33
- "expiresAt": "2026-06-20T09:15:00Z",
34
- "signature": {
35
- "algorithm": "ed25519",
36
- "value": "base64url_signature"
37
- },
38
- "finding": "private finding body"
39
- }
@@ -1,14 +0,0 @@
1
- {
2
- "schemaVersion": "archcontext.check-delivery/v1",
3
- "deliveryId": "delivery_bad_legacy",
4
- "challengeId": "chal_20260620_0001",
5
- "checkRunId": "check_legacy",
6
- "checkName": "ArchContext / Legacy Architecture Review",
7
- "headSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
8
- "status": "PENDING",
9
- "attemptCount": 0,
10
- "nextAttemptAt": null,
11
- "lastErrorCode": null,
12
- "createdAt": "2026-06-20T09:00:00Z",
13
- "updatedAt": "2026-06-20T09:00:00Z"
14
- }
@@ -1,16 +0,0 @@
1
- {
2
- "schemaVersion": "archcontext.review-challenge/v2",
3
- "challengeId": "chal_bad_private_field",
4
- "installationId": 10001,
5
- "repositoryId": 20002,
6
- "pullRequestNumber": 42,
7
- "headSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
8
- "baseSha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
9
- "nonce": "nonce_base64url_0001",
10
- "requiredTrust": "developer",
11
- "policyProfileId": "policy.default",
12
- "createdAt": "2026-06-20T09:00:00Z",
13
- "expiresAt": "2026-06-20T09:15:00Z",
14
- "status": "PENDING",
15
- "filename": "src/private.ts"
16
- }
@@ -1,38 +0,0 @@
1
- {
2
- "schemaVersion": "archcontext.attestation/v2",
3
- "attestationId": "att_20260620_0001",
4
- "challengeId": "chal_20260620_0001",
5
- "installationId": 10001,
6
- "repositoryId": 20002,
7
- "pullRequestNumber": 42,
8
- "headSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
9
- "baseSha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
10
- "mergeBaseSha": "cccccccccccccccccccccccccccccccccccccccc",
11
- "headTreeOid": "tree_aaaaaaaa",
12
- "worktreeDigest": "sha256:0000000000000000000000000000000000000000000000000000000000000000",
13
- "modelDigest": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
14
- "policyDigest": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
15
- "codeFactsDigest": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
16
- "reviewDigest": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
17
- "result": "pass",
18
- "execution": {
19
- "trustLevel": "developer",
20
- "source": "clean-commit-worktree",
21
- "principalId": "device_0001",
22
- "publicKeyId": "key_device_0001"
23
- },
24
- "runtime": {
25
- "version": "0.2.1",
26
- "buildDigest": "sha256:5555555555555555555555555555555555555555555555555555555555555555",
27
- "codeGraphVersion": "1.0.1",
28
- "capabilitiesDigest": "sha256:6666666666666666666666666666666666666666666666666666666666666666"
29
- },
30
- "nonce": "nonce_base64url_0001",
31
- "startedAt": "2026-06-20T09:03:00Z",
32
- "completedAt": "2026-06-20T09:04:00Z",
33
- "expiresAt": "2026-06-20T09:15:00Z",
34
- "signature": {
35
- "algorithm": "ed25519",
36
- "value": "base64url_signature"
37
- }
38
- }
@@ -1,25 +0,0 @@
1
- {
2
- "schemaVersion": "archcontext.attestation/v1",
3
- "attestationId": "att_123",
4
- "challengeId": "challenge_123",
5
- "repository": {
6
- "provider": "github",
7
- "owner": "ancienttwo",
8
- "name": "arch-context",
9
- "visibility": "private"
10
- },
11
- "headSha": "abc123",
12
- "worktreeDigest": "sha256:0000000000000000000000000000000000000000000000000000000000000000",
13
- "reviewDigest": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
14
- "device": {
15
- "deviceId": "device_local",
16
- "publicKeyId": "pk_local"
17
- },
18
- "issuedAt": "2026-06-19T00:00:00Z",
19
- "expiresAt": "2026-06-19T00:10:00Z",
20
- "trustLevel": "developer",
21
- "signature": {
22
- "alg": "ed25519",
23
- "value": "base64-test-signature"
24
- }
25
- }
@@ -1,14 +0,0 @@
1
- {
2
- "schemaVersion": "archcontext.check-delivery/v1",
3
- "deliveryId": "delivery_0001",
4
- "challengeId": "chal_20260620_0001",
5
- "checkRunId": "check_0001",
6
- "checkName": "ArchContext / Developer Review",
7
- "headSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
8
- "status": "PENDING",
9
- "attemptCount": 0,
10
- "nextAttemptAt": null,
11
- "lastErrorCode": null,
12
- "createdAt": "2026-06-20T09:00:00Z",
13
- "updatedAt": "2026-06-20T09:00:00Z"
14
- }
@@ -1,10 +0,0 @@
1
- {
2
- "schemaVersion": "archcontext.device-identity/v1",
3
- "deviceId": "device_0001",
4
- "accountId": "acct_0001",
5
- "publicKeyId": "key_device_0001",
6
- "publicKeyFingerprint": "sha256:8888888888888888888888888888888888888888888888888888888888888888",
7
- "status": "active",
8
- "createdAt": "2026-06-20T09:00:00Z",
9
- "revokedAt": null
10
- }
@@ -1,11 +0,0 @@
1
- {
2
- "schemaVersion": "archcontext.governance-key-status/v1",
3
- "publicKeyId": "key_runner_0001",
4
- "ownerKind": "runner",
5
- "ownerId": "runner_0001",
6
- "fingerprint": "sha256:9999999999999999999999999999999999999999999999999999999999999999",
7
- "status": "active",
8
- "createdAt": "2026-06-20T09:00:00Z",
9
- "rotatedAt": null,
10
- "revokedAt": null
11
- }
@@ -1,10 +0,0 @@
1
- {
2
- "schemaVersion": "archcontext.org-runner-identity/v1",
3
- "runnerId": "runner_acme_prod_1",
4
- "installationId": 12345,
5
- "repositoryNumericIds": [1001, 1002],
6
- "publicKeyId": "org_pk_1",
7
- "publicKeyFingerprint": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
8
- "status": "active",
9
- "createdAt": "2026-06-19T00:00:00Z"
10
- }
@@ -1,15 +0,0 @@
1
- {
2
- "schemaVersion": "archcontext.review-challenge/v2",
3
- "challengeId": "chal_20260620_0001",
4
- "installationId": 10001,
5
- "repositoryId": 20002,
6
- "pullRequestNumber": 42,
7
- "headSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
8
- "baseSha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
9
- "nonce": "nonce_base64url_0001",
10
- "requiredTrust": "developer",
11
- "policyProfileId": "policy.default",
12
- "createdAt": "2026-06-20T09:00:00Z",
13
- "expiresAt": "2026-06-20T09:15:00Z",
14
- "status": "PENDING"
15
- }
@@ -1,13 +0,0 @@
1
- {
2
- "schemaVersion": "archcontext.runner-identity/v1",
3
- "runnerId": "runner_0001",
4
- "installationId": 10001,
5
- "repositoryIds": [20002],
6
- "workflowRef": "owner/repo/.github/workflows/archcontext-review.yml@refs/heads/main",
7
- "publicKeyId": "key_runner_0001",
8
- "publicKeyFingerprint": "sha256:7777777777777777777777777777777777777777777777777777777777777777",
9
- "status": "active",
10
- "createdAt": "2026-06-20T09:00:00Z",
11
- "rotatedAt": null,
12
- "revokedAt": null
13
- }
@@ -1,85 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://archctx.repoharness.com/schemas/cloud/attestation-v2.schema.json",
4
- "title": "AttestationV2",
5
- "type": "object",
6
- "additionalProperties": false,
7
- "required": ["schemaVersion", "attestationId", "challengeId", "installationId", "repositoryId", "pullRequestNumber", "headSha", "baseSha", "mergeBaseSha", "headTreeOid", "worktreeDigest", "modelDigest", "policyDigest", "codeFactsDigest", "reviewDigest", "result", "execution", "runtime", "nonce", "startedAt", "completedAt", "expiresAt", "signature"],
8
- "properties": {
9
- "schemaVersion": { "const": "archcontext.attestation/v2" },
10
- "attestationId": { "type": "string" },
11
- "challengeId": { "type": "string" },
12
- "installationId": { "type": "integer", "minimum": 1 },
13
- "repositoryId": { "type": "integer", "minimum": 1 },
14
- "pullRequestNumber": { "type": "integer", "minimum": 1 },
15
- "headSha": { "type": "string", "pattern": "^[a-f0-9]{40,64}$" },
16
- "baseSha": { "type": "string", "pattern": "^[a-f0-9]{40,64}$" },
17
- "mergeBaseSha": { "type": "string", "pattern": "^[a-f0-9]{40,64}$" },
18
- "headTreeOid": { "type": "string" },
19
- "worktreeDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
20
- "modelDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
21
- "policyDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
22
- "codeFactsDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
23
- "reviewDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
24
- "result": { "type": "string", "enum": ["pass", "fail", "error"] },
25
- "errorCode": { "type": "string", "enum": ["RUNTIME_VERSION_UNSUPPORTED", "HEAD_UNAVAILABLE", "WORKTREE_NOT_CLEAN", "CODEGRAPH_FAILED", "POLICY_INVALID", "REVIEW_INCOMPLETE"] },
26
- "execution": {
27
- "type": "object",
28
- "oneOf": [
29
- {
30
- "type": "object",
31
- "additionalProperties": false,
32
- "required": ["trustLevel", "source", "principalId", "publicKeyId"],
33
- "properties": {
34
- "trustLevel": { "const": "developer" },
35
- "source": { "const": "clean-commit-worktree" },
36
- "principalId": { "type": "string" },
37
- "publicKeyId": { "type": "string" }
38
- }
39
- },
40
- {
41
- "type": "object",
42
- "additionalProperties": false,
43
- "required": ["trustLevel", "source", "principalId", "publicKeyId", "runnerId", "workflowRef", "runId", "runAttempt"],
44
- "properties": {
45
- "trustLevel": { "const": "organization" },
46
- "source": { "const": "organization-runner-checkout" },
47
- "principalId": { "type": "string" },
48
- "publicKeyId": { "type": "string" },
49
- "runnerId": { "type": "string", "pattern": "^runner_[A-Za-z0-9_.-]+$" },
50
- "workflowRef": {
51
- "type": "string",
52
- "pattern": "^[^/\\s]+/[^/\\s]+/\\.github/workflows/[^@\\s]+@(refs/(heads|tags)/[^@\\s]+|[a-fA-F0-9]{40})$"
53
- },
54
- "runId": { "type": "string", "pattern": "^[1-9][0-9]*$" },
55
- "runAttempt": { "type": "integer", "minimum": 1 }
56
- }
57
- }
58
- ]
59
- },
60
- "runtime": {
61
- "type": "object",
62
- "additionalProperties": false,
63
- "required": ["version", "buildDigest", "codeGraphVersion", "capabilitiesDigest"],
64
- "properties": {
65
- "version": { "type": "string" },
66
- "buildDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
67
- "codeGraphVersion": { "type": "string" },
68
- "capabilitiesDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
69
- }
70
- },
71
- "nonce": { "type": "string" },
72
- "startedAt": { "type": "string" },
73
- "completedAt": { "type": "string" },
74
- "expiresAt": { "type": "string" },
75
- "signature": {
76
- "type": "object",
77
- "additionalProperties": false,
78
- "required": ["algorithm", "value"],
79
- "properties": {
80
- "algorithm": { "type": "string", "enum": ["ed25519"] },
81
- "value": { "type": "string" }
82
- }
83
- }
84
- }
85
- }
@@ -1,49 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://archctx.repoharness.com/schemas/cloud/attestation.schema.json",
4
- "title": "Attestation",
5
- "type": "object",
6
- "additionalProperties": false,
7
- "required": ["schemaVersion", "attestationId", "challengeId", "repository", "headSha", "worktreeDigest", "reviewDigest", "device", "issuedAt", "expiresAt", "trustLevel", "signature"],
8
- "properties": {
9
- "schemaVersion": { "const": "archcontext.attestation/v1" },
10
- "attestationId": { "type": "string" },
11
- "challengeId": { "type": "string" },
12
- "repository": {
13
- "type": "object",
14
- "additionalProperties": false,
15
- "required": ["provider", "owner", "name", "visibility"],
16
- "properties": {
17
- "provider": { "type": "string", "enum": ["github"] },
18
- "owner": { "type": "string" },
19
- "name": { "type": "string" },
20
- "visibility": { "type": "string", "enum": ["public", "private"] }
21
- }
22
- },
23
- "headSha": { "type": "string" },
24
- "worktreeDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
25
- "reviewDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
26
- "device": {
27
- "type": "object",
28
- "additionalProperties": false,
29
- "required": ["deviceId", "publicKeyId"],
30
- "properties": {
31
- "deviceId": { "type": "string" },
32
- "publicKeyId": { "type": "string" }
33
- }
34
- },
35
- "issuedAt": { "type": "string" },
36
- "expiresAt": { "type": "string" },
37
- "trustLevel": { "type": "string", "enum": ["developer", "organization"] },
38
- "signature": {
39
- "type": "object",
40
- "additionalProperties": false,
41
- "required": ["alg", "value"],
42
- "properties": {
43
- "alg": { "type": "string", "enum": ["ed25519"] },
44
- "value": { "type": "string" }
45
- }
46
- },
47
- "extensions": { "type": "object", "additionalProperties": true }
48
- }
49
- }
@@ -1,25 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://archctx.repoharness.com/schemas/cloud/check-delivery.schema.json",
4
- "title": "CheckDelivery",
5
- "type": "object",
6
- "additionalProperties": false,
7
- "required": ["schemaVersion", "deliveryId", "challengeId", "checkName", "headSha", "status", "attemptCount", "createdAt", "updatedAt"],
8
- "properties": {
9
- "schemaVersion": { "const": "archcontext.check-delivery/v1" },
10
- "deliveryId": { "type": "string" },
11
- "challengeId": { "type": "string" },
12
- "checkRunId": { "type": ["string", "null"] },
13
- "checkName": { "type": "string", "enum": ["ArchContext / Developer Review", "ArchContext / Organization Runner"] },
14
- "headSha": { "type": "string", "pattern": "^[a-f0-9]{40,64}$" },
15
- "status": { "type": "string", "enum": ["PENDING", "PUBLISHED", "RETRYING", "DEAD_LETTER"] },
16
- "attemptCount": { "type": "integer", "minimum": 0 },
17
- "nextAttemptAt": { "type": ["string", "null"] },
18
- "lastErrorCode": {
19
- "type": ["string", "null"],
20
- "enum": ["CHALLENGE_NOT_FOUND", "CHALLENGE_EXPIRED", "CHALLENGE_SUPERSEDED", "CHALLENGE_ALREADY_CONSUMED", "NONCE_MISMATCH", "REPOSITORY_MISMATCH", "PULL_REQUEST_MISMATCH", "HEAD_SHA_MISMATCH", "BASE_SHA_MISMATCH", "TREE_OID_MISMATCH", "TRUST_LEVEL_MISMATCH", "DIGEST_INVALID", "RUNNER_NOT_FOUND", "RUNNER_REVOKED", "RUNNER_SCOPE_MISMATCH", "WORKFLOW_REF_MISMATCH", "DEVICE_REVOKED", "RUNTIME_VERSION_UNSUPPORTED", "SIGNATURE_INVALID", "PAYLOAD_PRIVACY_VIOLATION", null]
21
- },
22
- "createdAt": { "type": "string" },
23
- "updatedAt": { "type": "string" }
24
- }
25
- }
@@ -1,18 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://archctx.repoharness.com/schemas/cloud/device-identity.schema.json",
4
- "title": "DeviceIdentity",
5
- "type": "object",
6
- "additionalProperties": false,
7
- "required": ["schemaVersion", "deviceId", "accountId", "publicKeyId", "publicKeyFingerprint", "status", "createdAt"],
8
- "properties": {
9
- "schemaVersion": { "const": "archcontext.device-identity/v1" },
10
- "deviceId": { "type": "string" },
11
- "accountId": { "type": "string" },
12
- "publicKeyId": { "type": "string" },
13
- "publicKeyFingerprint": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
14
- "status": { "type": "string", "enum": ["active", "revoked"] },
15
- "createdAt": { "type": "string" },
16
- "revokedAt": { "type": ["string", "null"] }
17
- }
18
- }
@@ -1,19 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://archctx.repoharness.com/schemas/cloud/governance-key-status.schema.json",
4
- "title": "GovernanceKeyStatus",
5
- "type": "object",
6
- "additionalProperties": false,
7
- "required": ["schemaVersion", "publicKeyId", "ownerKind", "ownerId", "fingerprint", "status", "createdAt"],
8
- "properties": {
9
- "schemaVersion": { "const": "archcontext.governance-key-status/v1" },
10
- "publicKeyId": { "type": "string" },
11
- "ownerKind": { "type": "string", "enum": ["device", "runner"] },
12
- "ownerId": { "type": "string" },
13
- "fingerprint": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
14
- "status": { "type": "string", "enum": ["active", "rotating", "revoked"] },
15
- "createdAt": { "type": "string" },
16
- "rotatedAt": { "type": ["string", "null"] },
17
- "revokedAt": { "type": ["string", "null"] }
18
- }
19
- }
@@ -1,21 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://archctx.repoharness.com/schemas/cloud/org-runner-identity.schema.json",
4
- "title": "OrgRunnerIdentity",
5
- "type": "object",
6
- "additionalProperties": false,
7
- "required": ["schemaVersion", "runnerId", "installationId", "publicKeyId", "publicKeyFingerprint", "status", "createdAt"],
8
- "properties": {
9
- "schemaVersion": { "const": "archcontext.org-runner-identity/v1" },
10
- "runnerId": { "type": "string" },
11
- "installationId": { "type": "integer", "minimum": 1 },
12
- "repositoryNumericIds": { "type": "array", "items": { "type": "integer", "minimum": 1 } },
13
- "publicKeyId": { "type": "string" },
14
- "publicKeyFingerprint": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
15
- "status": { "type": "string", "enum": ["active", "revoked"] },
16
- "createdAt": { "type": "string" },
17
- "rotatedAt": { "type": "string" },
18
- "revokedAt": { "type": "string" },
19
- "extensions": { "type": "object", "additionalProperties": true }
20
- }
21
- }
@@ -1,23 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://archctx.repoharness.com/schemas/cloud/review-challenge-v2.schema.json",
4
- "title": "ReviewChallengeV2",
5
- "type": "object",
6
- "additionalProperties": false,
7
- "required": ["schemaVersion", "challengeId", "installationId", "repositoryId", "pullRequestNumber", "headSha", "baseSha", "nonce", "requiredTrust", "policyProfileId", "createdAt", "expiresAt", "status"],
8
- "properties": {
9
- "schemaVersion": { "const": "archcontext.review-challenge/v2" },
10
- "challengeId": { "type": "string" },
11
- "installationId": { "type": "integer", "minimum": 1 },
12
- "repositoryId": { "type": "integer", "minimum": 1 },
13
- "pullRequestNumber": { "type": "integer", "minimum": 1 },
14
- "headSha": { "type": "string", "pattern": "^[a-f0-9]{40,64}$" },
15
- "baseSha": { "type": "string", "pattern": "^[a-f0-9]{40,64}$" },
16
- "nonce": { "type": "string" },
17
- "requiredTrust": { "type": "string", "enum": ["developer", "organization"] },
18
- "policyProfileId": { "type": "string" },
19
- "createdAt": { "type": "string" },
20
- "expiresAt": { "type": "string" },
21
- "status": { "type": "string", "enum": ["PENDING", "LEASED", "SUBMITTED", "VERIFIED", "REJECTED", "SUPERSEDED", "EXPIRED"] }
22
- }
23
- }
@@ -1,42 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://archctx.repoharness.com/schemas/cloud/runner-identity.schema.json",
4
- "title": "RunnerIdentity",
5
- "type": "object",
6
- "additionalProperties": false,
7
- "required": ["schemaVersion", "runnerId", "installationId", "repositoryIds", "workflowRef", "publicKeyId", "publicKeyFingerprint", "status", "createdAt"],
8
- "properties": {
9
- "schemaVersion": { "const": "archcontext.runner-identity/v1" },
10
- "runnerId": { "type": "string" },
11
- "installationId": { "type": "integer", "minimum": 1 },
12
- "repositoryIds": { "type": "array", "minItems": 0, "items": { "type": "integer", "minimum": 1 } },
13
- "scope": {
14
- "oneOf": [
15
- {
16
- "type": "object",
17
- "additionalProperties": false,
18
- "required": ["kind", "repositoryIds"],
19
- "properties": {
20
- "kind": { "const": "repository" },
21
- "repositoryIds": { "type": "array", "minItems": 1, "items": { "type": "integer", "minimum": 1 } }
22
- }
23
- },
24
- {
25
- "type": "object",
26
- "additionalProperties": false,
27
- "required": ["kind"],
28
- "properties": {
29
- "kind": { "const": "organization" }
30
- }
31
- }
32
- ]
33
- },
34
- "workflowRef": { "type": "string" },
35
- "publicKeyId": { "type": "string" },
36
- "publicKeyFingerprint": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
37
- "status": { "type": "string", "enum": ["active", "rotating", "revoked"] },
38
- "createdAt": { "type": "string" },
39
- "rotatedAt": { "type": ["string", "null"] },
40
- "revokedAt": { "type": ["string", "null"] }
41
- }
42
- }
@@ -1,35 +0,0 @@
1
- import { digestJson } from "./schema";
2
-
3
- export const CONTROL_PLANE_ROUTES = [
4
- "GET /oauth/github/start",
5
- "POST /oauth/github/callback",
6
- "POST /device/authorize",
7
- "POST /device/complete",
8
- "GET /entitlements/:repository",
9
- "POST /github/webhook",
10
- "POST /stripe/webhook",
11
- "GET /v1/challenges",
12
- "POST /v1/challenges",
13
- "GET /v1/challenges/:challenge",
14
- "POST /v1/challenges/:challenge/lease",
15
- "POST /v1/challenges/:challenge/attestations",
16
- "POST /v1/challenges/:challenge/cancel",
17
- "POST /v1/device-keys",
18
- "POST /v1/device-keys/:device/revoke",
19
- "POST /v1/runner-keys",
20
- "POST /v1/runner-keys/:runner/rotate",
21
- "POST /v1/runner-keys/:runner/revoke",
22
- "POST /attestations/verify",
23
- "POST /org-runners",
24
- "POST /org-runners/:runner/revoke",
25
- "GET /mcp/metadata",
26
- "GET /chatgpt/directory",
27
- "POST /chatgpt/releases/:version/rollback",
28
- "GET /notifications/providers",
29
- "PUT /notifications/providers/:provider",
30
- "POST /notifications/events"
31
- ] as const;
32
-
33
- export function controlPlaneRouteDigest(routes: readonly string[] = CONTROL_PLANE_ROUTES): string {
34
- return digestJson([...routes]);
35
- }