@codemieai/code 0.12.0 → 0.13.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 (204) hide show
  1. package/README.md +109 -56
  2. package/bin/codemie-copilot.js +224 -0
  3. package/bin/codemie-pi.js +18 -0
  4. package/dist/agents/core/AgentCLI.d.ts.map +1 -1
  5. package/dist/agents/core/AgentCLI.js +16 -10
  6. package/dist/agents/core/AgentCLI.js.map +1 -1
  7. package/dist/agents/core/BaseAgentAdapter.d.ts.map +1 -1
  8. package/dist/agents/core/BaseAgentAdapter.js +43 -19
  9. package/dist/agents/core/BaseAgentAdapter.js.map +1 -1
  10. package/dist/agents/core/agent-aliases.d.ts +17 -0
  11. package/dist/agents/core/agent-aliases.d.ts.map +1 -0
  12. package/dist/agents/core/agent-aliases.js +41 -0
  13. package/dist/agents/core/agent-aliases.js.map +1 -0
  14. package/dist/agents/core/session/session-origin-audit.d.ts +13 -0
  15. package/dist/agents/core/session/session-origin-audit.d.ts.map +1 -1
  16. package/dist/agents/core/session/session-origin-audit.js +34 -0
  17. package/dist/agents/core/session/session-origin-audit.js.map +1 -1
  18. package/dist/agents/core/session/stale-session-reconciliation.d.ts +42 -0
  19. package/dist/agents/core/session/stale-session-reconciliation.d.ts.map +1 -0
  20. package/dist/agents/core/session/stale-session-reconciliation.js +141 -0
  21. package/dist/agents/core/session/stale-session-reconciliation.js.map +1 -0
  22. package/dist/agents/core/session/types.d.ts +19 -0
  23. package/dist/agents/core/session/types.d.ts.map +1 -1
  24. package/dist/agents/core/session/types.js +17 -1
  25. package/dist/agents/core/session/types.js.map +1 -1
  26. package/dist/agents/core/types.d.ts +1 -0
  27. package/dist/agents/core/types.d.ts.map +1 -1
  28. package/dist/agents/plugins/codex/codex.reconciliation.d.ts +15 -35
  29. package/dist/agents/plugins/codex/codex.reconciliation.d.ts.map +1 -1
  30. package/dist/agents/plugins/codex/codex.reconciliation.js +8 -139
  31. package/dist/agents/plugins/codex/codex.reconciliation.js.map +1 -1
  32. package/dist/agents/plugins/copilot-cli/copilot-cli.constants.d.ts +4 -0
  33. package/dist/agents/plugins/copilot-cli/copilot-cli.constants.d.ts.map +1 -1
  34. package/dist/agents/plugins/copilot-cli/copilot-cli.constants.js +4 -0
  35. package/dist/agents/plugins/copilot-cli/copilot-cli.constants.js.map +1 -1
  36. package/dist/agents/plugins/copilot-cli/copilot-cli.models.d.ts +8 -0
  37. package/dist/agents/plugins/copilot-cli/copilot-cli.models.d.ts.map +1 -0
  38. package/dist/agents/plugins/copilot-cli/copilot-cli.models.js +195 -0
  39. package/dist/agents/plugins/copilot-cli/copilot-cli.models.js.map +1 -0
  40. package/dist/agents/plugins/copilot-cli/copilot-cli.plugin.d.ts +4 -20
  41. package/dist/agents/plugins/copilot-cli/copilot-cli.plugin.d.ts.map +1 -1
  42. package/dist/agents/plugins/copilot-cli/copilot-cli.plugin.js +237 -38
  43. package/dist/agents/plugins/copilot-cli/copilot-cli.plugin.js.map +1 -1
  44. package/dist/agents/plugins/copilot-cli/copilot-cli.session.d.ts.map +1 -1
  45. package/dist/agents/plugins/copilot-cli/copilot-cli.session.js +14 -2
  46. package/dist/agents/plugins/copilot-cli/copilot-cli.session.js.map +1 -1
  47. package/dist/agents/plugins/copilot-cli/index.d.ts +2 -1
  48. package/dist/agents/plugins/copilot-cli/index.d.ts.map +1 -1
  49. package/dist/agents/plugins/copilot-cli/index.js +2 -1
  50. package/dist/agents/plugins/copilot-cli/index.js.map +1 -1
  51. package/dist/agents/plugins/copilot-cli/session/processors/copilot-cli.conversations-processor.d.ts +6 -3
  52. package/dist/agents/plugins/copilot-cli/session/processors/copilot-cli.conversations-processor.d.ts.map +1 -1
  53. package/dist/agents/plugins/copilot-cli/session/processors/copilot-cli.conversations-processor.js +298 -5
  54. package/dist/agents/plugins/copilot-cli/session/processors/copilot-cli.conversations-processor.js.map +1 -1
  55. package/dist/agents/plugins/pi/__tests__/home-redirect.d.ts +12 -0
  56. package/dist/agents/plugins/pi/__tests__/home-redirect.d.ts.map +1 -0
  57. package/dist/agents/plugins/pi/__tests__/home-redirect.js +27 -0
  58. package/dist/agents/plugins/pi/__tests__/home-redirect.js.map +1 -0
  59. package/dist/agents/plugins/pi/extension/README.md +68 -0
  60. package/dist/agents/plugins/pi/extension/index.js +161 -0
  61. package/dist/agents/plugins/pi/extension/package.json +8 -0
  62. package/dist/agents/plugins/pi/index.d.ts +3 -0
  63. package/dist/agents/plugins/pi/index.d.ts.map +1 -0
  64. package/dist/agents/plugins/pi/index.js +3 -0
  65. package/dist/agents/plugins/pi/index.js.map +1 -0
  66. package/dist/agents/plugins/pi/pi.extension.d.ts +60 -0
  67. package/dist/agents/plugins/pi/pi.extension.d.ts.map +1 -0
  68. package/dist/agents/plugins/pi/pi.extension.js +201 -0
  69. package/dist/agents/plugins/pi/pi.extension.js.map +1 -0
  70. package/dist/agents/plugins/pi/pi.incremental-sync.d.ts +63 -0
  71. package/dist/agents/plugins/pi/pi.incremental-sync.d.ts.map +1 -0
  72. package/dist/agents/plugins/pi/pi.incremental-sync.js +266 -0
  73. package/dist/agents/plugins/pi/pi.incremental-sync.js.map +1 -0
  74. package/dist/agents/plugins/pi/pi.models.d.ts +20 -0
  75. package/dist/agents/plugins/pi/pi.models.d.ts.map +1 -0
  76. package/dist/agents/plugins/pi/pi.models.js +201 -0
  77. package/dist/agents/plugins/pi/pi.models.js.map +1 -0
  78. package/dist/agents/plugins/pi/pi.packages.d.ts +11 -0
  79. package/dist/agents/plugins/pi/pi.packages.d.ts.map +1 -0
  80. package/dist/agents/plugins/pi/pi.packages.js +35 -0
  81. package/dist/agents/plugins/pi/pi.packages.js.map +1 -0
  82. package/dist/agents/plugins/pi/pi.paths.d.ts +37 -0
  83. package/dist/agents/plugins/pi/pi.paths.d.ts.map +1 -0
  84. package/dist/agents/plugins/pi/pi.paths.js +146 -0
  85. package/dist/agents/plugins/pi/pi.paths.js.map +1 -0
  86. package/dist/agents/plugins/pi/pi.plugin.d.ts +30 -0
  87. package/dist/agents/plugins/pi/pi.plugin.d.ts.map +1 -0
  88. package/dist/agents/plugins/pi/pi.plugin.js +453 -0
  89. package/dist/agents/plugins/pi/pi.plugin.js.map +1 -0
  90. package/dist/agents/plugins/pi/pi.session.d.ts +114 -0
  91. package/dist/agents/plugins/pi/pi.session.d.ts.map +1 -0
  92. package/dist/agents/plugins/pi/pi.session.js +388 -0
  93. package/dist/agents/plugins/pi/pi.session.js.map +1 -0
  94. package/dist/agents/plugins/pi/pi.setup.d.ts +2 -0
  95. package/dist/agents/plugins/pi/pi.setup.d.ts.map +1 -0
  96. package/dist/agents/plugins/pi/pi.setup.js +33 -0
  97. package/dist/agents/plugins/pi/pi.setup.js.map +1 -0
  98. package/dist/agents/plugins/pi/pi.types.d.ts +143 -0
  99. package/dist/agents/plugins/pi/pi.types.d.ts.map +1 -0
  100. package/dist/agents/plugins/pi/pi.types.js +74 -0
  101. package/dist/agents/plugins/pi/pi.types.js.map +1 -0
  102. package/dist/agents/plugins/pi/session/pi-file-operations.d.ts +17 -0
  103. package/dist/agents/plugins/pi/session/pi-file-operations.d.ts.map +1 -0
  104. package/dist/agents/plugins/pi/session/pi-file-operations.js +98 -0
  105. package/dist/agents/plugins/pi/session/pi-file-operations.js.map +1 -0
  106. package/dist/agents/plugins/pi/session/pi-named-invocations.d.ts +52 -0
  107. package/dist/agents/plugins/pi/session/pi-named-invocations.d.ts.map +1 -0
  108. package/dist/agents/plugins/pi/session/pi-named-invocations.js +189 -0
  109. package/dist/agents/plugins/pi/session/pi-named-invocations.js.map +1 -0
  110. package/dist/agents/plugins/pi/session/pi-user-prompt.d.ts +14 -0
  111. package/dist/agents/plugins/pi/session/pi-user-prompt.d.ts.map +1 -0
  112. package/dist/agents/plugins/pi/session/pi-user-prompt.js +51 -0
  113. package/dist/agents/plugins/pi/session/pi-user-prompt.js.map +1 -0
  114. package/dist/agents/plugins/pi/session/processors/pi.conversations-processor.d.ts +52 -0
  115. package/dist/agents/plugins/pi/session/processors/pi.conversations-processor.d.ts.map +1 -0
  116. package/dist/agents/plugins/pi/session/processors/pi.conversations-processor.js +716 -0
  117. package/dist/agents/plugins/pi/session/processors/pi.conversations-processor.js.map +1 -0
  118. package/dist/agents/plugins/pi/session/processors/pi.metrics-processor.d.ts +104 -0
  119. package/dist/agents/plugins/pi/session/processors/pi.metrics-processor.d.ts.map +1 -0
  120. package/dist/agents/plugins/pi/session/processors/pi.metrics-processor.js +595 -0
  121. package/dist/agents/plugins/pi/session/processors/pi.metrics-processor.js.map +1 -0
  122. package/dist/agents/registry.d.ts.map +1 -1
  123. package/dist/agents/registry.js +2 -2
  124. package/dist/agents/registry.js.map +1 -1
  125. package/dist/cli/commands/analytics/agent-labels.d.ts.map +1 -1
  126. package/dist/cli/commands/analytics/agent-labels.js +1 -0
  127. package/dist/cli/commands/analytics/agent-labels.js.map +1 -1
  128. package/dist/cli/commands/analytics/cost/usage-readers.d.ts +24 -0
  129. package/dist/cli/commands/analytics/cost/usage-readers.d.ts.map +1 -1
  130. package/dist/cli/commands/analytics/cost/usage-readers.js +199 -54
  131. package/dist/cli/commands/analytics/cost/usage-readers.js.map +1 -1
  132. package/dist/cli/commands/analytics/index.js +1 -0
  133. package/dist/cli/commands/analytics/index.js.map +1 -1
  134. package/dist/cli/commands/analytics/native-loader.d.ts +21 -4
  135. package/dist/cli/commands/analytics/native-loader.d.ts.map +1 -1
  136. package/dist/cli/commands/analytics/native-loader.js +250 -96
  137. package/dist/cli/commands/analytics/native-loader.js.map +1 -1
  138. package/dist/cli/commands/analytics/report/client/app.js +47 -3
  139. package/dist/cli/commands/analytics/report/payload-builder.d.ts.map +1 -1
  140. package/dist/cli/commands/analytics/report/payload-builder.js +25 -2
  141. package/dist/cli/commands/analytics/report/payload-builder.js.map +1 -1
  142. package/dist/cli/commands/analytics/report/types.d.ts +1 -0
  143. package/dist/cli/commands/analytics/report/types.d.ts.map +1 -1
  144. package/dist/cli/commands/hook.d.ts.map +1 -1
  145. package/dist/cli/commands/hook.js +71 -29
  146. package/dist/cli/commands/hook.js.map +1 -1
  147. package/dist/cli/commands/install.d.ts.map +1 -1
  148. package/dist/cli/commands/install.js +7 -5
  149. package/dist/cli/commands/install.js.map +1 -1
  150. package/dist/cli/commands/list.d.ts.map +1 -1
  151. package/dist/cli/commands/list.js +3 -1
  152. package/dist/cli/commands/list.js.map +1 -1
  153. package/dist/cli/commands/uninstall.d.ts.map +1 -1
  154. package/dist/cli/commands/uninstall.js +5 -3
  155. package/dist/cli/commands/uninstall.js.map +1 -1
  156. package/dist/cli/commands/update.d.ts.map +1 -1
  157. package/dist/cli/commands/update.js +5 -3
  158. package/dist/cli/commands/update.js.map +1 -1
  159. package/dist/cli/first-time.d.ts.map +1 -1
  160. package/dist/cli/first-time.js +7 -6
  161. package/dist/cli/first-time.js.map +1 -1
  162. package/dist/providers/core/auth-validation.d.ts +7 -2
  163. package/dist/providers/core/auth-validation.d.ts.map +1 -1
  164. package/dist/providers/core/auth-validation.js +11 -5
  165. package/dist/providers/core/auth-validation.js.map +1 -1
  166. package/dist/providers/plugins/sso/proxy/plugins/claude-request-normalizer.plugin.d.ts +8 -3
  167. package/dist/providers/plugins/sso/proxy/plugins/claude-request-normalizer.plugin.d.ts.map +1 -1
  168. package/dist/providers/plugins/sso/proxy/plugins/claude-request-normalizer.plugin.js +46 -11
  169. package/dist/providers/plugins/sso/proxy/plugins/claude-request-normalizer.plugin.js.map +1 -1
  170. package/dist/providers/plugins/sso/proxy/plugins/codex-encrypted-content-sanitizer.plugin.d.ts +23 -13
  171. package/dist/providers/plugins/sso/proxy/plugins/codex-encrypted-content-sanitizer.plugin.d.ts.map +1 -1
  172. package/dist/providers/plugins/sso/proxy/plugins/codex-encrypted-content-sanitizer.plugin.js +75 -18
  173. package/dist/providers/plugins/sso/proxy/plugins/codex-encrypted-content-sanitizer.plugin.js.map +1 -1
  174. package/dist/providers/plugins/sso/proxy/plugins/copilot-encrypted-content-sanitizer.plugin.d.ts +21 -0
  175. package/dist/providers/plugins/sso/proxy/plugins/copilot-encrypted-content-sanitizer.plugin.d.ts.map +1 -0
  176. package/dist/providers/plugins/sso/proxy/plugins/copilot-encrypted-content-sanitizer.plugin.js +133 -0
  177. package/dist/providers/plugins/sso/proxy/plugins/copilot-encrypted-content-sanitizer.plugin.js.map +1 -0
  178. package/dist/providers/plugins/sso/proxy/plugins/header-injection.plugin.js +1 -1
  179. package/dist/providers/plugins/sso/proxy/plugins/header-injection.plugin.js.map +1 -1
  180. package/dist/providers/plugins/sso/proxy/plugins/index.d.ts +2 -1
  181. package/dist/providers/plugins/sso/proxy/plugins/index.d.ts.map +1 -1
  182. package/dist/providers/plugins/sso/proxy/plugins/index.js +4 -2
  183. package/dist/providers/plugins/sso/proxy/plugins/index.js.map +1 -1
  184. package/dist/providers/plugins/sso/proxy/plugins/types.d.ts +11 -0
  185. package/dist/providers/plugins/sso/proxy/plugins/types.d.ts.map +1 -1
  186. package/dist/providers/plugins/sso/proxy/sso.proxy.d.ts +2 -0
  187. package/dist/providers/plugins/sso/proxy/sso.proxy.d.ts.map +1 -1
  188. package/dist/providers/plugins/sso/proxy/sso.proxy.js +37 -1
  189. package/dist/providers/plugins/sso/proxy/sso.proxy.js.map +1 -1
  190. package/dist/providers/plugins/sso/session/SessionSyncer.d.ts.map +1 -1
  191. package/dist/providers/plugins/sso/session/SessionSyncer.js +13 -0
  192. package/dist/providers/plugins/sso/session/SessionSyncer.js.map +1 -1
  193. package/dist/providers/plugins/sso/session/processors/conversations/syncProcessor.js +6 -0
  194. package/dist/providers/plugins/sso/session/processors/conversations/syncProcessor.js.map +1 -1
  195. package/dist/providers/plugins/sso/session/processors/metrics/metrics-post-processor.d.ts +0 -6
  196. package/dist/providers/plugins/sso/session/processors/metrics/metrics-post-processor.d.ts.map +1 -1
  197. package/dist/providers/plugins/sso/session/processors/metrics/metrics-post-processor.js +28 -19
  198. package/dist/providers/plugins/sso/session/processors/metrics/metrics-post-processor.js.map +1 -1
  199. package/dist/utils/interactive.d.ts +14 -0
  200. package/dist/utils/interactive.d.ts.map +1 -0
  201. package/dist/utils/interactive.js +16 -0
  202. package/dist/utils/interactive.js.map +1 -0
  203. package/package.json +6 -4
  204. package/scripts/copy-plugins.js +6 -0
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Extract the first real user prompt from Pi v3 session entries.
3
+ *
4
+ * A `/skill:<name>` invocation reaches the transcript as an ordinary user message whose text
5
+ * begins with Pi's literal `<skill …>…</skill>` block, followed by the prompt the user actually
6
+ * typed. Left in place that block becomes the session title in the report, so it is stripped
7
+ * via {@link parseSkillWrapper} — the single source of truth for the wrapper shape.
8
+ */
9
+ import { parseSkillWrapper } from './pi-named-invocations.js';
10
+ /** Concatenated text of a Pi user message's content, skill wrapper stripped; undefined when empty. */
11
+ function piUserText(content) {
12
+ if (typeof content === 'string') {
13
+ return parseSkillWrapper(content).rest.trim() || undefined;
14
+ }
15
+ if (!Array.isArray(content)) {
16
+ return undefined;
17
+ }
18
+ const texts = [];
19
+ for (const part of content) {
20
+ if (!part || typeof part !== 'object') {
21
+ continue;
22
+ }
23
+ const block = part;
24
+ if (block.type !== 'text' || typeof block.text !== 'string') {
25
+ continue;
26
+ }
27
+ const text = parseSkillWrapper(block.text).rest.trim();
28
+ if (text) {
29
+ texts.push(text);
30
+ }
31
+ }
32
+ return texts.length > 0 ? texts.join('\n') : undefined;
33
+ }
34
+ /**
35
+ * First user prompt in transcript order that still carries text once the skill wrapper is
36
+ * stripped. A message that is nothing but a skill block contributes no prompt and is skipped.
37
+ */
38
+ export function firstPiUserText(entries) {
39
+ for (const raw of entries) {
40
+ const entry = raw;
41
+ if (entry?.type !== 'message' || entry.message?.role !== 'user') {
42
+ continue;
43
+ }
44
+ const text = piUserText(entry.message.content);
45
+ if (text) {
46
+ return text;
47
+ }
48
+ }
49
+ return undefined;
50
+ }
51
+ //# sourceMappingURL=pi-user-prompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pi-user-prompt.js","sourceRoot":"","sources":["../../../../../src/agents/plugins/pi/session/pi-user-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAU9D,sGAAsG;AACtG,SAAS,UAAU,CAAC,OAAgB;IAClC,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAChC,OAAO,iBAAiB,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,SAAS,CAAC;IAC7D,CAAC;IACD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QAC5B,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE,CAAC;QAC3B,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YACtC,SAAS;QACX,CAAC;QACD,MAAM,KAAK,GAAG,IAAyC,CAAC;QACxD,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC5D,SAAS;QACX,CAAC;QACD,MAAM,IAAI,GAAG,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QACvD,IAAI,IAAI,EAAE,CAAC;YACT,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACzD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,OAA2B;IACzD,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE,CAAC;QAC1B,MAAM,KAAK,GAAG,GAAoB,CAAC;QACnC,IAAI,KAAK,EAAE,IAAI,KAAK,SAAS,IAAI,KAAK,CAAC,OAAO,EAAE,IAAI,KAAK,MAAM,EAAE,CAAC;YAChE,SAAS;QACX,CAAC;QACD,MAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC/C,IAAI,IAAI,EAAE,CAAC;YACT,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Pi Conversations Processor
3
+ *
4
+ * Turns Pi's v3 JSONL entry tree into incremental CodeMie conversation payloads so a Pi
5
+ * run shows up in the conversations UI the same way Claude, Codex, OpenCode and Gemini
6
+ * runs do.
7
+ *
8
+ * What survives the translation:
9
+ * - user prompts (with Pi's `<skill …>` wrapper stripped, and a wordless prompt described
10
+ * by what it did carry rather than dropped — see `describeUserPrompt`)
11
+ * - the last assistant text of a turn as the visible reply; earlier ones as thoughts
12
+ * - thinking blocks as reasoning thoughts
13
+ * - toolCall/toolResult pairs as Tool thoughts
14
+ * - `!`-style bash executions, unless the user marked them private (`!!`)
15
+ * - compaction and branch summaries as summary thoughts
16
+ *
17
+ * What deliberately does not: anything on an abandoned branch. A Pi session file is an
18
+ * append-only *tree*, so a `/rewind` or an edited message leaves the discarded exchange
19
+ * in the file forever; only the active branch is uploaded.
20
+ */
21
+ import type { SessionProcessor, ProcessingContext, ProcessingResult } from '../../../../../agents/core/session/BaseProcessor.js';
22
+ import type { ParsedSession } from '../../../../../agents/core/session/BaseSessionAdapter.js';
23
+ export declare class PiConversationsProcessor implements SessionProcessor {
24
+ readonly name = "pi-conversations";
25
+ readonly priority = 2;
26
+ shouldProcess(session: ParsedSession): boolean;
27
+ process(session: ParsedSession, _context: ProcessingContext): Promise<ProcessingResult>;
28
+ /**
29
+ * The file position this conversation's sync reached.
30
+ *
31
+ * Both the persisted session state and the queued payload file are shared by every
32
+ * transcript of the run, so a checkpoint only counts when its sentinel names *this*
33
+ * conversation — otherwise a `/new` transcript would inherit the previous one's position
34
+ * and silently skip its own opening turns.
35
+ *
36
+ * Only the position is taken from state. `lastSyncedHistoryIndex` deliberately is not:
37
+ * the sync processor computes it as a maximum over the payloads of *all* conversations
38
+ * in the session and the session store then keeps it monotonic, so it says nothing about
39
+ * where one conversation is. Turn numbering comes from the transcript instead
40
+ * (see `scanNextTurn`).
41
+ */
42
+ private resolveSyncedSourceIndex;
43
+ /**
44
+ * Queue one payload per complete turn past the checkpoint.
45
+ *
46
+ * Pi only fires SessionStart and SessionEnd, so a run's whole backlog arrives in a
47
+ * single call. Emitting one window per call — as the per-turn-hooked agents can
48
+ * afford to — would strand every turn but the first.
49
+ */
50
+ private appendTurnPayloads;
51
+ }
52
+ //# sourceMappingURL=pi.conversations-processor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pi.conversations-processor.d.ts","sourceRoot":"","sources":["../../../../../../src/agents/plugins/pi/session/processors/pi.conversations-processor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AACpH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AA6FjF,qBAAa,wBAAyB,YAAW,gBAAgB;IAC/D,QAAQ,CAAC,IAAI,sBAAmC;IAChD,QAAQ,CAAC,QAAQ,KAAK;IAEtB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO;IAKxC,OAAO,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAsG7F;;;;;;;;;;;;;OAaG;YACW,wBAAwB;IAsBtC;;;;;;OAMG;YACW,kBAAkB;CAoGjC"}