@paperclipai/hermes-paperclip-adapter 0.3.0

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.
Files changed (63) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +228 -0
  3. package/dist/cli/format-event.d.ts +14 -0
  4. package/dist/cli/format-event.d.ts.map +1 -0
  5. package/dist/cli/format-event.js +52 -0
  6. package/dist/cli/format-event.js.map +1 -0
  7. package/dist/cli/index.d.ts +5 -0
  8. package/dist/cli/index.d.ts.map +1 -0
  9. package/dist/cli/index.js +5 -0
  10. package/dist/cli/index.js.map +1 -0
  11. package/dist/index.d.ts +33 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +102 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/index.test.d.ts +2 -0
  16. package/dist/index.test.d.ts.map +1 -0
  17. package/dist/index.test.js +14 -0
  18. package/dist/index.test.js.map +1 -0
  19. package/dist/server/command-resolution.test.d.ts +2 -0
  20. package/dist/server/command-resolution.test.d.ts.map +1 -0
  21. package/dist/server/command-resolution.test.js +37 -0
  22. package/dist/server/command-resolution.test.js.map +1 -0
  23. package/dist/server/detect-model.d.ts +77 -0
  24. package/dist/server/detect-model.d.ts.map +1 -0
  25. package/dist/server/detect-model.js +158 -0
  26. package/dist/server/detect-model.js.map +1 -0
  27. package/dist/server/detect-model.test.d.ts +2 -0
  28. package/dist/server/detect-model.test.d.ts.map +1 -0
  29. package/dist/server/detect-model.test.js +166 -0
  30. package/dist/server/detect-model.test.js.map +1 -0
  31. package/dist/server/execute.d.ts +23 -0
  32. package/dist/server/execute.d.ts.map +1 -0
  33. package/dist/server/execute.js +482 -0
  34. package/dist/server/execute.js.map +1 -0
  35. package/dist/server/index.d.ts +16 -0
  36. package/dist/server/index.d.ts.map +1 -0
  37. package/dist/server/index.js +43 -0
  38. package/dist/server/index.js.map +1 -0
  39. package/dist/server/skills.d.ts +8 -0
  40. package/dist/server/skills.d.ts.map +1 -0
  41. package/dist/server/skills.js +177 -0
  42. package/dist/server/skills.js.map +1 -0
  43. package/dist/server/test.d.ts +9 -0
  44. package/dist/server/test.d.ts.map +1 -0
  45. package/dist/server/test.js +341 -0
  46. package/dist/server/test.js.map +1 -0
  47. package/dist/shared/constants.d.ts +47 -0
  48. package/dist/shared/constants.d.ts.map +1 -0
  49. package/dist/shared/constants.js +91 -0
  50. package/dist/shared/constants.js.map +1 -0
  51. package/dist/ui/build-config.d.ts +17 -0
  52. package/dist/ui/build-config.d.ts.map +1 -0
  53. package/dist/ui/build-config.js +69 -0
  54. package/dist/ui/build-config.js.map +1 -0
  55. package/dist/ui/index.d.ts +7 -0
  56. package/dist/ui/index.d.ts.map +1 -0
  57. package/dist/ui/index.js +7 -0
  58. package/dist/ui/index.js.map +1 -0
  59. package/dist/ui/parse-stdout.d.ts +25 -0
  60. package/dist/ui/parse-stdout.d.ts.map +1 -0
  61. package/dist/ui/parse-stdout.js +237 -0
  62. package/dist/ui/parse-stdout.js.map +1 -0
  63. package/package.json +80 -0
