Hoppa till innehållet
Meny

Referens

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.

.md

Anslutningen.

En adress, en nyckel och det omfång du arbetar i.

https://api.duplex.matterspace.ai/mcp
Den hostade MCP-adressen, via streamable HTTP. En dedikerad miljö eller ditt eget moln använder adressen som visas i din konsol, som slutar på /mcp.
https://duplex.matterspace.ai
Konsolen: logga in, välj din organisation, kopiera MCP-adressen och skapa din första nyckel. En nyckel visas en gång, när den skapas.
Authorization: Bearer <key>
Hur en klient som tar emot en nyckel skickar den.
x-duplex-key: <key>
Accepteras i stället för Authorization-headern.
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
Talar om för MCP-servern om den här klientens hooks är påslagna, som Claude Code-paketet gör åt dig.
OAuth-inloggning
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.

Miljövariabler.

Läses av hooks, paketen och de kopieringsklara inställningsfilerna på din dator.

DUPLEX_URL
Din Duplex-adress, utan /mcp, för hooks och för Cursor- och Copilot-paketen: https, eller vanlig http endast till den här datorn.
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
Hoppar över alla hook-händelser, bara för dig. Duplex-verktygen fortsätter att fungera via 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
Vad en hook gör när Duplex inte kan nås, och åsidosätter det som Duplex senast meddelade. Den öppnar aldrig det som DUPLEX_FAIL_CLOSED stänger.
DUPLEX_HOOK_APPROVAL_WAIT
Hur många sekunder ett verktygsanrop väntar på en persons godkännande innan det skickas igen. 60 som standard.

Hook-klienten.

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>]
Sparar adressen och din nyckel, från DUPLEX_API_KEY eller en dold inmatning, en gång för alla hooks på den här datorn. På Windows: duplex-hook.cmd setup -Url <address> -Scope <scope>.
duplex-hook status
Om Duplex svarar, vilken felpolicy som gäller och vilka händelser som väntar på att skickas.
duplex-hook mcp-headers
Skriver ut din nyckel som MCP-headers, för hjälpfunktionen för headers i Codex.
duplex-hook <client> <event>
Skickar en händelse. Din klient kör den åt dig; client är claude_code, codex, cursor eller copilot.
OS-nyckelring
Där setup i första hand sparar din nyckel: nyckelringen i macOS, Secret Service på Linux eller Windows Credential Manager.
~/.config/duplex/key
Där setup sparar din nyckel på en dator utan nyckelring, läsbar bara för dig.
~/.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-händelser, klient för klient.

Claude Code: SessionStart, UserPromptSubmit, PreToolUse, PermissionRequest, PostToolUse, PostToolUseFailure, PreCompact, Stop, SubagentStart, SubagentStop, SessionEnd
UserPromptSubmit, PreToolUse och PermissionRequest kan stoppa ett steg.
Codex: SessionStart, UserPromptSubmit, PreToolUse, PermissionRequest, PostToolUse, PreCompact, Stop, SubagentStart, SubagentStop, SessionEnd
UserPromptSubmit, PreToolUse och PermissionRequest kan stoppa ett steg.
Cursor: sessionStart, beforeSubmitPrompt, preToolUse, beforeShellExecution, beforeMCPExecution, postToolUse, postToolUseFailure, afterFileEdit, subagentStart, subagentStop, preCompact, stop, afterAgentResponse, sessionEnd
beforeSubmitPrompt, preToolUse, beforeShellExecution, beforeMCPExecution och subagentStart kan stoppa ett steg.
GitHub Copilot CLI: sessionStart, userPromptTransformed, preToolUse, permissionRequest, postToolUse, postToolUseFailure, subagentStart, subagentStop, preCompact, agentStop, sessionEnd
userPromptTransformed, preToolUse och permissionRequest kan stoppa ett steg. Ett repo kan registrera samma hooks i .github/hooks/duplex.json. Copilot CLI 1.0.101 eller senare.

Paketinställningar och kommandon.

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
Inställningarna i Cursor-paketet, under Plugins > Configure. Cursor CLI läser dem också från sin miljö.
/duplex:status
Om Duplex kan nås härifrån, anslutningens garanti och vad den beslutade senast.
/duplex:report
Levererade svar, tillämpade regler och vad som har lärts in på sistone.
/duplex:threads
Arbete som förts över från andra sessioner och verktyg.
/duplex:share
Dela en överförd tråd med en kollega eller ett team, eller sluta dela den.
/duplex:forget
Radera en överförd tråd och det som har lärts av den.

I Codex, Cursor och GitHub Copilot CLI heter samma kommandon /status, /report, /threads, /share och /forget.

De tolv MCP-verktygen.

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.

WordMeaning
commitReply with Duplex’s answer.
deferThe turn is your AI’s, with the context, route or call terms Duplex returned.
refuseDecline, naming the rule.
advisoryMCP alone: Duplex sees what your AI sends it.
hookedClient hooks hand Duplex each turn and supported tool calls before they run.
gatedModel calls travel through the Duplex gateway.

Outcomes, states and labels.

WhereWords
Turn outcomesucceeded · failed · abandoned
Rule actionsrefuse · deny · require_defer · require_tool · allow
Plan outcomesat_goal · plan · predicted · none
Observation labelsobserved · not_seen · gone · one_of · predicted
Search resultssolved · proposed · needs_input · unsolved · refused
Code check findingsproved · open · undecided
Skill healthunexercised · healthy · watch · degraded · retired
State typeslive · cached · local · ephemeral
Share permissionsread · append · share · manage · rollback · delete
Source marksuntrusted · declared · operator
Operation statesapplied · in_progress · not_applied · conflict · busy
License standingok · expiring · grace · stopped
Environment readinessready · partially ready · blocked

Receipts and errors.

saved · applied · ran · computed · submitted · removed
Kvittona som bevisar att något blev gjort. Ett listat verktyg eller en HTTP 200 bevisar bara att anslutningen fungerar. En skrivning som sparades bär durable.
kind: invalid | not_permitted | not_found | conflict | busy | fault
Varje fel anger vilken typ det är, om något tillämpades och om du ska försöka igen.
retry: safe | after | no
safe: skicka igen. after: skicka igen efter retry_after_s. no: ändra anropet först.
-32602 · -32003 · -32001 · -32005 · -32006
JSON-RPC-fel: -32602 ett anrop som verktyget inte tar emot (rätta det, skicka det inte igen som det var), -32003 en nyckel utan det omfång som verktyget kräver, -32001 en autentiseringsuppgift som inte godtas, -32005 en hastighetsbegränsning och -32006 en lagring som inte svarade, båda med Retry-After.

Console screens.

ScreenWhat it’s for
People and TeamsMembership, roles and the team whose knowledge someone needs.
ApprovalsProposals: the target level, who submitted it and what would change.
TasksA task’s goal, last verified step and open work.
FärdighetMethods available for reuse, with their cards.
Orsak och verkanOutcomes observed for a starting state, action and conditions.
ScopesLevels, maintenance choice and capacity.
API KeysClient keys, their purpose, scope and holder.
LicensThe installation’s license standing.
Python librariesPackage requests, grants and prepared versions.
ReportsSubmitted reports.
Support accessTime-limited support permissions.
Organizations and HealthInstallation-wide view, for installation administrators.

Promptar för den här sidan

Alla promptar →

Kopiera en, fyll i delarna inom vinkelparenteser och ge den till din AI.

Fråga din AIList exactly what my key can call
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:
- Referens, 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