@emilia-protocol/gate 0.9.5 → 0.11.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 (81) hide show
  1. package/CHANGELOG.md +103 -0
  2. package/LICENSE +190 -0
  3. package/README.md +95 -16
  4. package/action-control-manifest.js +26 -0
  5. package/action-escrow-custodian.js +395 -0
  6. package/action-escrow-evidence.js +859 -0
  7. package/action-escrow-package.js +1669 -0
  8. package/action-escrow-postgres.js +338 -0
  9. package/action-escrow-state.js +397 -0
  10. package/action-escrow-verifiers.js +332 -0
  11. package/action-escrow.js +2448 -0
  12. package/adapters/_kit.js +47 -5
  13. package/adapters/aws.js +15 -4
  14. package/adapters/github-demo.mjs +25 -22
  15. package/adapters/github.js +1 -1
  16. package/adapters/jira.js +1 -0
  17. package/adapters/linear.js +1 -0
  18. package/adapters/salesforce.js +1 -0
  19. package/adapters/stripe.js +1 -1
  20. package/adapters/supabase.js +26 -4
  21. package/adapters/vercel.js +33 -4
  22. package/aec-execution.js +1 -3
  23. package/breakglass.js +285 -51
  24. package/control-plane.js +341 -0
  25. package/coverage.js +722 -0
  26. package/custody-demo.mjs +13 -3
  27. package/demo.mjs +9 -3
  28. package/deploy/helm/README.md +16 -8
  29. package/deploy/helm/emilia-gate/Chart.yaml +3 -1
  30. package/deploy/helm/emilia-gate/templates/NOTES.txt +3 -2
  31. package/deploy/helm/emilia-gate/templates/deployment.yaml +55 -1
  32. package/deploy/helm/emilia-gate/values.yaml +18 -2
  33. package/deploy/helm/emilia-gate-service/Chart.yaml +11 -0
  34. package/deploy/helm/emilia-gate-service/README.md +81 -0
  35. package/deploy/helm/emilia-gate-service/templates/NOTES.txt +12 -0
  36. package/deploy/helm/emilia-gate-service/templates/_helpers.tpl +83 -0
  37. package/deploy/helm/emilia-gate-service/templates/deployment.yaml +153 -0
  38. package/deploy/helm/emilia-gate-service/templates/migration-job.yaml +73 -0
  39. package/deploy/helm/emilia-gate-service/templates/networkpolicy.yaml +113 -0
  40. package/deploy/helm/emilia-gate-service/templates/pdb.yaml +14 -0
  41. package/deploy/helm/emilia-gate-service/templates/service.yaml +20 -0
  42. package/deploy/helm/emilia-gate-service/templates/serviceaccount.yaml +8 -0
  43. package/deploy/helm/emilia-gate-service/tests/fixtures/001_gate.sql +26 -0
  44. package/deploy/helm/emilia-gate-service/tests/fixtures/002_runtime_access.sql +32 -0
  45. package/deploy/helm/emilia-gate-service/tests/fixtures/gate.config.mjs +29 -0
  46. package/deploy/helm/emilia-gate-service/tests/render-check.sh +145 -0
  47. package/deploy/helm/emilia-gate-service/values.schema.json +145 -0
  48. package/deploy/helm/emilia-gate-service/values.yaml +166 -0
  49. package/deploy/sql/001-runtime.sql +707 -0
  50. package/deploy/terraform/README.md +24 -14
  51. package/deploy/terraform/main.tf +59 -0
  52. package/deploy/terraform/service/README.md +81 -0
  53. package/deploy/terraform/service/main.tf +718 -0
  54. package/deploy/terraform/service/outputs.tf +19 -0
  55. package/deploy/terraform/service/tests/validate.sh +24 -0
  56. package/deploy/terraform/service/tests/validation.tftest.hcl +168 -0
  57. package/deploy/terraform/service/variables.tf +459 -0
  58. package/deploy/terraform/service/versions.tf +10 -0
  59. package/deploy/terraform/variables.tf +95 -2
  60. package/deployment-attestation.js +248 -0
  61. package/eg1-conformance.js +46 -12
  62. package/enterprise.js +6 -2
  63. package/ep-assure.mjs +3 -2
  64. package/evidence-postgres.js +357 -0
  65. package/evidence.js +10 -3
  66. package/execution-binding.js +141 -26
  67. package/index.js +556 -115
  68. package/key-registry.js +51 -19
  69. package/mcp.js +4 -2
  70. package/network-witness.js +500 -0
  71. package/package.json +39 -5
  72. package/reliance-kernel.js +5 -6
  73. package/reliance-packet.js +43 -10
  74. package/reports/assurance-package.js +45 -19
  75. package/reports/reperform.js +78 -18
  76. package/reports/underwriter.js +1 -1
  77. package/settlement.js +300 -0
  78. package/store-postgres.js +14 -0
  79. package/store.js +26 -5
  80. package/strict-json.js +103 -0
  81. package/witness-postgres.js +97 -0
