@noodleseed/one 0.159.0 → 0.160.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-first-flow.d.ts +1 -1
- package/dist/commands/deploy-first-flow.d.ts.map +1 -1
- package/dist/commands/deploy-first-flow.js +4 -193
- package/dist/commands/deploy-first-flow.js.map +1 -1
- package/dist/commands/deploy-ops.d.ts.map +1 -1
- package/dist/commands/deploy-ops.js +25 -1
- package/dist/commands/deploy-ops.js.map +1 -1
- package/dist/commands/deploy-preflight-command.d.ts +8 -0
- package/dist/commands/deploy-preflight-command.d.ts.map +1 -0
- package/dist/commands/deploy-preflight-command.js +78 -0
- package/dist/commands/deploy-preflight-command.js.map +1 -0
- package/dist/commands/deploy-preflight-output.d.ts +18 -0
- package/dist/commands/deploy-preflight-output.d.ts.map +1 -0
- package/dist/commands/deploy-preflight-output.js +176 -0
- package/dist/commands/deploy-preflight-output.js.map +1 -0
- package/dist/commands/deploy-preflight.d.ts +6 -1
- package/dist/commands/deploy-preflight.d.ts.map +1 -1
- package/dist/commands/deploy-preflight.js +24 -0
- package/dist/commands/deploy-preflight.js.map +1 -1
- package/dist/commands/deploy-target.d.ts +1 -0
- package/dist/commands/deploy-target.d.ts.map +1 -1
- package/dist/commands/deploy-target.js +9 -8
- package/dist/commands/deploy-target.js.map +1 -1
- package/dist/plugin-mode/build-readiness-recorder.d.ts.map +1 -1
- package/dist/plugin-mode/build-readiness-recorder.js +3 -0
- package/dist/plugin-mode/build-readiness-recorder.js.map +1 -1
- package/dist/plugin-mode/plugin-operation-contract.d.ts +120 -1
- package/dist/plugin-mode/plugin-operation-contract.d.ts.map +1 -1
- package/dist/plugin-mode/plugin-operation-contract.js +32 -1
- package/dist/plugin-mode/plugin-operation-contract.js.map +1 -1
- package/dist/plugin-mode/plugin-operation-tools.d.ts.map +1 -1
- package/dist/plugin-mode/plugin-operation-tools.js +47 -2
- package/dist/plugin-mode/plugin-operation-tools.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/generated/example-files.js +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/plugin-bootstrap-skill.js +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-operations-refs.js +2 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-router.js +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-verification-ref.js +1 -0
- package/node_modules/@noodle-borg/agent-kit/package.json +1 -1
- package/node_modules/@noodle-borg/cli-catalog/dist/catalog-data-hosted-deployment.js +85 -68
- package/node_modules/@noodle-borg/control-plane/dist/contracts.d.ts +5 -0
- package/node_modules/@noodle-borg/control-plane/dist/contracts.js +9 -0
- package/node_modules/@noodle-borg/control-plane/dist/in-memory-control-plane-store.d.ts +16 -1
- package/node_modules/@noodle-borg/control-plane/dist/in-memory-control-plane-store.js +18 -0
- package/node_modules/@noodle-borg/control-plane/dist/portable.d.ts +1 -0
- package/node_modules/@noodle-borg/control-plane/dist/portable.js +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/org-admin.js +21 -11
- package/node_modules/@noodle-borg/service/package.json +1 -1
- package/package.json +2 -2
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PersonalWorkspaceOwnerMutationError } from './contracts.js';
|
|
1
2
|
import { InMemoryOrganizationStore } from './in-memory-organization-store.js';
|
|
2
3
|
import { personalOrgSlugSuffix } from './organization-helpers.js';
|
|
3
4
|
import { validateUserOwnedOrgSlug } from './validation.js';
|
|
@@ -75,6 +76,18 @@ export class InMemoryControlPlaneStore extends InMemoryOrganizationStore {
|
|
|
75
76
|
return org;
|
|
76
77
|
});
|
|
77
78
|
}
|
|
79
|
+
addOrgMember(input) {
|
|
80
|
+
this.#assertPersonalOwnerMutation(input.org, input.subject, input.role);
|
|
81
|
+
return super.addOrgMember(input);
|
|
82
|
+
}
|
|
83
|
+
removeOrgMember(input) {
|
|
84
|
+
this.#assertPersonalOwnerMutation(input.org, input.subject);
|
|
85
|
+
return super.removeOrgMember(input);
|
|
86
|
+
}
|
|
87
|
+
updateOrgMemberRole(input) {
|
|
88
|
+
this.#assertPersonalOwnerMutation(input.org, input.subject, input.role);
|
|
89
|
+
return super.updateOrgMemberRole(input);
|
|
90
|
+
}
|
|
78
91
|
claimWelcomeEmail(input) {
|
|
79
92
|
const nowMs = input.now.getTime();
|
|
80
93
|
const record = [...this.#welcomeEmails.values()]
|
|
@@ -131,6 +144,11 @@ export class InMemoryControlPlaneStore extends InMemoryOrganizationStore {
|
|
|
131
144
|
role: 'owner',
|
|
132
145
|
});
|
|
133
146
|
}
|
|
147
|
+
#assertPersonalOwnerMutation(org, subject, role) {
|
|
148
|
+
if (this.#personalWorkspaces.get(subject) === org && role !== 'owner') {
|
|
149
|
+
throw new PersonalWorkspaceOwnerMutationError();
|
|
150
|
+
}
|
|
151
|
+
}
|
|
134
152
|
async #serialized(key, operation) {
|
|
135
153
|
const prior = this.#queues.get(key) ?? Promise.resolve();
|
|
136
154
|
let release;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { type AppPurgeReconciliationActor, type AppPurgeReconciliationConflictCode, AppPurgeReconciliationError, type AppPurgeReconciliationOperator, } from './app-purge-reconciliation-port.js';
|
|
2
2
|
export type { ActiveMcpSubdomainClaim, ChangeMcpSubdomainInput, ControlPlaneIdentity, CreateOrgWithOwnerInput, McpSubdomainMutationResult, McpSubdomainSetting, OrganizationStore, OrgDomainRecord, OrgInvitationRecord, OrgMemberRecord, OrgOpenAIAppsChallengeRecord, OrgRecord, OrgRole, PersonalWorkspaceProvisionInput, PersonalWorkspaceProvisionResult, SignupAllowlistKind, SignupAllowlistRecord, WelcomeEmailRecord, } from './contracts.js';
|
|
3
|
+
export { PersonalWorkspaceOwnerMutationError } from './contracts.js';
|
|
3
4
|
export { allowAllGate, bearerToken, type ControlPlaneAuthResult, type DeployAuthGate, } from './deploy-auth.js';
|
|
4
5
|
export { CompositeControlPlaneGate, type ControlPlaneSignupMode, GoogleControlPlaneGate, type GoogleControlPlaneGateOptions, type GoogleIdTokenVerifier, GoogleWorkloadControlPlaneGate, type GoogleWorkloadControlPlaneGateOptions, NoodleOAuthControlPlaneGate, type NoodleOAuthControlPlaneGateOptions, type SignupAuthorizer, } from './deploy-gates.js';
|
|
5
6
|
export { InMemoryControlPlaneStore } from './in-memory-control-plane-store.js';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { AppPurgeReconciliationError, } from './app-purge-reconciliation-port.js';
|
|
2
|
+
export { PersonalWorkspaceOwnerMutationError } from './contracts.js';
|
|
2
3
|
export { allowAllGate, bearerToken, } from './deploy-auth.js';
|
|
3
4
|
export { CompositeControlPlaneGate, GoogleControlPlaneGate, GoogleWorkloadControlPlaneGate, NoodleOAuthControlPlaneGate, } from './deploy-gates.js';
|
|
4
5
|
export { InMemoryControlPlaneStore } from './in-memory-control-plane-store.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mcpSubdomainEndpointOptions } from '@noodle-borg/control-plane/portable';
|
|
1
|
+
import { mcpSubdomainEndpointOptions, PersonalWorkspaceOwnerMutationError, } from '@noodle-borg/control-plane/portable';
|
|
2
2
|
import { normalizePublicBaseDomain, OPENAI_APPS_CHALLENGE_PATH } from '@noodle-borg/module';
|
|
3
3
|
import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
|
|
4
4
|
import { OrgSummarySchema } from '@noodle-borg/wire-contracts';
|
|
@@ -142,7 +142,7 @@ export async function handleMembers(req, res, gate, controlPlane, maxBody, ref,
|
|
|
142
142
|
return sendJson(res, 201, { ok: true, member });
|
|
143
143
|
}
|
|
144
144
|
catch (error) {
|
|
145
|
-
return
|
|
145
|
+
return sendMemberMutationError(res, error);
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
if (req.method === 'PATCH' && ref.subject !== undefined) {
|
|
@@ -177,7 +177,7 @@ export async function handleMembers(req, res, gate, controlPlane, maxBody, ref,
|
|
|
177
177
|
return sendJson(res, 200, { ok: true, member });
|
|
178
178
|
}
|
|
179
179
|
catch (error) {
|
|
180
|
-
return
|
|
180
|
+
return sendMemberMutationError(res, error);
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
if (req.method === 'DELETE' && ref.subject !== undefined) {
|
|
@@ -186,18 +186,28 @@ export async function handleMembers(req, res, gate, controlPlane, maxBody, ref,
|
|
|
186
186
|
if (await demotesLastOwner(controlPlane, ref.org, ref.subject, undefined)) {
|
|
187
187
|
return sendJson(res, 409, { error: 'cannot remove the last owner' });
|
|
188
188
|
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
189
|
+
try {
|
|
190
|
+
const removed = await controlPlane.removeOrgMember({ org: ref.org, subject: ref.subject });
|
|
191
|
+
if (removed) {
|
|
192
|
+
await emitOrgAudit(audit, 'org.member.removed', ref.org, identity, 204, {
|
|
193
|
+
subject: ref.subject,
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
res.writeHead(204);
|
|
197
|
+
res.end();
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
catch (error) {
|
|
201
|
+
return sendMemberMutationError(res, error);
|
|
194
202
|
}
|
|
195
|
-
res.writeHead(204);
|
|
196
|
-
res.end();
|
|
197
|
-
return;
|
|
198
203
|
}
|
|
199
204
|
return sendJson(res, 404, { error: 'not found' });
|
|
200
205
|
}
|
|
206
|
+
function sendMemberMutationError(res, error) {
|
|
207
|
+
sendJson(res, error instanceof PersonalWorkspaceOwnerMutationError ? 409 : 400, {
|
|
208
|
+
error: error.message,
|
|
209
|
+
});
|
|
210
|
+
}
|
|
201
211
|
export async function handleInvitations(req, res, gate, controlPlane, maxBody, ref, audit, url, invitationEmail = {}, now = () => new Date()) {
|
|
202
212
|
const identity = await authorizeControlPlane(req, res, gate, { requireIdentity: true });
|
|
203
213
|
if (identity === false)
|
|
@@ -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.97.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",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noodleseed/one",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.160.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.97.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",
|