@tryvitris/website-admin-contracts 1.3.1 → 1.5.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.
package/README.md CHANGED
@@ -1,3 +1,5 @@
1
- # Website Admin Contracts
2
-
3
- Validated installation manifests, roles, permissions and module contracts for `@tryvitris/website-admin-harness`. Node.js 24+. MIT licensed.
1
+ # Website Admin Contracts
2
+
3
+ Validated installation manifests, roles, permissions and module contracts for `@tryvitris/website-admin-harness`. Node.js 24+. MIT licensed.
4
+
5
+ The maintenance contract exports the stable admin package family and typed installed/locked/published-version reports and preparation plans. Its policy is prepare-and-test under existing publication permissions. It does not execute updates or create schedules; use the runtime maintenance CLI and its agent guide.
package/dist/index.d.ts CHANGED
@@ -214,3 +214,4 @@ export declare const workQueueModule: ModuleDefinition;
214
214
  export declare function isLoopback(origin: string): boolean;
215
215
  export declare function parseManifest(value: unknown): AdminManifest;
216
216
  export declare function validateModules(manifest: AdminManifest, modules: ModuleDefinition[]): void;
217
+ export * from './maintenance.js';
package/dist/index.js CHANGED
@@ -166,6 +166,7 @@ function validateModules(manifest, modules) {
166
166
  }
167
167
  for (const enabled of manifest.modules) if (!ids.has(enabled)) throw new Error(`Module ${enabled} is not installed`);
168
168
  }
