praxis-agent 0.35.0 → 0.37.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 (111) hide show
  1. package/README.md +20 -2
  2. package/dist/application/background-agent-manager.d.ts +16 -6
  3. package/dist/application/background-agent-manager.js +139 -97
  4. package/dist/application/context-engine.d.ts +56 -0
  5. package/dist/application/context-engine.js +129 -0
  6. package/dist/application/durable-follow-up.d.ts +14 -0
  7. package/dist/application/durable-follow-up.js +52 -0
  8. package/dist/application/native-session-transcript.d.ts +72 -0
  9. package/dist/application/native-session-transcript.js +351 -0
  10. package/dist/application/native-sidechain-transcript.d.ts +34 -0
  11. package/dist/application/native-sidechain-transcript.js +156 -0
  12. package/dist/application/session-service.d.ts +23 -4
  13. package/dist/application/session-service.js +1130 -494
  14. package/dist/application/subagent-service.d.ts +5 -1
  15. package/dist/application/subagent-service.js +749 -320
  16. package/dist/application/team-agent-runtime.d.ts +29 -0
  17. package/dist/application/team-agent-runtime.js +169 -0
  18. package/dist/application/team-capability.d.ts +27 -0
  19. package/dist/application/team-capability.js +41 -0
  20. package/dist/application/team-lead-operations.d.ts +38 -0
  21. package/dist/application/team-lead-operations.js +155 -0
  22. package/dist/application/team-mailbox.d.ts +54 -0
  23. package/dist/application/team-mailbox.js +196 -0
  24. package/dist/application/team-manager.d.ts +113 -0
  25. package/dist/application/team-manager.js +681 -0
  26. package/dist/application/team-workspace.d.ts +29 -0
  27. package/dist/application/team-workspace.js +197 -0
  28. package/dist/application/top-level-agent-manager.d.ts +1 -0
  29. package/dist/application/top-level-agent-manager.js +1025 -403
  30. package/dist/application/transcript-projection.d.ts +35 -0
  31. package/dist/application/transcript-projection.js +139 -0
  32. package/dist/application/turn-lifecycle.d.ts +2 -0
  33. package/dist/application/turn-memory-coordinator.d.ts +43 -0
  34. package/dist/application/turn-memory-coordinator.js +98 -0
  35. package/dist/cli/agents-dashboard.js +10 -5
  36. package/dist/cli/interactive.d.ts +7 -0
  37. package/dist/cli/interactive.js +645 -334
  38. package/dist/cli/tui/claude-style.d.ts +8 -25
  39. package/dist/cli/tui/claude-style.js +299 -277
  40. package/dist/cli/tui/decision-surface-model.d.ts +71 -0
  41. package/dist/cli/tui/decision-surface-model.js +131 -0
  42. package/dist/cli/tui/decision-surface.d.ts +7 -0
  43. package/dist/cli/tui/decision-surface.js +41 -0
  44. package/dist/cli/tui/help-surface-model.d.ts +68 -0
  45. package/dist/cli/tui/help-surface-model.js +131 -0
  46. package/dist/cli/tui/mcp-panel.js +1 -2
  47. package/dist/cli/tui/permission-surface-model.d.ts +195 -0
  48. package/dist/cli/tui/permission-surface-model.js +360 -0
  49. package/dist/cli/tui/permission-surface.d.ts +7 -0
  50. package/dist/cli/tui/permission-surface.js +69 -0
  51. package/dist/cli/tui/presentation-environment.d.ts +32 -0
  52. package/dist/cli/tui/presentation-environment.js +149 -0
  53. package/dist/cli/tui/task-panel.js +10 -1
  54. package/dist/cli/tui/theme.d.ts +46 -3
  55. package/dist/cli/tui/theme.js +414 -56
  56. package/dist/cli/tui/tool-permission.js +16 -8
  57. package/dist/cli/tui/transcript-presentation.d.ts +19 -1
  58. package/dist/cli/tui/transcript-presentation.js +26 -6
  59. package/dist/cli/tui/transcript-viewport.d.ts +18 -0
  60. package/dist/cli/tui/transcript-viewport.js +517 -111
  61. package/dist/cli/tui/transcript-window-model.d.ts +108 -0
  62. package/dist/cli/tui/transcript-window-model.js +772 -0
  63. package/dist/cli/tui/tui-interaction-router.d.ts +78 -0
  64. package/dist/cli/tui/tui-interaction-router.js +127 -0
  65. package/dist/cli/tui/tui-screen-model.d.ts +114 -0
  66. package/dist/cli/tui/tui-screen-model.js +210 -0
  67. package/dist/cli/tui/tui-view-model.d.ts +2 -49
  68. package/dist/cli/tui/tui-view-model.js +1 -68
  69. package/dist/cli-runtime.d.ts +4 -2
  70. package/dist/cli-runtime.js +397 -32
  71. package/dist/compatibility/claude/transcript-codec.js +6 -0
  72. package/dist/core/agent-orchestration.d.ts +31 -0
  73. package/dist/core/agent-orchestration.js +235 -0
  74. package/dist/core/permission-policy.d.ts +4 -0
  75. package/dist/core/permission-policy.js +21 -0
  76. package/dist/core/runtime.d.ts +6 -0
  77. package/dist/core/runtime.js +20 -2
  78. package/dist/core/team-mailbox.d.ts +54 -0
  79. package/dist/core/team-mailbox.js +212 -0
  80. package/dist/core/team-ownership.d.ts +84 -0
  81. package/dist/core/team-ownership.js +505 -0
  82. package/dist/core/tool-execution-scheduler.js +6 -1
  83. package/dist/core/transcript-event.d.ts +5 -1
  84. package/dist/core/transcript-event.js +12 -0
  85. package/dist/persistence/claude-job-store.d.ts +58 -0
  86. package/dist/persistence/claude-job-store.js +483 -1
  87. package/dist/persistence/claude-transcript-store.d.ts +2 -1
  88. package/dist/persistence/claude-transcript-store.js +2 -10
  89. package/dist/persistence/native-team-mailbox.d.ts +68 -0
  90. package/dist/persistence/native-team-mailbox.js +542 -0
  91. package/dist/persistence/native-team-store.d.ts +34 -0
  92. package/dist/persistence/native-team-store.js +257 -0
  93. package/dist/persistence/native-transcript-reader.d.ts +53 -0
  94. package/dist/persistence/native-transcript-reader.js +283 -0
  95. package/dist/persistence/native-transcript-store.d.ts +69 -0
  96. package/dist/persistence/native-transcript-store.js +321 -0
  97. package/dist/persistence/subagent-lifecycle-store.d.ts +41 -8
  98. package/dist/persistence/subagent-lifecycle-store.js +373 -146
  99. package/dist/persistence/transcript-file-append.d.ts +2 -0
  100. package/dist/persistence/transcript-file-append.js +10 -0
  101. package/dist/platform/exclusive-file-lease.d.ts +3 -0
  102. package/dist/platform/exclusive-file-lease.js +3 -0
  103. package/dist/tools/claude-capabilities.d.ts +4 -0
  104. package/dist/tools/claude-capabilities.js +18 -2
  105. package/dist/tools/team-lead-tools.d.ts +19 -0
  106. package/dist/tools/team-lead-tools.js +479 -0
  107. package/dist/tools/team-member-tools.d.ts +21 -0
  108. package/dist/tools/team-member-tools.js +259 -0
  109. package/package.json +1 -1
  110. package/dist/cli/tui/fullscreen-renderer.d.ts +0 -14
  111. package/dist/cli/tui/fullscreen-renderer.js +0 -13
