@monotykamary/pi-vcc 0.4.0 → 0.4.1

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 (46) hide show
  1. package/npm-shrinkwrap.json +2 -2
  2. package/package.json +1 -1
  3. package/__tests__/helpers.ts +0 -135
  4. package/__tests__/root-causes.test.ts +0 -858
  5. package/demo.gif +0 -0
  6. package/knip.json +0 -4
  7. package/scripts/audit-sessions.ts +0 -88
  8. package/scripts/benchmark-real-sessions.ts +0 -25
  9. package/scripts/compare-before-after.ts +0 -36
  10. package/scripts/dump-branch-output.ts +0 -20
  11. package/stress-debug.ts +0 -202
  12. package/stress-degradation-curve.ts +0 -251
  13. package/tests/australian-government.test.ts +0 -479
  14. package/tests/before-compact-hook.test.ts +0 -185
  15. package/tests/before-compact.test.ts +0 -227
  16. package/tests/breadcrumbs.test.ts +0 -312
  17. package/tests/brief.test.ts +0 -215
  18. package/tests/build-sections.test.ts +0 -59
  19. package/tests/compile.test.ts +0 -89
  20. package/tests/content.test.ts +0 -66
  21. package/tests/deep-extraction.test.ts +0 -322
  22. package/tests/extract-goals.test.ts +0 -86
  23. package/tests/extract-preferences.test.ts +0 -30
  24. package/tests/filter-noise.test.ts +0 -61
  25. package/tests/fixtures.ts +0 -61
  26. package/tests/format-recall.test.ts +0 -87
  27. package/tests/format.test.ts +0 -73
  28. package/tests/government-domain.test.ts +0 -542
  29. package/tests/lineage.test.ts +0 -33
  30. package/tests/load-messages.test.ts +0 -49
  31. package/tests/model-threshold-hook.test.ts +0 -311
  32. package/tests/model-threshold.test.ts +0 -223
  33. package/tests/normalize.test.ts +0 -104
  34. package/tests/proactive-threshold.test.ts +0 -490
  35. package/tests/real-sessions.test.ts +0 -38
  36. package/tests/recall-expand.test.ts +0 -15
  37. package/tests/recall-scope.test.ts +0 -32
  38. package/tests/recall-tool-scope.test.ts +0 -67
  39. package/tests/render-entries.test.ts +0 -92
  40. package/tests/report.test.ts +0 -58
  41. package/tests/sanitize.test.ts +0 -24
  42. package/tests/search-entries.test.ts +0 -233
  43. package/tests/stress-100-compactions.test.ts +0 -373
  44. package/tests/support/load-session.ts +0 -23
  45. package/tests/support/real-sessions.ts +0 -51
  46. package/tests/threshold-integration.test.ts +0 -335
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@monotykamary/pi-vcc",
3
- "version": "0.3.17",
3
+ "version": "0.4.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@monotykamary/pi-vcc",
9
- "version": "0.3.17",
9
+ "version": "0.4.1",
10
10
  "devDependencies": {
11
11
  "knip": "6.14.1",
12
12
  "typescript": "6.0.3"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monotykamary/pi-vcc",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Algorithmic conversation compactor for pi - transcript-preserving structured summaries, no LLM calls",
5
5
  "main": "index.ts",
6
6
  "keywords": [
@@ -1,135 +0,0 @@
1
- /**
2
- * Helpers for constructing mock session entries and messages.
3
- *
4
- * These mirror pi-agent-core types but use loose object shapes
5
- * so we don't need the actual runtime dependency in tests.
6
- */
7
-
8
- export interface MockEntry {
9
- type: string;
10
- id?: string;
11
- message?: {
12
- role?: string;
13
- content?: unknown;
14
- stopReason?: string;
15
- };
16
- firstKeptEntryId?: string;
17
- summary?: string;
18
- timestamp?: string;
19
- }
20
-
21
- let nextId = 1;
22
-
23
- function makeId(): string {
24
- return `entry_${nextId++}`;
25
- }
26
-
27
- export function resetIds(): void {
28
- nextId = 1;
29
- }
30
-
31
- export function makeUserEntry(
32
- text: string,
33
- overrides?: Partial<MockEntry>,
34
- ): MockEntry {
35
- const id = makeId();
36
- return {
37
- type: "message",
38
- id,
39
- message: {
40
- role: "user",
41
- content: [{ type: "text", text }],
42
- },
43
- ...overrides,
44
- };
45
- }
46
-
47
- export function makeAssistantEntry(
48
- text: string,
49
- stopReason = "stop",
50
- overrides?: Partial<MockEntry>,
51
- ): MockEntry {
52
- const id = makeId();
53
- return {
54
- type: "message",
55
- id,
56
- message: {
57
- role: "assistant",
58
- content: [{ type: "text", text }],
59
- stopReason,
60
- },
61
- ...overrides,
62
- };
63
- }
64
-
65
- export function makeToolResultEntry(
66
- toolCallId: string,
67
- content: string,
68
- overrides?: Partial<MockEntry>,
69
- ): MockEntry {
70
- const id = makeId();
71
- return {
72
- type: "message",
73
- id,
74
- message: {
75
- role: "toolResult",
76
- content: [{ type: "toolResult", toolCallId, content }],
77
- },
78
- ...overrides,
79
- };
80
- }
81
-
82
- export function makeCompactionEntry(
83
- firstKeptEntryId: string,
84
- overrides?: Partial<MockEntry>,
85
- ): MockEntry {
86
- const id = makeId();
87
- return {
88
- type: "compaction",
89
- id,
90
- firstKeptEntryId,
91
- summary: "Compaction summary",
92
- ...overrides,
93
- };
94
- }
95
-
96
- /**
97
- * Build a context snapshot dict matching Agent.state.messages shape.
98
- * Used for testing the "continue from assistant message" scenarios.
99
- */
100
- export interface ContextMessage {
101
- role: string;
102
- content: unknown;
103
- stopReason?: string;
104
- }
105
-
106
- export function makeContextMessages(
107
- ...msgs: ContextMessage[]
108
- ): ContextMessage[] {
109
- return msgs;
110
- }
111
-
112
- export function userMsg(text: string): ContextMessage {
113
- return { role: "user", content: [{ type: "text", text }] };
114
- }
115
-
116
- export function assistantMsg(
117
- text: string,
118
- stopReason = "stop",
119
- ): ContextMessage {
120
- return { role: "assistant", content: [{ type: "text", text }], stopReason };
121
- }
122
-
123
- export function toolResultMsg(
124
- toolCallId: string,
125
- content: string,
126
- ): ContextMessage {
127
- return {
128
- role: "toolResult",
129
- content: [{ type: "toolResult", toolCallId, content }],
130
- };
131
- }
132
-
133
- export function compactionSummaryMsg(summary: string): ContextMessage {
134
- return { role: "user", content: [{ type: "compactionSummary", text: summary }] };
135
- }