pi-context-kit 0.4.2 → 0.4.4
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/CHANGELOG.md +22 -8
- package/LICENSE +1 -1
- package/README.md +162 -151
- package/context-kit.schema.json +62 -78
- package/extensions/index.ts +279 -256
- package/node_modules/pi-hl-utils/LICENSE +21 -0
- package/node_modules/pi-hl-utils/package.json +47 -0
- package/node_modules/pi-hl-utils/src/errors.ts +9 -0
- package/node_modules/pi-hl-utils/src/evidence.ts +363 -0
- package/node_modules/pi-hl-utils/src/expand-on-click.ts +90 -0
- package/node_modules/pi-hl-utils/src/layered-settings.ts +513 -0
- package/node_modules/pi-hl-utils/src/null-optional-arguments.ts +147 -0
- package/node_modules/pi-hl-utils/src/pi-agent-session-discovery.ts +48 -0
- package/node_modules/pi-hl-utils/src/record.ts +3 -0
- package/node_modules/pi-hl-utils/src/settings-command.ts +213 -0
- package/node_modules/pi-hl-utils/src/settings-menu.ts +477 -0
- package/node_modules/pi-hl-utils/src/token-calibration.ts +39 -0
- package/node_modules/pi-hl-utils/src/ui.ts +355 -0
- package/package.json +42 -44
- package/src/background.ts +2 -3
- package/src/command.ts +17 -0
- package/src/config.ts +3 -207
- package/src/context-kit-settings.ts +152 -0
- package/src/context.ts +43 -16
- package/src/files.ts +6 -13
- package/src/handoff.ts +3 -7
- package/src/maintain.ts +6 -19
- package/src/menu.ts +159 -0
- package/src/migrate.ts +99 -19
- package/src/note.ts +5 -6
- package/src/prune.ts +2 -1
- package/src/recall.ts +14 -37
- package/src/settings-file.ts +13 -101
- package/src/shake.ts +6 -12
- package/src/stale.ts +22 -26
- package/src/status.ts +2 -6
- package/src/tool-calls.ts +2 -3
- package/README.zh-CN.md +0 -387
- package/src/panel.ts +0 -89
package/context-kit.schema.json
CHANGED
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://unpkg.com/pi-context-kit/context-kit.schema.json",
|
|
4
4
|
"title": "pi-context-kit settings",
|
|
5
|
-
"description": "~/.pi/agent/
|
|
5
|
+
"description": "The \"context-kit\" namespace of Pi's settings.json: ~/.pi/agent/settings.json, or .pi/settings.json in a trusted project.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"properties": {
|
|
9
|
-
"$schema": { "type": "string" },
|
|
10
9
|
"enabled": {
|
|
11
10
|
"description": "false stops context maintenance and handoff notes. recall stays available.",
|
|
12
11
|
"type": "boolean",
|
|
@@ -17,7 +16,10 @@
|
|
|
17
16
|
"default": "75%",
|
|
18
17
|
"oneOf": [
|
|
19
18
|
{ "type": "integer", "minimum": 1 },
|
|
20
|
-
{
|
|
19
|
+
{
|
|
20
|
+
"type": "string",
|
|
21
|
+
"pattern": "^(0*100(\\.0+)?|0*[1-9]\\d?(\\.\\d+)?|0+\\.\\d*[1-9]\\d*)%$"
|
|
22
|
+
},
|
|
21
23
|
{ "const": "pi" }
|
|
22
24
|
]
|
|
23
25
|
},
|
|
@@ -26,81 +28,63 @@
|
|
|
26
28
|
"enum": ["balanced", "frugal", "pi-summary"],
|
|
27
29
|
"default": "balanced"
|
|
28
30
|
},
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
"minimum": 0,
|
|
87
|
-
"default": 16000
|
|
88
|
-
},
|
|
89
|
-
"minSavings": {
|
|
90
|
-
"description": "Shake only when this many tokens or more are removed.",
|
|
91
|
-
"type": "integer",
|
|
92
|
-
"minimum": 0,
|
|
93
|
-
"default": 4000
|
|
94
|
-
},
|
|
95
|
-
"blockMinTokens": {
|
|
96
|
-
"description": "Code and XML blocks smaller than this are never shaken.",
|
|
97
|
-
"type": "integer",
|
|
98
|
-
"minimum": 0,
|
|
99
|
-
"default": 400
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
31
|
+
"methodOrder": {
|
|
32
|
+
"description": "Replaces the method order of the strategy. Methods after \"soft\" never run.",
|
|
33
|
+
"type": "array",
|
|
34
|
+
"items": { "enum": ["handoff", "shake", "soft"] }
|
|
35
|
+
},
|
|
36
|
+
"background": {
|
|
37
|
+
"description": "Write the handoff note in the background before the threshold. The strategy sets the default.",
|
|
38
|
+
"type": "boolean"
|
|
39
|
+
},
|
|
40
|
+
"supersedeReads": {
|
|
41
|
+
"description": "Replace an older read of a file that was read again.",
|
|
42
|
+
"type": "boolean",
|
|
43
|
+
"default": true
|
|
44
|
+
},
|
|
45
|
+
"progressRatio": {
|
|
46
|
+
"description": "Each method must bring the context to this fraction of the threshold, or the next method runs.",
|
|
47
|
+
"type": "number",
|
|
48
|
+
"exclusiveMinimum": 0,
|
|
49
|
+
"maximum": 1,
|
|
50
|
+
"default": 0.8
|
|
51
|
+
},
|
|
52
|
+
"pruneEnabled": { "type": "boolean", "default": true },
|
|
53
|
+
"pruneProtectTokens": {
|
|
54
|
+
"description": "The newest tool outputs, up to this many tokens, are never pruned.",
|
|
55
|
+
"type": "integer",
|
|
56
|
+
"minimum": 0,
|
|
57
|
+
"default": 40000
|
|
58
|
+
},
|
|
59
|
+
"pruneMinSavings": {
|
|
60
|
+
"description": "Prune only when this many tokens or more are removed.",
|
|
61
|
+
"type": "integer",
|
|
62
|
+
"minimum": 0,
|
|
63
|
+
"default": 20000
|
|
64
|
+
},
|
|
65
|
+
"pruneMinTokens": {
|
|
66
|
+
"description": "Tool outputs smaller than this are never pruned.",
|
|
67
|
+
"type": "integer",
|
|
68
|
+
"minimum": 0,
|
|
69
|
+
"default": 50
|
|
70
|
+
},
|
|
71
|
+
"shakeProtectTokens": {
|
|
72
|
+
"description": "The newest context, up to this many tokens, is never shaken.",
|
|
73
|
+
"type": "integer",
|
|
74
|
+
"minimum": 0,
|
|
75
|
+
"default": 16000
|
|
76
|
+
},
|
|
77
|
+
"shakeMinSavings": {
|
|
78
|
+
"description": "Shake only when this many tokens or more are removed.",
|
|
79
|
+
"type": "integer",
|
|
80
|
+
"minimum": 0,
|
|
81
|
+
"default": 4000
|
|
82
|
+
},
|
|
83
|
+
"shakeBlockMinTokens": {
|
|
84
|
+
"description": "Code and XML blocks smaller than this are never shaken.",
|
|
85
|
+
"type": "integer",
|
|
86
|
+
"minimum": 0,
|
|
87
|
+
"default": 400
|
|
104
88
|
}
|
|
105
89
|
}
|
|
106
90
|
}
|