@@ -57,7 +57,7 @@ type ShellItem = Extract<TranscriptItem, {
57
57
  type ShellResultItem = Extract<TranscriptItem, {
58
58
  kind: 'shell-result';
59
59
  }>;
60
- export type TranscriptPresentationEntry = {
60
+ type TranscriptPresentationEntryValue = {
61
61
  kind: 'item';
62
62
  key: string;
63
63
  item: Exclude<TranscriptItem, ToolItem | ToolResultItem | ShellItem | ShellResultItem>;
@@ -84,6 +84,24 @@ export type TranscriptPresentationEntry = {
84
84
  key: string;
85
85
  count: number;
86
86
  };
87
+ /**
88
+ * Fullscreen-only projection of one oversized renderer row. This metadata is
89
+ * derived from Transcript content and never enters the authoritative source
90
+ * item or persisted JSONL.
91
+ */
92
+ export type TranscriptPresentationEntry = TranscriptPresentationEntryValue & {
93
+ readonly viewportSlice?: {
94
+ readonly text: string;
95
+ readonly rows: number;
96
+ readonly assistantMarkdown?: {
97
+ readonly marginTop: 0 | 1;
98
+ };
99
+ };
100
+ };
101
+ /** Stable renderer key for one source Transcript item. */
102
+ export declare function transcriptPresentationEntryKey(item: TranscriptItem, sourceIndex: number): string;
103
+ /** Stable renderer key for a Normal-mode contiguous Read summary. */
104
+ export declare function transcriptReadSummaryKey(sourceIndex: number): string;
87
105
  export declare function projectTranscriptPresentation(items: readonly TranscriptItem[], mode: TranscriptPresentationMode): readonly TranscriptPresentationEntry[];
88
106
  export {};
89
107
  //# sourceMappingURL=transcript-presentation.d.ts.map
@@ -1,3 +1,19 @@
1
+ /** Stable renderer key for one source Transcript item. */
2
+ export function transcriptPresentationEntryKey(item, sourceIndex) {
3
+ if (item.kind === 'tool')
4
+ return `tool-${sourceIndex}-${item.call.id}`;
5
+ if (item.kind === 'tool-result')
6
+ return `tool-result-${sourceIndex}`;
7
+ if (item.kind === 'shell')
8
+ return `shell-${sourceIndex}-${item.callId}`;
9
+ if (item.kind === 'shell-result')
10
+ return `shell-result-${sourceIndex}`;
11
+ return `item-${sourceIndex}`;
12
+ }
13
+ /** Stable renderer key for a Normal-mode contiguous Read summary. */
14
+ export function transcriptReadSummaryKey(sourceIndex) {
15
+ return `read-summary-${sourceIndex}`;
16
+ }
1
17
  function pairResults(items) {
2
18
  const toolResults = new Map();
3
19
  const toolResultIndexes = new Map();
@@ -115,7 +131,7 @@ export function projectTranscriptPresentation(items, mode) {
115
131
  if (summary) {
116
132
  entries.push({
117
133
  kind: 'read-summary',
118
- key: `read-summary-${index}`,
134
+ key: transcriptReadSummaryKey(index),
119
135
  count: summary.count,
120
136
  });
121
137
  index = summary.end - 1;
@@ -126,7 +142,7 @@ export function projectTranscriptPresentation(items, mode) {
126
142
  const result = pairing.toolResults.get(index);
127
143
  entries.push({
128
144
  kind: 'tool',
129
- key: `tool-${index}-${item.call.id}`,
145
+ key: transcriptPresentationEntryKey(item, index),
130
146
  item,
131
147
  ...(result ? { result } : {}),
132
148
  });
@@ -137,7 +153,7 @@ export function projectTranscriptPresentation(items, mode) {
137
153
  continue;
138
154
  entries.push({
139
155
  kind: 'orphan-tool-result',
140
- key: `tool-result-${index}`,
156
+ key: transcriptPresentationEntryKey(item, index),
141
157
  item,
142
158
  });
143
159
  continue;
@@ -146,7 +162,7 @@ export function projectTranscriptPresentation(items, mode) {
146
162
  const result = pairing.shellResults.get(index);
147
163
  entries.push({
148
164
  kind: 'shell',
149
- key: `shell-${index}-${item.callId}`,
165
+ key: transcriptPresentationEntryKey(item, index),
150
166
  item,
151
167
  ...(result ? { result } : {}),
152
168
  });
@@ -157,12 +173,16 @@ export function projectTranscriptPresentation(items, mode) {
157
173
  continue;
158
174
  entries.push({
159
175
  kind: 'orphan-shell-result',
160
- key: `shell-result-${index}`,
176
+ key: transcriptPresentationEntryKey(item, index),
161
177
  item,
162
178
  });
163
179
  continue;
164
180
  }
165
- entries.push({ kind: 'item', key: `item-${index}`, item });
181
+ entries.push({
182
+ kind: 'item',
183
+ key: transcriptPresentationEntryKey(item, index),
184
+ item,
185
+ });
166
186
  }
167
187
  return entries;
168
188
  }
@@ -3,6 +3,24 @@ export declare const FULLSCREEN_TRANSCRIPT_RESERVED_ROWS = 12;
3
3
  export declare const TRANSCRIPT_TRUNCATION_MARKER = "\u2026";
4
4
  export declare function estimateTranscriptEntryLines(entry: TranscriptPresentationEntry, width: number, mode: TranscriptPresentationMode): number;
5
5
  export declare function transcriptPresentationLineCount(entries: readonly TranscriptPresentationEntry[], width: number, mode: TranscriptPresentationMode): number;
6
+ interface MarkdownViewportRow {
7
+ readonly text: string;
8
+ readonly fenceBefore: boolean;
9
+ readonly fenceAfter: boolean;
10
+ readonly fenceLabel: string;
11
+ }
12
+ /** Immutable visual-row index retained only for oversized presentation rows. */
13
+ export interface TranscriptEntryViewportIndex {
14
+ readonly entry: TranscriptPresentationEntry;
15
+ readonly width: number;
16
+ readonly mode: TranscriptPresentationMode;
17
+ readonly rows: readonly string[];
18
+ readonly assistantMarkdownRows?: readonly MarkdownViewportRow[];
19
+ }
20
+ export declare function createTranscriptEntryViewportIndex(entry: TranscriptPresentationEntry, width: number, mode: TranscriptPresentationMode): TranscriptEntryViewportIndex | undefined;
21
+ export declare function projectTranscriptEntryRange(entry: TranscriptPresentationEntry, startRow: number, budget: number, width: number, mode: TranscriptPresentationMode, viewportIndex?: TranscriptEntryViewportIndex): TranscriptPresentationEntry;
6
22
  export declare function projectTranscriptPresentationTail(entries: readonly TranscriptPresentationEntry[], budget: number, width: number, mode: TranscriptPresentationMode): readonly TranscriptPresentationEntry[];
23
+ export declare function projectTranscriptPresentationRange(entries: readonly TranscriptPresentationEntry[], budget: number, width: number, startRow: number, mode: TranscriptPresentationMode): readonly TranscriptPresentationEntry[];
7
24
  export declare function projectTranscriptPresentationWindow(entries: readonly TranscriptPresentationEntry[], budget: number, width: number, scrollOffset: number, mode: TranscriptPresentationMode): readonly TranscriptPresentationEntry[];
25
+ export {};
8
26
  //# sourceMappingURL=transcript-viewport.d.ts.map