@danypops/pi-lector 0.13.7 → 0.13.11

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.
@@ -13,6 +13,8 @@ export interface AnnotationAnchorInput {
13
13
  readonly character: number;
14
14
  }
15
15
 
16
+ export type AnnotationAutoPopulationOptions = Pick<OperationInputs["workspace.createAnnotation"], "autoPopulate" | "maxFiles" | "maxSymbolsPerFile">;
17
+
16
18
  /**
17
19
  * Thin wrappers over Lector's annotation operations. Every operation resolves its workspace from
18
20
  * its own `path` parameter via workspaceForAnnotationPath -- a real project directory or an
@@ -29,6 +31,7 @@ export interface SymbolAnnotationOperations {
29
31
  body: string,
30
32
  anchors: readonly AnnotationAnchorInput[],
31
33
  call: LectorVehicleCall,
34
+ autoPopulation?: AnnotationAutoPopulationOptions,
32
35
  ): Promise<OperationOutputs["workspace.createAnnotation"]>;
33
36
  get(path: string, id: string, call: LectorVehicleCall): Promise<OperationOutputs["workspace.getAnnotation"]>;
34
37
  list(
@@ -44,6 +47,7 @@ export interface SymbolAnnotationOperations {
44
47
  body: string,
45
48
  anchors: readonly AnnotationAnchorInput[],
46
49
  call: LectorVehicleCall,
50
+ autoPopulation?: AnnotationAutoPopulationOptions,
47
51
  ): Promise<OperationOutputs["workspace.refreshAnnotation"]>;
48
52
  scrub(path: string, id: string, call: LectorVehicleCall): Promise<OperationOutputs["workspace.scrubAnnotation"]>;
49
53
  restore(path: string, id: string, call: LectorVehicleCall): Promise<OperationOutputs["workspace.restoreAnnotation"]>;
@@ -54,13 +58,13 @@ export interface SymbolAnnotationOperations {
54
58
 
55
59
  export function createLectorSymbolAnnotationOperations(): SymbolAnnotationOperations {
56
60
  return {
57
- async create(path, subtype, title, body, anchors, call) {
61
+ async create(path, subtype, title, body, anchors, call, autoPopulation) {
58
62
  return withWorkspace(
59
63
  () => workspaceForAnnotationPath(path),
60
64
  ({ workspaceId }) =>
61
65
  invokeLectorVehicleOperation<OperationOutputs["workspace.createAnnotation"]>(
62
66
  "workspace.createAnnotation",
63
- { workspaceId, subtype, title, body, anchors },
67
+ { workspaceId, subtype, title, body, anchors, ...autoPopulation },
64
68
  ANNOTATION_WRITE_PERMISSIONS,
65
69
  call,
66
70
  ),
@@ -90,13 +94,13 @@ export function createLectorSymbolAnnotationOperations(): SymbolAnnotationOperat
90
94
  ),
91
95
  );
92
96
  },
93
- async refresh(path, id, subtype, title, body, anchors, call) {
97
+ async refresh(path, id, subtype, title, body, anchors, call, autoPopulation) {
94
98
  return withWorkspace(
95
99
  () => workspaceForAnnotationPath(path),
96
100
  ({ workspaceId }) =>
97
101
  invokeLectorVehicleOperation<OperationOutputs["workspace.refreshAnnotation"]>(
98
102
  "workspace.refreshAnnotation",
99
- { workspaceId, id, subtype, title, body, anchors },
103
+ { workspaceId, id, subtype, title, body, anchors, ...autoPopulation },
100
104
  ANNOTATION_WRITE_PERMISSIONS,
101
105
  call,
102
106
  ),
@@ -29,9 +29,11 @@ import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
29
29
 
30
30
  type VehicleClientConnector = () => Promise<VehicleClient>;
31
31
 
32
- function connectLectorVehicleClient(): Promise<VehicleClient> {
32
+ async function connectLectorVehicleClient(): Promise<VehicleClient> {
33
33
  const { host, port, token } = resolveLectorDaemonConnection();
34
- return Promise.resolve(new RemoteVehicleClient({ baseUrl: `http://${host}:${port}`, token }));
34
+ const client = new RemoteVehicleClient({ baseUrl: `http://${host}:${port}`, token });
35
+ await client.negotiate({ minimumVersion: 1, maximumVersion: 1, requiredCapabilities: [], optionalCapabilities: [] });
36
+ return client;
35
37
  }
36
38
 
37
39
  function resolveLectorVehicleIdentity() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danypops/pi-lector",
3
- "version": "0.13.7",
3
+ "version": "0.13.11",
4
4
  "description": "Pi host adapter for Lector: overrides read/write/edit with a daemon-backed, hash-guarded filesystem",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -22,9 +22,9 @@
22
22
  "@danypops/vehicle-client-pi": "^0.45.0"
23
23
  },
24
24
  "dependencies": {
25
- "@danypops/lector": "^0.20.0",
26
- "@danypops/vehicle-client": "^0.10.3",
27
- "@danypops/vehicle-core": "^0.17.1",
25
+ "@danypops/lector": "^0.20.4",
26
+ "@danypops/vehicle-client": "^0.10.8",
27
+ "@danypops/vehicle-core": "^0.19.1",
28
28
  "malevich-tui-components": "^0.32.1",
29
29
  "picomatch": "^4.0.5"
30
30
  },