Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .changeset/24327-runtime-this-system-copy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
'@objectstack/runtime': patch
---

Clause-②: no

Ten user-facing strings the runtime's HTTP doors answer no longer call the system the caller is in
"this environment". The permission-set clone door's success notice (`PERMISSION_SET_CLONE_NOTICE`, the
`notice` beside the copy) now says the copy is "a new permission set authored in this system", the
wording the console's clone hint uses. The other nine drop the noun: `/mcp` and `/mcp/skill` on a
deployment that opts out answer `404` "MCP server is not enabled"; a share-link request with no
share-link service answers `501` "Sharing is not configured"; and the webhook-redelivery, approval
action-page and inbound automation-hook doors answer `501` "… no webhooks service is registered." (or
approvals, or trigger-api) when the service is missing, and "… the registered webhooks service does not
implement handleRedeliver." (or `handleActionPage`, or `handleInboundHook`) when it lacks its member.
Only the human-readable text moves: every HTTP status, error code and response shape is what it was.
2 changes: 1 addition & 1 deletion docs/qa/platform-checklist/areas/ai.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
],
"acceptance": [
{
"clause": "the opted-out boot answers 404 'MCP server is not enabled for this environment' on BOTH /mcp and /mcp/skill — a deliberate un-advertised surface, NOT the 501 (which means route mounted but MCP plugin missing: 'MCP server is not available')",
"clause": "the opted-out boot answers 404 'MCP server is not enabled' on /mcp/skill to any caller (the skill is public) and on /mcp to a signed-in or system caller, while an anonymous /mcp caller is refused 401 UNAUTHENTICATED before the switch is read (ADR-0138 D2) — a deliberate un-advertised surface, NOT the 501 (which means route mounted but MCP plugin missing: 'MCP server is not available')",
"oracle": "api",
"verify": "status + body of both routes on the disabled boot match packages/runtime/src/domains/mcp.ts (isMcpServerEnabled → 404; unresolvable mcp service → 501); record WHICH of the two refusals was observed",
"evidence": "the two responses"
Expand Down
8 changes: 4 additions & 4 deletions packages/runtime/src/domains/approvals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ export async function handleApprovalsActRequest(
return {
handled: true,
response: deps.error(
'Approval action pages are not available: no approvals service is registered for this '
+ 'environment. Register @objectstack/plugin-approvals to serve them.',
'Approval action pages are not available: no approvals service is registered. '
+ 'Register @objectstack/plugin-approvals to serve them.',
501,
),
};
Expand All @@ -123,8 +123,8 @@ export async function handleApprovalsActRequest(
return {
handled: true,
response: deps.error(
'Approval action pages are not available: the approvals service registered for this '
+ 'environment does not implement handleActionPage.',
'Approval action pages are not available: the registered approvals service '
+ 'does not implement handleActionPage.',
501,
),
};
Expand Down
8 changes: 4 additions & 4 deletions packages/runtime/src/domains/automation-hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ export async function handleInboundHookRequest(
return {
handled: true,
response: deps.error(
'Inbound automation hooks are not available: no trigger-api service is registered for this '
+ 'environment. The inbound-hook trigger (@objectstack/trigger-api) serves this route through that '
'Inbound automation hooks are not available: no trigger-api service is registered. '
+ 'The inbound-hook trigger (@objectstack/trigger-api) serves this route through that '
+ 'service; compose it on the environment that owns the flow.',
501,
),
Expand All @@ -134,8 +134,8 @@ export async function handleInboundHookRequest(
return {
handled: true,
response: deps.error(
'Inbound automation hooks are not available: the trigger-api service registered for this '
+ 'environment does not implement handleInboundHook.',
'Inbound automation hooks are not available: the registered trigger-api service '
+ 'does not implement handleInboundHook.',
501,
),
};
Expand Down
4 changes: 2 additions & 2 deletions packages/runtime/src/domains/mcp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export async function handleMcpRequest(deps: DomainHandlerDeps, body: any, conte
}

if (!isMcpServerEnabled()) {
return { handled: true, response: deps.error('MCP server is not enabled for this environment', 404) };
return { handled: true, response: deps.error('MCP server is not enabled', 404) };
}
const mcp: any = await deps.resolveService(context, 'mcp', context.environmentId);
if (!mcp || typeof mcp.handleHttpRequest !== 'function') {
Expand Down Expand Up @@ -161,7 +161,7 @@ export async function handleMcpRequest(deps: DomainHandlerDeps, body: any, conte
*/
export async function handleMcpSkillRequest(deps: DomainHandlerDeps, method: string, context: HttpProtocolContext): Promise<HttpDispatcherResult> {
if (!isMcpServerEnabled()) {
return { handled: true, response: deps.error('MCP server is not enabled for this environment', 404) };
return { handled: true, response: deps.error('MCP server is not enabled', 404) };
}
if (method !== 'GET') {
// Hand-rolled rather than `deps.error(...)` only because it carries an
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/src/domains/permission-set-clone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export const PERMISSION_SET_CLONE_DROPPED_KEYS: readonly string[] = Object.freez
* copy grants nobody until it is given to someone.
*/
export const PERMISSION_SET_CLONE_NOTICE =
'The copy is a new permission set authored in this environment, with no link to the set it was copied '
'The copy is a new permission set authored in this system, with no link to the set it was copied '
+ 'from: changes to that set do not reach it. Not copied: delegated-admin scope (`adminScope`) and the '
+ 'everyone-baseline suggestion (`isDefault`) — grant either deliberately on the copy if it needs one. '
+ 'The copy is held by nobody yet: add it to a position, or assign it to users.';
Expand Down
4 changes: 2 additions & 2 deletions packages/runtime/src/domains/share-links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@ async function handleShareLinksRequestBody(
// a second hand-written `'shareLinks'`, copied from a constant whose own
// doc-comment says "keep in sync with the SharingPlugin registration" — and a
// drifted copy here resolves nothing, so every share link 501s with "Sharing
// is not configured for this environment" on an environment where it is.
// is not configured" on an environment where it is.
const svc = await deps.resolveService(context, SHARE_LINK_SERVICE, context.environmentId);
if (!svc) {
return { handled: true, response: deps.error('Sharing is not configured for this environment', 501) };
return { handled: true, response: deps.error('Sharing is not configured', 501) };
}

const SYSTEM_CTX = { isSystem: true, positions: [], permissions: [] } as const;
Expand Down
4 changes: 2 additions & 2 deletions packages/runtime/src/domains/webhooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export async function handleWebhooksRedeliverRequest(
return {
handled: true,
response: deps.error(
'Webhook redelivery is not available: no webhooks service is registered for this environment. '
'Webhook redelivery is not available: no webhooks service is registered. '
+ '@objectstack/plugin-webhooks registers it once its redelivery veto is installed, which needs '
+ 'the data engine and @objectstack/service-messaging; the boot log names the one that is missing.',
501,
Expand All @@ -128,7 +128,7 @@ export async function handleWebhooksRedeliverRequest(
return {
handled: true,
response: deps.error(
'Webhook redelivery is not available: the webhooks service registered for this environment '
'Webhook redelivery is not available: the registered webhooks service '
+ 'does not implement handleRedeliver.',
501,
),
Expand Down
Loading