@@ -0,0 +1,91 @@
1
+ /**
2
+ * Shared constants for the Hermes Agent adapter.
3
+ */
4
+ /** Adapter type identifier registered with Paperclip. */
5
+ export const ADAPTER_TYPE = "hermes_local";
6
+ /** Human-readable label shown in the Paperclip UI. */
7
+ export const ADAPTER_LABEL = "Hermes Agent";
8
+ /** Default CLI binary name. */
9
+ export const HERMES_CLI = "hermes";
10
+ /** Default timeout for a single execution run (seconds). */
11
+ export const DEFAULT_TIMEOUT_SEC = 1800;
12
+ /** Grace period after SIGTERM before SIGKILL (seconds). */
13
+ export const DEFAULT_GRACE_SEC = 10;
14
+ /**
15
+ * Default model to use if none specified.
16
+ *
17
+ * Use "auto" so that Hermes resolves the model from the user's local
18
+ * ~/.hermes/config.yaml — preventing the adapter from overriding a
19
+ * user's configured default (e.g. MiniMax, OpenRouter, etc.) with a
20
+ * hardcoded Anthropic model during Paperclip onboarding.
21
+ */
22
+ export const DEFAULT_MODEL = "auto";
23
+ /**
24
+ * Valid --provider choices for the hermes CLI.
25
+ * Must stay in sync with `hermes chat --help`.
26
+ */
27
+ export const VALID_PROVIDERS = [
28
+ "auto",
29
+ "openrouter",
30
+ "nous",
31
+ "openai-codex",
32
+ "copilot",
33
+ "copilot-acp",
34
+ "anthropic",
35
+ "huggingface",
36
+ "zai",
37
+ "kimi-coding",
38
+ "minimax",
39
+ "minimax-cn",
40
+ "kilocode",
41
+ ];
42
+ /**
43
+ * Model-name prefix → provider hint mapping.
44
+ * Used when no explicit provider is configured and we need to infer
45
+ * the correct provider from the model string alone.
46
+ *
47
+ * Keys are lowercased prefix patterns; values must be valid provider names.
48
+ * Longer prefixes are matched first (order matters).
49
+ */
50
+ export const MODEL_PREFIX_PROVIDER_HINTS = [
51
+ // OpenAI-native models
52
+ ["gpt-4", "openai-codex"],
53
+ ["gpt-5", "copilot"],
54
+ ["o1-", "openai-codex"],
55
+ ["o3-", "openai-codex"],
56
+ ["o4-", "openai-codex"],
57
+ // Anthropic models
58
+ ["claude", "anthropic"],
59
+ // Google models (via openrouter or direct)
60
+ ["gemini", "auto"],
61
+ // Nous models
62
+ ["hermes-", "nous"],
63
+ // Z.AI / GLM models
64
+ ["glm-", "zai"],
65
+ // Kimi / Moonshot
66
+ ["moonshot", "kimi-coding"],
67
+ ["kimi", "kimi-coding"],
68
+ // MiniMax
69
+ ["minimax", "minimax"],
70
+ // DeepSeek
71
+ ["deepseek", "auto"],
72
+ // Meta Llama
73
+ ["llama", "auto"],
74
+ // Qwen
75
+ ["qwen", "auto"],
76
+ // Mistral
77
+ ["mistral", "auto"],
78
+ // HuggingFace models (org/model format)
79
+ ["huggingface/", "huggingface"],
80
+ ];
81
+ /** Regex to extract session ID from Hermes CLI output. */
82
+ export const SESSION_ID_REGEX = /session[_ ](?:id|saved)[:\s]+([a-zA-Z0-9_-]+)/i;
83
+ /** Regex to extract token usage from Hermes output. */
84
+ export const TOKEN_USAGE_REGEX = /tokens?[:\s]+(\d+)\s*(?:input|in)\b.*?(\d+)\s*(?:output|out)\b/i;
85
+ /** Regex to extract cost from Hermes output. */
86
+ export const COST_REGEX = /(?:cost|spent)[:\s]*\$?([\d.]+)/i;
87
+ /** Prefix used by Hermes for tool output lines. */
88
+ export const TOOL_OUTPUT_PREFIX = "┊";
89
+ /** Prefix for Hermes thinking blocks. */
90
+ export const THINKING_PREFIX = "💭";
91
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/shared/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,yDAAyD;AACzD,MAAM,CAAC,MAAM,YAAY,GAAG,cAAc,CAAC;AAE3C,sDAAsD;AACtD,MAAM,CAAC,MAAM,aAAa,GAAG,cAAc,CAAC;AAE5C,+BAA+B;AAC/B,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC;AAEnC,4DAA4D;AAC5D,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC;AAExC,2DAA2D;AAC3D,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAEpC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC;AAEpC;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,MAAM;IACN,YAAY;IACZ,MAAM;IACN,cAAc;IACd,SAAS;IACT,aAAa;IACb,WAAW;IACX,aAAa;IACb,KAAK;IACL,aAAa;IACb,SAAS;IACT,YAAY;IACZ,UAAU;CACF,CAAC;AAEX;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAuB;IAC7D,uBAAuB;IACvB,CAAC,OAAO,EAAE,cAAc,CAAC;IACzB,CAAC,OAAO,EAAE,SAAS,CAAC;IACpB,CAAC,KAAK,EAAE,cAAc,CAAC;IACvB,CAAC,KAAK,EAAE,cAAc,CAAC;IACvB,CAAC,KAAK,EAAE,cAAc,CAAC;IACvB,mBAAmB;IACnB,CAAC,QAAQ,EAAE,WAAW,CAAC;IACvB,2CAA2C;IAC3C,CAAC,QAAQ,EAAE,MAAM,CAAC;IAClB,cAAc;IACd,CAAC,SAAS,EAAE,MAAM,CAAC;IACnB,oBAAoB;IACpB,CAAC,MAAM,EAAE,KAAK,CAAC;IACf,kBAAkB;IAClB,CAAC,UAAU,EAAE,aAAa,CAAC;IAC3B,CAAC,MAAM,EAAE,aAAa,CAAC;IACvB,UAAU;IACV,CAAC,SAAS,EAAE,SAAS,CAAC;IACtB,WAAW;IACX,CAAC,UAAU,EAAE,MAAM,CAAC;IACpB,aAAa;IACb,CAAC,OAAO,EAAE,MAAM,CAAC;IACjB,OAAO;IACP,CAAC,MAAM,EAAE,MAAM,CAAC;IAChB,UAAU;IACV,CAAC,SAAS,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,CAAC,cAAc,EAAE,aAAa,CAAC;CAChC,CAAC;AAEF,0DAA0D;AAC1D,MAAM,CAAC,MAAM,gBAAgB,GAAG,gDAAgD,CAAC;AAEjF,uDAAuD;AACvD,MAAM,CAAC,MAAM,iBAAiB,GAC5B,iEAAiE,CAAC;AAEpE,gDAAgD;AAChD,MAAM,CAAC,MAAM,UAAU,GAAG,kCAAkC,CAAC;AAE7D,mDAAmD;AACnD,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAEtC,yCAAyC;AACzC,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Build adapter configuration from UI form values.
3
+ *
4
+ * Translates Paperclip's CreateConfigValues into the adapterConfig
5
+ * object stored in the agent record.
6
+ *
7
+ * NOTE: Provider resolution happens at runtime in execute.ts, not here.
8
+ * The UI may or may not pass a provider field. If it does, we persist it
9
+ * as the user's explicit override. If not, execute.ts will detect it from
10
+ * ~/.hermes/config.yaml at runtime.
11
+ */
12
+ import type { CreateConfigValues } from "@paperclipai/adapter-utils";
13
+ /**
14
+ * Build a Hermes Agent adapter config from the Paperclip UI form values.
15
+ */
16
+ export declare function buildHermesConfig(v: CreateConfigValues): Record<string, unknown>;
17
+ //# sourceMappingURL=build-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-config.d.ts","sourceRoot":"","sources":["../../src/ui/build-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAMrE;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,CAAC,EAAE,kBAAkB,GACpB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA+DzB"}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Build adapter configuration from UI form values.
3
+ *
4
+ * Translates Paperclip's CreateConfigValues into the adapterConfig
5
+ * object stored in the agent record.
6
+ *
7
+ * NOTE: Provider resolution happens at runtime in execute.ts, not here.
8
+ * The UI may or may not pass a provider field. If it does, we persist it
9
+ * as the user's explicit override. If not, execute.ts will detect it from
10
+ * ~/.hermes/config.yaml at runtime.
11
+ */
12
+ import { DEFAULT_TIMEOUT_SEC, } from "../shared/constants.js";
13
+ /**
14
+ * Build a Hermes Agent adapter config from the Paperclip UI form values.
15
+ */
16
+ export function buildHermesConfig(v) {
17
+ const ac = {};
18
+ // Model
19
+ if (v.model.trim()) {
20
+ ac.model = v.model.trim();
21
+ }
22
+ // NOTE: Provider is NOT set here because the Paperclip UI form
23
+ // (CreateConfigValues) does not expose a provider field.
24
+ // Instead, provider is resolved at runtime in execute.ts using
25
+ // a priority chain:
26
+ // 1. adapterConfig.provider (if set via API directly)
27
+ // 2. ~/.hermes/config.yaml detection
28
+ // 3. Model-name prefix inference
29
+ // 4. "auto" fallback
30
+ // This ensures correct provider routing even for agents created
31
+ // before provider tracking existed.
32
+ // Execution limits — let the user configure these from the Paperclip UI.
33
+ // timeoutSec: wall-clock kill timeout for the hermes child process.
34
+ // maxTurnsPerRun: maps to Hermes's --max-turns (agent tool-calling iterations).
35
+ ac.timeoutSec = DEFAULT_TIMEOUT_SEC;
36
+ if (v.maxTurnsPerRun > 0) {
37
+ ac.maxTurnsPerRun = v.maxTurnsPerRun;
38
+ // Scale timeout to match: ~20s per tool turn is generous headroom.
39
+ // Never go below the default (1800s / 30 min).
40
+ ac.timeoutSec = Math.max(DEFAULT_TIMEOUT_SEC, v.maxTurnsPerRun * 20);
41
+ }
42
+ // Session persistence (default: on)
43
+ ac.persistSession = true;
44
+ // Working directory
45
+ if (v.cwd) {
46
+ ac.cwd = v.cwd;
47
+ }
48
+ // Custom hermes binary path
49
+ if (v.command) {
50
+ ac.hermesCommand = v.command;
51
+ }
52
+ // Extra CLI arguments
53
+ if (v.extraArgs) {
54
+ ac.extraArgs = v.extraArgs.split(/\s+/).filter(Boolean);
55
+ }
56
+ // Thinking/reasoning effort
57
+ if (v.thinkingEffort) {
58
+ const existing = ac.extraArgs || [];
59
+ existing.push("--reasoning-effort", String(v.thinkingEffort));
60
+ ac.extraArgs = existing;
61
+ }
62
+ // Prompt template
63
+ if (v.promptTemplate) {
64
+ ac.promptTemplate = v.promptTemplate;
65
+ }
66
+ // Heartbeat config is handled by Paperclip itself
67
+ return ac;
68
+ }
69
+ //# sourceMappingURL=build-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-config.js","sourceRoot":"","sources":["../../src/ui/build-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EACL,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAEhC;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAC/B,CAAqB;IAErB,MAAM,EAAE,GAA4B,EAAE,CAAC;IAEvC,QAAQ;IACR,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;QACnB,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;IAC5B,CAAC;IAED,+DAA+D;IAC/D,yDAAyD;IACzD,+DAA+D;IAC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C,CAAC,cAAc,EAAE,CAAC;QACrB,EAAE,CAAC,cAAc,GAAG,CAAC,CAAC,cAAc,CAAC;IACvC,CAAC;IAED,kDAAkD;IAElD,OAAO,EAAE,CAAC;AACZ,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * UI module exports — used by Paperclip's dashboard for run viewing
3
+ * and agent configuration forms.
4
+ */
5
+ export { parseHermesStdoutLine } from "./parse-stdout.js";
6
+ export { buildHermesConfig } from "./build-config.js";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * UI module exports — used by Paperclip's dashboard for run viewing
3
+ * and agent configuration forms.
4
+ */
5
+ export { parseHermesStdoutLine } from "./parse-stdout.js";
6
+ export { buildHermesConfig } from "./build-config.js";
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Parse Hermes Agent stdout into TranscriptEntry objects for the Paperclip UI.
3
+ *
4
+ * Hermes CLI quiet-mode output patterns:
5
+ * Assistant: " ┊ 💬 {text}"
6
+ * Tool (TTY): " ┊ {emoji} {verb:9} {detail} {duration}"
7
+ * Tool (pipe): " [done] ┊ {emoji} {verb:9} {detail} {duration} ({total})"
8
+ * System: "[hermes] ..."
9
+ *
10
+ * We emit structured tool_call/tool_result pairs so Paperclip renders proper
11
+ * tool cards (with status icons, expand/collapse) instead of raw stdout blocks.
12
+ */
13
+ import type { TranscriptEntry } from "@paperclipai/adapter-utils";
14
+ /**
15
+ * Parse a single line of Hermes stdout into transcript entries.
16
+ *
17
+ * Emits structured tool_call/tool_result pairs (with synthetic IDs) so
18
+ * Paperclip renders proper tool cards with status icons and expand/collapse.
19
+ *
20
+ * @param line Raw stdout line from Hermes CLI
21
+ * @param ts ISO timestamp for the entry
22
+ * @returns Array of TranscriptEntry objects (may be empty)
23
+ */
24
+ export declare function parseHermesStdoutLine(line: string, ts: string): TranscriptEntry[];
25
+ //# sourceMappingURL=parse-stdout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-stdout.d.ts","sourceRoot":"","sources":["../../src/ui/parse-stdout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AA8JlE;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,GACT,eAAe,EAAE,CAiGnB"}
@@ -0,0 +1,237 @@
1
+ /**
2
+ * Parse Hermes Agent stdout into TranscriptEntry objects for the Paperclip UI.
3
+ *
4
+ * Hermes CLI quiet-mode output patterns:
5
+ * Assistant: " ┊ 💬 {text}"
6
+ * Tool (TTY): " ┊ {emoji} {verb:9} {detail} {duration}"
7
+ * Tool (pipe): " [done] ┊ {emoji} {verb:9} {detail} {duration} ({total})"
8
+ * System: "[hermes] ..."
9
+ *
10
+ * We emit structured tool_call/tool_result pairs so Paperclip renders proper
11
+ * tool cards (with status icons, expand/collapse) instead of raw stdout blocks.
12
+ */
13
+ import { TOOL_OUTPUT_PREFIX } from "../shared/constants.js";
14
+ // ── Kaomoji / noise stripping ──────────────────────────────────────────────
15
+ /**
16
+ * Strip kawaii faces and decorative emoji from a tool summary line.
17
+ * Leaves meaningful emoji (💻 for terminal, 🔍 for search, etc.) intact
18
+ * by only stripping parenthesized kaomoji like (。◕‿◕。).
19
+ */
20
+ function stripKaomoji(text) {
21
+ // Strip parenthesized kaomoji faces: (。◕‿◕。), (★ω★), etc.
22
+ return text.replace(/[(][^()]{2,20}[)]\s*/gu, "").trim();
23
+ }
24
+ // ── Line classification ────────────────────────────────────────────────────
25
+ /** Check if a ┊ line is an assistant message (┊ 💬 ...). */
26
+ function isAssistantToolLine(stripped) {
27
+ return /^┊\s*💬/.test(stripped);
28
+ }
29
+ /** Extract assistant text from a ┊ 💬 line. */
30
+ function extractAssistantText(line) {
31
+ return line.replace(/^[\s┊]*💬\s*/, "").trim();
32
+ }
33
+ /**
34
+ * Parse a tool completion line into structured data.
35
+ *
36
+ * Handles both TTY and pipe formats:
37
+ * TTY: ┊ 💻 $ curl -s "..." 0.1s
38
+ * Pipe: [done] ┊ 💻 $ curl -s "..." 0.1s (0.5s)
39
+ */
40
+ function parseToolCompletionLine(line) {
41
+ // Strip leading whitespace and [done] prefix
42
+ let cleaned = line.trim().replace(/^\[done\]\s*/, "");
43
+ // Must start with ┊
44
+ if (!cleaned.startsWith(TOOL_OUTPUT_PREFIX))
45
+ return null;
46
+ // Remove ┊ prefix and any leading kaomoji face
47
+ cleaned = cleaned.slice(TOOL_OUTPUT_PREFIX.length);
48
+ cleaned = stripKaomoji(cleaned).trim();
49
+ // Now format is: "{emoji} {verb:9} {detail} {duration}" or "{emoji} {verb:9} {detail} {duration} ({total})"
50
+ // Example: "💻 $ curl -s ..." or "🔍 search pattern 0.1s"
51
+ // The verb+detail are separated by whitespace, duration is at the end
52
+ // Match: emoji + verb + detail + duration
53
+ // Duration pattern: N.Ns (possibly followed by (N.Ns))
54
+ const durationMatch = cleaned.match(/([\d.]+s)\s*(?:\([\d.]+s\))?\s*$/);
55
+ const duration = durationMatch ? durationMatch[1] : "";
56
+ // Remove duration from the end to get verb + detail
57
+ let verbAndDetail = durationMatch
58
+ ? cleaned.slice(0, cleaned.lastIndexOf(durationMatch[0])).trim()
59
+ : cleaned;
60
+ // Check for error suffixes
61
+ const hasError = /\[(?:exit \d+|error|full)\]/.test(verbAndDetail) ||
62
+ /\[error\]\s*$/.test(cleaned);
63
+ // The first token (after emoji) is the verb, rest is detail
64
+ // Verbs are always a single word or symbol ($ for terminal)
65
+ const parts = verbAndDetail.match(/^(\S+)\s+(.*)/);
66
+ if (!parts) {
67
+ return { name: "tool", detail: verbAndDetail, duration, hasError };
68
+ }
69
+ const verb = parts[1];
70
+ const detail = parts[2].trim();
71
+ // Map Hermes verbs to readable tool names
72
+ const nameMap = {
73
+ "$": "shell",
74
+ "exec": "shell",
75
+ "terminal": "shell",
76
+ "search": "search",
77
+ "fetch": "fetch",
78
+ "crawl": "crawl",
79
+ "navigate": "browser",
80
+ "snapshot": "browser",
81
+ "click": "browser",
82
+ "type": "browser",
83
+ "scroll": "browser",
84
+ "back": "browser",
85
+ "press": "browser",
86
+ "close": "browser",
87
+ "images": "browser",
88
+ "vision": "browser",
89
+ "read": "read",
90
+ "write": "write",
91
+ "patch": "patch",
92
+ "grep": "search",
93
+ "find": "search",
94
+ "plan": "plan",
95
+ "recall": "recall",
96
+ "proc": "process",
97
+ "delegate": "delegate",
98
+ "todo": "todo",
99
+ "memory": "memory",
100
+ "clarify": "clarify",
101
+ "session_search": "recall",
102
+ "code": "execute",
103
+ "execute": "execute",
104
+ "web_search": "search",
105
+ "web_extract": "fetch",
106
+ "browser_navigate": "browser",
107
+ "browser_click": "browser",
108
+ "browser_type": "browser",
109
+ "browser_snapshot": "browser",
110
+ "browser_vision": "browser",
111
+ "browser_scroll": "browser",
112
+ "browser_press": "browser",
113
+ "browser_back": "browser",
114
+ "browser_close": "browser",
115
+ "browser_get_images": "browser",
116
+ "read_file": "read",
117
+ "write_file": "write_file",
118
+ "search_files": "search",
119
+ "patch_file": "patch",
120
+ "execute_code": "execute",
121
+ };
122
+ const name = nameMap[verb.toLowerCase()] || verb;
123
+ return { name, detail, duration, hasError };
124
+ }
125
+ // ── Synthetic tool ID generation ────────────────────────────────────────────
126
+ let toolCallCounter = 0;
127
+ /**
128
+ * Generate a synthetic toolUseId for pairing tool_call with tool_result.
129
+ * Paperclip uses this to match them in normalizeTranscript.
130
+ */
131
+ function syntheticToolUseId() {
132
+ return `hermes-tool-${++toolCallCounter}`;
133
+ }
134
+ // ── Thinking detection ─────────────────────────────────────────────────────
135
+ function isThinkingLine(line) {
136
+ return (line.includes("💭") ||
137
+ line.startsWith("<thinking>") ||
138
+ line.startsWith("</thinking>") ||
139
+ line.startsWith("Thinking:"));
140
+ }
141
+ // ── Main parser ────────────────────────────────────────────────────────────
142
+ /**
143
+ * Parse a single line of Hermes stdout into transcript entries.
144
+ *
145
+ * Emits structured tool_call/tool_result pairs (with synthetic IDs) so
146
+ * Paperclip renders proper tool cards with status icons and expand/collapse.
147
+ *
148
+ * @param line Raw stdout line from Hermes CLI
149
+ * @param ts ISO timestamp for the entry
150
+ * @returns Array of TranscriptEntry objects (may be empty)
151
+ */
152
+ export function parseHermesStdoutLine(line, ts) {
153
+ const trimmed = line.trim();
154
+ if (!trimmed)
155
+ return [];
156
+ // ── System/adapter messages ────────────────────────────────────────────
157
+ if (trimmed.startsWith("[hermes]") || trimmed.startsWith("[paperclip]")) {
158
+ return [{ kind: "system", ts, text: trimmed }];
159
+ }
160
+ // ── Non-quiet mode tool start lines: [tool] (kaomoji) emoji verb ... ──
161
+ // These are redundant — the tool_call/tool_result pair arrives later from
162
+ // the ┊ completion line. Skip them to avoid duplicate entries.
163
+ if (trimmed.startsWith("[tool]")) {
164
+ return [];
165
+ }
166
+ // ── MCP / server init noise reclassified from stderr by wrappedOnLog ──
167
+ // Pattern: [2026-03-25T10:40:53.941Z] INFO: ...
168
+ // Emit as stderr so Paperclip groups them into the amber accordion.
169
+ if (/^\[\d{4}-\d{2}-\d{2}T/.test(trimmed)) {
170
+ return [{ kind: "stderr", ts, text: trimmed }];
171
+ }
172
+ // ── Standalone spinner remnants: "💻 Completed", "💻\nCompleted", etc. ─
173
+ // These are non-quiet mode spinner frame leftovers — skip them.
174
+ if (/^\p{Emoji_Presentation}\s*(Completed|Running|Error)?\s*$/u.test(trimmed)) {
175
+ return [];
176
+ }
177
+ // ── Session info line ────────────────────────────────────────────────
178
+ if (trimmed.startsWith("session_id:")) {
179
+ return [{ kind: "system", ts, text: trimmed }];
180
+ }
181
+ // ── Quiet-mode tool/message lines (prefixed with ┊) ────────────────────
182
+ if (trimmed.includes(TOOL_OUTPUT_PREFIX)) {
183
+ // Assistant message: ┊ 💬 {text}
184
+ if (isAssistantToolLine(trimmed)) {
185
+ return [{ kind: "assistant", ts, text: extractAssistantText(trimmed) }];
186
+ }
187
+ // Tool completion: ┊ {emoji} {verb} {detail} {duration}
188
+ const toolInfo = parseToolCompletionLine(trimmed);
189
+ if (toolInfo) {
190
+ const id = syntheticToolUseId();
191
+ const detailText = toolInfo.duration
192
+ ? `${toolInfo.detail} ${toolInfo.duration}`
193
+ : toolInfo.detail;
194
+ return [
195
+ {
196
+ kind: "tool_call",
197
+ ts,
198
+ name: toolInfo.name,
199
+ input: { detail: toolInfo.detail },
200
+ toolUseId: id,
201
+ },
202
+ {
203
+ kind: "tool_result",
204
+ ts,
205
+ toolUseId: id,
206
+ content: detailText,
207
+ isError: toolInfo.hasError,
208
+ },
209
+ ];
210
+ }
211
+ // Fallback: raw ┊ line that doesn't match tool format
212
+ const stripped = trimmed
213
+ .replace(/^\[done\]\s*/, "")
214
+ .replace(new RegExp(`^${TOOL_OUTPUT_PREFIX.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\s*`), "")
215
+ .trim();
216
+ return [{ kind: "stdout", ts, text: stripped }];
217
+ }
218
+ // ── Thinking blocks ────────────────────────────────────────────────────
219
+ if (isThinkingLine(trimmed)) {
220
+ return [
221
+ {
222
+ kind: "thinking",
223
+ ts,
224
+ text: trimmed.replace(/^💭\s*/, ""),
225
+ },
226
+ ];
227
+ }
228
+ // ── Error output ───────────────────────────────────────────────────────
229
+ if (trimmed.startsWith("Error:") ||
230
+ trimmed.startsWith("ERROR:") ||
231
+ trimmed.startsWith("Traceback")) {
232
+ return [{ kind: "stderr", ts, text: trimmed }];
233
+ }
234
+ // ── Regular assistant output ───────────────────────────────────────────
235
+ return [{ kind: "assistant", ts, text: trimmed }];
236
+ }
237
+ //# sourceMappingURL=parse-stdout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-stdout.js","sourceRoot":"","sources":["../../src/ui/parse-stdout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,8EAA8E;AAE9E;;;;GAIG;AACH,SAAS,YAAY,CAAC,IAAY;IAChC,0DAA0D;IAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;AAC3D,CAAC;AAED,8EAA8E;AAE9E,4DAA4D;AAC5D,SAAS,mBAAmB,CAAC,QAAgB;IAC3C,OAAO,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAClC,CAAC;AAED,+CAA+C;AAC/C,SAAS,oBAAoB,CAAC,IAAY;IACxC,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;AACjD,CAAC;AAED;;;;;;GAMG;AACH,SAAS,uBAAuB,CAC9B,IAAY;IAEZ,6CAA6C;IAC7C,IAAI,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;IAEtD,oBAAoB;IACpB,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC;QAAE,OAAO,IAAI,CAAC;IAEzD,+CAA+C;IAC/C,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;IACnD,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,CA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I,MAAM,CAAC,IAAI,kBAAkB,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;aAC5F,IAAI,EAAE,CAAC;QACV,OAAO,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClD,CAAC;IAED,0EAA0E;IAC1E,IAAI,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;QAC5B,OAAO;YACL;gBACE,IAAI,EAAE,UAAU;gBAChB,EAAE;gBACF,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;aACpC;SACF,CAAC;IACJ,CAAC;IAED,0EAA0E;IAC1E,IACE,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC;QAC5B,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC;QAC5B,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,EAC/B,CAAC;QACD,OAAO,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IACjD,CAAC;IAED,0EAA0E;IAC1E,OAAO,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;AACpD,CAAC"}
package/package.json ADDED
@@ -0,0 +1,80 @@
1
+ {
2
+ "name": "@paperclipai/hermes-paperclip-adapter",
3
+ "version": "0.3.0",
4
+ "description": "Paperclip adapter for Hermes Agent — run Hermes as a managed employee in a Paperclip company",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "author": "Paperclip",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/paperclipai/paperclip.git",
11
+ "directory": "packages/adapters/hermes-local"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/paperclipai/paperclip/issues"
15
+ },
16
+ "homepage": "https://github.com/paperclipai/paperclip/tree/master/packages/adapters/hermes-local#readme",
17
+ "keywords": [
18
+ "paperclip",
19
+ "hermes",
20
+ "hermes-agent",
21
+ "ai-agent",
22
+ "adapter",
23
+ "orchestration"
24
+ ],
25
+ "exports": {
26
+ ".": "./src/index.ts",
27
+ "./server": "./src/server/index.ts",
28
+ "./ui": "./src/ui/index.ts",
29
+ "./cli": "./src/cli/index.ts"
30
+ },
31
+ "publishConfig": {
32
+ "access": "public",
33
+ "exports": {
34
+ ".": {
35
+ "types": "./dist/index.d.ts",
36
+ "import": "./dist/index.js"
37
+ },
38
+ "./server": {
39
+ "types": "./dist/server/index.d.ts",
40
+ "import": "./dist/server/index.js"
41
+ },
42
+ "./ui": {
43
+ "types": "./dist/ui/index.d.ts",
44
+ "import": "./dist/ui/index.js"
45
+ },
46
+ "./cli": {
47
+ "types": "./dist/cli/index.d.ts",
48
+ "import": "./dist/cli/index.js"
49
+ }
50
+ },
51
+ "main": "./dist/index.js",
52
+ "types": "./dist/index.d.ts",
53
+ "provenance": true
54
+ },
55
+ "files": [
56
+ "dist",
57
+ "README.md",
58
+ "LICENSE"
59
+ ],
60
+ "scripts": {
61
+ "build": "tsc",
62
+ "dev": "tsc --watch",
63
+ "lint": "eslint src/",
64
+ "typecheck": "tsc --noEmit",
65
+ "test": "vitest run",
66
+ "test:command-resolution": "vitest run src/server/command-resolution.test.ts",
67
+ "clean": "rm -rf dist"
68
+ },
69
+ "dependencies": {
70
+ "@paperclipai/adapter-utils": "workspace:*",
71
+ "picocolors": "^1.1.1"
72
+ },
73
+ "devDependencies": {
74
+ "@types/node": "^22.19.21",
75
+ "typescript": "^5.7.3"
76
+ },
77
+ "engines": {
78
+ "node": ">=20.0.0"
79
+ }
80
+ }