@@ -0,0 +1,166 @@
1
+ # This is a BYOC reference chart. It does not identify or imply an official
2
+ # published image. Build Dockerfile.gate, push it to a registry you control,
3
+ # and set either image.tag or image.digest before rendering.
4
+
5
+ replicaCount: 2
6
+
7
+ image:
8
+ repository: ""
9
+ tag: ""
10
+ digest: ""
11
+ pullPolicy: IfNotPresent
12
+
13
+ imagePullSecrets: []
14
+ nameOverride: ""
15
+ fullnameOverride: ""
16
+
17
+ service:
18
+ type: ClusterIP
19
+ port: 8080
20
+ annotations: {}
21
+
22
+ runtime:
23
+ port: 8080
24
+ logLevel: info
25
+ terminationGracePeriodSeconds: 30
26
+ extraEnv: []
27
+
28
+ # apps/gate-service deliberately loads an operator-owned ESM module. The
29
+ # existing Secret must contain both files when migrations are enabled:
30
+ # gate.config.mjs - default export builds the production service config
31
+ # migrate.mjs - idempotent, forward-compatible Postgres migrations
32
+ configuration:
33
+ existingSecret: ""
34
+ configKey: gate.config.mjs
35
+ migrationKey: migrate.mjs
36
+ mountPath: /app/config
37
+
38
+ # Secret values are never accepted by this chart. Every entry names a Secret
39
+ # provisioned out of band in the release namespace and the key to reference.
40
+ secrets:
41
+ postgres:
42
+ existingSecret: ""
43
+ key: database-url
44
+ envName: DATABASE_URL
45
+ apiToken:
46
+ existingSecret: ""
47
+ key: api-token
48
+ envName: EMILIA_GATE_API_TOKEN
49
+ kms:
50
+ existingSecret: ""
51
+ key: kms-key-id
52
+ envName: EP_KMS_KEY_ID
53
+ issuerRoots:
54
+ existingSecret: ""
55
+ key: issuer-roots.json
56
+ envName: EP_GATE_ISSUER_ROOTS
57
+
58
+ migrations:
59
+ enabled: true
60
+ postgres:
61
+ # Required, distinct migration-role Secret. Reuse of secrets.postgres is
62
+ # refused so the long-lived runtime credential never gains DDL authority.
63
+ existingSecret: ""
64
+ # Required key containing the migration-role connection URL.
65
+ key: ""
66
+ command:
67
+ - node
68
+ - /app/config/migrate.mjs
69
+ activeDeadlineSeconds: 600
70
+ backoffLimit: 3
71
+ ttlSecondsAfterFinished: 600
72
+ resources:
73
+ requests:
74
+ cpu: 50m
75
+ memory: 64Mi
76
+ limits:
77
+ cpu: 500m
78
+ memory: 256Mi
79
+
80
+ probes:
81
+ startup:
82
+ path: /v1/live
83
+ periodSeconds: 2
84
+ timeoutSeconds: 2
85
+ failureThreshold: 30
86
+ liveness:
87
+ path: /v1/live
88
+ periodSeconds: 10
89
+ timeoutSeconds: 2
90
+ failureThreshold: 3
91
+ readiness:
92
+ path: /v1/ready
93
+ periodSeconds: 5
94
+ timeoutSeconds: 2
95
+ failureThreshold: 3
96
+
97
+ resources:
98
+ requests:
99
+ cpu: 100m
100
+ memory: 128Mi
101
+ limits:
102
+ cpu: "1"
103
+ memory: 512Mi
104
+
105
+ podDisruptionBudget:
106
+ enabled: true
107
+ minAvailable: 1
108
+
109
+ podSecurityContext:
110
+ runAsNonRoot: true
111
+ runAsUser: 10001
112
+ runAsGroup: 10001
113
+ fsGroup: 10001
114
+ fsGroupChangePolicy: OnRootMismatch
115
+ seccompProfile:
116
+ type: RuntimeDefault
117
+
118
+ containerSecurityContext:
119
+ allowPrivilegeEscalation: false
120
+ readOnlyRootFilesystem: true
121
+ capabilities:
122
+ drop:
123
+ - ALL
124
+
125
+ networkPolicy:
126
+ enabled: true
127
+ ingress:
128
+ # Allows callers in the release namespace to reach the ClusterIP service.
129
+ # Replace or supplement this for an ingress controller in another namespace.
130
+ allowSameNamespace: true
131
+ additionalPeers: []
132
+ egress:
133
+ dns:
134
+ enabled: true
135
+ namespaceSelector:
136
+ matchLabels:
137
+ kubernetes.io/metadata.name: kube-system
138
+ podSelector:
139
+ matchLabels:
140
+ k8s-app: kube-dns
141
+ postgres:
142
+ port: 5432
143
+ # By default, only a same-namespace pod with this label is reachable.
144
+ # For managed Postgres, set podSelector: null and provide stable cidrs.
145
+ podSelector:
146
+ matchLabels:
147
+ app.kubernetes.io/name: postgresql
148
+ namespaceSelector: {}
149
+ cidrs: []
150
+ # Standard NetworkPolicy has no FQDN peers. Supply stable proxy/NAT CIDRs
151
+ # here, or enforce GitHub/KMS/SIEM hostnames with a CNI-specific policy.
152
+ kmsCidrs: []
153
+ githubCidrs: []
154
+ siemCidrs: []
155
+ additionalRules: []
156
+
157
+ topologySpreadConstraints:
158
+ - maxSkew: 1
159
+ topologyKey: kubernetes.io/hostname
160
+ whenUnsatisfiable: ScheduleAnyway
161
+
162
+ podAnnotations: {}
163
+ podLabels: {}
164
+ nodeSelector: {}
165
+ tolerations: []
166
+ affinity: {}