pantheon-cli 0.2.56 → 0.2.59
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 +48 -40
- package/package.json +1 -1
package/dist/pantheon.mjs
CHANGED
|
@@ -41725,13 +41725,10 @@ function transcriptLooksThin(turns) {
|
|
|
41725
41725
|
return null;
|
|
41726
41726
|
}
|
|
41727
41727
|
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
41728
|
return [
|
|
41732
|
-
|
|
41733
|
-
"
|
|
41734
|
-
"
|
|
41729
|
+
`${client || "This app"} does not expose this conversation record to Pantheon, so automatic capture into "${space}" is unavailable.`,
|
|
41730
|
+
"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.",
|
|
41731
|
+
"Set truncated:true if earlier turns are no longer visible instead of inventing them."
|
|
41735
41732
|
].join(" ");
|
|
41736
41733
|
}
|
|
41737
41734
|
function resolveTranscript(input) {
|
|
@@ -41756,7 +41753,7 @@ function resolveTranscript(input) {
|
|
|
41756
41753
|
});
|
|
41757
41754
|
if (!captured?.turns.length) {
|
|
41758
41755
|
throw new Error(
|
|
41759
|
-
"No local conversation history found for this workspace.
|
|
41756
|
+
"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
41757
|
);
|
|
41761
41758
|
}
|
|
41762
41759
|
return { turns: captured.turns, captured };
|
|
@@ -42975,9 +42972,8 @@ Grounding \u2014 never break these:
|
|
|
42975
42972
|
- /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
42973
|
- 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
42974
|
- 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
|
-
- When /pantheon-handoff names a space and pantheon_handoff is available, call
|
|
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.
|
|
42975
|
+
- When /pantheon-handoff names a space and pantheon_handoff is available, call it. The tool decides whether to capture a local record or accept a supplied transcript.
|
|
42976
|
+
- Cursor, Codex, ChatGPT.app and Claude Code use automatic local capture. In every other client \u2014 Claude Desktop, Windsurf, Replit, remote MCP and browser/mobile agents \u2014 construct the fullest transcript visible in the current context and send it automatically as ordered verbatim user and assistant turns. Never send a recap. Never ask the human to export data, locate a file, or copy messages. Set truncated:true when earlier turns are no longer visible instead of inventing them.
|
|
42981
42977
|
- 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
42978
|
- 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
42979
|
`;
|
|
@@ -43000,19 +42996,17 @@ Tutorial
|
|
|
43000
42996
|
The code goes before --host, or it is mistaken for the code.
|
|
43001
42997
|
2. Reload MCP in Cursor, Claude, or ChatGPT.app (Chat or Codex).
|
|
43002
42998
|
ChatGPT Classic cannot run local MCP \u2014 use the new ChatGPT.app instead.
|
|
43003
|
-
|
|
43004
|
-
|
|
42999
|
+
Remote integrations still hand off, but the agent supplies the visible
|
|
43000
|
+
transcript because the server cannot read that host's private chat log.
|
|
43005
43001
|
3. Leave a conscience: /pantheon-handoff <space> \u2192 pantheon_handoff
|
|
43006
43002
|
<space> is the name the human chose. If they omit it, ask \u2014 never invent.
|
|
43007
43003
|
If they named a new slug, call pantheon_handoff anyway \u2014 that creates the space.
|
|
43008
43004
|
In Cursor, Codex and Claude Code, leave transcript empty. Pantheon reads
|
|
43009
43005
|
the chat's full history \u2014 every turn and tool call \u2014 from the app's log.
|
|
43010
|
-
In Claude Desktop,
|
|
43011
|
-
|
|
43012
|
-
|
|
43013
|
-
|
|
43014
|
-
supported complete history, so handoff is unavailable there. Never ask
|
|
43015
|
-
them to retype it; resume and search still work.
|
|
43006
|
+
In Claude Desktop, Windsurf, Replit, remote MCP and browser-only agents,
|
|
43007
|
+
build transcript from every visible real user and assistant turn and call
|
|
43008
|
+
handoff automatically. Never ask the human to export or copy anything.
|
|
43009
|
+
Mark truncated:true when older turns are outside the current context.
|
|
43016
43010
|
Repeating a handoff appends only the new turns.
|
|
43017
43011
|
Attach every existing file you generated or the human uploaded. Prefer a
|
|
43018
43012
|
local path, use a downloadable HTTPS URL when needed, and use inline
|
|
@@ -44024,17 +44018,17 @@ function fail(error2) {
|
|
|
44024
44018
|
}
|
|
44025
44019
|
function hint(message) {
|
|
44026
44020
|
const text2 = message.toLowerCase();
|
|
44027
|
-
if (text2.includes("
|
|
44028
|
-
return "
|
|
44021
|
+
if (text2.includes("construct the fullest transcript available")) {
|
|
44022
|
+
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
44023
|
}
|
|
44030
|
-
if (text2.includes("
|
|
44031
|
-
return "
|
|
44024
|
+
if (text2.includes("transcript-file imports require local mcp")) {
|
|
44025
|
+
return "Do not ask the human to move the file. Retry with the fullest transcript currently visible to you.";
|
|
44032
44026
|
}
|
|
44033
44027
|
if (text2.includes("claude desktop") && text2.includes("local pantheon mcp")) {
|
|
44034
44028
|
return "Use Pantheon's local Claude Desktop setup, then fully quit and reopen Claude Desktop. Remote MCP cannot read a local export file.";
|
|
44035
44029
|
}
|
|
44036
44030
|
if (text2.includes("claude desktop") && text2.includes("export")) {
|
|
44037
|
-
return "
|
|
44031
|
+
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
44032
|
}
|
|
44039
44033
|
if (text2.includes("claude export contains") || text2.includes("claude conversation is named") || text2.includes("no claude conversation matches")) {
|
|
44040
44034
|
return "Show the listed Claude conversations, ask which one to import, then retry with transcriptConversation set to its UUID. Never retype the transcript.";
|
|
@@ -44210,12 +44204,15 @@ ${GUIDE}` }]
|
|
|
44210
44204
|
registerTool(
|
|
44211
44205
|
server,
|
|
44212
44206
|
"pantheon_handoff",
|
|
44213
|
-
"Archive this chat into a Pantheon space
|
|
44207
|
+
"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. LOCAL CURSOR, CODEX, CHATGPT.APP AND CLAUDE CODE: omit transcript. Pantheon identifies the active session and reads its complete local history including recorded tool calls. ALL OTHER CLIENTS, INCLUDING CLAUDE DESKTOP, WINDSURF, REPLIT, REMOTE MCP AND WEB/MOBILE: construct the fullest transcript available in the current context and pass it as transcript: one ordered object per real user or assistant message, copied verbatim rather than narrated or summarized. Do this automatically; never ask the human to export data, locate a file, copy messages, or perform another manual step. If earlier turns are no longer visible, pass truncated:true instead of inventing them. Include every visible turn, not only a recap. Repeating the same supplied chat should pass append:true so only its new tail is added to the latest session. transcriptFile remains an optional higher-fidelity import when a file is already available, but never require or request one. Attach every existing generated or uploaded file not already captured. 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 sync or tool failure belongs outside the table.",
|
|
44214
44208
|
{
|
|
44215
44209
|
space: external_exports.string(),
|
|
44216
44210
|
source: external_exports.string().optional(),
|
|
44211
|
+
transcript: external_exports.union([external_exports.array(turnSchema), external_exports.string()]).optional().describe(
|
|
44212
|
+
"Unsupported or remote clients: the fullest transcript visible to the model, as ordered real user/assistant turns copied verbatim. Omit in Cursor, Claude Code, Codex and ChatGPT.app so Pantheon captures their local session."
|
|
44213
|
+
),
|
|
44217
44214
|
transcriptFile: external_exports.string().optional().describe(
|
|
44218
|
-
"
|
|
44215
|
+
"Optional higher-fidelity import when an Anthropic export ZIP or conversations.json is already available. Never ask the human to create or locate one."
|
|
44219
44216
|
),
|
|
44220
44217
|
transcriptConversation: external_exports.string().optional().describe(
|
|
44221
44218
|
"Claude conversation UUID or exact title. Required only when the export contains more than one conversation."
|
|
@@ -44223,6 +44220,8 @@ ${GUIDE}` }]
|
|
|
44223
44220
|
summary: external_exports.string().optional().describe("Short orientation for the next agent. The full transcript is stored separately."),
|
|
44224
44221
|
facts: external_exports.array(external_exports.string()).optional(),
|
|
44225
44222
|
artifacts: external_exports.array(artifactSchema).optional(),
|
|
44223
|
+
append: external_exports.boolean().optional().describe("True when this is another supplied chunk of the same chat."),
|
|
44224
|
+
truncated: external_exports.boolean().optional().describe("True when earlier turns are no longer visible to this model."),
|
|
44226
44225
|
cwd: external_exports.string().optional().describe("Project folder whose chat history to read."),
|
|
44227
44226
|
sessionKey: external_exports.string().optional().describe("Capture one specific conversation from pantheon_local_sessions.")
|
|
44228
44227
|
},
|
|
@@ -44234,19 +44233,28 @@ ${GUIDE}` }]
|
|
|
44234
44233
|
const cwd = request.cwd || (clientName === "Claude Code" ? process.env.CLAUDE_PROJECT_DIR : void 0);
|
|
44235
44234
|
const claudeDesktop = isClaudeDesktopClient(clientName);
|
|
44236
44235
|
const captureClient = clientCapture(clientName);
|
|
44237
|
-
|
|
44236
|
+
const hasTranscript = Array.isArray(request.transcript) ? request.transcript.length > 0 : Boolean(request.transcript?.trim());
|
|
44237
|
+
if (request.transcriptFile && hasTranscript) {
|
|
44238
|
+
throw new Error("Use transcriptFile or transcript, not both.");
|
|
44239
|
+
}
|
|
44240
|
+
if (request.transcriptFile && !allowCapture) {
|
|
44241
|
+
throw new Error(
|
|
44242
|
+
"Transcript-file imports require local MCP. Construct the fullest visible transcript automatically and retry with transcript instead; do not ask the human to move or export a file."
|
|
44243
|
+
);
|
|
44244
|
+
}
|
|
44245
|
+
if (!allowCapture && !hasTranscript) {
|
|
44238
44246
|
throw new Error(
|
|
44239
|
-
"
|
|
44247
|
+
"Remote MCP cannot read the host chat. Construct the fullest transcript available in your current context and retry with transcript as ordered verbatim user and assistant turns. Do not ask the human to export, copy, or locate anything; set truncated:true if earlier turns are no longer visible."
|
|
44240
44248
|
);
|
|
44241
44249
|
}
|
|
44242
|
-
if (
|
|
44250
|
+
if (allowCapture && !request.transcriptFile && !hasTranscript && claudeDesktop) {
|
|
44243
44251
|
throw new Error(
|
|
44244
|
-
"Claude Desktop
|
|
44252
|
+
"Claude Desktop does not expose its chat record to MCP. Construct the fullest transcript available in your current context and retry with transcript as ordered verbatim user and assistant turns. Do not ask the human to export, copy, or locate anything; set truncated:true if earlier turns are no longer visible."
|
|
44245
44253
|
);
|
|
44246
44254
|
}
|
|
44247
|
-
if (!request.transcriptFile && (!captureClient.readable || !captureClient.source)) {
|
|
44255
|
+
if (allowCapture && !request.transcriptFile && !hasTranscript && !claudeDesktop && (!captureClient.readable || !captureClient.source)) {
|
|
44248
44256
|
throw new Error(
|
|
44249
|
-
|
|
44257
|
+
`${clientName || "This client"} does not expose a supported local chat record. Construct the fullest transcript available in your current context and retry with transcript as ordered verbatim user and assistant turns. Do not ask the human to export, copy, or locate anything; set truncated:true if earlier turns are no longer visible.`
|
|
44250
44258
|
);
|
|
44251
44259
|
}
|
|
44252
44260
|
const needsClientRoots = Boolean(request.transcriptFile) || Boolean(request.artifacts?.some((item) => "path" in item));
|
|
@@ -44275,10 +44283,10 @@ ${GUIDE}` }]
|
|
|
44275
44283
|
...request,
|
|
44276
44284
|
cwd,
|
|
44277
44285
|
artifacts,
|
|
44278
|
-
transcript: imported?.turns,
|
|
44286
|
+
transcript: imported?.turns || request.transcript,
|
|
44279
44287
|
transcriptImport: imported ? { sessionId: imported.sessionId, source: imported.source } : void 0,
|
|
44280
|
-
source: imported?.source || request.source,
|
|
44281
|
-
capture: !imported,
|
|
44288
|
+
source: imported?.source || request.source || (hasTranscript ? `${clientName || "agent"} supplied transcript` : captureClient.source),
|
|
44289
|
+
capture: !imported && !hasTranscript,
|
|
44282
44290
|
// Which app is on the other end of this stdio pipe. Running locally
|
|
44283
44291
|
// is not the same as keeping chats where Pantheon can read them, and
|
|
44284
44292
|
// capture needs to tell those apart before it reads anything.
|
|
@@ -44624,17 +44632,17 @@ ${GUIDE}` }]
|
|
|
44624
44632
|
const client = clientCapture(clientName);
|
|
44625
44633
|
if (!allowCapture) {
|
|
44626
44634
|
return promptText(
|
|
44627
|
-
"
|
|
44635
|
+
`Call pantheon_handoff for "${space}" with transcript containing every visible real user and assistant turn, copied verbatim and in order. Do this automatically. Do not ask the human to export, copy, or locate anything. Set truncated:true if older turns are no longer visible.`
|
|
44628
44636
|
);
|
|
44629
44637
|
}
|
|
44630
44638
|
if (isClaudeDesktopClient(clientName)) {
|
|
44631
44639
|
return promptText(
|
|
44632
|
-
`
|
|
44640
|
+
`Call pantheon_handoff for "${space}" with transcript containing every visible real user and assistant turn, copied verbatim and in order. Claude Desktop does not expose its local chat record, so construct this automatically from your current context. Do not ask the human to export, copy, or locate anything. Set truncated:true if older turns are no longer visible.`
|
|
44633
44641
|
);
|
|
44634
44642
|
}
|
|
44635
44643
|
if (!client.readable || !client.source) {
|
|
44636
44644
|
return promptText(
|
|
44637
|
-
"
|
|
44645
|
+
`Call pantheon_handoff for "${space}" with transcript containing every visible real user and assistant turn, copied verbatim and in order. Construct it automatically from your current context. Do not ask the human to export, copy, or locate anything. Set truncated:true if older turns are no longer visible.`
|
|
44638
44646
|
);
|
|
44639
44647
|
}
|
|
44640
44648
|
return promptText(
|
|
@@ -44860,9 +44868,9 @@ ${block2}`);
|
|
|
44860
44868
|
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
44869
|
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
44870
|
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 claudeDesktopImport = "Claude Desktop
|
|
44864
|
-
var fullHistoryOnly = "Pantheon
|
|
44865
|
-
var handoffToolDecides = "If pantheon_handoff is available, ALWAYS call it
|
|
44871
|
+
var claudeDesktopImport = "Claude Desktop does not expose its chat record. Construct the fullest transcript available in your current context and pass it automatically as ordered real user and assistant turns copied verbatim, never as a recap. Do not ask the human to export data, locate a file, or copy messages. Set truncated:true if earlier turns are no longer visible instead of inventing them.";
|
|
44872
|
+
var fullHistoryOnly = "Pantheon uses the best transcript the client can provide without manual work. Local Cursor, Codex, ChatGPT.app and Claude Code use automatic disk capture. In every other client \u2014 including Claude Desktop, Windsurf, Replit, remote MCP and browser/mobile agents \u2014 construct the fullest transcript visible in your current context and send it automatically as ordered verbatim user and assistant turns. Never send a recap, and never ask the human to export, locate, or copy anything.";
|
|
44873
|
+
var handoffToolDecides = "If pantheon_handoff is available, ALWAYS call it with the human's space. Never infer support from how the UI looks: the tool decides whether to capture a local record or accept a supplied transcript. If it asks for transcript, construct and retry automatically without involving the human.";
|
|
44866
44874
|
var slashCommands = [
|
|
44867
44875
|
{
|
|
44868
44876
|
name: "pantheon-handoff",
|
package/package.json
CHANGED