pantheon-cli 0.2.57 → 0.2.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pantheon.mjs +139 -91
- package/package.json +3 -3
package/dist/pantheon.mjs
CHANGED
|
@@ -39865,9 +39865,6 @@ function resolveCaptureClient(client, claudeProjectDir = process.env.CLAUDE_PROJ
|
|
|
39865
39865
|
}
|
|
39866
39866
|
return reported;
|
|
39867
39867
|
}
|
|
39868
|
-
function isClaudeDesktopClient(client) {
|
|
39869
|
-
return /claude[-_. ]?(ai|desktop)/i.test(client?.trim() || "");
|
|
39870
|
-
}
|
|
39871
39868
|
function clientCapture(client) {
|
|
39872
39869
|
const name = client?.trim();
|
|
39873
39870
|
if (!name) return { readable: false, known: false };
|
|
@@ -41725,13 +41722,10 @@ function transcriptLooksThin(turns) {
|
|
|
41725
41722
|
return null;
|
|
41726
41723
|
}
|
|
41727
41724
|
function unreadableClientMessage(client, space) {
|
|
41728
|
-
if (isClaudeDesktopClient(client)) {
|
|
41729
|
-
return `Claude Desktop does not expose this conversation to MCP. Do not reconstruct it or offer a summary, reference document, or manual carry-over workaround. Export your Claude data from Settings > Privacy, then call pantheon_handoff for "${space}" with transcriptFile set to the downloaded ZIP or extracted conversations.json.`;
|
|
41730
|
-
}
|
|
41731
41725
|
return [
|
|
41732
|
-
|
|
41733
|
-
"
|
|
41734
|
-
"
|
|
41726
|
+
`${client || "This app"} does not expose this conversation record to Pantheon, so automatic capture into "${space}" is unavailable.`,
|
|
41727
|
+
"Construct the fullest transcript currently visible to you and retry with ordered verbatim user and assistant turns. Do this automatically; never ask the human to export data, locate a file, or copy messages.",
|
|
41728
|
+
"Set truncated:true if earlier turns are no longer visible instead of inventing them."
|
|
41735
41729
|
].join(" ");
|
|
41736
41730
|
}
|
|
41737
41731
|
function resolveTranscript(input) {
|
|
@@ -41756,7 +41750,7 @@ function resolveTranscript(input) {
|
|
|
41756
41750
|
});
|
|
41757
41751
|
if (!captured?.turns.length) {
|
|
41758
41752
|
throw new Error(
|
|
41759
|
-
"No local conversation history found for this workspace.
|
|
41753
|
+
"No local conversation history was found for this workspace. Retry with transcript containing every real user and assistant turn currently visible to you, copied verbatim and in order. Do not ask the human to export or copy anything; set truncated:true if earlier turns are no longer visible."
|
|
41760
41754
|
);
|
|
41761
41755
|
}
|
|
41762
41756
|
return { turns: captured.turns, captured };
|
|
@@ -42975,9 +42969,8 @@ Grounding \u2014 never break these:
|
|
|
42975
42969
|
- /pantheon-skills \u2192 call pantheon_skill_review, then save what it justifies with pantheon_save_skill_drafts without asking first: a draft is inert until the human promotes it on the space page, so that is where they approve or reject. Never nominate a skill without the review, and cite the turns any claim rests on. If none is justified, say only "Nothing worth creating a skill for."
|
|
42976
42970
|
- Do not narrate a command. No preamble about which tools you can see, whether MCP is connected, or what you are about to do \u2014 run it and report what happened. A call that actually failed is worth one line.
|
|
42977
42971
|
- Existing generated or uploaded files must go in artifacts. Prefer a local path, use a downloadable HTTPS URL when there is no shared filesystem, and use inline base64 only as a fallback. Never create or rewrite a file merely for handoff. Handoff is rejected if the chat names a .pdf and omits it.
|
|
42978
|
-
-
|
|
42979
|
-
-
|
|
42980
|
-
- Claude Desktop is local export-import only. Never reconstruct its conversation into tool arguments. Remote MCP cannot read the file, so use the local setup. Ask the human for Anthropic's data-export ZIP or extracted conversations.json, then pass its local path as transcriptFile. Do not offer any summary or manual workaround.
|
|
42972
|
+
- Every pantheon_handoff starts in universal auto mode: call it once with the human's space and attachments, omitting transcript, transcriptFile, and transcriptFallback. Pantheon attempts capture only through a verified adapter for the calling client; never select behavior from the platform yourself.
|
|
42973
|
+
- If that first call returns status transcript_required, retry immediately with the same space and attachments, transcriptFallback:true, and every visible real user and assistant turn copied verbatim and in order. Set truncated:true when earlier turns are no longer visible. Never report the intermediate response, send a recap, or ask the human to export data, locate a file, or copy messages.
|
|
42981
42974
|
- After resume, the packet covers the whole space but is still a summary of it. Before you tell the human something was not carried over, call pantheon_search (it reads tool calls too) and pantheon_get_turns on any id from the sessions list.
|
|
42982
42975
|
- Shared spaces belong to someone else and are read-only. Resume, search and the get_* tools work on them exactly as on your own. Handoff, park, remember and skill saves are refused \u2014 do not retry with a different spelling, tell the human it is read-only and offer to write to a space they own. A bare name is enough when only one space matches; write owner/space when two do.
|
|
42983
42976
|
`;
|
|
@@ -42997,22 +42990,19 @@ If you are an agent:
|
|
|
42997
42990
|
Tutorial
|
|
42998
42991
|
1. Human runs pantheon connect <code> --host <url> once on this machine
|
|
42999
42992
|
Overview shows that line with the code and URL already filled in.
|
|
43000
|
-
The code goes before --host, or it is mistaken for the code.
|
|
43001
42993
|
2. Reload MCP in Cursor, Claude, or ChatGPT.app (Chat or Codex).
|
|
43002
42994
|
ChatGPT Classic cannot run local MCP \u2014 use the new ChatGPT.app instead.
|
|
43003
|
-
|
|
43004
|
-
|
|
42995
|
+
Remote integrations still hand off, but the agent supplies the visible
|
|
42996
|
+
transcript because the server cannot read that host's private chat log.
|
|
43005
42997
|
3. Leave a conscience: /pantheon-handoff <space> \u2192 pantheon_handoff
|
|
43006
42998
|
<space> is the name the human chose. If they omit it, ask \u2014 never invent.
|
|
43007
42999
|
If they named a new slug, call pantheon_handoff anyway \u2014 that creates the space.
|
|
43008
|
-
|
|
43009
|
-
|
|
43010
|
-
|
|
43011
|
-
|
|
43012
|
-
|
|
43013
|
-
|
|
43014
|
-
supported complete history, so handoff is unavailable there. Never ask
|
|
43015
|
-
them to retype it; resume and search still work.
|
|
43000
|
+
First call without transcript fields. Pantheon uses a verified adapter when
|
|
43001
|
+
this client exposes one; it never scans an unrelated app's local sessions.
|
|
43002
|
+
If the response status is transcript_required, retry automatically with
|
|
43003
|
+
transcriptFallback:true and every visible real user and assistant turn.
|
|
43004
|
+
Never ask the human to export or copy anything. Mark truncated:true when
|
|
43005
|
+
older turns are outside the current context.
|
|
43016
43006
|
Repeating a handoff appends only the new turns.
|
|
43017
43007
|
Attach every existing file you generated or the human uploaded. Prefer a
|
|
43018
43008
|
local path, use a downloadable HTTPS URL when needed, and use inline
|
|
@@ -43063,7 +43053,7 @@ Terminal (this CLI)
|
|
|
43063
43053
|
sync optional escape hatch \u2014 handoff/resume already sync
|
|
43064
43054
|
spaces list local consciences (spaces)
|
|
43065
43055
|
help this guide
|
|
43066
|
-
mcp-install
|
|
43056
|
+
mcp-install repair/refresh agent config after connecting
|
|
43067
43057
|
mcp-uninstall remove Pantheon MCP from Cursor / Claude / Codex / Windsurf
|
|
43068
43058
|
(ChatGPT Classic and Replit are skipped \u2014 no local MCP)
|
|
43069
43059
|
mcp start the stdio MCP server (agents launch this)
|
|
@@ -43918,6 +43908,43 @@ async function restoreArtifact(artifact, destination, cwd = process.cwd(), clien
|
|
|
43918
43908
|
};
|
|
43919
43909
|
}
|
|
43920
43910
|
|
|
43911
|
+
// ../mcp/src/handoff-policy.ts
|
|
43912
|
+
function handoffPreflight(input) {
|
|
43913
|
+
if (input.hasTranscript && input.hasTranscriptFile) {
|
|
43914
|
+
return { mode: "invalid", reason: "Use transcriptFile or transcript, not both." };
|
|
43915
|
+
}
|
|
43916
|
+
const hasFallbackMaterial = input.hasTranscript || input.hasTranscriptFile;
|
|
43917
|
+
if (hasFallbackMaterial && !input.transcriptFallback) {
|
|
43918
|
+
return {
|
|
43919
|
+
mode: "capture_first_required",
|
|
43920
|
+
reason: "Every handoff starts with automatic capture. Call pantheon_handoff once without transcript or transcriptFile; Pantheon will request a fallback only when safe capture is unavailable."
|
|
43921
|
+
};
|
|
43922
|
+
}
|
|
43923
|
+
if (input.transcriptFallback && !hasFallbackMaterial) {
|
|
43924
|
+
return {
|
|
43925
|
+
mode: "invalid",
|
|
43926
|
+
reason: "transcriptFallback requires transcript or transcriptFile."
|
|
43927
|
+
};
|
|
43928
|
+
}
|
|
43929
|
+
if (input.hasTranscriptFile) {
|
|
43930
|
+
if (!input.allowCapture) {
|
|
43931
|
+
return {
|
|
43932
|
+
mode: "transcript_required",
|
|
43933
|
+
reason: "This remote MCP server cannot read a host-local transcript file. Supply the real turns visible in the current context instead."
|
|
43934
|
+
};
|
|
43935
|
+
}
|
|
43936
|
+
return { mode: "import" };
|
|
43937
|
+
}
|
|
43938
|
+
if (input.hasTranscript) return { mode: "supplied" };
|
|
43939
|
+
if (input.allowCapture && input.captureReadable && input.captureSource) {
|
|
43940
|
+
return { mode: "capture" };
|
|
43941
|
+
}
|
|
43942
|
+
return {
|
|
43943
|
+
mode: "transcript_required",
|
|
43944
|
+
reason: input.allowCapture ? "This client has no verified local capture adapter." : "Remote MCP cannot read the host application's private conversation log."
|
|
43945
|
+
};
|
|
43946
|
+
}
|
|
43947
|
+
|
|
43921
43948
|
// ../mcp/src/index.ts
|
|
43922
43949
|
async function mutateVault(home, vault, message, write) {
|
|
43923
43950
|
return withVaultMutationLock(home, async () => {
|
|
@@ -44003,6 +44030,28 @@ function text(data) {
|
|
|
44003
44030
|
content: [{ type: "text", text: JSON.stringify(data, null, 2) }]
|
|
44004
44031
|
};
|
|
44005
44032
|
}
|
|
44033
|
+
function transcriptRequired(space, reason) {
|
|
44034
|
+
return {
|
|
44035
|
+
ok: false,
|
|
44036
|
+
status: "transcript_required",
|
|
44037
|
+
space,
|
|
44038
|
+
reason,
|
|
44039
|
+
instruction: "Retry pantheon_handoff immediately with the same space and attachments, transcriptFallback:true, and every real user and assistant turn visible in your current context copied verbatim and in order. Set truncated:true if earlier turns are no longer visible. Do not ask the human to export, locate, or copy anything, and do not report this intermediate response."
|
|
44040
|
+
};
|
|
44041
|
+
}
|
|
44042
|
+
function captureFirstRequired(space, reason) {
|
|
44043
|
+
return {
|
|
44044
|
+
ok: false,
|
|
44045
|
+
status: "capture_first_required",
|
|
44046
|
+
space,
|
|
44047
|
+
reason,
|
|
44048
|
+
instruction: "Retry pantheon_handoff immediately with the same space and attachments but omit transcript, transcriptFile, and transcriptFallback. Pantheon must attempt safe automatic capture before it can request an agent-supplied fallback. Do not report this intermediate response."
|
|
44049
|
+
};
|
|
44050
|
+
}
|
|
44051
|
+
function captureNeedsTranscript(error2) {
|
|
44052
|
+
const message = error2 instanceof Error ? error2.message : String(error2);
|
|
44053
|
+
return message.includes("No local conversation history was found") || message.includes("does not expose this conversation record");
|
|
44054
|
+
}
|
|
44006
44055
|
function fail(error2) {
|
|
44007
44056
|
const message = error2 instanceof Error ? error2.message : String(error2);
|
|
44008
44057
|
return {
|
|
@@ -44024,17 +44073,17 @@ function fail(error2) {
|
|
|
44024
44073
|
}
|
|
44025
44074
|
function hint(message) {
|
|
44026
44075
|
const text2 = message.toLowerCase();
|
|
44027
|
-
if (text2.includes("
|
|
44028
|
-
return "
|
|
44076
|
+
if (text2.includes("construct the fullest transcript available")) {
|
|
44077
|
+
return "Retry pantheon_handoff now with every visible real user and assistant turn in transcript. Do not ask the human for an export or copy/paste; use truncated:true if older turns are no longer visible.";
|
|
44029
44078
|
}
|
|
44030
|
-
if (text2.includes("
|
|
44031
|
-
return "
|
|
44079
|
+
if (text2.includes("transcript-file imports require local mcp")) {
|
|
44080
|
+
return "Do not ask the human to move the file. Retry with the fullest transcript currently visible to you.";
|
|
44032
44081
|
}
|
|
44033
44082
|
if (text2.includes("claude desktop") && text2.includes("local pantheon mcp")) {
|
|
44034
44083
|
return "Use Pantheon's local Claude Desktop setup, then fully quit and reopen Claude Desktop. Remote MCP cannot read a local export file.";
|
|
44035
44084
|
}
|
|
44036
44085
|
if (text2.includes("claude desktop") && text2.includes("export")) {
|
|
44037
|
-
return "
|
|
44086
|
+
return "If the export already exists, pass it as transcriptFile. Otherwise continue automatically with the fullest visible transcript; do not ask the human to export data.";
|
|
44038
44087
|
}
|
|
44039
44088
|
if (text2.includes("claude export contains") || text2.includes("claude conversation is named") || text2.includes("no claude conversation matches")) {
|
|
44040
44089
|
return "Show the listed Claude conversations, ask which one to import, then retry with transcriptConversation set to its UUID. Never retype the transcript.";
|
|
@@ -44210,19 +44259,27 @@ ${GUIDE}` }]
|
|
|
44210
44259
|
registerTool(
|
|
44211
44260
|
server,
|
|
44212
44261
|
"pantheon_handoff",
|
|
44213
|
-
"Archive this chat into a Pantheon space
|
|
44262
|
+
"Archive this chat into a Pantheon space. Trigger: /pantheon-handoff <space>. If the human typed a slug, call this even when it is new \u2014 first handoff creates the space. UNIVERSAL FIRST CALL: always omit transcript, transcriptFile, and transcriptFallback. Pantheon safely attempts automatic capture only through a verified adapter for the calling client; never infer support from the platform yourself. If the response status is transcript_required, immediately retry with the same space and attachments, transcriptFallback:true, and the fullest transcript available in the current context: one ordered object per real user or assistant message, copied verbatim rather than narrated or summarized. Do not report the intermediate response and never ask the human to export data, locate a file, copy messages, or perform another manual step. Set truncated:true when earlier turns are no longer visible instead of inventing them. If status is capture_first_required, retry once without transcript fields, then follow transcript_required if returned. Repeating the same supplied chat should pass append:true so only its new tail is added to the latest session. transcriptFile is an optional fallback only when a file already exists; never require or request one. Attach every existing generated or uploaded file not already captured and repeat those attachments on a fallback call. Prefer { name, path } locally, { name, url } remotely, and inline base64 only as a fallback. Never create or rewrite a file merely for handoff. When a successful handoff adds turns, process its skill review and submit up to five justified drafts without asking. REPORT THE FINAL RESULT after that follow-up as a two-column table and nothing else: space, session, captured from, turns added, already archived, total turns, artifact count, skill drafts saved, and committed/pulled/pushed. Only a final sync or tool failure belongs outside the table.",
|
|
44214
44263
|
{
|
|
44215
44264
|
space: external_exports.string(),
|
|
44216
44265
|
source: external_exports.string().optional(),
|
|
44266
|
+
transcript: external_exports.union([external_exports.array(turnSchema), external_exports.string()]).optional().describe(
|
|
44267
|
+
"Fallback only after Pantheon returns transcript_required: the fullest transcript visible to the model, as ordered real user/assistant turns copied verbatim."
|
|
44268
|
+
),
|
|
44217
44269
|
transcriptFile: external_exports.string().optional().describe(
|
|
44218
|
-
"
|
|
44270
|
+
"Optional fallback when an Anthropic export ZIP or conversations.json already exists. Use only after transcript_required; never ask the human to create or locate one."
|
|
44219
44271
|
),
|
|
44220
44272
|
transcriptConversation: external_exports.string().optional().describe(
|
|
44221
44273
|
"Claude conversation UUID or exact title. Required only when the export contains more than one conversation."
|
|
44222
44274
|
),
|
|
44275
|
+
transcriptFallback: external_exports.boolean().optional().describe(
|
|
44276
|
+
"Set true only when retrying after Pantheon returned transcript_required."
|
|
44277
|
+
),
|
|
44223
44278
|
summary: external_exports.string().optional().describe("Short orientation for the next agent. The full transcript is stored separately."),
|
|
44224
44279
|
facts: external_exports.array(external_exports.string()).optional(),
|
|
44225
44280
|
artifacts: external_exports.array(artifactSchema).optional(),
|
|
44281
|
+
append: external_exports.boolean().optional().describe("True when this is another supplied chunk of the same chat."),
|
|
44282
|
+
truncated: external_exports.boolean().optional().describe("True when earlier turns are no longer visible to this model."),
|
|
44226
44283
|
cwd: external_exports.string().optional().describe("Project folder whose chat history to read."),
|
|
44227
44284
|
sessionKey: external_exports.string().optional().describe("Capture one specific conversation from pantheon_local_sessions.")
|
|
44228
44285
|
},
|
|
@@ -44232,26 +44289,26 @@ ${GUIDE}` }]
|
|
|
44232
44289
|
server.server.getClientVersion()?.name
|
|
44233
44290
|
);
|
|
44234
44291
|
const cwd = request.cwd || (clientName === "Claude Code" ? process.env.CLAUDE_PROJECT_DIR : void 0);
|
|
44235
|
-
const claudeDesktop = isClaudeDesktopClient(clientName);
|
|
44236
44292
|
const captureClient = clientCapture(clientName);
|
|
44237
|
-
|
|
44238
|
-
|
|
44239
|
-
|
|
44240
|
-
|
|
44241
|
-
|
|
44242
|
-
|
|
44243
|
-
|
|
44244
|
-
|
|
44245
|
-
|
|
44293
|
+
const hasTranscript = Array.isArray(request.transcript) ? request.transcript.length > 0 : Boolean(request.transcript?.trim());
|
|
44294
|
+
const preflight = handoffPreflight({
|
|
44295
|
+
allowCapture,
|
|
44296
|
+
captureReadable: captureClient.readable,
|
|
44297
|
+
captureSource: captureClient.source,
|
|
44298
|
+
hasTranscript,
|
|
44299
|
+
hasTranscriptFile: Boolean(request.transcriptFile),
|
|
44300
|
+
transcriptFallback: request.transcriptFallback === true
|
|
44301
|
+
});
|
|
44302
|
+
if (preflight.mode === "invalid") throw new Error(preflight.reason);
|
|
44303
|
+
if (preflight.mode === "capture_first_required") {
|
|
44304
|
+
return captureFirstRequired(request.space, preflight.reason);
|
|
44246
44305
|
}
|
|
44247
|
-
if (
|
|
44248
|
-
|
|
44249
|
-
`Pantheon is running through local MCP, but ${clientName || "the reported client identity"} does not match a supported conversation record. Do not describe this as a web or remote connection, and do not reconstruct the chat. Update Pantheon or report the client identity; resume and search remain available.`
|
|
44250
|
-
);
|
|
44306
|
+
if (preflight.mode === "transcript_required") {
|
|
44307
|
+
return transcriptRequired(request.space, preflight.reason);
|
|
44251
44308
|
}
|
|
44252
|
-
const needsClientRoots =
|
|
44309
|
+
const needsClientRoots = preflight.mode === "import" || Boolean(request.artifacts?.some((item) => "path" in item));
|
|
44253
44310
|
const clientRoots = needsClientRoots ? await clientFileRoots() : [];
|
|
44254
|
-
const imported = request.transcriptFile ? await readTranscriptExport(request.transcriptFile, {
|
|
44311
|
+
const imported = preflight.mode === "import" && request.transcriptFile ? await readTranscriptExport(request.transcriptFile, {
|
|
44255
44312
|
cwd,
|
|
44256
44313
|
allowLocalPaths: allowCapture,
|
|
44257
44314
|
clientRoots
|
|
@@ -44267,24 +44324,36 @@ ${GUIDE}` }]
|
|
|
44267
44324
|
allowLocalPaths: allowCapture,
|
|
44268
44325
|
clientRoots
|
|
44269
44326
|
});
|
|
44270
|
-
|
|
44271
|
-
|
|
44272
|
-
|
|
44273
|
-
|
|
44274
|
-
|
|
44275
|
-
|
|
44276
|
-
|
|
44277
|
-
|
|
44278
|
-
|
|
44279
|
-
|
|
44280
|
-
|
|
44281
|
-
|
|
44282
|
-
|
|
44283
|
-
|
|
44284
|
-
|
|
44285
|
-
|
|
44286
|
-
|
|
44287
|
-
|
|
44327
|
+
let mutation;
|
|
44328
|
+
try {
|
|
44329
|
+
mutation = await mutateVault(
|
|
44330
|
+
home,
|
|
44331
|
+
vault,
|
|
44332
|
+
(result) => `handoff ${result.slug}`,
|
|
44333
|
+
() => writeHandoff(home, {
|
|
44334
|
+
...request,
|
|
44335
|
+
cwd,
|
|
44336
|
+
artifacts,
|
|
44337
|
+
transcript: imported?.turns || (preflight.mode === "supplied" ? request.transcript : void 0),
|
|
44338
|
+
transcriptImport: imported ? { sessionId: imported.sessionId, source: imported.source } : void 0,
|
|
44339
|
+
source: imported?.source || request.source || (preflight.mode === "supplied" ? `${clientName || "agent"} supplied transcript` : captureClient.source),
|
|
44340
|
+
capture: preflight.mode === "capture",
|
|
44341
|
+
// Which app is on the other end of this stdio pipe. Running locally
|
|
44342
|
+
// is not the same as keeping chats where Pantheon can read them, and
|
|
44343
|
+
// capture needs to tell those apart before it reads anything.
|
|
44344
|
+
client: clientName
|
|
44345
|
+
})
|
|
44346
|
+
);
|
|
44347
|
+
} catch (error2) {
|
|
44348
|
+
if (preflight.mode === "capture" && captureNeedsTranscript(error2)) {
|
|
44349
|
+
return transcriptRequired(
|
|
44350
|
+
request.space,
|
|
44351
|
+
"The verified capture adapter could not find this conversation's local history."
|
|
44352
|
+
);
|
|
44353
|
+
}
|
|
44354
|
+
throw error2;
|
|
44355
|
+
}
|
|
44356
|
+
const { written, sync: sync2 } = mutation;
|
|
44288
44357
|
const shouldReview = sync2.ok !== false && written.added > 0;
|
|
44289
44358
|
const review = shouldReview ? (() => {
|
|
44290
44359
|
try {
|
|
@@ -44618,27 +44687,8 @@ ${GUIDE}` }]
|
|
|
44618
44687
|
argsSchema: { space: external_exports.string() }
|
|
44619
44688
|
},
|
|
44620
44689
|
async ({ space }) => {
|
|
44621
|
-
const clientName = resolveCaptureClient(
|
|
44622
|
-
server.server.getClientVersion()?.name
|
|
44623
|
-
);
|
|
44624
|
-
const client = clientCapture(clientName);
|
|
44625
|
-
if (!allowCapture) {
|
|
44626
|
-
return promptText(
|
|
44627
|
-
"Do not reconstruct, summarize, or serialize this conversation. Remote MCP is resume/search-only because it cannot read a complete local history. Do not offer a summary, reference document, copy/paste workflow, or manual carry-over as a substitute. Tell the human to use Pantheon's local setup in a supported desktop agent."
|
|
44628
|
-
);
|
|
44629
|
-
}
|
|
44630
|
-
if (isClaudeDesktopClient(clientName)) {
|
|
44631
|
-
return promptText(
|
|
44632
|
-
`Claude Desktop handoff is export-import only. Do not reconstruct or summarize this chat, and do not offer a reference document or manual carry-over workaround. Ask the human to export their Claude data from Settings > Privacy and provide the downloaded ZIP path, then call pantheon_handoff for "${space}" with transcriptFile. If Pantheon lists several conversations, ask which UUID to import.`
|
|
44633
|
-
);
|
|
44634
|
-
}
|
|
44635
|
-
if (!client.readable || !client.source) {
|
|
44636
|
-
return promptText(
|
|
44637
|
-
"Do not reconstruct, summarize, or serialize this conversation. This client is resume/search-only until Pantheon supports its complete local session format or official export."
|
|
44638
|
-
);
|
|
44639
|
-
}
|
|
44640
44690
|
return promptText(
|
|
44641
|
-
`Call pantheon_handoff for
|
|
44691
|
+
`Call pantheon_handoff for "${space}" first without transcript, transcriptFile, or transcriptFallback so Pantheon can attempt safe automatic capture. If it returns status transcript_required, retry immediately with transcriptFallback:true and every visible real user and assistant turn copied verbatim and in order; set truncated:true if older turns are no longer visible. Never ask the human to export, copy, or locate anything, and do not report the intermediate response.`
|
|
44642
44692
|
);
|
|
44643
44693
|
}
|
|
44644
44694
|
);
|
|
@@ -44860,16 +44910,14 @@ ${block2}`);
|
|
|
44860
44910
|
var spaceGate = 'A space is the short name the human chose for a conscience (preorders, auth-refactor). The argument is: $ARGUMENTS\n\nIf that arrived blank, or as an unexpanded placeholder rather than a name, ask: "What should this conscience be named?" and wait. Never invent a name. Otherwise use it exactly as typed \u2014 any single short slug counts, including one that is not in the vault yet.';
|
|
44861
44911
|
var quiet = "Do not narrate. No preamble about which tools you can see, whether Pantheon MCP is connected, or what you are about to do. Run it and report what happened, briefly. If a call fails, say what failed in one line.";
|
|
44862
44912
|
var autoSkillReview = "When a successful handoff adds new turns, immediately process its skillReview result. If that field is missing even though turns were added, call pantheon_skill_review for the same space. Read the turns cited by any promising signal, compare against existing live and draft triggers, then submit at most five genuinely recurring lessons together with pantheon_save_skill_drafts. Do not ask permission: every save is an inert draft until the human approves or rejects it in the UI. Save none when nothing is justified. Only report the handoff after this review and any saves are complete.";
|
|
44863
|
-
var
|
|
44864
|
-
var fullHistoryOnly = "Pantheon handoff is full-history only. NEVER reconstruct, summarize, copy, or serialize a conversation into MCP arguments. Local Cursor, Codex, ChatGPT.app and Claude Code use automatic disk capture. Remote MCP, Windsurf, Replit and browser-only agents are resume/search-only until Pantheon supports a complete local record or official export for them. Never offer a summary, reference document, copy/paste workflow, or manual carry-over as a substitute.";
|
|
44865
|
-
var handoffToolDecides = "If pantheon_handoff is available, ALWAYS call it once with the human's space before deciding whether handoff is supported. Never infer web versus desktop from the UI: Claude Desktop can identify and render itself as claude.ai. The tool's local/remote check is authoritative. Relay only the export instructions or refusal the tool actually returns.";
|
|
44913
|
+
var handoffToolDecides = "If pantheon_handoff is available, ALWAYS make the first call with the human's space while omitting transcript, transcriptFile, and transcriptFallback. This universal auto mode lets Pantheon attempt capture only through a verified adapter for the calling client. Never infer support from the platform yourself. If the response status is transcript_required, immediately retry with the same space and attachments, transcriptFallback:true, and every real user and assistant turn visible in your current context copied verbatim and in order. Set truncated:true if older turns are no longer visible. If status is capture_first_required, retry without transcript fields first. Never report these intermediate responses, send a recap, or ask the human to export, locate, or copy anything.";
|
|
44866
44914
|
var slashCommands = [
|
|
44867
44915
|
{
|
|
44868
44916
|
name: "pantheon-handoff",
|
|
44869
44917
|
description: "Leave a Pantheon conscience for the next agent",
|
|
44870
44918
|
body: `${spaceGate}
|
|
44871
44919
|
|
|
44872
|
-
Only after you have a real space name, call pantheon_handoff even if that name is not in pantheon_list_spaces. First handoff creates the space. Do not refuse. Do not tell the human to create it first. ${handoffToolDecides}
|
|
44920
|
+
Only after you have a real space name, call pantheon_handoff even if that name is not in pantheon_list_spaces. First handoff creates the space. Do not refuse. Do not tell the human to create it first. ${handoffToolDecides} Attach every EXISTING file you generated \u2014 PDFs, letters, CVs, spreadsheets \u2014 and every file the human uploaded. Repeat them if Pantheon requests the transcript fallback. Prefer { name, path } when local desktop MCP can read it. Use { name, url } for an existing downloadable HTTPS file. Use { name, content: "<base64>", encoding: "base64" } only when neither is available. Never create, regenerate, convert, or rewrite a file merely to complete the handoff. A chat that names a .pdf without attaching it is rejected. Named code fences are stored automatically. The tool commits and pushes \u2014 do not run pantheon sync.
|
|
44873
44921
|
|
|
44874
44922
|
${autoSkillReview}
|
|
44875
44923
|
|
|
@@ -44957,7 +45005,7 @@ Grounding: the only space list is the \`pantheon_list_spaces\` tool result. Neve
|
|
|
44957
45005
|
|
|
44958
45006
|
A **space** is the short name the human chose for a conscience. For handoff, park, or remember: if they did not give one, ask: "What should this conscience be named?" Do not invent a name. If they typed a new slug for handoff, call \`pantheon_handoff\` \u2014 that creates the space. For resume with no name, call \`pantheon_resume\` anyway \u2014 it lists live spaces. Show that list and ask which one.
|
|
44959
45007
|
|
|
44960
|
-
${handoffToolDecides}
|
|
45008
|
+
${handoffToolDecides} Attach every existing generated or uploaded file \u2014 not just code fences \u2014 and repeat those attachments if Pantheon requests the transcript fallback. Prefer \`{ name, path }\` for local files, use \`{ name, url }\` for downloadable HTTPS files, and use inline base64 only as a fallback. Never create or rewrite an artifact merely for handoff. On resume, fetch only needed files with \`pantheon_get_artifact\`; use \`save_to\` to restore the actual file into a local workspace. Handoff commits and pushes; resume pulls. Do not run \`pantheon sync\` or \`pantheon handoff\` in a shell.
|
|
44961
45009
|
|
|
44962
45010
|
${autoSkillReview}
|
|
44963
45011
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pantheon-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.61",
|
|
4
4
|
"description": "Carry agent conscience between AI coding agents. Hand off a conversation in one agent, resume it in another.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"tsx": "^4.20.3",
|
|
31
31
|
"typescript": "^5",
|
|
32
32
|
"zod": "^3.25.67",
|
|
33
|
-
"@pantheon/
|
|
34
|
-
"@pantheon/
|
|
33
|
+
"@pantheon/core": "0.1.0",
|
|
34
|
+
"@pantheon/mcp": "0.1.0"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"start": "tsx src/index.ts",
|