diff --git a/docs/conversational-mcp.md b/docs/conversational-mcp.md index 6e6b599..930e4cd 100644 --- a/docs/conversational-mcp.md +++ b/docs/conversational-mcp.md @@ -100,7 +100,7 @@ result and the panel preserve the original `content`, `structuredContent` and uncertain-effects warning, so a CRM `not_found` or `forbidden` response is visible instead of being discarded, with known authentication credentials redacted. Cold setup verifies the shared account remotely; prepared calls check the selected credentials locally before -and after execution; server-side authorization still applies to every call. +and after execution; the backend still authorizes every call. See [ADR 0002](adr/0002-conversational-project-mcp-client.md) for the design and authentication decision. diff --git a/docs/local-development-backend.md b/docs/local-development-backend.md index 0c1d291..79d445f 100644 --- a/docs/local-development-backend.md +++ b/docs/local-development-backend.md @@ -1,26 +1,26 @@ # Local development backend -For the shared Mac/workstation Django proxy, save these existing workspace +To point the plugin at a development backend, save these existing workspace preferences through `mainsequence_settings`: ```json { "action": "save", - "backend": "http://local-backend:8000", - "baseDir": "/Users/jose/mainsequence-dev", + "backend": "http://dev-backend.test:8000", + "baseDir": "~/mainsequence-dev", "commandCenterUrl": "" } ``` Settings saves replace the full preference object, so retain the current -repositories folder and optional Command Center URL. This workstation setup -uses the values above. No plugin rebuild or new hardcoded backend is required. +repositories folder and optional Command Center URL. Replace the example values +with your own. No plugin rebuild or new hardcoded backend is required. -Map `local-backend` to the machine serving the development Django stack with -that stack's `maintenance/switch_local_backend.py` after a stack switch. Refresh -the plugin context afterwards. The installed plugin reads these shared devtools -preferences; source and published packages keep their normal backend-selection -behavior. Historical verification notes retain the addresses actually tested. +Map a hostname such as `dev-backend.test` to the machine serving the development +backend, for example in `/etc/hosts`, and update it when that machine changes. +Refresh the plugin context afterwards. The installed plugin reads these shared +devtools preferences; source and published packages keep their normal +backend-selection behavior. Login and saved connections are backend scoped. Use the existing settings login flow if this hostname has no saved session, and rediscover/reconnect project MCPs diff --git a/experiments/codex-host-probe/results/desktop-v3-recovery.json b/experiments/codex-host-probe/results/desktop-v3-recovery.json index 9c78228..3b8dec2 100644 --- a/experiments/codex-host-probe/results/desktop-v3-recovery.json +++ b/experiments/codex-host-probe/results/desktop-v3-recovery.json @@ -3,7 +3,7 @@ "version": "0.3.0", "problem": "Registered temporary marketplace and temporary fixture state were absent; plugin cache still existed; native MCP tools absent from this turn.", "repair": { - "marketplaceRoot": "/Users/jose/code/MainSequenceClientSide/mainsequence-codex-plugin/experiments/codex-host-probe/.local-marketplace", + "marketplaceRoot": "/experiments/codex-host-probe/.local-marketplace", "installedVersion": "0.3.0", "sourceScope": "Test experiment only", "hookEnabled": true, diff --git a/scripts/preview-panel.mjs b/scripts/preview-panel.mjs index 9002801..34a898c 100644 --- a/scripts/preview-panel.mjs +++ b/scripts/preview-panel.mjs @@ -18,7 +18,7 @@ else if(msg.method==='tools/call'){ else if(msg.params.name==='mainsequence_agent_status')value={requests:[]}; else if(msg.params.name==='mainsequence_discover')value=a.catalog==='agents'?data.agents:data.mcps; else if(msg.params.name==='mainsequence_view')value=a.view==='agent'?data.agentDetails?.[a.agentUid]:a.view==='project'?data.projectDetails?.[a.projectUid]:data[a.view]; - else if(msg.params.name==='mainsequence_settings')value=snapshot.settings||{preferences:{backend:snapshot.status.account.backend,baseDir:'/Users/jose/mainsequence',commandCenterUrl:''},runtime:{nodeVersion:'22',platform:'darwin arm64',capabilities:{}}}; + else if(msg.params.name==='mainsequence_settings')value=snapshot.settings||{preferences:{backend:snapshot.status.account.backend,baseDir:'/home/fixture/mainsequence',commandCenterUrl:''},runtime:{nodeVersion:'22',platform:'darwin arm64',capabilities:{}}}; else if(msg.params.name==='mainsequence_operations')value={operations:[]}; else if(msg.params.name==='mainsequence_workspace')value=a.action==='local-context'?data.localContext:a.action==='deployment-history'?data.deployments:a.action==='deployment-run'?data.runs?.[a.input.runUid]:a.action==='deployment-logs'?data.logs?.[a.input.runUid]:{result:{status:'success',summary:'Preview',data:{}}}; else if(msg.params.name==='mainsequence_tools')value=data.catalogs?.[a.releaseUid]; diff --git a/scripts/verify-update-lifecycle-live.mjs b/scripts/verify-update-lifecycle-live.mjs index e0074a6..296c289 100644 --- a/scripts/verify-update-lifecycle-live.mjs +++ b/scripts/verify-update-lifecycle-live.mjs @@ -48,7 +48,9 @@ try { report.agentCount = agents.count; const saved = await call('mainsequence_view', { ...scope, view: 'connections' }); report.savedConnectionCount = saved.results.length; - const crm = saved.results.find(r => r.uid === '2de75e21-bfe1-4b77-b668-6916488ed317'); + // The saved CRM connection named `crm`, or the release in MAINSEQUENCE_CRM_RELEASE_UID. + const crmUid = process.env.MAINSEQUENCE_CRM_RELEASE_UID; + const crm = saved.results.find(r => crmUid ? r.uid === crmUid : r.name === 'crm'); assert.ok(crm, 'Existing saved CRM connection is readable'); const catalog = await call('mainsequence_tools', { ...scope, releaseUid: crm.uid }); report.crmToolCount = catalog.tools.length; diff --git a/tests/helpers.cjs b/tests/helpers.cjs index 7fb8c1f..dbdfdba 100644 --- a/tests/helpers.cjs +++ b/tests/helpers.cjs @@ -14,14 +14,14 @@ async function fixtureBackend(t) { const body = raw ? JSON.parse(raw) : undefined; calls.push({ path: req.url, method: req.method, authorization: req.headers.authorization, body }); res.setHeader('Content-Type', 'application/json'); - if (req.url === '/auth/cli/token/') return res.end(JSON.stringify({ access: accepted, refresh: 'fixture-refresh-1', username: 'José' })); + if (req.url === '/auth/cli/token/') return res.end(JSON.stringify({ access: accepted, refresh: 'fixture-refresh-1', username: 'Zoë' })); if (req.url === '/auth/jwt-token/token/refresh/') { generation++; accepted = `fixture-access-${generation}`; return res.end(JSON.stringify({ access: accepted, refresh: `fixture-refresh-${generation}` })); } if (req.url === '/auth/cli/revoke/') { res.writeHead(204).end(); return; } if (req.headers.authorization !== `Bearer ${accepted}`) { res.writeHead(401).end(JSON.stringify({ detail: 'denied' })); return; } - if (req.url === '/api/v1/users/me/') return res.end(JSON.stringify({ username: 'José', organization: { name: 'Fixture Org' } })); + if (req.url === '/api/v1/users/me/') return res.end(JSON.stringify({ username: 'Zoë', organization: { name: 'Fixture Org' } })); if (req.url === '/api/v1/code-repositories/') return res.end(JSON.stringify({ results: [{ uid: 'repo-1', code_repository_name: 'Shared', code_repository_type: 'python', primary_language: 'python', framework: 'none', branches: [] }] })); if (req.url === '/api/v1/code-repository-branches/resolve-git-context/') return res.end(JSON.stringify({ canonical_repository_identity: body.repository_identity, repository_branch: body.repository_branch, repository_ref: `refs/heads/${body.repository_branch}`, commit_sha: body.commit_sha, code_repository_branch: { uid: 'branch-1', code_repository_uid: 'repo-1', code_repository_name: 'Shared', repository_branch: body.repository_branch, is_initialized: true } })); res.writeHead(404).end('{}');