Referentie
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.
De verbinding.
Eén adres, één sleutel en de scope waarin je werkt.
https://api.duplex.matterspace.ai/mcp- Het gehoste MCP-adres, via streamable HTTP. Een dedicated omgeving of je eigen cloud gebruikt het adres dat je console toont, eindigend op /mcp.
https://duplex.matterspace.ai- De console: log in, kies je organisatie, kopieer het MCP-adres en maak je eerste sleutel. Een sleutel wordt één keer getoond, bij het aanmaken.
Authorization: Bearer <key>- Hoe een client die een sleutel accepteert, die meestuurt.
x-duplex-key: <key>- Geaccepteerd in plaats van de Authorization-header.
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- Laat de MCP-server weten of de hooks van deze client aan staan, zoals het Claude Code-pakket voor je doet.
OAuth-aanmelding- 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.
Omgevingsvariabelen.
Gelezen door de hooks, de pakketten en de kant-en-klare instellingenbestanden op je machine.
DUPLEX_URL- Je Duplex-adres, zonder /mcp, voor de hooks en de pakketten voor Cursor en Copilot: https, of gewoon http alleen naar deze machine.
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- Slaat elk hook-event over, alleen voor jou. De duplex-tools blijven via MCP werken.
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- Wat een hook doet als Duplex onbereikbaar is; gaat voor op wat Duplex het laatst heeft aangekondigd. Heropent nooit wat DUPLEX_FAIL_CLOSED afsluit.
DUPLEX_HOOK_APPROVAL_WAIT- Hoeveel seconden een tool-aanroep wacht op goedkeuring door een persoon voordat hij opnieuw wordt verstuurd. Standaard 60.
De hook-client.
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>]- Slaat het adres en je sleutel, uit DUPLEX_API_KEY of een verborgen invoer, één keer op voor elke hook op deze machine. Op Windows: duplex-hook.cmd setup -Url <address> -Scope <scope>.
duplex-hook status- Of Duplex antwoordt, welk faalbeleid geldt en welke events wachten om verstuurd te worden.
duplex-hook mcp-headers- Geeft je sleutel weer als MCP-headers, voor de header-helper van Codex.
duplex-hook <client> <event>- Verstuurt één event. Je client voert dit voor je uit; client is claude_code, codex, cursor of copilot.
Sleutelhanger van het besturingssysteem- Waar setup je sleutel bij voorkeur bewaart: de macOS-sleutelhanger, Secret Service op Linux of Windows Credential Manager.
~/.config/duplex/key- Waar setup je sleutel bewaart op een machine zonder sleutelhanger, alleen leesbaar voor jou.
~/.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.
Hook-events, per client.
Claude Code: SessionStart, UserPromptSubmit, PreToolUse, PermissionRequest, PostToolUse, PostToolUseFailure, PreCompact, Stop, SubagentStart, SubagentStop, SessionEnd- UserPromptSubmit, PreToolUse en PermissionRequest kunnen een stap tegenhouden.
Codex: SessionStart, UserPromptSubmit, PreToolUse, PermissionRequest, PostToolUse, PreCompact, Stop, SubagentStart, SubagentStop, SessionEnd- UserPromptSubmit, PreToolUse en PermissionRequest kunnen een stap tegenhouden.
Cursor: sessionStart, beforeSubmitPrompt, preToolUse, beforeShellExecution, beforeMCPExecution, postToolUse, postToolUseFailure, afterFileEdit, subagentStart, subagentStop, preCompact, stop, afterAgentResponse, sessionEnd- beforeSubmitPrompt, preToolUse, beforeShellExecution, beforeMCPExecution en subagentStart kunnen een stap tegenhouden.
GitHub Copilot CLI: sessionStart, userPromptTransformed, preToolUse, permissionRequest, postToolUse, postToolUseFailure, subagentStart, subagentStop, preCompact, agentStop, sessionEnd- userPromptTransformed, preToolUse en permissionRequest kunnen een stap tegenhouden. Een repository kan dezelfde hooks registreren in .github/hooks/duplex.json. Copilot CLI 1.0.101 of later.
Pakketinstellingen en opdrachten.
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- De instellingen van het Cursor-pakket, onder Plugins > Configure. De Cursor CLI leest ze ook uit zijn omgeving.
/duplex:status- Of Duplex hiervandaan bereikbaar is, de garantie van deze verbinding en wat het als laatste besliste.
/duplex:report- Geleverde antwoorden, toegepaste regels en wat er onlangs is geleerd.
/duplex:threads- Werk dat is meegenomen uit andere sessies en tools.
/duplex:share- Deel een meegenomen thread met een teamgenoot of een team, of stop met delen.
/duplex:forget- Wis een meegenomen thread en wat ervan is geleerd.
In Codex, Cursor en GitHub Copilot CLI zijn dezelfde opdrachten /status, /report, /threads, /share en /forget.
De twaalf MCP-tools.
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- De bewijzen dat iets is gedaan. Een vermelde tool of een HTTP 200 bewijst alleen dat de verbinding werkt. Een schrijfactie die is bewaard, draagt durable.
kind: invalid | not_permitted | not_found | conflict | busy | fault- Elke fout zegt van welk soort hij is, of er iets is toegepast en of je het opnieuw moet proberen.
retry: safe | after | no- safe: stuur opnieuw. after: stuur opnieuw na retry_after_s. no: pas eerst de aanroep aan.
-32602 · -32003 · -32001 · -32005 · -32006- JSON-RPC-fouten: -32602 een aanroep die de tool niet aanneemt (corrigeer hem, stuur hem niet ongewijzigd opnieuw), -32003 een sleutel zonder de scope die de tool nodig heeft, -32001 inloggegevens die niet worden geaccepteerd, -32005 een rate limit en -32006 een opslag die niet antwoordde, beide met 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. |
| Skills | Methods available for reuse, with their cards. |
| Oorzaak en gevolg | Outcomes observed for a starting state, action and conditions. |
| Scopes | Levels, maintenance choice and capacity. |
| API Keys | Client keys, their purpose, scope and holder. |
| Licentie | 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. |
Instructies die een AI-agent volgt om dit deel van MatterSpace Duplex goed te gebruiken. Plak ze in de instructies van je agent, of verwijs hem naar de markdown van deze 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:
- Referentie, 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.txtPrompts voor deze pagina
Alle prompts →Kopieer er een, vul de delen tussen punthaken in en geef hem aan je AI.
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:
- Referentie, 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
