Riferimento
Every setting. Every call. Every answer.
The complete public surface of MatterSpace Duplex on one page: the connection, environment variables, the hook client and events, package commands, the twelve MCP tools, and every decision, outcome, state and error.
La connessione.
Un indirizzo, una chiave e l’ambito in cui lavori.
https://api.duplex.matterspace.ai/mcp- L’indirizzo MCP ospitato, su HTTP in streaming. Un ambiente dedicato o il tuo cloud usa l’indirizzo mostrato nella tua console, che termina con /mcp.
https://duplex.matterspace.ai- La console: accedi, scegli la tua organizzazione, copia l’indirizzo MCP e crea la tua prima chiave. Una chiave viene mostrata una sola volta, al momento della creazione.
Authorization: Bearer <key>- Come la invia un client che accetta una chiave.
x-duplex-key: <key>- Accettato al posto dell’header Authorization.
x-duplex-scope: <scope> · ?scope=<scope>- The scope you work in when a key is shared by a team, such as eng:platform, or your own level in it, such as eng:platform/you. Left out, you work at the level your key is held to. A scope your key doesn’t reach is refused, naming the level.
?hooks=on | off- Indica al server MCP se gli hook di questo client sono attivi, come fa per te il pacchetto Claude Code.
Accesso con OAuth- claude.ai, Claude Desktop and ChatGPT connectors take the address alone and sign you in. You allow access on a page that names the app and its host, and land in your own personal workspace.
Variabili d’ambiente.
Lette dagli hook, dai pacchetti e dai file di impostazioni pronti da copiare sul tuo computer.
DUPLEX_URL- Il tuo indirizzo Duplex, senza /mcp, per gli hook e per i pacchetti Cursor e Copilot: https, oppure http semplice solo verso questo computer.
DUPLEX_API_KEY- Your key. The hooks and settings files read it from here, so it never goes on a command line or into a file you commit.
DUPLEX_SCOPE- Your scope, carried by MCP calls as ?scope= and by the hooks as x-duplex-scope.
DUPLEX_HOOKS=off- Salta ogni evento degli hook, solo per te. Gli strumenti duplex continuano a funzionare tramite MCP.
DUPLEX_FAIL_CLOSED=1- Requires Duplex’s checks. When Duplex can’t be reached, prompts and checked tool calls are denied instead of allowed.
DUPLEX_HOOK_FAIL=open | closed- Cosa fa un hook quando Duplex non è raggiungibile, in sostituzione di quanto Duplex ha comunicato per ultimo. Non riapre mai ciò che DUPLEX_FAIL_CLOSED chiude.
DUPLEX_HOOK_APPROVAL_WAIT- Quanti secondi una chiamata a uno strumento attende l’approvazione di una persona prima di essere inviata di nuovo. 60 per impostazione predefinita.
Il client degli hook.
duplex-hook needs nothing but curl: macOS and Linux as they come, Windows through Git Bash or PowerShell 5.1 and 7.
duplex-hook setup --url <address> [--scope <scope>]- Salva l’indirizzo e la tua chiave, da DUPLEX_API_KEY o da un inserimento nascosto, una sola volta per tutti gli hook di questo computer. Su Windows: duplex-hook.cmd setup -Url <address> -Scope <scope>.
duplex-hook status- Se Duplex risponde, la policy in caso di errore in vigore e gli eventi in attesa di invio.
duplex-hook mcp-headers- Stampa la tua chiave come header MCP, per l’helper degli header di Codex.
duplex-hook <client> <event>- Invia un evento. Lo esegue il tuo client per te; client è claude_code, codex, cursor o copilot.
Portachiavi del sistema- Dove setup conserva per prima cosa la tua chiave: il portachiavi di macOS, Secret Service su Linux o Gestione credenziali di Windows.
~/.config/duplex/key- Dove setup conserva la tua chiave su un computer senza portachiavi, leggibile solo da te.
~/.config/duplex/spool- Events that couldn’t be sent wait here and go with the next call that gets through.
Keys, tokens and passwords are removed on your machine before an event leaves it. Pictures and documents stay on your machine too: hooks send only their type, size and fingerprint.
Eventi degli hook, client per client.
Claude Code: SessionStart, UserPromptSubmit, PreToolUse, PermissionRequest, PostToolUse, PostToolUseFailure, PreCompact, Stop, SubagentStart, SubagentStop, SessionEnd- UserPromptSubmit, PreToolUse e PermissionRequest possono fermare un passaggio.
Codex: SessionStart, UserPromptSubmit, PreToolUse, PermissionRequest, PostToolUse, PreCompact, Stop, SubagentStart, SubagentStop, SessionEnd- UserPromptSubmit, PreToolUse e PermissionRequest possono fermare un passaggio.
Cursor: sessionStart, beforeSubmitPrompt, preToolUse, beforeShellExecution, beforeMCPExecution, postToolUse, postToolUseFailure, afterFileEdit, subagentStart, subagentStop, preCompact, stop, afterAgentResponse, sessionEnd- beforeSubmitPrompt, preToolUse, beforeShellExecution, beforeMCPExecution e subagentStart possono fermare un passaggio.
GitHub Copilot CLI: sessionStart, userPromptTransformed, preToolUse, permissionRequest, postToolUse, postToolUseFailure, subagentStart, subagentStop, preCompact, agentStop, sessionEnd- userPromptTransformed, preToolUse e permissionRequest possono fermare un passaggio. Un repository può registrare gli stessi hook in .github/hooks/duplex.json. Copilot CLI 1.0.101 o successivo.
Impostazioni e comandi dei pacchetti.
One install adds the connection, its hooks and its commands together, once you agree; disconnecting puts your previous settings back exactly.
url · api_key · scope · hook_events- The Claude Code package’s settings: where your Duplex runs, your key, kept in the system’s secure credential store, your optional scope, and hook events, on by default.
DUPLEX_URL · DUPLEX_API_KEY · DUPLEX_SCOPE- Le impostazioni del pacchetto Cursor, in Plugins > Configure. Anche la Cursor CLI le legge dal proprio ambiente.
/duplex:status- Se Duplex è raggiungibile da qui, la garanzia di questa connessione e la sua ultima decisione.
/duplex:report- Risposte fornite, regole applicate e ciò che ha imparato di recente.
/duplex:threads- Il lavoro ripreso da altre sessioni e strumenti.
/duplex:share- Condividi un thread ripreso con un collega o un team, oppure smetti di condividerlo.
/duplex:forget- Cancella un thread ripreso e ciò che se ne è imparato.
In Codex, Cursor e GitHub Copilot CLI gli stessi comandi sono /status, /report, /threads, /share e /forget.
I dodici strumenti MCP.
Most take a word, in op, what or show, plus the fields that word takes. duplex_status show "capabilities" lists exactly what your key may call and the fields each word takes.
duplex_context { message, after?, include? }- Opens a turn with the user’s latest message, word for word, and returns its decision: commit, refuse or defer. include: examples, generalize, prompt, sources, recall, tools, history.
duplex_observe { turn, answer, tools?, outcome?, remember? }- Closes the turn before you reply: a one-line answer summary, the tools used, outcome succeeded, failed or abandoned, and anything the user asked to keep. saved: true means it is recorded.
duplex_learn { what, … }- Teaches, when the user asks. what: label, fact, document, transition, tools, credit, outcome, correction, recipe, skill, transfer, environment.
duplex_rules { op, rule?, rule_id?, confirm? }- op: list, add, remove, approve, calling. A change takes two calls: a summary with a one-time confirm code, then the same call with the code once the user agrees.
duplex_task { op, task?, … }- op: open, step, checkpoint, rollback, state, pack, close, list, verify, skills, skill, run_skill.
duplex_plan { op, … }- op: predict, simulate, plan, recommend, world, classify, agree. Every step says whether it was observed or predicted.
duplex_skill { op, … }- op: build, submit, status, cancel, run, list, show, certificate, recall, parts, budget. Read a card with show, then run it with run.
duplex_tool { tool, input, args? }- Runs a registered tool in one call where the key may run tools. ran: true means it ran.
duplex_share { op, … }- op: threads, thread, open, share, unshare. Share with a user, team, agent or platform for a set time, with read, append, share, manage, rollback or delete access.
duplex_forget { what, id?, restore? }- what: label, correction, thread, task, credit, outcome, transition, samples, skill, environment. Restores where supported, with a certificate where the removal is attested.
duplex_status { show, … }- show: capabilities, entry, calling, policies, skills, audit, ledger, certificates, recipes, recipe, lessons, sources, job, operation. audit with verify: true walks the signed chain.
duplex_report_feedback { text, confirm? }- The user’s own report, in two calls: a preview that sends nothing, then the report once the user confirms.
operation- An optional ID of your choosing, 1 to 64 letters, digits or . _ : -, on any write. The same ID with the same arguments is applied once; duplex_status show "operation" says whether it was applied.
Decisions and guarantees.
| Word | Meaning |
|---|---|
commit | Reply with Duplex’s answer. |
defer | The turn is your AI’s, with the context, route or call terms Duplex returned. |
refuse | Decline, naming the rule. |
advisory | MCP alone: Duplex sees what your AI sends it. |
hooked | Client hooks hand Duplex each turn and supported tool calls before they run. |
gated | Model calls travel through the Duplex gateway. |
Outcomes, states and labels.
| Where | Words |
|---|---|
| Turn outcome | succeeded · failed · abandoned |
| Rule actions | refuse · deny · require_defer · require_tool · allow |
| Plan outcomes | at_goal · plan · predicted · none |
| Observation labels | observed · not_seen · gone · one_of · predicted |
| Search results | solved · proposed · needs_input · unsolved · refused |
| Code check findings | proved · open · undecided |
| Skill health | unexercised · healthy · watch · degraded · retired |
| State types | live · cached · local · ephemeral |
| Share permissions | read · append · share · manage · rollback · delete |
| Source marks | untrusted · declared · operator |
| Operation states | applied · in_progress · not_applied · conflict · busy |
| License standing | ok · expiring · grace · stopped |
| Environment readiness | ready · partially ready · blocked |
Receipts and errors.
saved · applied · ran · computed · submitted · removed- Le ricevute che dimostrano che qualcosa è stato fatto. Uno strumento elencato o un HTTP 200 dimostra solo che la connessione funziona. Una scrittura conservata riporta durable.
kind: invalid | not_permitted | not_found | conflict | busy | fault- Ogni errore dice di che tipo è, se è stato applicato qualcosa e se riprovare.
retry: safe | after | no- safe: invialo di nuovo. after: invialo di nuovo dopo retry_after_s. no: prima modifica la chiamata.
-32602 · -32003 · -32001 · -32005 · -32006- Errori JSON-RPC: -32602 una chiamata che lo strumento non accetta (correggila, non reinviarla così com’è), -32003 una chiave senza l’ambito richiesto dallo strumento, -32001 una credenziale non accettata, -32005 un limite di frequenza e -32006 un archivio che non ha risposto, entrambi con Retry-After.
Console screens.
| Screen | What it’s for |
|---|---|
| People and Teams | Membership, roles and the team whose knowledge someone needs. |
| Approvals | Proposals: the target level, who submitted it and what would change. |
| Tasks | A task’s goal, last verified step and open work. |
| Competenze | Methods available for reuse, with their cards. |
| Causa ed effetto | Outcomes observed for a starting state, action and conditions. |
| Scopes | Levels, maintenance choice and capacity. |
| API Keys | Client keys, their purpose, scope and holder. |
| Licenza | The installation’s license standing. |
| Python libraries | Package requests, grants and prepared versions. |
| Reports | Submitted reports. |
| Support access | Time-limited support permissions. |
| Organizations and Health | Installation-wide view, for installation administrators. |
Le istruzioni che un agente IA segue per usare al meglio questa parte di MatterSpace Duplex. Incollale nelle istruzioni del tuo agente, oppure indicagli il markdown di questa pagina.
How to use this reference
Look up exact names here, but trust duplex_status {show: "capabilities"} for what your key may call right now and the fields each operation takes.
Rules that never change
- Pass the user's message word for word to
duplex_context. - Close the turn with
duplex_observe(without hooks). - Two-step confirmation for rule changes and feedback reports: show the preview, wait for the user.
- Put an
operationID on writes and check it before resending. - Report receipts (
saved,applied,ran,computed,submitted,removed) before claiming anything was done. - Read errors by
kindandretry. On-32602, fix the call; don't resend it unchanged. - Never put a password, key or token in any call.
Where to find more in the MatterSpace Duplex docs:
- Riferimento, this topic in full: https://www.matterspace.ai/duplex/docs/reference.md
- Every prompt, and where to paste the standing ones: https://www.matterspace.ai/duplex/docs/prompts.md
- Errors and what to do about them: https://www.matterspace.ai/duplex/docs/troubleshooting.md
- Every docs page, with what it covers: https://www.matterspace.ai/duplex/docs/llms.txtPrompt per questa pagina
Tutti i prompt →Copiane uno, completa le parti tra parentesi angolari e dallo alla tua IA.
Call duplex_status with show "capabilities" and give me a table: each tool, the operations my key may use, and the fields each operation takes.
Where to find more in the MatterSpace Duplex docs:
- Riferimento, this topic in full: https://www.matterspace.ai/duplex/docs/reference.md
- Every prompt, and where to paste the standing ones: https://www.matterspace.ai/duplex/docs/prompts.md
- Errors and what to do about them: https://www.matterspace.ai/duplex/docs/troubleshooting.md
- Every docs page, with what it covers: https://www.matterspace.ai/duplex/docs/llms.txt
