Skip to content

Commit 485dc43

Browse files
committed
Merge origin/main into claude/issue-24393-adr-0104-d2-declarative-update
Claude-Session: https://claude.ai/code/session_019oFY6Hi35J7atvgVFnmoaK Co-authored-by: Claude <noreply@anthropic.com>
2 parents fce8981 + 71fa166 commit 485dc43

8 files changed

Lines changed: 34 additions & 14 deletions
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/cloud-connection': patch
3+
---
4+
5+
Clause-②: no
6+
7+
fix(cloud-connection): the sign-in refusals and the unmanaged-install copy no longer call the running system "this environment"
8+
9+
- **What changed.** Inside the running system, user-facing copy names the system the user is in as "this system", or drops the noun. The seven `401 UNAUTHENTICATED` answers on `/api/v1/cloud-connection/*` now read "Sign in to connect a cloud account." (`bind/start`), "Sign in to install apps." (`install`) and "Sign in." (`bind/poll`, `unbind`, `installation`, `installed`, `org-packages`), where each used to say "Sign in to this environment …". On `/api/v1/marketplace/install-local`, the `409 RESOURCE_CONFLICT` that refuses a managed install over an unmanaged copy now names the holder as "the writable base 'BASE' — an unmanaged install of this package, or a base authored in this system — whose items are this system's own metadata", and the unmanaged install's success `note` reads "The package's metadata is now this system's own, in the base 'BASE' …".
10+
- **Unchanged.** Every HTTP status, error code (`UNAUTHENTICATED`, `RESOURCE_CONFLICT`), `details` object and response shape. Server log lines are not touched.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/mcp': patch
3+
---
4+
5+
Clause-②: no
6+
7+
fix(mcp): the known-partial listing warning and the Connect-an-Agent bundle description say "this system"
8+
9+
- **What changed.** Inside the running system, user-facing copy names the system the caller is in as "this system". The warning an MCP client receives with a known-partial object listing (the `objectstack://objects` resource and the `list_objects` tool) now says "this system declares at least that many objects, possibly more", and the Connect-an-Agent UI bundle's description ends "for connecting MCP clients to this system".
10+
- **Unchanged.** The `SERVICE_UNAVAILABLE` code that marks a partial listing, every payload shape, the portable `SKILL.md` (which names the deployment an outside agent connects to), and server log lines.

‎content/docs/deployment/cloud-connection.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ button:
125125
| *The request expired before it was approved. Start again.* | The code's lifetime ran out, or the cloud answered `expired_token`. |
126126
| *The connection request was denied. Start again.* | The cloud answered `access_denied`. |
127127
| *Device authorization failed: …* | The cloud ended the request with another error, named after the colon. |
128-
| *Sign in to this environment to connect a cloud account.* (or *Sign in to this environment.* while waiting) | Your session on the server has ended. |
128+
| *Sign in to connect a cloud account.* (or *Sign in.* while waiting) | Your session on the server has ended. |
129129
| *No cloud control plane configured.* | The plugin is mounted without a control-plane URL. |
130130
| a network error such as *fetch failed* | The server could not reach the cloud. |
131131

‎packages/cloud-connection/src/cloud-connection-plugin.ts‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ export class CloudConnectionPlugin implements Plugin {
594594
}
595595
const session = await resolveSession(environmentId ?? '', c.req.raw);
596596
if (session?.authGate) return refuseHeldSession(c, session.authGate);
597-
if (!session?.userId) return c.json({ success: false, error: { code: 'UNAUTHENTICATED', message: 'Sign in to this environment to connect a cloud account.' } }, 401);
597+
if (!session?.userId) return c.json({ success: false, error: { code: 'UNAUTHENTICATED', message: 'Sign in to connect a cloud account.' } }, 401);
598598
// [#24148] Refused before any work, so a caller without the
599599
// capability cannot learn whether a control plane is configured.
600600
if (!(await holdsSetupAccess(c.req.raw, session))) return refuseWithoutSetupAccess(c);
@@ -656,7 +656,7 @@ export class CloudConnectionPlugin implements Plugin {
656656
}
657657
const session = await resolveSession(environmentId ?? '', c.req.raw);
658658
if (session?.authGate) return refuseHeldSession(c, session.authGate);
659-
if (!session?.userId) return c.json({ success: false, error: { code: 'UNAUTHENTICATED', message: 'Sign in to this environment.' } }, 401);
659+
if (!session?.userId) return c.json({ success: false, error: { code: 'UNAUTHENTICATED', message: 'Sign in.' } }, 401);
660660
// [#24148] This is the door that persists the binding.
661661
if (!(await holdsSetupAccess(c.req.raw, session))) return refuseWithoutSetupAccess(c);
662662
if (!cloudUrl) return c.json({ success: false, error: { code: 'CLOUD_UNCONFIGURED', message: 'No cloud control plane configured.' } }, 503);
@@ -758,7 +758,7 @@ export class CloudConnectionPlugin implements Plugin {
758758
}
759759
const session = await resolveSession(environmentId ?? '', c.req.raw);
760760
if (session?.authGate) return refuseHeldSession(c, session.authGate);
761-
if (!session?.userId) return c.json({ success: false, error: { code: 'UNAUTHENTICATED', message: 'Sign in to this environment.' } }, 401);
761+
if (!session?.userId) return c.json({ success: false, error: { code: 'UNAUTHENTICATED', message: 'Sign in.' } }, 401);
762762
// [#24148] Refused before the revoke and before the local clear.
763763
if (!(await holdsSetupAccess(c.req.raw, session))) return refuseWithoutSetupAccess(c);
764764

