@lune_99/pi-recap 0.0.0-stage → 0.1.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.
- package/CHANGELOG.md +42 -0
- package/LICENSE +21 -0
- package/README.md +69 -2
- package/dist/extension.d.ts +5 -0
- package/dist/extension.js +77 -0
- package/dist/focus.d.ts +5 -0
- package/dist/focus.js +23 -0
- package/dist/generate.d.ts +9 -0
- package/dist/generate.js +71 -0
- package/dist/input.d.ts +50 -0
- package/dist/input.js +138 -0
- package/dist/panel.d.ts +8 -0
- package/dist/panel.js +44 -0
- package/dist/runtime.d.ts +117 -0
- package/dist/runtime.js +572 -0
- package/dist/settings.d.ts +23 -0
- package/dist/settings.js +31 -0
- package/docs/recap-settings.png +0 -0
- package/docs/recap-settings.svg +20 -0
- package/docs/recap-widget.png +0 -0
- package/docs/recap-widget.svg +9 -0
- package/package.json +64 -5
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Type, type Static } from "typebox";
|
|
2
|
+
import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
3
|
+
import { type SettingsView } from "@lune_99/pi-lune-extensions-core/settings";
|
|
4
|
+
export declare const recapSchema: Type.TObject<{
|
|
5
|
+
enabled: Type.TBoolean;
|
|
6
|
+
model: Type.TUnion<[Type.TNull, Type.TObject<{
|
|
7
|
+
provider: Type.TString;
|
|
8
|
+
id: Type.TString;
|
|
9
|
+
}>]>;
|
|
10
|
+
thinkingLevel: Type.TUnion<[Type.TLiteral<"off">, Type.TLiteral<"minimal">, Type.TLiteral<"low">, Type.TLiteral<"medium">, Type.TLiteral<"high">, Type.TLiteral<"xhigh">, Type.TLiteral<"max">]>;
|
|
11
|
+
}>;
|
|
12
|
+
export type RecapSettings = Static<typeof recapSchema>;
|
|
13
|
+
export type RecapSettingsView = SettingsView<typeof recapSchema>;
|
|
14
|
+
/** Resolve references at use time so registry changes cannot leave a cached model behind. */
|
|
15
|
+
export declare function resolveRecapModel(ctx: ExtensionContext, settings: RecapSettings): import("@earendil-works/pi-ai").Model<any> | undefined;
|
|
16
|
+
export declare const recapSettings: import("@lune_99/pi-lune-extensions-core/settings").DefinedSettings<Type.TObject<{
|
|
17
|
+
enabled: Type.TBoolean;
|
|
18
|
+
model: Type.TUnion<[Type.TNull, Type.TObject<{
|
|
19
|
+
provider: Type.TString;
|
|
20
|
+
id: Type.TString;
|
|
21
|
+
}>]>;
|
|
22
|
+
thinkingLevel: Type.TUnion<[Type.TLiteral<"off">, Type.TLiteral<"minimal">, Type.TLiteral<"low">, Type.TLiteral<"medium">, Type.TLiteral<"high">, Type.TLiteral<"xhigh">, Type.TLiteral<"max">]>;
|
|
23
|
+
}>>;
|
package/dist/settings.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Type } from "typebox";
|
|
2
|
+
import { defineSettings } from "@lune_99/pi-lune-extensions-core/settings";
|
|
3
|
+
export const recapSchema = Type.Object({
|
|
4
|
+
enabled: Type.Boolean({ default: false }),
|
|
5
|
+
model: Type.Union([
|
|
6
|
+
Type.Null(),
|
|
7
|
+
Type.Object({
|
|
8
|
+
provider: Type.String({ minLength: 1 }),
|
|
9
|
+
id: Type.String({ minLength: 1 }),
|
|
10
|
+
}),
|
|
11
|
+
], { default: null }),
|
|
12
|
+
thinkingLevel: Type.Union([
|
|
13
|
+
Type.Literal("off"),
|
|
14
|
+
Type.Literal("minimal"),
|
|
15
|
+
Type.Literal("low"),
|
|
16
|
+
Type.Literal("medium"),
|
|
17
|
+
Type.Literal("high"),
|
|
18
|
+
Type.Literal("xhigh"),
|
|
19
|
+
Type.Literal("max"),
|
|
20
|
+
], { default: "off" }),
|
|
21
|
+
});
|
|
22
|
+
/** Resolve references at use time so registry changes cannot leave a cached model behind. */
|
|
23
|
+
export function resolveRecapModel(ctx, settings) {
|
|
24
|
+
return settings.model
|
|
25
|
+
? ctx.modelRegistry.find(settings.model.provider, settings.model.id)
|
|
26
|
+
: ctx.model;
|
|
27
|
+
}
|
|
28
|
+
export const recapSettings = defineSettings({
|
|
29
|
+
id: "pi-recap",
|
|
30
|
+
schema: recapSchema,
|
|
31
|
+
});
|
|
Binary file
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="929.5799999999999" height="322.2" viewBox="0 0 929.5799999999999 322.2" font-family="Menlo, FiraCode Nerd Font Mono, monospace" font-size="14" xml:space="preserve" role="img" aria-label="pi — a recap on demand, or when you return">
|
|
2
|
+
<title>pi — a recap on demand, or when you return</title>
|
|
3
|
+
<rect width="929.5799999999999" height="322.2" rx="10" fill="#181a1b"/>
|
|
4
|
+
<rect width="929.5799999999999" height="34" rx="10" fill="#768186" opacity="0.25"/>
|
|
5
|
+
<circle cx="24" cy="17" r="5" fill="#ff5f57"/><circle cx="42" cy="17" r="5" fill="#febc2e"/><circle cx="60" cy="17" r="5" fill="#28c840"/>
|
|
6
|
+
<text x="80" y="22" fill="#9da5a9" font-size="13">pi — a recap on demand, or when you return</text>
|
|
7
|
+
<text x="18.00" y="65.97" fill="#7e888e" textLength="893.58" lengthAdjust="spacingAndGlyphs">──────────────────────────────────────────────────────────────────────────────────────────────────────────</text>
|
|
8
|
+
<text x="18.00" y="85.37" fill="#a798d7" textLength="185.46" lengthAdjust="spacingAndGlyphs">Lune settings · global</text>
|
|
9
|
+
<text x="18.00" y="104.77" fill="#a798d7" textLength="42.15" lengthAdjust="spacingAndGlyphs">Recap</text>
|
|
10
|
+
<text x="18.00" y="124.17" fill="#7e888e" textLength="893.58" lengthAdjust="spacingAndGlyphs">──────────────────────────────────────────────────────────────────────────────────────────────────────────</text>
|
|
11
|
+
<text x="18.00" y="143.57" fill="#a798d7" textLength="311.91" lengthAdjust="spacingAndGlyphs">→ Automatic recap off</text>
|
|
12
|
+
<text x="18.00" y="162.97" fill="#dee0e1" textLength="109.59" lengthAdjust="spacingAndGlyphs"> Recap model</text><text x="127.59" y="162.97" fill="#9da5a9" textLength="345.63" lengthAdjust="spacingAndGlyphs"> Follow session model</text>
|
|
13
|
+
<text x="18.00" y="182.37" fill="#dee0e1" textLength="185.46" lengthAdjust="spacingAndGlyphs"> Recap thinking level</text><text x="203.46" y="182.37" fill="#9da5a9" textLength="126.45" lengthAdjust="spacingAndGlyphs"> off</text>
|
|
14
|
+
|
|
15
|
+
<text x="18.00" y="221.17" fill="#9da5a9" textLength="809.28" lengthAdjust="spacingAndGlyphs">Off by default. Automatic recap requires real terminal focus reports (e.g. fullscreen); ordinary</text>
|
|
16
|
+
<text x="18.00" y="240.57" fill="#9da5a9" textLength="295.05" lengthAdjust="spacingAndGlyphs">scrollback may only support /recap.</text>
|
|
17
|
+
<text x="18.00" y="259.97" fill="#7e888e" textLength="893.58" lengthAdjust="spacingAndGlyphs">──────────────────────────────────────────────────────────────────────────────────────────────────────────</text>
|
|
18
|
+
<text x="18.00" y="279.37" fill="#7e888e" textLength="876.72" lengthAdjust="spacingAndGlyphs">↑↓ select · Enter change · Tab section · Ctrl+G scope · Ctrl+S reload section · Ctrl+R reset · Esc close</text>
|
|
19
|
+
<text x="18.00" y="298.77" fill="#7e888e" textLength="893.58" lengthAdjust="spacingAndGlyphs">──────────────────────────────────────────────────────────────────────────────────────────────────────────</text>
|
|
20
|
+
</svg>
|
|
Binary file
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="912.72" height="108.8" viewBox="0 0 912.72 108.8" font-family="Menlo, FiraCode Nerd Font Mono, monospace" font-size="14" xml:space="preserve" role="img" aria-label="pi — pick up where you left off">
|
|
2
|
+
<title>pi — pick up where you left off</title>
|
|
3
|
+
<rect width="912.72" height="108.8" rx="10" fill="#181a1b"/>
|
|
4
|
+
<rect width="912.72" height="34" rx="10" fill="#768186" opacity="0.25"/>
|
|
5
|
+
<circle cx="24" cy="17" r="5" fill="#ff5f57"/><circle cx="42" cy="17" r="5" fill="#febc2e"/><circle cx="60" cy="17" r="5" fill="#28c840"/>
|
|
6
|
+
<text x="80" y="22" fill="#9da5a9" font-size="13">pi — pick up where you left off</text>
|
|
7
|
+
<text x="18.00" y="65.97" fill="#dee0e1" textLength="8.43" lengthAdjust="spacingAndGlyphs"> </text><text x="26.43" y="65.97" fill="#7e888e" textLength="834.57" lengthAdjust="spacingAndGlyphs">☾ recap · The retry policy is implemented and the focused tests pass. The full suite still needs to</text><text x="861.00" y="65.97" fill="#dee0e1" textLength="33.72" lengthAdjust="spacingAndGlyphs"> </text>
|
|
8
|
+
<text x="18.00" y="85.37" fill="#dee0e1" textLength="8.43" lengthAdjust="spacingAndGlyphs"> </text><text x="26.43" y="85.37" fill="#7e888e" textLength="269.76" lengthAdjust="spacingAndGlyphs">run before the release is ready.</text><text x="296.19" y="85.37" fill="#dee0e1" textLength="598.53" lengthAdjust="spacingAndGlyphs"> </text>
|
|
9
|
+
</svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,65 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "@lune_99/pi-recap",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Independent session recap for Pi using Lune Core settings and panel infrastructure",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/extension.d.ts",
|
|
9
|
+
"default": "./dist/extension.js"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist",
|
|
14
|
+
"docs",
|
|
15
|
+
"README.md",
|
|
16
|
+
"CHANGELOG.md",
|
|
17
|
+
"LICENSE"
|
|
18
|
+
],
|
|
19
|
+
"pi": {
|
|
20
|
+
"extensions": [
|
|
21
|
+
"./dist/extension.js"
|
|
22
|
+
],
|
|
23
|
+
"image": "./docs/recap-widget.png"
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && tsc -p tsconfig.build.json",
|
|
27
|
+
"typecheck": "tsc --noEmit",
|
|
28
|
+
"test": "node --experimental-strip-types --test 'test/**/*.test.ts'",
|
|
29
|
+
"tui:demo": "node --experimental-strip-types test/tui/launch.ts",
|
|
30
|
+
"tui:smoke": "python3 test/tui/recap-smoke.py",
|
|
31
|
+
"prepack": "npm run build",
|
|
32
|
+
"docs:images": "node --experimental-strip-types tools/make-doc-images.mjs"
|
|
33
|
+
},
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=22.19.0"
|
|
36
|
+
},
|
|
37
|
+
"license": "MIT",
|
|
38
|
+
"author": "Nouvelle-Lune",
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@lune_99/pi-lune-extensions-core": "^0.1.0"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"@earendil-works/pi-ai": ">=1.0.4",
|
|
44
|
+
"@earendil-works/pi-coding-agent": ">=1.0.4",
|
|
45
|
+
"@earendil-works/pi-tui": ">=1.0.0",
|
|
46
|
+
"typebox": ">=1.3.27"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@earendil-works/pi-ai": "1.3.0",
|
|
50
|
+
"@earendil-works/pi-coding-agent": "1.3.0",
|
|
51
|
+
"@earendil-works/pi-tui": "1.3.0",
|
|
52
|
+
"@types/node": "^22.20.2",
|
|
53
|
+
"typebox": "1.3.27",
|
|
54
|
+
"typescript": "5.9.3"
|
|
55
|
+
},
|
|
56
|
+
"repository": {
|
|
57
|
+
"type": "git",
|
|
58
|
+
"url": "git+https://github.com/Nouvelle-Lune/lune-pi.git",
|
|
59
|
+
"directory": "packages/pi-recap"
|
|
60
|
+
},
|
|
61
|
+
"homepage": "https://github.com/Nouvelle-Lune/lune-pi/tree/main/packages/pi-recap#readme",
|
|
62
|
+
"bugs": {
|
|
63
|
+
"url": "https://github.com/Nouvelle-Lune/lune-pi/issues"
|
|
64
|
+
}
|
|
65
|
+
}
|