169
+ export * from "./maintenance.js";
169
170
  export {
170
171
  analyticsBreakdownKeys,
171
172
  analyticsMetricKeys,
@@ -0,0 +1,47 @@
1
+ /** Package maintenance is an agent workflow; this contract grants no deployment authority. */
2
+ export declare const maintenanceVersion = 1;
3
+ export declare const adminMaintenancePackages: readonly ["@tryvitris/website-admin-harness", "@tryvitris/website-admin-contracts", "@tryvitris/create-website-admin-harness"];
4
+ export declare const maintenancePackages: readonly ["@tryvitris/website-admin-harness", "@tryvitris/website-admin-contracts", "@tryvitris/create-website-admin-harness", "@tryvitris/website-harness"];
5
+ export type MaintenancePackage = typeof maintenancePackages[number];
6
+ export type MaintenanceStatus = 'not-declared' | 'current' | 'update-available' | 'ahead' | 'unmanaged' | 'drift' | 'unavailable';
7
+ export interface MaintenanceRelease {
8
+ name: MaintenancePackage;
9
+ version: string;
10
+ integrity: string;
11
+ tarball: string;
12
+ }
13
+ export interface MaintenanceEntry {
14
+ name: MaintenancePackage;
15
+ declared: string | null;
16
+ installed: string | null;
17
+ locked: string | null;
18
+ status: MaintenanceStatus;
19
+ change: 'none' | 'patch' | 'minor' | 'major' | 'unknown';
20
+ latest: MaintenanceRelease | null;
21
+ }
22
+ export interface MaintenanceReport {
23
+ schemaVersion: 1;
24
+ checkedAt: string;
25
+ policy: 'prepare-and-test';
26
+ adminRelease: {
27
+ version: string | null;
28
+ complete: boolean;
29
+ };
30
+ packages: MaintenanceEntry[];
31
+ baseline: Record<string, string>;
32
+ deployment: 'not-checked';
33
+ }
34
+ export interface MaintenancePlan {
35
+ schemaVersion: 1;
36
+ policy: 'prepare-and-test';
37
+ baseline: Record<string, string>;
38
+ ready: boolean;
39
+ held: MaintenancePackage[];
40
+ updates: MaintenanceRelease[];
41
+ install: {
42
+ command: 'npm';
43
+ args: string[];
44
+ } | null;
45
+ requiredChecks: string[];
46
+ deployment: 'follow-existing-permissions';
47
+ }
@@ -0,0 +1,9 @@
1
+ // packages/contracts/src/maintenance.ts
2
+ var maintenanceVersion = 1;
3
+ var adminMaintenancePackages = ["@tryvitris/website-admin-harness", "@tryvitris/website-admin-contracts", "@tryvitris/create-website-admin-harness"];
4
+ var maintenancePackages = ["@tryvitris/website-admin-harness", "@tryvitris/website-admin-contracts", "@tryvitris/create-website-admin-harness", "@tryvitris/website-harness"];
5
+ export {
6
+ adminMaintenancePackages,
7
+ maintenancePackages,
8
+ maintenanceVersion
9
+ };
package/dist/pairing.d.ts CHANGED
@@ -12,6 +12,13 @@ export declare const pairingPolicy: {
12
12
  export interface PairingStart {
13
13
  requestId: string;
14
14
  challenge: string;
15
+ signOn?: {
16
+ version: 1;
17
+ subject: {
18
+ id: string;
19
+ email: string;
20
+ };
21
+ };
15
22
  }
16
23
  export interface PairingExchange {
17
24
  requestId: string;
@@ -48,6 +55,10 @@ export interface PairingCapabilities {
48
55
  scope: 'analytics:read';
49
56
  requestPath: string;
50
57
  approvalPath: string;
58
+ connectionSetup?: {
59
+ version: 1;
60
+ signOn: boolean;
61
+ };
51
62
  }
52
63
  export interface PairingEnvelope {
53
64
  version: 1;
@@ -69,6 +80,11 @@ export interface PairingCredential {
69
80
  keyId: string;
70
81
  scope: 'analytics:read';
71
82
  operations: readonly ['status', 'analytics'];
83
+ signOn?: {
84
+ version: 1;
85
+ subjectId: string;
86
+ approved: boolean;
87
+ };
72
88
  }
73
89
  export interface PairingGrantView {
74
90
  id: string;
@@ -89,6 +105,21 @@ export interface PairingRequestView {
89
105
  status: 'pending' | 'approved' | 'revoked' | 'expired';
90
106
  scope: 'analytics:read';
91
107
  createsRelationship: boolean;
108
+ signOn?: {
109
+ version: 1;
110
+ subject: {
111
+ id: string;
112
+ email: string;
113
+ };
114
+ approved: boolean;
115
+ localUserId: string | null;
116
+ users: {
117
+ id: string;
118
+ email: string;
119
+ role: string;
120
+ permissions?: readonly string[];
121
+ }[];
122
+ };
92
123
  }
93
124
  export type PairingErrorCode = 'invalid_request' | 'unauthorized' | 'forbidden' | 'expired' | 'replay' | 'conflict' | 'unavailable' | 'unsupported';
94
125
  export declare function samePairingIdentity(a: PairingIdentity, b: PairingIdentity): boolean;
package/package.json CHANGED
@@ -1,36 +1,46 @@
1
- {
2
- "name": "@tryvitris/website-admin-contracts",
3
- "version": "1.3.1",
4
- "type": "module",
5
- "license": "MIT",
6
- "description": "Validated installation and module contracts for Cloudflare business admin apps",
7
- "exports": {
8
- ".": {
9
- "types": "./dist/index.d.ts",
10
- "default": "./dist/index.js"
11
- },
12
- "./scheduling": {
13
- "types": "./dist/scheduling.d.ts",
14
- "default": "./dist/scheduling.js"
15
- }
16
- },
17
- "files": [
18
- "dist"
19
- ],
20
- "publishConfig": {
21
- "access": "public",
22
- "tag": "latest"
23
- },
24
- "engines": {
25
- "node": ">=24"
26
- },
27
- "repository": {
28
- "type": "git",
29
- "url": "git+https://github.com/jackperrotta/website-admin-harness.git",
30
- "directory": "packages/contracts"
31
- },
32
- "homepage": "https://github.com/jackperrotta/website-admin-harness#readme",
33
- "bugs": {
34
- "url": "https://github.com/jackperrotta/website-admin-harness/issues"
35
- }
36
- }
1
+ {
2
+ "name": "@tryvitris/website-admin-contracts",
3
+ "version": "1.5.0",
4
+ "type": "module",
5
+ "license": "MIT",
6
+ "description": "Validated installation and module contracts for Cloudflare business admin apps",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "default": "./dist/index.js"
11
+ },
12
+ "./scheduling": {
13
+ "types": "./dist/scheduling.d.ts",
14
+ "default": "./dist/scheduling.js"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "vitris-release.json"
20
+ ],
21
+ "publishConfig": {
22
+ "access": "public",
23
+ "tag": "latest"
24
+ },
25
+ "engines": {
26
+ "node": ">=24"
27
+ },
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "git+https://github.com/jackperrotta/website-admin-harness.git",
31
+ "directory": "packages/contracts"
32
+ },
33
+ "homepage": "https://github.com/jackperrotta/website-admin-harness#readme",
34
+ "bugs": {
35
+ "url": "https://github.com/jackperrotta/website-admin-harness/issues"
36
+ },
37
+ "vitris": {
38
+ "maintenance": {
39
+ "version": 1,
40
+ "policy": "prepare-and-test",
41
+ "stableChannel": "latest",
42
+ "command": "vitris-admin updates check --dir . --json",
43
+ "schedule": "reuse-existing-daily-care"
44
+ }
45
+ }
46
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "name": "@tryvitris/website-admin-contracts",
4
+ "version": "1.5.0",
5
+ "title": "Typed agent maintenance reports and plans",
6
+ "notesScope": "package",
7
+ "notes": [
8
+ "Adds the shared package-family, status, release identity and prepare-and-test plan contract used by the admin and website daily maintenance tooling."
9
+ ],
10
+ "repository": "https://github.com/jackperrotta/website-admin-harness",
11
+ "readmePath": "packages/contracts/README.md",
12
+ "ref": "v1.5.0",
13
+ "documentation": "# Website Admin Contracts\r\n\r\nValidated installation manifests, roles, permissions and module contracts for `@tryvitris/website-admin-harness`. Node.js 24+. MIT licensed.\r\n\r\nThe maintenance contract exports the stable admin package family and typed installed/locked/published-version reports and preparation plans. Its policy is prepare-and-test under existing publication permissions. It does not execute updates or create schedules; use the runtime maintenance CLI and its agent guide.\r\n",
14
+ "documentationSha256": "53077ee5624185df808524801143734e7d9786aab747834e83a8603de06a1ee8"
15
+ }