@@ -810,7 +810,7 @@ export class CloudConnectionPlugin implements Plugin {
810810
const session = await resolveSession(environmentId, c.req.raw);
811811
if (session?.authGate) return refuseHeldSession(c, session.authGate);
812812
if (!session?.userId) {
813-
return c.json({ success: false, error: { code: 'UNAUTHENTICATED', message: 'Sign in to this environment to install apps.' } }, 401);
813+
return c.json({ success: false, error: { code: 'UNAUTHENTICATED', message: 'Sign in to install apps.' } }, 401);
814814
}
815815

816816
if (!cloudUrl || !credential()) {
@@ -864,7 +864,7 @@ export class CloudConnectionPlugin implements Plugin {
864864
const session = await resolveSession(environmentId, c.req.raw);
865865
if (session?.authGate) return refuseHeldSession(c, session.authGate);
866866
if (!session?.userId) {
867-
return c.json({ success: false, error: { code: 'UNAUTHENTICATED', message: 'Sign in to this environment.' } }, 401);
867+
return c.json({ success: false, error: { code: 'UNAUTHENTICATED', message: 'Sign in.' } }, 401);
868868
}
869869

870870
let packageId = '';
@@ -927,7 +927,7 @@ export class CloudConnectionPlugin implements Plugin {
927927
const session = await resolveSession(environmentId, c.req.raw);
928928
if (session?.authGate) return refuseHeldSession(c, session.authGate);
929929
if (!session?.userId) {
930-
return c.json({ success: false, error: { code: 'UNAUTHENTICATED', message: 'Sign in to this environment.' } }, 401);
930+
return c.json({ success: false, error: { code: 'UNAUTHENTICATED', message: 'Sign in.' } }, 401);
931931
}
932932

933933
if (!cloudUrl || !credential()) {
@@ -965,7 +965,7 @@ export class CloudConnectionPlugin implements Plugin {
965965
const session = await resolveSession(environmentId ?? '', c.req.raw);
966966
if (session?.authGate) return refuseHeldSession(c, session.authGate);
967967
if (!session?.userId) {
968-
return c.json({ success: false, error: { code: 'UNAUTHENTICATED', message: 'Sign in to this environment.' } }, 401);
968+
return c.json({ success: false, error: { code: 'UNAUTHENTICATED', message: 'Sign in.' } }, 401);
969969
}
970970

971971
if (!cloudUrl || !credential()) {

‎packages/cloud-connection/src/marketplace-install-local-install-modes.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ describe('install-local — a managed install never takes over an unmanaged copy
406406
expect(res.status).toBe(409);
407407
expect(res.payload.error.code).toBe('RESOURCE_CONFLICT');
408408
expect(res.payload.error.details).toEqual({ namespace: 'crm', base: 'com.example.crm-copy' });
409-
expect(res.payload.error.message).toContain("held by the environment base 'com.example.crm-copy'");
409+
expect(res.payload.error.message).toContain("'com.example.crm-copy'");
410410
expect(h.register).not.toHaveBeenCalled();
411411
expect(h.syncSchemas).not.toHaveBeenCalled();
412412
expect(h.ledgerHas('com.example.crm')).toBe(false);

‎packages/cloud-connection/src/marketplace-install-local-plugin.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,8 +1494,8 @@ export class MarketplaceInstallLocalPlugin implements Plugin {
14941494
error: {
14951495
code: 'RESOURCE_CONFLICT',
14961496
message: `Package '${manifestId}' cannot be installed managed: its namespace '${copyBase.namespace}' is held by `
1497-
+ `the environment base '${copyBase.base}' — an unmanaged install of this package, or a base authored `
1498-
+ 'in this environment — whose items are this environment\'s own metadata. A managed '
1497+
+ `the writable base '${copyBase.base}' — an unmanaged install of this package, or a base authored `
1498+
+ 'in this system — whose items are this system\'s own metadata. A managed '
14991499
+ 'install would hand that namespace to the package and stop serving them. Keep the copy (it follows '
15001500
+ `no upgrade), or uninstall the base '${copyBase.base}' first; its items go with it.`,
15011501
details: { namespace: copyBase.namespace, base: copyBase.base },
@@ -2559,7 +2559,7 @@ export class MarketplaceInstallLocalPlugin implements Plugin {
25592559
},
25602560
}
25612561
: {}),
2562-
note: `The package's metadata is now this environment's own, in the base '${result.targetPackageId}', `
2562+
note: `The package's metadata is now this system's own, in the base '${result.targetPackageId}', `
25632563
+ 'and it follows no upgrade. Refresh the console to see it.',
25642564
},
25652565
}, 200);

‎packages/mcp/src/connect-ui.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export const CONNECT_AGENT_UI_BUNDLE = {
8181
type: 'plugin',
8282
scope: 'system',
8383
name: 'Connect an Agent UI',
84-
description: 'Connect-an-Agent page + Setup and Account navigation for connecting MCP clients to this environment.',
84+
description: 'Connect-an-Agent page + Setup and Account navigation for connecting MCP clients to this system.',
8585
pages: [CONNECT_AGENT_PAGE],
8686
// Both entries point at the one `connect_agent` page and share the item id.
8787
// That is legal and deliberate, read off the fold rather than assumed: the

‎packages/mcp/src/metadata-completeness.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function metadataPartialListingSentence(plural: string, served: number):
4444
return (
4545
`The metadata service could not be fully read, so this listing of ${plural} is known to be INCOMPLETE. `
4646
+ `${served} ${served === 1 ? 'is' : 'are'} being served and the total is withheld — `
47-
+ `this environment declares at least that many ${plural}, possibly more. `
47+
+ `this system declares at least that many ${plural}, possibly more. `
4848
+ 'Retry once the metadata service is reachable.'
4949
);
5050
}

0 commit comments

Comments
 (0)