@noodleseed/one 0.165.0 → 0.166.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/dist/commands/deploy-status-ops.d.ts +2 -0
- package/dist/commands/deploy-status-ops.d.ts.map +1 -1
- package/dist/commands/deploy-status-ops.js +11 -0
- package/dist/commands/deploy-status-ops.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/package.json +1 -1
- package/node_modules/@noodle-borg/module/dist/customer-auth-access.d.ts +7 -0
- package/node_modules/@noodle-borg/module/dist/customer-auth-access.js +6 -0
- package/node_modules/@noodle-borg/module/dist/index.d.ts +1 -0
- package/node_modules/@noodle-borg/module/dist/index.js +1 -0
- package/node_modules/@noodle-borg/service/dist/customer-auth-audience-binding.js +16 -5
- package/node_modules/@noodle-borg/service/dist/deployment-authentication.js +19 -0
- package/node_modules/@noodle-borg/service/dist/deployment-record-version.js +31 -0
- package/node_modules/@noodle-borg/service/dist/developer-mcp/inspection.js +15 -1
- package/node_modules/@noodle-borg/service/dist/registry-access.js +18 -3
- package/node_modules/@noodle-borg/service/dist/registry-compile.js +42 -1
- package/node_modules/@noodle-borg/service/dist/registry-deploy-transaction.js +15 -0
- package/node_modules/@noodle-borg/service/dist/registry-rollback.js +2 -0
- package/node_modules/@noodle-borg/service/dist/registry-state.d.ts +1 -0
- package/node_modules/@noodle-borg/service/dist/registry-state.js +12 -5
- package/node_modules/@noodle-borg/service/dist/registry-status.js +3 -0
- package/node_modules/@noodle-borg/service/dist/registry-targets.js +8 -0
- package/node_modules/@noodle-borg/service/dist/registry-types.d.ts +1 -1
- package/node_modules/@noodle-borg/service/dist/registry.js +31 -36
- package/node_modules/@noodle-borg/service/dist/routes/access.js +5 -0
- package/node_modules/@noodle-borg/service/dist/store/in-memory.d.ts +1 -0
- package/node_modules/@noodle-borg/service/dist/store/in-memory.js +10 -3
- package/node_modules/@noodle-borg/service/dist/store/json-file.d.ts +1 -0
- package/node_modules/@noodle-borg/service/dist/store/json-file.js +10 -3
- package/node_modules/@noodle-borg/service/dist/store/records.js +4 -2
- package/node_modules/@noodle-borg/service/dist/store.d.ts +5 -1
- package/node_modules/@noodle-borg/service/package.json +1 -1
- package/node_modules/@noodle-borg/wire-contracts/dist/control-plane.d.ts +23 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/control-plane.js +34 -4
- package/package.json +2 -2
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type DeploymentAuthentication } from '@noodle-borg/wire-contracts';
|
|
1
2
|
import type { ConfigLocation } from '../config.js';
|
|
2
3
|
import type { AccessMode } from '../deploy.js';
|
|
3
4
|
import { type DetailCardOptions } from '../detail-card.js';
|
|
@@ -19,6 +20,7 @@ export interface StatusResponse {
|
|
|
19
20
|
readonly createdAt: string;
|
|
20
21
|
readonly createdByEmail?: string;
|
|
21
22
|
readonly accessMode: AccessMode;
|
|
23
|
+
readonly authentication?: DeploymentAuthentication;
|
|
22
24
|
readonly ownerSubject?: string;
|
|
23
25
|
readonly deploymentLock?: {
|
|
24
26
|
readonly lockedAt: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-status-ops.d.ts","sourceRoot":"","sources":["../../src/commands/deploy-status-ops.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deploy-status-ops.d.ts","sourceRoot":"","sources":["../../src/commands/deploy-status-ops.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,wBAAwB,EAE9B,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AASnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,KAAK,iBAAiB,EAAoC,MAAM,mBAAmB,CAAC;AAC7F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAG5D,OAAO,EAA6B,KAAK,UAAU,EAA4B,MAAM,aAAa,CAAC;AAanG,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gB,CAC9B,IAAI,EAAE,cAAc,EACpB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,iBAAiB,EACvB,GAAG,GAAE,MAAmB,GACvB,MAAM,CAoER;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAC/C,OAAO,CAAC,UAAU,CAAC,CAOrB;AAED,wBAAsB,SAAS,CAC7B,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,GAAG,EAAE,MAAM,CAAC,UAAU,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,MAAM,CAAC,CA2DjB;AAED,wBAAsB,WAAW,CAC/B,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,GAAG,EAAE,MAAM,CAAC,UAAU,EACtB,IAAI,EAAE,cAAc,EACpB,UAAU,CAAC,EAAE,UAAU,GACtB,OAAO,CAAC,MAAM,CAAC,CAuIjB;AAoCD,wBAAsB,SAAS,CAC7B,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,GAAG,EAAE,MAAM,CAAC,UAAU,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,MAAM,CAAC,CAwHjB"}
|
|
@@ -64,6 +64,15 @@ export function renderStatusCard(body, serviceUrl, opts, now = Date.now()) {
|
|
|
64
64
|
tone: 'attention',
|
|
65
65
|
note: accessModeNote(deployment.accessMode),
|
|
66
66
|
},
|
|
67
|
+
...(deployment.authentication !== undefined
|
|
68
|
+
? [
|
|
69
|
+
{
|
|
70
|
+
key: 'authentication',
|
|
71
|
+
value: deployment.authentication,
|
|
72
|
+
tone: 'dim',
|
|
73
|
+
},
|
|
74
|
+
]
|
|
75
|
+
: []),
|
|
67
76
|
...(deployment.ownerSubject !== undefined
|
|
68
77
|
? [{ key: 'owner', value: deployment.ownerSubject, tone: 'dim' }]
|
|
69
78
|
: []),
|
|
@@ -393,6 +402,8 @@ export async function runAccess(rest, env, home) {
|
|
|
393
402
|
if (body.deployment.serverVersion !== undefined)
|
|
394
403
|
console.log(`version: ${body.deployment.serverVersion}`);
|
|
395
404
|
console.log(`access: ${body.deployment.accessMode}`);
|
|
405
|
+
if (body.deployment.authentication !== undefined)
|
|
406
|
+
console.log(`auth: ${body.deployment.authentication}`);
|
|
396
407
|
if (body.deployment.ownerSubject !== undefined)
|
|
397
408
|
console.log(`owner: ${body.deployment.ownerSubject}`);
|
|
398
409
|
return 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-status-ops.js","sourceRoot":"","sources":["../../src/commands/deploy-status-ops.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gCAAgC,EAChC,4BAA4B,GAC7B,MAAM,6BAA6B,CAAC;AAErC;;;;;;GAMG;AACH,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEjG,OAAO,EAA0C,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE7F,OAAO,EAAE,iCAAiC,EAAE,MAAM,yCAAyC,CAAC;AAC5F,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAmB,wBAAwB,EAAE,MAAM,aAAa,CAAC;AACnG,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAEL,YAAY,EACZ,sBAAsB,EACtB,eAAe,EACf,mBAAmB,EACnB,cAAc,GACf,MAAM,aAAa,CAAC;AAwBrB,oFAAoF;AACpF,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,IAAI,IAAI,KAAK,YAAY;QAAE,OAAO,oCAAoC,CAAC;IACvE,IA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C,YAAY,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC,CAAC;QACtD,IAAI,IAAI,CAAC,UAAU,CAAC,cAAc,KAAK,SAAS;YAC9C,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC,CAAC;QAC5D,IAAI,IAAI,CAAC,UAAU,CAAC,YAAY,KAAK,SAAS;YAC5C,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC,CAAC;QAC1D,OAAO,CAAC,CAAC;IACX,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,eAAe,CAAC,QAAQ,EAAE,oBAAoB,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3E,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AccessMode } from './contract.js';
|
|
2
|
+
export declare function usesCustomerAuthentication(input: {
|
|
3
|
+
readonly schemaVersion: number;
|
|
4
|
+
readonly accessMode: AccessMode | undefined;
|
|
5
|
+
readonly hasServerAuth: boolean;
|
|
6
|
+
}): boolean;
|
|
7
|
+
//# sourceMappingURL=customer-auth-access.d.ts.map
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
import { usesCustomerAuthentication } from '@noodle-borg/module';
|
|
2
|
+
/** Match durable ownership, including an omitted stored projection when compilation declares auth. */
|
|
3
|
+
export function requiresCustomerAuthProjection(record, compiledAuth) {
|
|
4
|
+
return usesCustomerAuthentication({
|
|
5
|
+
schemaVersion: record.schemaVersion,
|
|
6
|
+
accessMode: record.accessMode,
|
|
7
|
+
hasServerAuth: record.serverAuth != null || compiledAuth !== undefined,
|
|
8
|
+
});
|
|
9
|
+
}
|
|
1
10
|
/** Safe lifecycle error; tenant identities and configured values never enter its public message. */
|
|
2
11
|
export class CustomerAuthAudienceConflictError extends Error {
|
|
3
12
|
code = 'customer_auth_audience_conflict';
|
|
@@ -51,7 +60,7 @@ export function isTenantAuthConfig(value) {
|
|
|
51
60
|
}
|
|
52
61
|
/** Customer-serving records must exactly project the compiler-authoritative auth declaration. */
|
|
53
62
|
export function hasExactCustomerAuthProjection(record, compiledAuth) {
|
|
54
|
-
if (record
|
|
63
|
+
if (!requiresCustomerAuthProjection(record, compiledAuth))
|
|
55
64
|
return true;
|
|
56
65
|
if (compiledAuth === undefined || !isTenantAuthConfig(record.serverAuth))
|
|
57
66
|
return false;
|
|
@@ -65,7 +74,7 @@ export function hasExactCustomerAuthProjection(record, compiledAuth) {
|
|
|
65
74
|
}
|
|
66
75
|
/** Require an exact compiler-authenticated snapshot before clearing customer app archive stamps. */
|
|
67
76
|
export function assertCustomerAuthRestorePrecondition(records, precondition) {
|
|
68
|
-
const candidates = records.filter((record) => record.active && record
|
|
77
|
+
const candidates = records.filter((record) => record.active && requiresCustomerAuthProjection(record));
|
|
69
78
|
const projections = precondition?.customerAuthProjections ?? [];
|
|
70
79
|
if (candidates.length !== projections.length) {
|
|
71
80
|
throw new CustomerAuthAudienceProjectionError();
|
|
@@ -107,7 +116,7 @@ export function findActiveCustomerAuthAudienceConflict(records, tenant, auth) {
|
|
|
107
116
|
for (const record of records) {
|
|
108
117
|
if (!record.active ||
|
|
109
118
|
record.archivedAt !== undefined ||
|
|
110
|
-
record
|
|
119
|
+
!requiresCustomerAuthProjection(record) ||
|
|
111
120
|
sameTenant(record, tenant)) {
|
|
112
121
|
continue;
|
|
113
122
|
}
|
|
@@ -124,7 +133,9 @@ export function findActiveCustomerAuthAudienceConflict(records, tenant, auth) {
|
|
|
124
133
|
export function assertUniqueActiveCustomerAuthAudienceBindings(records) {
|
|
125
134
|
const owners = new Map();
|
|
126
135
|
for (const record of records) {
|
|
127
|
-
if (!record.active ||
|
|
136
|
+
if (!record.active ||
|
|
137
|
+
record.archivedAt !== undefined ||
|
|
138
|
+
!requiresCustomerAuthProjection(record)) {
|
|
128
139
|
continue;
|
|
129
140
|
}
|
|
130
141
|
if (!isTenantAuthConfig(record.serverAuth)) {
|
|
@@ -143,7 +154,7 @@ export function assertUniqueActiveCustomerAuthAudienceBindings(records) {
|
|
|
143
154
|
}
|
|
144
155
|
/** Shared registry guard with an optimized durable-store path and an in-memory fallback. */
|
|
145
156
|
export async function hasActiveCustomerAuthAudienceConflict(store, records, record, auth) {
|
|
146
|
-
if (record
|
|
157
|
+
if (!requiresCustomerAuthProjection(record, auth) || auth === undefined || auth.kind === 'bridge')
|
|
147
158
|
return false;
|
|
148
159
|
const tenant = { org: record.orgSlug, app: record.appSlug, env: record.environment };
|
|
149
160
|
const conflict = store?.findActiveCustomerAuthAudienceConflict !== undefined
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { usesCustomerAuthentication } from '@noodle-borg/module';
|
|
2
|
+
import { deploymentRecordVersionError } from './deployment-record-version.js';
|
|
3
|
+
/** Read the effective authentication authority only when this runtime understands the record. */
|
|
4
|
+
export function deploymentAuthenticationFor(record) {
|
|
5
|
+
if (deploymentRecordVersionError(record) !== undefined || record.accessMode === undefined) {
|
|
6
|
+
return undefined;
|
|
7
|
+
}
|
|
8
|
+
if (record.accessMode === 'public')
|
|
9
|
+
return 'none';
|
|
10
|
+
if (usesCustomerAuthentication({
|
|
11
|
+
schemaVersion: record.schemaVersion,
|
|
12
|
+
accessMode: record.accessMode,
|
|
13
|
+
hasServerAuth: record.serverAuth !== undefined,
|
|
14
|
+
})) {
|
|
15
|
+
return 'customer';
|
|
16
|
+
}
|
|
17
|
+
return 'platform';
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=deployment-authentication.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { sameDeploymentScope } from './deployment-versioning.js';
|
|
2
|
+
const VERSION_ERROR = {
|
|
3
|
+
code: 'unsupported_deployment_record_version',
|
|
4
|
+
path: 'schemaVersion',
|
|
5
|
+
message: 'Deployment record version is not supported by this runtime.',
|
|
6
|
+
};
|
|
7
|
+
export class UnsupportedDeploymentRecordVersionError extends Error {
|
|
8
|
+
code = VERSION_ERROR.code;
|
|
9
|
+
constructor() {
|
|
10
|
+
super(VERSION_ERROR.message);
|
|
11
|
+
this.name = 'UnsupportedDeploymentRecordVersionError';
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
/** R0 understands newer ownership records but must never serve their authentication semantics. */
|
|
15
|
+
export function deploymentRecordVersionError(record) {
|
|
16
|
+
return record.schemaVersion === 1 ? undefined : VERSION_ERROR;
|
|
17
|
+
}
|
|
18
|
+
/** A stale writer cannot replace or deactivate a newer policy, even after registry preflight. */
|
|
19
|
+
export function assertDeploymentAppendVersion(records, candidate) {
|
|
20
|
+
if (records.some((record) => record.schemaVersion > candidate.schemaVersion &&
|
|
21
|
+
(record.deploymentId === candidate.deploymentId ||
|
|
22
|
+
(candidate.active &&
|
|
23
|
+
record.active &&
|
|
24
|
+
record.archivedAt === undefined &&
|
|
25
|
+
sameDeploymentScope(record, candidate)))))
|
|
26
|
+
throw new UnsupportedDeploymentRecordVersionError();
|
|
27
|
+
}
|
|
28
|
+
export function unsupportedDeploymentRecordFailure() {
|
|
29
|
+
return { ok: false, errors: [VERSION_ERROR] };
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=deployment-record-version.js.map
|
|
@@ -8,7 +8,21 @@ export async function inspectServiceDeployment(registry, tenant, baseUrl, endpoi
|
|
|
8
8
|
return {
|
|
9
9
|
ok: true,
|
|
10
10
|
target: status.target,
|
|
11
|
-
|
|
11
|
+
// Keep the Developer MCP port projection explicit as status gains additive operator fields.
|
|
12
|
+
deployment: {
|
|
13
|
+
deploymentId: status.deployment.deploymentId,
|
|
14
|
+
endpointUrl: status.deployment.endpointUrl,
|
|
15
|
+
active: status.deployment.active,
|
|
16
|
+
serverName: status.deployment.serverName,
|
|
17
|
+
createdAt: status.deployment.createdAt,
|
|
18
|
+
...(status.deployment.createdByEmail === undefined
|
|
19
|
+
? {}
|
|
20
|
+
: { createdByEmail: status.deployment.createdByEmail }),
|
|
21
|
+
accessMode: status.deployment.accessMode,
|
|
22
|
+
...(status.deployment.ownerSubject === undefined
|
|
23
|
+
? {}
|
|
24
|
+
: { ownerSubject: status.deployment.ownerSubject }),
|
|
25
|
+
},
|
|
12
26
|
health: {
|
|
13
27
|
state: status.health.state,
|
|
14
28
|
missingSecrets: status.config.missingSecrets,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { assertUniqueActiveCustomerAuthAudienceBindings, CustomerAuthAudienceConflictError, } from './customer-auth-audience-binding.js';
|
|
1
|
+
import { assertUniqueActiveCustomerAuthAudienceBindings, CustomerAuthAudienceConflictError, requiresCustomerAuthProjection, } from './customer-auth-audience-binding.js';
|
|
2
|
+
import { deploymentRecordVersionError } from './deployment-record-version.js';
|
|
2
3
|
import { deploymentOwnerSubject } from './registry-helpers.js';
|
|
3
4
|
import { activeRecord, activeRecordVersion } from './registry-state.js';
|
|
4
5
|
import { tenantDeploymentKey, tryServedTargetFor } from './registry-targets.js';
|
|
@@ -41,6 +42,15 @@ export async function updateActiveAccess(state, tenant, options, loadServed, cus
|
|
|
41
42
|
: await activeRecordVersion(state, tenant, options.serverVersion);
|
|
42
43
|
if (record === undefined)
|
|
43
44
|
return noActiveDeployment();
|
|
45
|
+
const versionError = deploymentRecordVersionError(record);
|
|
46
|
+
if (versionError !== undefined) {
|
|
47
|
+
return {
|
|
48
|
+
ok: false,
|
|
49
|
+
status: 409,
|
|
50
|
+
code: 'unsupported_deployment_record_version',
|
|
51
|
+
message: versionError.message,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
44
54
|
const nextAccessMode = options.accessMode;
|
|
45
55
|
const previousAccessMode = record.accessMode ?? 'owner-only';
|
|
46
56
|
const previousOwnerSubject = deploymentOwnerSubject(record);
|
|
@@ -64,12 +74,14 @@ export async function updateActiveAccess(state, tenant, options, loadServed, cus
|
|
|
64
74
|
? commitInMemoryAccessUpdate(state, tenant, record, {
|
|
65
75
|
accessMode: nextAccessMode,
|
|
66
76
|
expectedAccessMode: record.accessMode,
|
|
77
|
+
expectedSchemaVersion: record.schemaVersion,
|
|
67
78
|
expectedOwnerSubject: previousOwnerSubject,
|
|
68
79
|
...(serverAuth !== undefined ? { serverAuth } : {}),
|
|
69
80
|
})
|
|
70
81
|
: await state.store.updateActiveAccess(tenant, record.deploymentId, {
|
|
71
82
|
accessMode: nextAccessMode,
|
|
72
83
|
expectedAccessMode: record.accessMode,
|
|
84
|
+
expectedSchemaVersion: record.schemaVersion,
|
|
73
85
|
expectedOwnerSubject: previousOwnerSubject,
|
|
74
86
|
...(serverAuth !== undefined ? { serverAuth } : {}),
|
|
75
87
|
});
|
|
@@ -120,6 +132,7 @@ export async function updateActiveAccess(state, tenant, options, loadServed, cus
|
|
|
120
132
|
? { ownerSubject: nextOwnerSubject }
|
|
121
133
|
: {}),
|
|
122
134
|
expectedAccessMode: record.accessMode,
|
|
135
|
+
expectedSchemaVersion: record.schemaVersion,
|
|
123
136
|
expectedOwnerSubject: previousOwnerSubject,
|
|
124
137
|
...(serverAuth !== undefined ? { serverAuth } : {}),
|
|
125
138
|
})
|
|
@@ -129,6 +142,7 @@ export async function updateActiveAccess(state, tenant, options, loadServed, cus
|
|
|
129
142
|
? { ownerSubject: nextOwnerSubject }
|
|
130
143
|
: {}),
|
|
131
144
|
expectedAccessMode: record.accessMode,
|
|
145
|
+
expectedSchemaVersion: record.schemaVersion,
|
|
132
146
|
expectedOwnerSubject: previousOwnerSubject,
|
|
133
147
|
...(serverAuth !== undefined ? { serverAuth } : {}),
|
|
134
148
|
});
|
|
@@ -155,19 +169,20 @@ function commitInMemoryAccessUpdate(state, tenant, observed, input) {
|
|
|
155
169
|
current.appSlug !== tenant.app ||
|
|
156
170
|
current.environment !== tenant.env ||
|
|
157
171
|
current.accessMode !== input.expectedAccessMode ||
|
|
172
|
+
current.schemaVersion !== (input.expectedSchemaVersion ?? 1) ||
|
|
158
173
|
deploymentOwnerSubject(current) !== input.expectedOwnerSubject) {
|
|
159
174
|
return undefined;
|
|
160
175
|
}
|
|
161
176
|
if ((current.accessMode ?? 'owner-only') === input.accessMode &&
|
|
162
177
|
(input.ownerSubject === undefined || deploymentOwnerSubject(current) === input.ownerSubject) &&
|
|
163
|
-
input.accessMode
|
|
178
|
+
!requiresCustomerAuthProjection({ ...current, accessMode: input.accessMode }, input.serverAuth)) {
|
|
164
179
|
return current;
|
|
165
180
|
}
|
|
166
181
|
const committed = {
|
|
167
182
|
...current,
|
|
168
183
|
accessMode: input.accessMode,
|
|
169
184
|
...(input.ownerSubject !== undefined ? { ownerSubject: input.ownerSubject } : {}),
|
|
170
|
-
...(input.accessMode
|
|
185
|
+
...(requiresCustomerAuthProjection({ ...current, accessMode: input.accessMode }, input.serverAuth) && input.serverAuth !== undefined
|
|
171
186
|
? { serverAuth: input.serverAuth }
|
|
172
187
|
: {}),
|
|
173
188
|
};
|
|
@@ -4,12 +4,24 @@ import { compileConnectors, delegatedTokenExchangeIdentityErrors, } from '@noodl
|
|
|
4
4
|
import { InMemoryConnectorRegistry, resolveManagedOrigins, resolveVariableEnvironment, } from '@noodle-borg/runtime';
|
|
5
5
|
import { AppPackageSnapshotError, createAppPackageSnapshot, } from './app-package-snapshot.js';
|
|
6
6
|
import { missingServerConfigErrors } from './assistant-bindings.js';
|
|
7
|
+
import { normalizePersistedConnectorsForCompile } from './connector-normalize.js';
|
|
7
8
|
import { ManagedConfigBroker } from './credential-broker.js';
|
|
8
9
|
import { deploymentCredentialBrokerOptions } from './credential-broker-options.js';
|
|
10
|
+
import { deploymentRecordVersionError } from './deployment-record-version.js';
|
|
9
11
|
import { normalizePersistedManifestForCompile } from './manifest-normalize.js';
|
|
10
|
-
import { missingSecretErrors, missingVariableErrors } from './registry-helpers.js';
|
|
12
|
+
import { missingCapabilityErrors, missingSecretErrors, missingVariableErrors, } from './registry-helpers.js';
|
|
13
|
+
import { servedTargetFor } from './registry-targets.js';
|
|
11
14
|
import { createDeploymentStateConnector, } from './state-connector-factory.js';
|
|
12
15
|
import { resolveConfigScope, } from './store.js';
|
|
16
|
+
/** Reject unsupported persisted semantics before constructing executable runtime dependencies. */
|
|
17
|
+
export async function compilePersistedRegistryRecord(record, compileTarget) {
|
|
18
|
+
const versionError = deploymentRecordVersionError(record);
|
|
19
|
+
if (versionError !== undefined)
|
|
20
|
+
return { ok: false, errors: [versionError] };
|
|
21
|
+
return compileTarget({ org: record.orgSlug, app: record.appSlug, env: record.environment }, record.manifest, record.connectors === undefined
|
|
22
|
+
? undefined
|
|
23
|
+
: normalizePersistedConnectorsForCompile(record.connectors), record.hostedAssets, false, record.deploymentId);
|
|
24
|
+
}
|
|
13
25
|
export async function compileRegistryTarget(context, input) {
|
|
14
26
|
const { tenant, manifest, connectors, hostedAssets, deploymentId } = input;
|
|
15
27
|
let catalogConnectors = [];
|
|
@@ -216,4 +228,33 @@ export async function compileRegistryTarget(context, input) {
|
|
|
216
228
|
...(appPackageSnapshot !== undefined ? { appPackageSnapshot } : {}),
|
|
217
229
|
};
|
|
218
230
|
}
|
|
231
|
+
/** Load and validate persisted semantics before publishing an executable target to caches. */
|
|
232
|
+
export async function loadPersistedRegistryTarget(source, context) {
|
|
233
|
+
const { state } = context;
|
|
234
|
+
const record = typeof source === 'string'
|
|
235
|
+
? state.store
|
|
236
|
+
? await state.store.get(source)
|
|
237
|
+
: state.records.get(source)
|
|
238
|
+
: source;
|
|
239
|
+
if (!record ||
|
|
240
|
+
record.archivedAt !== undefined ||
|
|
241
|
+
deploymentRecordVersionError(record) !== undefined)
|
|
242
|
+
return undefined;
|
|
243
|
+
const deploymentId = record.deploymentId;
|
|
244
|
+
const built = await context.compile(record);
|
|
245
|
+
if (!built.ok) {
|
|
246
|
+
throw new Error(`deployment ${deploymentId} failed to recompile (${built.errors.map((e) => e.code).join(',')})`);
|
|
247
|
+
}
|
|
248
|
+
const missingCapabilities = missingCapabilityErrors(built.served.artifact.requirements?.capabilities ?? [], context.capabilities);
|
|
249
|
+
if (missingCapabilities.length > 0) {
|
|
250
|
+
throw new Error(`deployment ${deploymentId} failed capability requirements (${missingCapabilities.map((e) => e.path).join(',')})`);
|
|
251
|
+
}
|
|
252
|
+
if (record.active &&
|
|
253
|
+
(await context.hasCustomerAuthConflict(record, built.served.artifact.server.auth)))
|
|
254
|
+
return undefined;
|
|
255
|
+
const target = servedTargetFor(record, built.served, context.customerVerifierFactory);
|
|
256
|
+
state.servers.set(deploymentId, target);
|
|
257
|
+
state.records.set(deploymentId, record);
|
|
258
|
+
return target;
|
|
259
|
+
}
|
|
219
260
|
//# sourceMappingURL=registry-compile.js.map
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { normalizeServerVersion } from '@noodle-borg/module';
|
|
2
|
+
import { deploymentRecordVersionError } from './deployment-record-version.js';
|
|
2
3
|
import { deployAccessRequiresActor, deployerRequiredError, deploymentOwnerSubject, emptyMembershipSourcesError, membershipSourcesRequireOrgMembersError, missingCapabilityErrors, serverAuthRequiredError, } from './registry-helpers.js';
|
|
4
|
+
import { activeRecord, activeRecordVersion } from './registry-state.js';
|
|
3
5
|
import { idempotentDeploymentId, mintDeploymentId } from './registry-targets.js';
|
|
4
6
|
/** Serialize candidate validation/activation with hierarchical configuration writers. */
|
|
5
7
|
export async function withDeploymentConfiguration(config, org, work) {
|
|
@@ -19,6 +21,15 @@ export async function withDeploymentConfiguration(config, org, work) {
|
|
|
19
21
|
throw error;
|
|
20
22
|
}
|
|
21
23
|
}
|
|
24
|
+
/** Validate the exact destination scope before compilation or publication side effects. */
|
|
25
|
+
export async function deploymentWriteVersionError(state, tenant, serverVersion) {
|
|
26
|
+
const active = serverVersion === undefined
|
|
27
|
+
? await activeRecord(state, tenant)
|
|
28
|
+
: await activeRecordVersion(state, tenant, serverVersion);
|
|
29
|
+
return active !== undefined && active.serverVersion === serverVersion
|
|
30
|
+
? deploymentRecordVersionError(active)
|
|
31
|
+
: undefined;
|
|
32
|
+
}
|
|
22
33
|
export async function preflightRegistryDeploy(input) {
|
|
23
34
|
const { actor, accessMode, orgMembershipSources } = input.options;
|
|
24
35
|
if (input.options.serverVersion !== undefined) {
|
|
@@ -67,6 +78,10 @@ export async function resolveDeployAttempt(input) {
|
|
|
67
78
|
const existing = (await input.store?.get(deploymentId)) ?? input.records.get(deploymentId);
|
|
68
79
|
if (existing === undefined)
|
|
69
80
|
return { deploymentId };
|
|
81
|
+
const versionError = deploymentRecordVersionError(existing);
|
|
82
|
+
if (versionError !== undefined) {
|
|
83
|
+
return { deploymentId, replay: { ok: false, errors: [versionError] } };
|
|
84
|
+
}
|
|
70
85
|
if (!sameIdempotentDeploy(existing, input.tenant, input.manifest, input.options)) {
|
|
71
86
|
return {
|
|
72
87
|
deploymentId,
|
|
@@ -75,10 +75,12 @@ export async function rollbackDeployment(state, ref, deploymentId, compilePersis
|
|
|
75
75
|
const activation = state.store
|
|
76
76
|
? await state.store.activateDeployment(ref, deploymentId, {
|
|
77
77
|
expectedAccessMode: target.accessMode,
|
|
78
|
+
expectedSchemaVersion: target.schemaVersion,
|
|
78
79
|
...(compiledAuth !== undefined ? { serverAuth: compiledAuth } : {}),
|
|
79
80
|
})
|
|
80
81
|
: activateInMemory(state.records, ref, deploymentId, {
|
|
81
82
|
expectedAccessMode: target.accessMode,
|
|
83
|
+
expectedSchemaVersion: target.schemaVersion,
|
|
82
84
|
...(compiledAuth !== undefined ? { serverAuth: compiledAuth } : {}),
|
|
83
85
|
});
|
|
84
86
|
if (activation === undefined) {
|
|
@@ -36,6 +36,7 @@ export declare function persistDeployRecord(view: RegistryStateView, record: Dep
|
|
|
36
36
|
/** No-store activation fallback (moved verbatim from `ServerRegistry.#activateInMemory`). */
|
|
37
37
|
export declare function activateInMemory(records: Map<string, DeployRecord>, ref: TenantRef, deploymentId: string, precondition?: {
|
|
38
38
|
readonly expectedAccessMode: DeployRecord['accessMode'];
|
|
39
|
+
readonly expectedSchemaVersion?: number;
|
|
39
40
|
readonly serverAuth?: DeployRecord['serverAuth'];
|
|
40
41
|
}): {
|
|
41
42
|
readonly active: DeployRecord;
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
* durable store first, then reconcile the in-process caches so no instance keeps serving stale state.
|
|
6
6
|
*/
|
|
7
7
|
import { normalizeServerVersion } from '@noodle-borg/module';
|
|
8
|
-
import { assertCustomerAuthRestorePrecondition, assertUniqueActiveCustomerAuthAudienceBindings, CustomerAuthAudienceProjectionError, hasExactCustomerAuthProjection, } from './customer-auth-audience-binding.js';
|
|
8
|
+
import { assertCustomerAuthRestorePrecondition, assertUniqueActiveCustomerAuthAudienceBindings, CustomerAuthAudienceProjectionError, hasExactCustomerAuthProjection, requiresCustomerAuthProjection, } from './customer-auth-audience-binding.js';
|
|
9
9
|
import { assertDeploymentActivationUnlocked, assertDeploymentAppendUnlocked, } from './deployment-lock.js';
|
|
10
|
+
import { assertDeploymentAppendVersion } from './deployment-record-version.js';
|
|
10
11
|
import { defaultActiveRecord } from './deployment-versioning.js';
|
|
11
12
|
import { recordMatchesTenant, tenantDeploymentKey, tenantKey } from './registry-targets.js';
|
|
12
13
|
import { appArchivedAt, deploymentSummary, paginateAppSummaries, planAppArchive, planAppRestore, planArchivedAppSweep, resolveProductionEnvironment, summarizeApps, summarizeEnvs, withoutArchiveStamp, } from './store/records.js';
|
|
@@ -34,6 +35,7 @@ export async function persistDeployRecord(view, record, tenant, activatesNow) {
|
|
|
34
35
|
return persisted;
|
|
35
36
|
}
|
|
36
37
|
else {
|
|
38
|
+
assertDeploymentAppendVersion([...view.records.values()], record);
|
|
37
39
|
if (!assertDeploymentAppendUnlocked([...view.records.values()], record)) {
|
|
38
40
|
return view.records.get(record.deploymentId);
|
|
39
41
|
}
|
|
@@ -66,18 +68,23 @@ export function activateInMemory(records, ref, deploymentId, precondition) {
|
|
|
66
68
|
if (target === undefined || !recordMatchesTenant(target, ref))
|
|
67
69
|
return undefined;
|
|
68
70
|
assertDeploymentActivationUnlocked([...records.values()], target);
|
|
69
|
-
if (
|
|
71
|
+
if (target.schemaVersion !== (precondition?.expectedSchemaVersion ?? 1) ||
|
|
72
|
+
(precondition !== undefined && target.accessMode !== precondition.expectedAccessMode)) {
|
|
70
73
|
return undefined;
|
|
71
74
|
}
|
|
72
75
|
const previousActive = [...records.values()]
|
|
73
76
|
.filter((record) => record.active && recordMatchesTenant(record, ref))
|
|
74
77
|
.filter((record) => record.serverVersion === target.serverVersion)
|
|
75
78
|
.sort((a, b) => b.deploymentVersion - a.deploymentVersion)[0];
|
|
79
|
+
if (precondition === undefined && previousActive !== undefined) {
|
|
80
|
+
assertDeploymentAppendVersion([previousActive], { ...target, active: true });
|
|
81
|
+
}
|
|
76
82
|
const alreadyActive = previousActive?.deploymentId === deploymentId;
|
|
77
83
|
const activated = {
|
|
78
84
|
...target,
|
|
79
85
|
active: true,
|
|
80
|
-
...(target
|
|
86
|
+
...(requiresCustomerAuthProjection(target, precondition?.serverAuth) &&
|
|
87
|
+
precondition?.serverAuth !== undefined
|
|
81
88
|
? { serverAuth: precondition.serverAuth }
|
|
82
89
|
: {}),
|
|
83
90
|
};
|
|
@@ -207,7 +214,7 @@ export async function registryRestoreApp(state, org, app, compileRecord) {
|
|
|
207
214
|
return undefined;
|
|
208
215
|
const projections = [];
|
|
209
216
|
for (const record of plan.clear) {
|
|
210
|
-
if (!record.active || record
|
|
217
|
+
if (!record.active || !requiresCustomerAuthProjection(record))
|
|
211
218
|
continue;
|
|
212
219
|
const built = await compileRecord(record);
|
|
213
220
|
const compiledAuth = built.ok ? built.served.artifact.server.auth : undefined;
|
|
@@ -243,7 +250,7 @@ export async function registryCustomerAuthRestoreProjections(state, deploymentId
|
|
|
243
250
|
: state.store.get(deploymentId)));
|
|
244
251
|
const projections = [];
|
|
245
252
|
for (const record of records) {
|
|
246
|
-
if (record === undefined || !record.active || record
|
|
253
|
+
if (record === undefined || !record.active || !requiresCustomerAuthProjection(record))
|
|
247
254
|
continue;
|
|
248
255
|
const built = await compileRecord(record);
|
|
249
256
|
const compiledAuth = built.ok ? built.served.artifact.server.auth : undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { tenantMcpUrl } from '@noodle-borg/module';
|
|
2
|
+
import { deploymentAuthenticationFor } from './deployment-authentication.js';
|
|
2
3
|
import { deploymentOwnerSubject, missingSecretNames } from './registry-helpers.js';
|
|
3
4
|
/** Project one compiled deployment into the control-plane status contract. */
|
|
4
5
|
export function deploymentStatusFor(ref, record, built, baseUrl, endpointOptions) {
|
|
@@ -8,6 +9,7 @@ export function deploymentStatusFor(ref, record, built, baseUrl, endpointOptions
|
|
|
8
9
|
built.served.artifact.server.auth === undefined;
|
|
9
10
|
const unhealthy = missingCustomerAuth || (!built.ok && missingSecrets.length === 0);
|
|
10
11
|
const ownerSubject = deploymentOwnerSubject(record);
|
|
12
|
+
const authentication = deploymentAuthenticationFor(record);
|
|
11
13
|
return {
|
|
12
14
|
target: ref,
|
|
13
15
|
deployment: {
|
|
@@ -20,6 +22,7 @@ export function deploymentStatusFor(ref, record, built, baseUrl, endpointOptions
|
|
|
20
22
|
...(record.createdByEmail !== undefined ? { createdByEmail: record.createdByEmail } : {}),
|
|
21
23
|
...(ownerSubject !== undefined ? { ownerSubject } : {}),
|
|
22
24
|
accessMode: record.accessMode ?? 'owner-only',
|
|
25
|
+
...(authentication !== undefined ? { authentication } : {}),
|
|
23
26
|
...(record.deploymentLock !== undefined
|
|
24
27
|
? {
|
|
25
28
|
deploymentLock: {
|
|
@@ -2,6 +2,7 @@ import { createHash, randomUUID } from 'node:crypto';
|
|
|
2
2
|
import { RECORD_CONNECTOR_ID } from '@noodle-borg/compiler';
|
|
3
3
|
import { parseAppPackageSnapshot } from './app-package-snapshot.js';
|
|
4
4
|
import { hasExactCustomerAuthProjection } from './customer-auth-audience-binding.js';
|
|
5
|
+
import { deploymentRecordVersionError } from './deployment-record-version.js';
|
|
5
6
|
import { deploymentOwnerSubject } from './registry-helpers.js';
|
|
6
7
|
import { validateTenantRef } from './store.js';
|
|
7
8
|
/** Replace only the platform record port; unrelated compiled runtime ports retain their authority. */
|
|
@@ -34,6 +35,9 @@ export function rebindNativeRecords(target, record, factory) {
|
|
|
34
35
|
* front-door checks. Legacy alpha records without an identity access mode are not served.
|
|
35
36
|
*/
|
|
36
37
|
export function servedTargetFor(record, served, customerVerifierFactory) {
|
|
38
|
+
const versionError = deploymentRecordVersionError(record);
|
|
39
|
+
if (versionError !== undefined)
|
|
40
|
+
throw new Error(versionError.code);
|
|
37
41
|
const accessMode = record.accessMode;
|
|
38
42
|
if (accessMode === undefined) {
|
|
39
43
|
throw new Error(`deployment ${record.deploymentId} has unsupported legacy access mode`);
|
|
@@ -102,6 +106,10 @@ function bindAppPackageSnapshot(served, value) {
|
|
|
102
106
|
export async function targetForPersistedRecord(record, state) {
|
|
103
107
|
const cached = state.servers.get(record.deploymentId);
|
|
104
108
|
state.records.set(record.deploymentId, record);
|
|
109
|
+
if (deploymentRecordVersionError(record) !== undefined) {
|
|
110
|
+
state.servers.delete(record.deploymentId);
|
|
111
|
+
return undefined;
|
|
112
|
+
}
|
|
105
113
|
if (cached === undefined)
|
|
106
114
|
return state.load?.();
|
|
107
115
|
if (!hasExactCustomerAuthProjection(record, cached.served.artifact.server.auth)) {
|
|
@@ -73,7 +73,7 @@ export type RunDeployResult = DeployResult | {
|
|
|
73
73
|
readonly deploymentVersion: number;
|
|
74
74
|
readonly serverVersion?: string;
|
|
75
75
|
};
|
|
76
|
-
export type AccessUpdateFailureCode = 'no_active_deployment' | 'server_auth_required' | 'customer_auth_audience_conflict' | 'public_user_context_conflict' | 'owner_identity_required' | 'access_update_conflict';
|
|
76
|
+
export type AccessUpdateFailureCode = 'unsupported_deployment_record_version' | 'no_active_deployment' | 'server_auth_required' | 'customer_auth_audience_conflict' | 'public_user_context_conflict' | 'owner_identity_required' | 'access_update_conflict';
|
|
77
77
|
export type AccessUpdateResult = {
|
|
78
78
|
readonly ok: true;
|
|
79
79
|
readonly changed: boolean;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { KnowledgePublicationError, withKnowledgePublication, } from '@noodle-borg/knowledge-operations/portable';
|
|
2
2
|
import { DeploymentActivationError, normalizeServerVersion, } from '@noodle-borg/module';
|
|
3
|
-
import { normalizePersistedConnectorsForCompile } from './connector-normalize.js';
|
|
4
3
|
import { CustomerAuthAudienceConflictError, customerAuthAudienceConflictFailure, hasActiveCustomerAuthAudienceConflict, } from './customer-auth-audience-binding.js';
|
|
5
4
|
import { DeploymentLockedError, deploymentLockedConflict, deploymentLockedPreflight, } from './deployment-lock.js';
|
|
5
|
+
import { UnsupportedDeploymentRecordVersionError, unsupportedDeploymentRecordFailure, } from './deployment-record-version.js';
|
|
6
6
|
import { defaultActiveRecord } from './deployment-versioning.js';
|
|
7
7
|
import { updateRegistryAccess } from './registry-access.js';
|
|
8
|
-
import { compileRegistryTarget } from './registry-compile.js';
|
|
9
|
-
import { preflightRegistryDeploy, resolveDeployAttempt, withDeploymentConfiguration, } from './registry-deploy-transaction.js';
|
|
10
|
-
import { deploymentOwnerSubject
|
|
8
|
+
import { compilePersistedRegistryRecord, compileRegistryTarget, loadPersistedRegistryTarget, } from './registry-compile.js';
|
|
9
|
+
import { deploymentWriteVersionError, preflightRegistryDeploy, resolveDeployAttempt, withDeploymentConfiguration, } from './registry-deploy-transaction.js';
|
|
10
|
+
import { deploymentOwnerSubject } from './registry-helpers.js';
|
|
11
11
|
import { registryDeploymentPackage, renderDeploymentPackageSnapshot } from './registry-package.js';
|
|
12
12
|
import { recoverRegistryRecords } from './registry-recover.js';
|
|
13
13
|
import { rollbackDeployment, rollbackWithMappedErrors } from './registry-rollback.js';
|
|
14
14
|
import { activeRecord, activeRecordVersion, persistDeployRecord, reconcilePlatformAccountResetRegistryCache, registryAppArchivedAt, registryArchiveApp, registryCustomerAuthRestoreProjections, registryGetApp, registryGetDeployment, registryGetEnvironment, registryListApps, registryListEnvironments, registryRestoreApp, registrySetProductionEnvironment, registrySweepArchived, setRegistryDeploymentLock, } from './registry-state.js';
|
|
15
15
|
import { deploymentStatusFor } from './registry-status.js';
|
|
16
|
-
import { deploymentSourceFor, emptySecretEnvelope, rebindNativeRecords,
|
|
16
|
+
import { deploymentSourceFor, emptySecretEnvelope, rebindNativeRecords, servedTargetFor, targetForPersistedRecord, tenantDeploymentKey, tenantKey, } from './registry-targets.js';
|
|
17
17
|
import { withBuiltinStateCatalog } from './state-catalog.js';
|
|
18
18
|
import { deploymentSummary, matchesDeploymentFilter, validateDeploymentListFilter, } from './store/records.js';
|
|
19
19
|
import { InMemoryConfigStore, validateTenantRef, } from './store.js';
|
|
@@ -119,6 +119,9 @@ export class ServerRegistry {
|
|
|
119
119
|
if (active?.deploymentLock !== undefined)
|
|
120
120
|
return deploymentLockedConflict();
|
|
121
121
|
}
|
|
122
|
+
const versionError = await deploymentWriteVersionError(this.#stateView(), safeTenant, safeServerVersion);
|
|
123
|
+
if (versionError !== undefined)
|
|
124
|
+
return { ok: false, errors: [versionError] };
|
|
122
125
|
const preflight = await preflightRegistryDeploy({
|
|
123
126
|
options,
|
|
124
127
|
serviceCapabilities: this.#serviceCapabilities,
|
|
@@ -186,6 +189,8 @@ export class ServerRegistry {
|
|
|
186
189
|
if (error instanceof CustomerAuthAudienceConflictError) {
|
|
187
190
|
return customerAuthAudienceConflictFailure();
|
|
188
191
|
}
|
|
192
|
+
if (error instanceof UnsupportedDeploymentRecordVersionError)
|
|
193
|
+
return unsupportedDeploymentRecordFailure();
|
|
189
194
|
if (error instanceof DeploymentLockedError)
|
|
190
195
|
return deploymentLockedConflict();
|
|
191
196
|
throw error;
|
|
@@ -211,6 +216,8 @@ export class ServerRegistry {
|
|
|
211
216
|
if (error instanceof CustomerAuthAudienceConflictError) {
|
|
212
217
|
return customerAuthAudienceConflictFailure();
|
|
213
218
|
}
|
|
219
|
+
if (error instanceof UnsupportedDeploymentRecordVersionError)
|
|
220
|
+
return unsupportedDeploymentRecordFailure();
|
|
214
221
|
if (error instanceof DeploymentLockedError)
|
|
215
222
|
return deploymentLockedConflict();
|
|
216
223
|
throw error;
|
|
@@ -262,6 +269,9 @@ export class ServerRegistry {
|
|
|
262
269
|
if (active?.deploymentLock !== undefined)
|
|
263
270
|
return deploymentLockedPreflight();
|
|
264
271
|
}
|
|
272
|
+
const versionError = await deploymentWriteVersionError(this.#stateView(), safeTenant, safeServerVersion);
|
|
273
|
+
if (versionError !== undefined)
|
|
274
|
+
return { ok: false, errors: [versionError] };
|
|
265
275
|
const result = await preflightRegistryDeploy({
|
|
266
276
|
options,
|
|
267
277
|
serviceCapabilities: this.#serviceCapabilities,
|
|
@@ -305,16 +315,20 @@ export class ServerRegistry {
|
|
|
305
315
|
}, { tenant, manifest, connectors, hostedAssets, deploymentId, renderAppPackage });
|
|
306
316
|
}
|
|
307
317
|
#compilePersistedRecord(record) {
|
|
308
|
-
return this.#compileTarget(
|
|
309
|
-
? undefined
|
|
310
|
-
: normalizePersistedConnectorsForCompile(record.connectors), record.hostedAssets, false, record.deploymentId);
|
|
318
|
+
return compilePersistedRegistryRecord(record, this.#compileTarget.bind(this));
|
|
311
319
|
}
|
|
312
320
|
async get(deploymentId) {
|
|
313
321
|
if (this.#records.get(deploymentId)?.archivedAt !== undefined)
|
|
314
322
|
return undefined;
|
|
315
323
|
const cached = this.#servers.get(deploymentId);
|
|
316
|
-
if (cached)
|
|
317
|
-
|
|
324
|
+
if (cached) {
|
|
325
|
+
const record = this.#store
|
|
326
|
+
? await this.#store.get(deploymentId)
|
|
327
|
+
: this.#records.get(deploymentId);
|
|
328
|
+
return record === undefined || record.archivedAt !== undefined
|
|
329
|
+
? undefined
|
|
330
|
+
: this.#targetForPersistedRecord(record);
|
|
331
|
+
}
|
|
318
332
|
const inflight = this.#inflight.get(deploymentId);
|
|
319
333
|
if (inflight)
|
|
320
334
|
return inflight;
|
|
@@ -495,32 +509,13 @@ export class ServerRegistry {
|
|
|
495
509
|
});
|
|
496
510
|
}
|
|
497
511
|
async #loadAndCompile(source) {
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
:
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
const deploymentId = record.deploymentId;
|
|
506
|
-
if (record.archivedAt !== undefined)
|
|
507
|
-
return undefined;
|
|
508
|
-
const built = await this.#compilePersistedRecord(record);
|
|
509
|
-
if (!built.ok) {
|
|
510
|
-
throw new Error(`deployment ${deploymentId} failed to recompile (${built.errors.map((e) => e.code).join(',')})`);
|
|
511
|
-
}
|
|
512
|
-
const missingCapabilities = missingCapabilityErrors(built.served.artifact.requirements?.capabilities ?? [], this.#serviceCapabilities);
|
|
513
|
-
if (missingCapabilities.length > 0) {
|
|
514
|
-
throw new Error(`deployment ${deploymentId} failed capability requirements (${missingCapabilities.map((e) => e.path).join(',')})`);
|
|
515
|
-
}
|
|
516
|
-
if (record.active &&
|
|
517
|
-
(await this.#hasCustomerAuthAudienceConflict(record, built.served.artifact.server.auth))) {
|
|
518
|
-
return undefined;
|
|
519
|
-
}
|
|
520
|
-
const target = servedTargetFor(record, built.served, this.#customerVerifierFactory);
|
|
521
|
-
this.#servers.set(deploymentId, target);
|
|
522
|
-
this.#records.set(deploymentId, record);
|
|
523
|
-
return target;
|
|
512
|
+
return loadPersistedRegistryTarget(source, {
|
|
513
|
+
state: this.#stateView(),
|
|
514
|
+
compile: (record) => this.#compilePersistedRecord(record),
|
|
515
|
+
capabilities: this.#serviceCapabilities,
|
|
516
|
+
customerVerifierFactory: this.#customerVerifierFactory,
|
|
517
|
+
hasCustomerAuthConflict: (record, auth) => this.#hasCustomerAuthAudienceConflict(record, auth),
|
|
518
|
+
});
|
|
524
519
|
}
|
|
525
520
|
async #hasCustomerAuthAudienceConflict(record, auth) {
|
|
526
521
|
return hasActiveCustomerAuthAudienceConflict(this.#store, this.#records, record, auth);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { normalizeServerVersion } from '@noodle-borg/module';
|
|
2
2
|
import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
|
|
3
3
|
import { accessUpdateRequestSchema } from '@noodle-borg/wire-contracts';
|
|
4
|
+
import { deploymentAuthenticationFor } from '../deployment-authentication.js';
|
|
4
5
|
import { deploymentOwnerSubject } from '../registry-helpers.js';
|
|
5
6
|
import { authorizeControlPlane } from './control-plane.js';
|
|
6
7
|
import { canManageMembers } from './org-admin.js';
|
|
@@ -44,6 +45,7 @@ export async function handleAccessUpdate(req, res, registry, gate, controlPlane,
|
|
|
44
45
|
}
|
|
45
46
|
const accessMode = result.record.accessMode ?? 'owner-only';
|
|
46
47
|
const ownerSubject = deploymentOwnerSubject(result.record);
|
|
48
|
+
const authentication = deploymentAuthenticationFor(result.record);
|
|
47
49
|
await audit.emit({
|
|
48
50
|
eventType: 'deployment.access.updated',
|
|
49
51
|
org: tenant.org,
|
|
@@ -63,6 +65,7 @@ export async function handleAccessUpdate(req, res, registry, gate, controlPlane,
|
|
|
63
65
|
...(ownerSubject !== undefined ? { ownerSubject } : {}),
|
|
64
66
|
accessChanged: result.accessChanged,
|
|
65
67
|
ownerChanged: result.ownerChanged,
|
|
68
|
+
...(authentication !== undefined ? { authentication, policyChanged: false } : {}),
|
|
66
69
|
changed: result.changed,
|
|
67
70
|
},
|
|
68
71
|
});
|
|
@@ -75,6 +78,7 @@ export async function handleAccessUpdate(req, res, registry, gate, controlPlane,
|
|
|
75
78
|
? { serverVersion: result.record.serverVersion }
|
|
76
79
|
: {}),
|
|
77
80
|
accessMode,
|
|
81
|
+
...(authentication !== undefined ? { authentication } : {}),
|
|
78
82
|
...(ownerSubject !== undefined ? { ownerSubject } : {}),
|
|
79
83
|
},
|
|
80
84
|
previousAccessMode: result.previousAccessMode,
|
|
@@ -83,6 +87,7 @@ export async function handleAccessUpdate(req, res, registry, gate, controlPlane,
|
|
|
83
87
|
: {}),
|
|
84
88
|
accessChanged: result.accessChanged,
|
|
85
89
|
ownerChanged: result.ownerChanged,
|
|
90
|
+
...(authentication !== undefined ? { policyChanged: false } : {}),
|
|
86
91
|
changed: result.changed,
|
|
87
92
|
});
|
|
88
93
|
}
|
|
@@ -12,6 +12,7 @@ export declare class InMemoryArtifactStore implements ArtifactStore {
|
|
|
12
12
|
findActiveCustomerAuthAudienceConflict(ref: TenantRef, auth: TenantAuthConfig): Promise<TenantRef | undefined>;
|
|
13
13
|
activateDeployment(ref: TenantRef, deploymentId: string, precondition?: {
|
|
14
14
|
readonly expectedAccessMode: AccessMode | undefined;
|
|
15
|
+
readonly expectedSchemaVersion?: number;
|
|
15
16
|
readonly serverAuth?: TenantAuthConfig;
|
|
16
17
|
}, _options?: {
|
|
17
18
|
readonly automationId?: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { normalizeServerVersion } from '@noodle-borg/module';
|
|
2
2
|
import { assertSameAppPackageSnapshot, sanitizeDeployRecordAppPackageSnapshot, } from '../app-package-snapshot.js';
|
|
3
|
-
import { assertCustomerAuthRestorePrecondition, assertUniqueActiveCustomerAuthAudienceBindings, findActiveCustomerAuthAudienceConflict, } from '../customer-auth-audience-binding.js';
|
|
3
|
+
import { assertCustomerAuthRestorePrecondition, assertUniqueActiveCustomerAuthAudienceBindings, findActiveCustomerAuthAudienceConflict, requiresCustomerAuthProjection, } from '../customer-auth-audience-binding.js';
|
|
4
4
|
import { assertDeploymentActivationUnlocked, assertDeploymentAppendUnlocked, } from '../deployment-lock.js';
|
|
5
|
+
import { assertDeploymentAppendVersion } from '../deployment-record-version.js';
|
|
5
6
|
import { defaultActiveRecord, sameDeploymentScope, sameTenantRecord, } from '../deployment-versioning.js';
|
|
6
7
|
import { appArchivedAt, deploymentSummary, matchesDeploymentFilter, paginateAppSummaries, planAppArchive, planAppRestore, planArchivedAppSweep, preserveDeploymentOwnerState, resolveActiveAccessUpdate, resolveProductionEnvironment, summarizeApps, summarizeEnvs, validateDeploymentListFilter, withoutArchiveStamp, } from './records.js';
|
|
7
8
|
import { validateSlug, validateTenantRef } from './validate.js';
|
|
@@ -10,6 +11,7 @@ export class InMemoryArtifactStore {
|
|
|
10
11
|
#records = new Map();
|
|
11
12
|
#productionEnvironments = new Map();
|
|
12
13
|
async append(record) {
|
|
14
|
+
assertDeploymentAppendVersion([...this.#records.values()], record);
|
|
13
15
|
const existing = this.#records.get(record.deploymentId);
|
|
14
16
|
if (existing !== undefined)
|
|
15
17
|
assertSameAppPackageSnapshot(existing, record);
|
|
@@ -83,17 +85,22 @@ export class InMemoryArtifactStore {
|
|
|
83
85
|
if (target === undefined || !sameTenantRecord(target, safe))
|
|
84
86
|
return Promise.resolve(undefined);
|
|
85
87
|
assertDeploymentActivationUnlocked([...this.#records.values()], target);
|
|
86
|
-
if (
|
|
88
|
+
if (target.schemaVersion !== (precondition?.expectedSchemaVersion ?? 1) ||
|
|
89
|
+
(precondition !== undefined && target.accessMode !== precondition.expectedAccessMode)) {
|
|
87
90
|
return Promise.resolve(undefined);
|
|
88
91
|
}
|
|
89
92
|
const previousActive = [...this.#records.values()]
|
|
90
93
|
.filter((record) => record.active && sameDeploymentScope(record, target))
|
|
91
94
|
.sort((a, b) => b.deploymentVersion - a.deploymentVersion)[0];
|
|
95
|
+
if (precondition === undefined && previousActive !== undefined) {
|
|
96
|
+
assertDeploymentAppendVersion([previousActive], { ...target, active: true });
|
|
97
|
+
}
|
|
92
98
|
const alreadyActive = previousActive?.deploymentId === target.deploymentId;
|
|
93
99
|
const activated = {
|
|
94
100
|
...target,
|
|
95
101
|
active: true,
|
|
96
|
-
...(target
|
|
102
|
+
...(requiresCustomerAuthProjection(target, precondition?.serverAuth) &&
|
|
103
|
+
precondition?.serverAuth !== undefined
|
|
97
104
|
? { serverAuth: precondition.serverAuth }
|
|
98
105
|
: {}),
|
|
99
106
|
};
|
|
@@ -18,6 +18,7 @@ export declare class JsonFileArtifactStore implements ArtifactStore {
|
|
|
18
18
|
updateActiveAccess(ref: TenantRef, deploymentId: string, input: ActiveAccessUpdateInput): Promise<DeployRecord | undefined>;
|
|
19
19
|
activateDeployment(ref: TenantRef, deploymentId: string, precondition?: {
|
|
20
20
|
readonly expectedAccessMode: AccessMode | undefined;
|
|
21
|
+
readonly expectedSchemaVersion?: number;
|
|
21
22
|
readonly serverAuth?: TenantAuthConfig;
|
|
22
23
|
}): Promise<DeploymentActivationResult | undefined>;
|
|
23
24
|
loadAll(): Promise<readonly DeployRecord[]>;
|
|
@@ -3,8 +3,9 @@ import { mkdir, readdir, readFile, rename, rm, writeFile } from 'node:fs/promise
|
|
|
3
3
|
import { join } from 'node:path';
|
|
4
4
|
import { normalizeServerVersion } from '@noodle-borg/module';
|
|
5
5
|
import { assertSameAppPackageSnapshot, sanitizeDeployRecordAppPackageSnapshot, } from '../app-package-snapshot.js';
|
|
6
|
-
import { assertCustomerAuthRestorePrecondition, assertUniqueActiveCustomerAuthAudienceBindings, findActiveCustomerAuthAudienceConflict, } from '../customer-auth-audience-binding.js';
|
|
6
|
+
import { assertCustomerAuthRestorePrecondition, assertUniqueActiveCustomerAuthAudienceBindings, findActiveCustomerAuthAudienceConflict, requiresCustomerAuthProjection, } from '../customer-auth-audience-binding.js';
|
|
7
7
|
import { assertDeploymentActivationUnlocked, assertDeploymentAppendUnlocked, } from '../deployment-lock.js';
|
|
8
|
+
import { assertDeploymentAppendVersion } from '../deployment-record-version.js';
|
|
8
9
|
import { defaultActiveRecord, sameDeploymentScope, sameTenantRecord, } from '../deployment-versioning.js';
|
|
9
10
|
import { appArchivedAt, deploymentSummary, matchesDeploymentFilter, paginateAppSummaries, planAppArchive, planAppRestore, planArchivedAppSweep, preserveDeploymentOwnerState, resolveActiveAccessUpdate, resolveProductionEnvironment, summarizeApps, summarizeEnvs, validateDeploymentListFilter, withoutArchiveStamp, } from './records.js';
|
|
10
11
|
import { DEPLOYMENT_ID_PATTERN, validateSlug, validateTenantRef } from './validate.js';
|
|
@@ -34,6 +35,7 @@ export class JsonFileArtifactStore {
|
|
|
34
35
|
throw new Error(`invalid deploymentId for persistence: "${record.deploymentId}"`);
|
|
35
36
|
}
|
|
36
37
|
const records = await this.loadAll();
|
|
38
|
+
assertDeploymentAppendVersion(records, record);
|
|
37
39
|
const existing = records.find((candidate) => candidate.deploymentId === record.deploymentId);
|
|
38
40
|
if (existing !== undefined)
|
|
39
41
|
assertSameAppPackageSnapshot(existing, record);
|
|
@@ -127,7 +129,8 @@ export class JsonFileArtifactStore {
|
|
|
127
129
|
const target = await this.get(deploymentId);
|
|
128
130
|
if (target === undefined || !sameTenantRecord(target, safe))
|
|
129
131
|
return undefined;
|
|
130
|
-
if (
|
|
132
|
+
if (target.schemaVersion !== (precondition?.expectedSchemaVersion ?? 1) ||
|
|
133
|
+
(precondition !== undefined && target.accessMode !== precondition.expectedAccessMode)) {
|
|
131
134
|
return undefined;
|
|
132
135
|
}
|
|
133
136
|
const records = await this.loadAll();
|
|
@@ -135,11 +138,15 @@ export class JsonFileArtifactStore {
|
|
|
135
138
|
const previousActive = records
|
|
136
139
|
.filter((record) => record.active && sameDeploymentScope(record, target))
|
|
137
140
|
.sort((a, b) => b.deploymentVersion - a.deploymentVersion)[0];
|
|
141
|
+
if (precondition === undefined && previousActive !== undefined) {
|
|
142
|
+
assertDeploymentAppendVersion([previousActive], { ...target, active: true });
|
|
143
|
+
}
|
|
138
144
|
const alreadyActive = previousActive?.deploymentId === target.deploymentId;
|
|
139
145
|
const activated = {
|
|
140
146
|
...target,
|
|
141
147
|
active: true,
|
|
142
|
-
...(target
|
|
148
|
+
...(requiresCustomerAuthProjection(target, precondition?.serverAuth) &&
|
|
149
|
+
precondition?.serverAuth !== undefined
|
|
143
150
|
? { serverAuth: precondition.serverAuth }
|
|
144
151
|
: {}),
|
|
145
152
|
};
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* own persistence and feed their own raw records/anchors through these pure functions so every
|
|
6
6
|
* backend groups, ranks, and sorts identically.
|
|
7
7
|
*/
|
|
8
|
+
import { requiresCustomerAuthProjection } from '../customer-auth-audience-binding.js';
|
|
8
9
|
import { sameTenantRecord } from '../deployment-versioning.js';
|
|
9
10
|
import { deploymentOwnerSubject } from '../registry-helpers.js';
|
|
10
11
|
import { validateSlug } from './validate.js';
|
|
@@ -139,17 +140,18 @@ export function resolveActiveAccessUpdate(record, ref, input) {
|
|
|
139
140
|
record.archivedAt !== undefined ||
|
|
140
141
|
!sameTenantRecord(record, ref) ||
|
|
141
142
|
record.accessMode !== input.expectedAccessMode ||
|
|
143
|
+
record.schemaVersion !== (input.expectedSchemaVersion ?? 1) ||
|
|
142
144
|
deploymentOwnerSubject(record) !== input.expectedOwnerSubject)
|
|
143
145
|
return undefined;
|
|
144
146
|
if ((record.accessMode ?? 'owner-only') === input.accessMode &&
|
|
145
147
|
(input.ownerSubject === undefined || deploymentOwnerSubject(record) === input.ownerSubject) &&
|
|
146
|
-
input.accessMode
|
|
148
|
+
!requiresCustomerAuthProjection({ ...record, accessMode: input.accessMode }, input.serverAuth))
|
|
147
149
|
return record;
|
|
148
150
|
return {
|
|
149
151
|
...record,
|
|
150
152
|
accessMode: input.accessMode,
|
|
151
153
|
...(input.ownerSubject !== undefined ? { ownerSubject: input.ownerSubject } : {}),
|
|
152
|
-
...(input.accessMode
|
|
154
|
+
...(requiresCustomerAuthProjection({ ...record, accessMode: input.accessMode }, input.serverAuth) && input.serverAuth !== undefined
|
|
153
155
|
? { serverAuth: input.serverAuth }
|
|
154
156
|
: {}),
|
|
155
157
|
};
|
|
@@ -3,7 +3,7 @@ import type { OrganizationStore } from '@noodle-borg/control-plane/portable';
|
|
|
3
3
|
import type { OrgMembershipSource } from '@noodle-borg/module';
|
|
4
4
|
import type { SealedSecret } from '@noodle-borg/runtime';
|
|
5
5
|
import type { AccessMode } from '@noodle-borg/transport-http';
|
|
6
|
-
import type { DeploymentSource } from '@noodle-borg/wire-contracts';
|
|
6
|
+
import type { DeploymentAuthentication, DeploymentSource } from '@noodle-borg/wire-contracts';
|
|
7
7
|
import type { AppPackageSnapshotV1 } from './app-package-snapshot.js';
|
|
8
8
|
import type { ProductionEnvironmentChange } from './store/environment-production.js';
|
|
9
9
|
export type { ActiveMcpSubdomainClaim, ChangeMcpSubdomainInput, CreateOrgWithOwnerInput, McpSubdomainMutationResult, McpSubdomainSetting, OrgDomainRecord, OrgInvitationRecord, OrgMemberRecord, OrgOpenAIAppsChallengeRecord, OrgRecord, OrgRole, PersonalWorkspaceProvisionInput, PersonalWorkspaceProvisionResult, SignupAllowlistKind, SignupAllowlistRecord, WelcomeEmailRecord, } from '@noodle-borg/control-plane/portable';
|
|
@@ -241,6 +241,7 @@ export interface DeploymentStatus {
|
|
|
241
241
|
readonly createdByEmail?: string;
|
|
242
242
|
readonly ownerSubject?: string;
|
|
243
243
|
readonly accessMode: AccessMode;
|
|
244
|
+
readonly authentication?: DeploymentAuthentication;
|
|
244
245
|
readonly deploymentLock?: DeploymentLockMetadata;
|
|
245
246
|
};
|
|
246
247
|
readonly health: {
|
|
@@ -262,6 +263,8 @@ export interface ActiveAccessUpdateInput {
|
|
|
262
263
|
/** Desired owner mutation. Omission preserves the current effective owner; clearing is unsupported. */
|
|
263
264
|
readonly ownerSubject?: string;
|
|
264
265
|
readonly expectedAccessMode: AccessMode | undefined;
|
|
266
|
+
/** Older callers omit this and are restricted to version-1 records. */
|
|
267
|
+
readonly expectedSchemaVersion?: number;
|
|
265
268
|
readonly expectedOwnerSubject: string | undefined;
|
|
266
269
|
/** Compiler-authoritative projection persisted atomically when enabling customer access. */
|
|
267
270
|
readonly serverAuth?: TenantAuthConfig;
|
|
@@ -303,6 +306,7 @@ export interface ArtifactStore {
|
|
|
303
306
|
findActiveCustomerAuthAudienceConflict?(ref: TenantRef, auth: TenantAuthConfig): Promise<TenantRef | undefined>;
|
|
304
307
|
activateDeployment(ref: TenantRef, deploymentId: string, precondition?: {
|
|
305
308
|
readonly expectedAccessMode: AccessMode | undefined;
|
|
309
|
+
readonly expectedSchemaVersion?: number;
|
|
306
310
|
/** Compiler-authoritative projection persisted atomically when activating customer access. */
|
|
307
311
|
readonly serverAuth?: TenantAuthConfig;
|
|
308
312
|
}, options?: {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
41
41
|
"@noodle-borg/admission-limits": "0.0.0",
|
|
42
|
-
"@noodle-borg/agent-kit": "0.
|
|
42
|
+
"@noodle-borg/agent-kit": "0.102.0",
|
|
43
43
|
"@noodle-borg/app-package": "0.0.0",
|
|
44
44
|
"@noodle-borg/assistant-gateway": "0.0.0",
|
|
45
45
|
"@noodle-borg/auth": "0.0.0",
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
/** Strict service-output contracts for control-plane reads and mutations (ADR 0128). */
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
+
/** Effective authority enforcing caller authentication for one deployment. */
|
|
4
|
+
export declare const deploymentAuthenticationSchema: z.ZodEnum<{
|
|
5
|
+
customer: "customer";
|
|
6
|
+
none: "none";
|
|
7
|
+
platform: "platform";
|
|
8
|
+
}>;
|
|
9
|
+
export type DeploymentAuthentication = z.infer<typeof deploymentAuthenticationSchema>;
|
|
3
10
|
/** Exact OAuth subject bound by an operator to an owner-only deployment. */
|
|
4
11
|
export declare const deploymentOwnerSubjectSchema: z.ZodString;
|
|
5
12
|
export declare const accessUpdateRequestSchema: z.ZodObject<{
|
|
@@ -32,6 +39,11 @@ export declare const accessUpdateResponseSchema: z.ZodObject<{
|
|
|
32
39
|
mixed: "mixed";
|
|
33
40
|
customers: "customers";
|
|
34
41
|
}>;
|
|
42
|
+
authentication: z.ZodOptional<z.ZodEnum<{
|
|
43
|
+
customer: "customer";
|
|
44
|
+
none: "none";
|
|
45
|
+
platform: "platform";
|
|
46
|
+
}>>;
|
|
35
47
|
ownerSubject: z.ZodOptional<z.ZodString>;
|
|
36
48
|
}, z.core.$strict>;
|
|
37
49
|
previousAccessMode: z.ZodEnum<{
|
|
@@ -45,6 +57,7 @@ export declare const accessUpdateResponseSchema: z.ZodObject<{
|
|
|
45
57
|
previousOwnerSubject: z.ZodOptional<z.ZodString>;
|
|
46
58
|
accessChanged: z.ZodBoolean;
|
|
47
59
|
ownerChanged: z.ZodBoolean;
|
|
60
|
+
policyChanged: z.ZodOptional<z.ZodBoolean>;
|
|
48
61
|
changed: z.ZodBoolean;
|
|
49
62
|
}, z.core.$strict>;
|
|
50
63
|
export type AccessUpdateResponse = z.output<typeof accessUpdateResponseSchema>;
|
|
@@ -71,6 +84,11 @@ export declare const accessUpdateClientResponseSchema: z.ZodPipe<z.ZodObject<{
|
|
|
71
84
|
mixed: "mixed";
|
|
72
85
|
customers: "customers";
|
|
73
86
|
}>;
|
|
87
|
+
authentication: z.ZodOptional<z.ZodEnum<{
|
|
88
|
+
customer: "customer";
|
|
89
|
+
none: "none";
|
|
90
|
+
platform: "platform";
|
|
91
|
+
}>>;
|
|
74
92
|
ownerSubject: z.ZodOptional<z.ZodString>;
|
|
75
93
|
}, z.core.$strip>;
|
|
76
94
|
previousAccessMode: z.ZodEnum<{
|
|
@@ -84,6 +102,7 @@ export declare const accessUpdateClientResponseSchema: z.ZodPipe<z.ZodObject<{
|
|
|
84
102
|
previousOwnerSubject: z.ZodOptional<z.ZodString>;
|
|
85
103
|
accessChanged: z.ZodOptional<z.ZodBoolean>;
|
|
86
104
|
ownerChanged: z.ZodOptional<z.ZodBoolean>;
|
|
105
|
+
policyChanged: z.ZodOptional<z.ZodBoolean>;
|
|
87
106
|
changed: z.ZodBoolean;
|
|
88
107
|
}, z.core.$strip>, z.ZodTransform<{
|
|
89
108
|
accessChanged: boolean;
|
|
@@ -97,12 +116,14 @@ export declare const accessUpdateClientResponseSchema: z.ZodPipe<z.ZodObject<{
|
|
|
97
116
|
deploymentId: string;
|
|
98
117
|
accessMode: "owner-only" | "org-members" | "authenticated" | "public" | "mixed" | "customers";
|
|
99
118
|
serverVersion?: string | undefined;
|
|
119
|
+
authentication?: "customer" | "none" | "platform" | undefined;
|
|
100
120
|
ownerSubject?: string | undefined;
|
|
101
121
|
};
|
|
102
122
|
previousAccessMode: "owner-only" | "org-members" | "authenticated" | "public" | "mixed" | "customers";
|
|
103
123
|
changed: boolean;
|
|
104
124
|
previousOwnerSubject?: string | undefined;
|
|
105
125
|
ownerChanged?: boolean | undefined;
|
|
126
|
+
policyChanged?: boolean | undefined;
|
|
106
127
|
}, {
|
|
107
128
|
ok: true;
|
|
108
129
|
target: {
|
|
@@ -114,6 +135,7 @@ export declare const accessUpdateClientResponseSchema: z.ZodPipe<z.ZodObject<{
|
|
|
114
135
|
deploymentId: string;
|
|
115
136
|
accessMode: "owner-only" | "org-members" | "authenticated" | "public" | "mixed" | "customers";
|
|
116
137
|
serverVersion?: string | undefined;
|
|
138
|
+
authentication?: "customer" | "none" | "platform" | undefined;
|
|
117
139
|
ownerSubject?: string | undefined;
|
|
118
140
|
};
|
|
119
141
|
previousAccessMode: "owner-only" | "org-members" | "authenticated" | "public" | "mixed" | "customers";
|
|
@@ -121,6 +143,7 @@ export declare const accessUpdateClientResponseSchema: z.ZodPipe<z.ZodObject<{
|
|
|
121
143
|
previousOwnerSubject?: string | undefined;
|
|
122
144
|
accessChanged?: boolean | undefined;
|
|
123
145
|
ownerChanged?: boolean | undefined;
|
|
146
|
+
policyChanged?: boolean | undefined;
|
|
124
147
|
}>>;
|
|
125
148
|
export type AccessUpdateClientResponse = z.output<typeof accessUpdateClientResponseSchema>;
|
|
126
149
|
export declare const WhoamiIdentityResponseSchema: z.ZodObject<{
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/** Strict service-output contracts for control-plane reads and mutations (ADR 0128). */
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { accessModeSchema } from './access-mode.js';
|
|
4
|
+
/** Effective authority enforcing caller authentication for one deployment. */
|
|
5
|
+
export const deploymentAuthenticationSchema = z.enum(['none', 'platform', 'customer']);
|
|
4
6
|
function containsC0OrDel(value) {
|
|
5
7
|
for (let index = 0; index < value.length; index += 1) {
|
|
6
8
|
const codeUnit = value.charCodeAt(index);
|
|
@@ -46,6 +48,7 @@ export const accessUpdateResponseSchema = z
|
|
|
46
48
|
deploymentId: z.string().min(1),
|
|
47
49
|
serverVersion: z.string().min(1).optional(),
|
|
48
50
|
accessMode: accessModeSchema,
|
|
51
|
+
authentication: deploymentAuthenticationSchema.optional(),
|
|
49
52
|
ownerSubject: deploymentOwnerSubjectSchema.optional(),
|
|
50
53
|
})
|
|
51
54
|
.strict(),
|
|
@@ -53,6 +56,7 @@ export const accessUpdateResponseSchema = z
|
|
|
53
56
|
previousOwnerSubject: deploymentOwnerSubjectSchema.optional(),
|
|
54
57
|
accessChanged: z.boolean(),
|
|
55
58
|
ownerChanged: z.boolean(),
|
|
59
|
+
policyChanged: z.boolean().optional(),
|
|
56
60
|
changed: z.boolean(),
|
|
57
61
|
})
|
|
58
62
|
.strict()
|
|
@@ -65,11 +69,19 @@ export const accessUpdateResponseSchema = z
|
|
|
65
69
|
message: 'owner-only access requires a current owner subject',
|
|
66
70
|
});
|
|
67
71
|
}
|
|
68
|
-
if (value.
|
|
72
|
+
if ((value.deployment.authentication === undefined) !== (value.policyChanged === undefined)) {
|
|
73
|
+
context.addIssue({
|
|
74
|
+
code: 'custom',
|
|
75
|
+
path: ['policyChanged'],
|
|
76
|
+
message: 'authentication and policyChanged must be present together',
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
if (value.changed !==
|
|
80
|
+
(value.accessChanged || value.ownerChanged || (value.policyChanged ?? false))) {
|
|
69
81
|
context.addIssue({
|
|
70
82
|
code: 'custom',
|
|
71
83
|
path: ['changed'],
|
|
72
|
-
message: 'changed must equal accessChanged || ownerChanged',
|
|
84
|
+
message: 'changed must equal accessChanged || ownerChanged || policyChanged',
|
|
73
85
|
});
|
|
74
86
|
}
|
|
75
87
|
});
|
|
@@ -90,12 +102,14 @@ export const accessUpdateClientResponseSchema = z
|
|
|
90
102
|
deploymentId: z.string().min(1),
|
|
91
103
|
serverVersion: z.string().min(1).optional(),
|
|
92
104
|
accessMode: accessModeSchema,
|
|
105
|
+
authentication: deploymentAuthenticationSchema.optional(),
|
|
93
106
|
ownerSubject: deploymentOwnerSubjectSchema.optional(),
|
|
94
107
|
}),
|
|
95
108
|
previousAccessMode: accessModeSchema,
|
|
96
109
|
previousOwnerSubject: deploymentOwnerSubjectSchema.optional(),
|
|
97
110
|
accessChanged: z.boolean().optional(),
|
|
98
111
|
ownerChanged: z.boolean().optional(),
|
|
112
|
+
policyChanged: z.boolean().optional(),
|
|
99
113
|
changed: z.boolean(),
|
|
100
114
|
})
|
|
101
115
|
.superRefine((value, context) => {
|
|
@@ -107,6 +121,20 @@ export const accessUpdateClientResponseSchema = z
|
|
|
107
121
|
message: 'accessChanged and ownerChanged must be present together',
|
|
108
122
|
});
|
|
109
123
|
}
|
|
124
|
+
if ((value.deployment.authentication === undefined) !== (value.policyChanged === undefined)) {
|
|
125
|
+
context.addIssue({
|
|
126
|
+
code: 'custom',
|
|
127
|
+
path: ['policyChanged'],
|
|
128
|
+
message: 'authentication and policyChanged must be present together',
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
if (value.policyChanged !== undefined && !modernComponents) {
|
|
132
|
+
context.addIssue({
|
|
133
|
+
code: 'custom',
|
|
134
|
+
path: ['policyChanged'],
|
|
135
|
+
message: 'policyChanged requires accessChanged and ownerChanged',
|
|
136
|
+
});
|
|
137
|
+
}
|
|
110
138
|
if (modernComponents &&
|
|
111
139
|
value.deployment.accessMode === 'owner-only' &&
|
|
112
140
|
value.deployment.ownerSubject === undefined) {
|
|
@@ -116,11 +144,13 @@ export const accessUpdateClientResponseSchema = z
|
|
|
116
144
|
message: 'owner-only access requires a current owner subject',
|
|
117
145
|
});
|
|
118
146
|
}
|
|
119
|
-
if (modernComponents &&
|
|
147
|
+
if (modernComponents &&
|
|
148
|
+
value.changed !==
|
|
149
|
+
(value.accessChanged || value.ownerChanged || (value.policyChanged ?? false))) {
|
|
120
150
|
context.addIssue({
|
|
121
151
|
code: 'custom',
|
|
122
152
|
path: ['changed'],
|
|
123
|
-
message: 'changed must equal accessChanged || ownerChanged',
|
|
153
|
+
message: 'changed must equal accessChanged || ownerChanged || policyChanged',
|
|
124
154
|
});
|
|
125
155
|
}
|
|
126
156
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noodleseed/one",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.166.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Noodle CLI by Noodle Seed — author, run, and deploy declarative MCP servers. Embedding the assistant in your own web app is @noodleseed/assistant.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -235,7 +235,7 @@
|
|
|
235
235
|
"@modelcontextprotocol/client": "2.0.0",
|
|
236
236
|
"@modelcontextprotocol/server": "2.0.0",
|
|
237
237
|
"@noodle-borg/admission-limits": "0.0.0",
|
|
238
|
-
"@noodle-borg/agent-kit": "0.
|
|
238
|
+
"@noodle-borg/agent-kit": "0.102.0",
|
|
239
239
|
"@noodle-borg/app-audit": "0.0.0",
|
|
240
240
|
"@noodle-borg/app-package": "0.0.0",
|
|
241
241
|
"@noodle-borg/assistant-gateway": "0.0.0",
|