@danypops/pi-papyrus 0.55.1 → 0.55.3
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/extension/src/service-client.ts +7 -1
- package/extension/src/tool-rendering/render-model/index.ts +3 -8
- package/extension/src/tool-rendering/render-model/shared.ts +1 -4
- package/extension/src/tool-rendering/render-model.ts +3 -12
- package/extension/src/tools/renderers/index.ts +3 -8
- package/extension/src/tools/renderers/shared.ts +2 -5
- package/extension/src/tools/vehicle-artifact-renderers.ts +1 -8
- package/extension/src/tools/vehicle-notes-client.ts +4 -0
- package/package.json +2 -2
|
@@ -17,7 +17,13 @@ import {
|
|
|
17
17
|
type ClientConnector = () => Promise<PapyrusClient>;
|
|
18
18
|
|
|
19
19
|
let connector: ClientConnector = () => connectPapyrusClient();
|
|
20
|
-
|
|
20
|
+
// connectRetry:true (vehicle-client's own bounded background retry budget) covers a
|
|
21
|
+
// daemon that crashed and is mid systemd-restart -- without it, the very first call
|
|
22
|
+
// during that window fails immediately instead of waiting the ~2s restart out.
|
|
23
|
+
const client: RetryingClient<PapyrusClient> = createRetryingClient<PapyrusClient>(() => connector(), {
|
|
24
|
+
label: "Papyrus",
|
|
25
|
+
connectRetry: true,
|
|
26
|
+
});
|
|
21
27
|
|
|
22
28
|
export async function papyrusClient(): Promise<PapyrusClient> {
|
|
23
29
|
return client.call(async (resolved) => resolved);
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* render-model/ -- typed, bounded Vehicle-result render details, one file per result-kind
|
|
3
|
-
* (
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* "pi-papyrus render-model.ts split" child of "Epic: Modularize papyrus/pi-papyrus god-files into
|
|
7
|
-
* building-block modules"). This file is the one place that assembles every kind into the
|
|
8
|
-
* PapyrusToolDetails union and validates a persisted one back (parsePapyrusToolDetails) -- the
|
|
9
|
-
* "wide internal, narrow public" shape: each sibling module owns one kind's own real complexity,
|
|
10
|
-
* this one only ever needs to know each kind's own type + guard, never re-derive it.
|
|
3
|
+
* (Strategy-shaped: one create-and-is-guard pair per kind). This file assembles every kind into
|
|
4
|
+
* the PapyrusToolDetails union and validates a persisted one back (parsePapyrusToolDetails) --
|
|
5
|
+
* each sibling module owns one kind's own complexity, this one only needs its type + guard.
|
|
11
6
|
*/
|
|
12
7
|
import {
|
|
13
8
|
TOOL_DETAILS_BODY_MAX_CHARACTERS,
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Base kernel shared by every render-model/*.ts result-kind module: the schema-version marker,
|
|
3
3
|
* the common completeness/bounding primitives, and the base validators nearly every kind's own
|
|
4
|
-
* parse case reuses.
|
|
5
|
-
* driven decomposition (see Doc "Modularity playbook: building-block-shaped TypeScript modules
|
|
6
|
-
* for papyrus/pi-papyrus" and the "pi-papyrus render-model.ts split" child of "Epic: Modularize
|
|
7
|
-
* papyrus/pi-papyrus god-files into building-block modules").
|
|
4
|
+
* parse case reuses.
|
|
8
5
|
*/
|
|
9
6
|
import {
|
|
10
7
|
type Artifact,
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Barrel re-exporting the typed, bounded Vehicle-result render details, one file per result-kind,
|
|
3
3
|
* from ./render-model/. Kept as a real file (not relying on directory-index resolution) so every
|
|
4
|
-
* existing `from "./render-model.ts"`
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* unchanged -- this codebase's imports always carry an explicit `.ts` extension, which does not
|
|
8
|
-
* implicitly resolve a bare specifier to a directory's own index file the way Node's CJS
|
|
9
|
-
* `require()` does.
|
|
10
|
-
*
|
|
11
|
-
* The real implementation now lives in ./render-model/ (one file per result-kind, already
|
|
12
|
-
* Strategy-shaped in spirit) instead of one 827-line file -- see Doc "Modularity playbook:
|
|
13
|
-
* building-block-shaped TypeScript modules for papyrus/pi-papyrus" and the "pi-papyrus
|
|
14
|
-
* render-model.ts split" child of "Epic: Modularize papyrus/pi-papyrus god-files into
|
|
15
|
-
* building-block modules".
|
|
4
|
+
* existing `from "./render-model.ts"` import keeps resolving unchanged -- this codebase's imports
|
|
5
|
+
* always carry an explicit `.ts` extension, which does not implicitly resolve a bare specifier to
|
|
6
|
+
* a directory's own index file the way Node's CJS `require()` does.
|
|
16
7
|
*/
|
|
17
8
|
export * from "./render-model/index.ts";
|
|
@@ -11,14 +11,9 @@
|
|
|
11
11
|
* Falls back to the generic Vehicle renderer for any other output shape
|
|
12
12
|
* (progress, transitions, gate runs, errors).
|
|
13
13
|
*
|
|
14
|
-
* This file
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* real complexity, this one only ever needs to know each kind's own type + guard + renderer, never
|
|
18
|
-
* re-derive it. Split out of the former single 670-line vehicle-artifact-renderers.ts as part of a
|
|
19
|
-
* SOLID-audit-driven decomposition (see Doc "Modularity playbook: building-block-shaped
|
|
20
|
-
* TypeScript modules for papyrus/pi-papyrus" and the "pi-papyrus vehicle-artifact-renderers.ts
|
|
21
|
-
* split" child of "Epic: Modularize papyrus/pi-papyrus god-files into building-block modules").
|
|
14
|
+
* This file assembles every result-kind's own detector/renderer into the two exported Registry
|
|
15
|
+
* entry points (papyrusVehicleRenderers/papyrusVehiclePresentations) -- each sibling module owns
|
|
16
|
+
* one kind's own complexity, this one only needs its type + guard + renderer.
|
|
22
17
|
*/
|
|
23
18
|
|
|
24
19
|
import { TOOL_DETAILS_MAX_SERIALIZED_CHARACTERS } from "@danypops/papyrus";
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Base shape-detection kernel shared by every renderers/*.ts result-kind module: the generic
|
|
3
3
|
* "looks like an Artifact" duck-typing every other detector in this directory builds on, plus the
|
|
4
|
-
* Task Focus wrapper shape and small rendering primitives with no kind-specific machinery of
|
|
5
|
-
* own.
|
|
6
|
-
* decomposition (see Doc "Modularity playbook: building-block-shaped TypeScript modules for
|
|
7
|
-
* papyrus/pi-papyrus" and the "pi-papyrus vehicle-artifact-renderers.ts split" child of "Epic:
|
|
8
|
-
* Modularize papyrus/pi-papyrus god-files into building-block modules").
|
|
4
|
+
* Task Focus wrapper shape and small rendering primitives with no kind-specific machinery of
|
|
5
|
+
* their own.
|
|
9
6
|
*/
|
|
10
7
|
import type { Artifact } from "@danypops/papyrus";
|
|
11
8
|
import type { Theme } from "@earendil-works/pi-coding-agent";
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Barrel re-exporting Papyrus's own Vehicle-projected result renderers from ./renderers/. Kept as
|
|
3
3
|
* a real file (not relying on directory-index resolution) so every existing
|
|
4
|
-
* `from "./vehicle-artifact-renderers.ts"`
|
|
5
|
-
* import (vehicle-notes-client.ts plus 3 test files) keeps resolving unchanged -- this codebase's
|
|
4
|
+
* `from "./vehicle-artifact-renderers.ts"` import keeps resolving unchanged -- this codebase's
|
|
6
5
|
* imports always carry an explicit `.ts` extension, which does not implicitly resolve a bare
|
|
7
6
|
* specifier to a directory's own index file the way Node's CJS `require()` does.
|
|
8
|
-
*
|
|
9
|
-
* The real implementation now lives in ./renderers/ (one file per result-kind, plus index.ts as
|
|
10
|
-
* the Registry assembly point) instead of one 670-line file -- see Doc "Modularity playbook:
|
|
11
|
-
* building-block-shaped TypeScript modules for papyrus/pi-papyrus" and the "pi-papyrus
|
|
12
|
-
* vehicle-artifact-renderers.ts split" child of "Epic: Modularize papyrus/pi-papyrus god-files
|
|
13
|
-
* into building-block modules".
|
|
14
7
|
*/
|
|
15
8
|
export { papyrusVehiclePresentations, papyrusVehicleRenderers } from "./renderers/index.ts";
|
|
@@ -121,6 +121,10 @@ export function registerNotesVehicle(pi: ExtensionAPI): Promise<RegisteredPiVehi
|
|
|
121
121
|
// every dispatch so a long-lived Pi session never sends one sacrificial call to a
|
|
122
122
|
// cached dead port just to discover what the handle file already says.
|
|
123
123
|
resolveIdentity: () => daemonInstanceIdentity(resolveTarget().baseUrl),
|
|
124
|
+
// connectRetry:true (vehicle-client's own bounded background retry budget) covers a
|
|
125
|
+
// daemon that crashed and is mid systemd-restart -- without it, the very first call
|
|
126
|
+
// during that window fails immediately instead of waiting the ~2s restart out.
|
|
127
|
+
connectRetry: true,
|
|
124
128
|
},
|
|
125
129
|
);
|
|
126
130
|
return registerVehicleToolsWhenReady(pi, () => Promise.resolve(currentVehicleClientTarget() ? client : undefined), {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danypops/pi-papyrus",
|
|
3
|
-
"version": "0.55.
|
|
3
|
+
"version": "0.55.3",
|
|
4
4
|
"description": "Pi host extension for Papyrus: native tools, TUI panels, and context injection over the daemon-backed graph store",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": ["pi-package"],
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@danypops/jittor": "^0.18.1",
|
|
21
21
|
"@danypops/papyrus": "^0.54.2",
|
|
22
|
-
"@danypops/vehicle-client": "^0.
|
|
22
|
+
"@danypops/vehicle-client": "^0.10.0",
|
|
23
23
|
"@danypops/vehicle-client-pi": "^0.40.1",
|
|
24
24
|
"@danypops/vehicle-core": "^0.12.3",
|
|
25
25
|
"@danypops/vehicle-server": "^0.18.1",
|