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
2 changes: 1 addition & 1 deletion docs/conversational-mcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
20 changes: 10 additions & 10 deletions docs/local-development-backend.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": "<repo>/experiments/codex-host-probe/.local-marketplace",
"installedVersion": "0.3.0",
"sourceScope": "Test experiment only",
"hookEnabled": true,
Expand Down
2 changes: 1 addition & 1 deletion scripts/preview-panel.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
4 changes: 3 additions & 1 deletion scripts/verify-update-lifecycle-live.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions tests/helpers.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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('{}');
Expand Down
Loading