initiative-plugin-sdk 2.1.0 → 4.0.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,58 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://initiative.morelitea.com/schemas/env-contract.json",
4
+ "title": "Initiative app deployment contract",
5
+ "description": "What an app requires of whoever deploys it, published as data at env-contract.json in the app's repository root.\n\nEvery app in the set publishes one, generated from its own settings declaration and committed — because whoever reads it has a checkout, not a build. A deployment tool reads these instead of parsing each app's source, which is how a setting enforced by a validator rather than by a missing default came to be absent from the Helm chart until 2026-09-23.\n\nThe classes exist because 'required' is the distinction that misleads. An app with 131 settings and 3 mandatory ones is easy to deploy; an app that presents all 131 as configuration is not, and they look identical until someone splits them up.",
6
+ "type": "object",
7
+ "required": ["service", "env_prefix", "required", "registration", "runtime", "env_only", "optional"],
8
+ "additionalProperties": true,
9
+ "properties": {
10
+ "service": {
11
+ "type": "string",
12
+ "description": "The app's own name, matching its image and its repository."
13
+ },
14
+ "public_id": {
15
+ "type": "string",
16
+ "description": "The app's id in the Initiative App Protocol registration, for an app that registers. Absent for Initiative itself, which is what apps register WITH."
17
+ },
18
+ "env_prefix": {
19
+ "type": "string",
20
+ "description": "Prepended to every setting name to get the environment variable. Empty for most; initiative-billing declares lower-case fields with 'BILLING_'. Names elsewhere in this file are always the ENV NAME, already prefixed — this field is for mapping back."
21
+ },
22
+ "required": {
23
+ "type": "array",
24
+ "items": { "type": "string" },
25
+ "description": "The app will not start without these. Includes settings enforced by a validator, not only those lacking a default — the distinction a source parser misses."
26
+ },
27
+ "registration": {
28
+ "type": "array",
29
+ "items": { "type": "string" },
30
+ "description": "Credentials a third-party vendor issues when this deployment is registered there. Deferrable by construction: an app holding none of them starts anyway and serves the one route that registers it, opened by INITIATIVE_APP_SETUP_TOKEN (see src/setup.ts). A deployment tool does not need these up front, and saying so is the point of the class."
31
+ },
32
+ "runtime": {
33
+ "type": "array",
34
+ "items": { "type": "string" },
35
+ "description": "Read once as a FIRST-BOOT SEED, then owned by a database row and edited in the app's own settings UI. An operator needs none of these at deploy time, and a deployment tool should not carry them as deploy-time secrets: the credential-bearing ones are encrypted at rest and rotate with the app's SECRET_KEY, which a values file cannot do."
36
+ },
37
+ "env_only": {
38
+ "type": "array",
39
+ "items": { "type": "string" },
40
+ "description": "Operator-supplied values with no database path, so the environment is the only place to set them. These, and only these, are what a deployment tool genuinely must carry as configuration."
41
+ },
42
+ "optional": {
43
+ "type": "array",
44
+ "items": { "type": "string" },
45
+ "description": "Tunables whose defaults work. Present so the contract is a complete account of the app's settings rather than a list of the interesting ones."
46
+ },
47
+ "fail_closed": {
48
+ "type": "array",
49
+ "items": { "type": "string" },
50
+ "description": "Settings whose absence takes a whole surface dark while the service stays up. The class 'required' cannot express for a service designed to boot unconfigured — initiative-billing is the case: everything has a default, so its useful contract is what goes dark, not what is mandatory."
51
+ },
52
+ "default_unsuitable_for_production": {
53
+ "type": "array",
54
+ "items": { "type": "string" },
55
+ "description": "Settings with a default that is correct for a first run and wrong for a real deployment — billing's database_url points at a local SQLite file, which is data loss the first time a pod rolls. Not required, not fail-closed: silently fine until it is not."
56
+ }
57
+ }
58
+ }
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "scopes": {
35
35
  "type": "array",
36
- "maxItems": 54,
36
+ "maxItems": 56,
37
37
  "uniqueItems": true,
38
38
  "items": {
39
39
  "anyOf": [
@@ -41,8 +41,8 @@
41
41
  "enum": [
42
42
  "projects:read",
43
43
  "projects:write",
44
- "documents:read",
45
- "documents:write",
44
+ "files:read",
45
+ "files:write",
46
46
  "queues:read",
47
47
  "queues:write",
48
48
  "counter_groups:read",
@@ -63,6 +63,8 @@
63
63
  "relationships:write",
64
64
  "tags:read",
65
65
  "tags:write",
66
+ "properties:read",
67
+ "properties:write",
66
68
  "sharing:read",
67
69
  "sharing:write",
68
70
  "members:read",