@cortexkit/aft-pi 0.58.1 → 0.59.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/README.md +4 -0
- package/dist/bg-notifications.d.ts +8 -0
- package/dist/bg-notifications.d.ts.map +1 -1
- package/dist/config.d.ts +103 -21
- package/dist/config.d.ts.map +1 -1
- package/dist/hashline-tag-sources.d.ts +18 -0
- package/dist/hashline-tag-sources.d.ts.map +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3678 -1449
- package/dist/lsp-auto-install.d.ts +30 -0
- package/dist/lsp-auto-install.d.ts.map +1 -1
- package/dist/lsp-github-install.d.ts +5 -2
- package/dist/lsp-github-install.d.ts.map +1 -1
- package/dist/lsp-github-table.d.ts +4 -3
- package/dist/lsp-github-table.d.ts.map +1 -1
- package/dist/lsp-npm-table.d.ts +10 -0
- package/dist/lsp-npm-table.d.ts.map +1 -1
- package/dist/lsp-registry-probe.d.ts +8 -4
- package/dist/lsp-registry-probe.d.ts.map +1 -1
- package/dist/notifications.d.ts +1 -1
- package/dist/notifications.d.ts.map +1 -1
- package/dist/omp-internal-urls.d.ts +17 -0
- package/dist/omp-internal-urls.d.ts.map +1 -0
- package/dist/shared/status.d.ts +1 -0
- package/dist/shared/status.d.ts.map +1 -1
- package/dist/tool-registration.d.ts +4 -3
- package/dist/tool-registration.d.ts.map +1 -1
- package/dist/tools/_shared.d.ts.map +1 -1
- package/dist/tools/ast.d.ts +1 -18
- package/dist/tools/ast.d.ts.map +1 -1
- package/dist/tools/bash.d.ts +22 -6
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/fs.d.ts +2 -12
- package/dist/tools/fs.d.ts.map +1 -1
- package/dist/tools/hoisted.d.ts.map +1 -1
- package/dist/tools/imports.d.ts +3 -19
- package/dist/tools/imports.d.ts.map +1 -1
- package/dist/tools/inspect.d.ts +11 -9
- package/dist/tools/inspect.d.ts.map +1 -1
- package/dist/tools/navigate.d.ts +3 -17
- package/dist/tools/navigate.d.ts.map +1 -1
- package/dist/tools/reading.d.ts +3 -8
- package/dist/tools/reading.d.ts.map +1 -1
- package/dist/tools/render-helpers.d.ts +3 -1
- package/dist/tools/render-helpers.d.ts.map +1 -1
- package/dist/tools/safety.d.ts +3 -11
- package/dist/tools/safety.d.ts.map +1 -1
- package/dist/tools/semantic.d.ts +4 -3
- package/dist/tools/semantic.d.ts.map +1 -1
- package/dist/types.d.ts +9 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/workflow-hints.d.ts +64 -10
- package/dist/workflow-hints.d.ts.map +1 -1
- package/package.json +11 -10
package/dist/tools/navigate.d.ts
CHANGED
|
@@ -3,27 +3,13 @@
|
|
|
3
3
|
* Ops: call_tree, callers, trace_to, trace_to_symbol, impact, trace_data.
|
|
4
4
|
*/
|
|
5
5
|
import type { AgentToolResult, ExtensionAPI, Theme } from "@earendil-works/pi-coding-agent";
|
|
6
|
-
import { type Static, Type } from "typebox";
|
|
7
6
|
import type { PluginContext } from "../types.js";
|
|
8
7
|
import { type RenderContextLike, type RenderResultOptionsLike } from "./render-helpers.js";
|
|
9
|
-
declare function navigateParamsSchema(): Type.TObject<{
|
|
10
|
-
op: Type.TUnsafe<"call_tree" | "callers" | "trace_to" | "trace_to_symbol" | "impact" | "trace_data">;
|
|
11
|
-
path: Type.TString;
|
|
12
|
-
symbol: Type.TString;
|
|
13
|
-
depth: Type.TOptional<Type.TUnion<[Type.TInteger, Type.TString]>>;
|
|
14
|
-
expression: Type.TOptional<Type.TString>;
|
|
15
|
-
toSymbol: Type.TOptional<Type.TString>;
|
|
16
|
-
toPath: Type.TOptional<Type.TString>;
|
|
17
|
-
includeTests: Type.TOptional<Type.TBoolean>;
|
|
18
|
-
includeUnresolved: Type.TOptional<Type.TBoolean>;
|
|
19
|
-
}>;
|
|
20
|
-
type NavigateArgs = Static<ReturnType<typeof navigateParamsSchema>>;
|
|
21
8
|
/** Exported for renderer unit tests. */
|
|
22
|
-
export declare function buildNavigateSections(args:
|
|
9
|
+
export declare function buildNavigateSections(args: unknown, payload: unknown, theme: Theme): string[];
|
|
23
10
|
/** Exported for renderer unit tests. */
|
|
24
|
-
export declare function renderNavigateCall(args:
|
|
11
|
+
export declare function renderNavigateCall(args: unknown, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Text;
|
|
25
12
|
/** Exported for renderer unit tests. */
|
|
26
|
-
export declare function renderNavigateResult(result: AgentToolResult<unknown>, args:
|
|
13
|
+
export declare function renderNavigateResult(result: AgentToolResult<unknown>, args: unknown, theme: Theme, context: RenderContextLike, options?: RenderResultOptionsLike): import("@earendil-works/pi-tui").Component | import("@earendil-works/pi-tui").Text;
|
|
27
14
|
export declare function registerNavigateTool(pi: ExtensionAPI, ctx: PluginContext): void;
|
|
28
|
-
export {};
|
|
29
15
|
//# sourceMappingURL=navigate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigate.d.ts","sourceRoot":"","sources":["../../src/tools/navigate.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"navigate.d.ts","sourceRoot":"","sources":["../../src/tools/navigate.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAG5F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAYjD,OAAO,EAML,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAI7B,MAAM,qBAAqB,CAAC;AAoD7B,wCAAwC;AACxC,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,EAAE,CAU7F;AAED,wCAAwC;AACxC,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,iBAAiB,yCAezF;AAED,wCAAwC;AACxC,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,EAChC,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,EAC1B,OAAO,GAAE,uBAA4C,sFAWtD;AAED,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,GAAG,IAAI,CA4E/E"}
|
package/dist/tools/reading.d.ts
CHANGED
|
@@ -6,11 +6,6 @@ import type { AgentToolResult, ExtensionAPI, Theme } from "@earendil-works/pi-co
|
|
|
6
6
|
import { type Static, Type } from "typebox";
|
|
7
7
|
import type { PluginContext } from "../types.js";
|
|
8
8
|
import { type RenderContextLike, type RenderResultOptionsLike } from "./render-helpers.js";
|
|
9
|
-
declare const OutlineParams: Type.TObject<{
|
|
10
|
-
target: Type.TUnion<[Type.TString, Type.TArray<Type.TString>]>;
|
|
11
|
-
files: Type.TOptional<Type.TBoolean>;
|
|
12
|
-
includeTests: Type.TOptional<Type.TBoolean>;
|
|
13
|
-
}>;
|
|
14
9
|
declare const ZoomParams: Type.TObject<{
|
|
15
10
|
path: Type.TOptional<Type.TString>;
|
|
16
11
|
url: Type.TOptional<Type.TString>;
|
|
@@ -32,13 +27,13 @@ export interface ReadingSurface {
|
|
|
32
27
|
/** Exported for renderer unit tests. */
|
|
33
28
|
export declare function buildOutlineSections(text: string, theme: Theme): string[];
|
|
34
29
|
/** Exported for renderer unit tests. */
|
|
35
|
-
export declare function buildZoomSections(args:
|
|
30
|
+
export declare function buildZoomSections(args: unknown, payload: unknown, theme: Theme): string[];
|
|
36
31
|
/** Exported for renderer unit tests. */
|
|
37
|
-
export declare function renderOutlineCall(args:
|
|
32
|
+
export declare function renderOutlineCall(args: unknown, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Text;
|
|
38
33
|
/** Exported for renderer unit tests. */
|
|
39
34
|
export declare function renderOutlineResult(result: AgentToolResult<unknown>, theme: Theme, context: RenderContextLike, options?: RenderResultOptionsLike): import("@earendil-works/pi-tui").Component | import("@earendil-works/pi-tui").Text;
|
|
40
35
|
/** Exported for renderer unit tests. */
|
|
41
|
-
export declare function renderZoomCall(args:
|
|
36
|
+
export declare function renderZoomCall(args: unknown, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Text;
|
|
42
37
|
/** Exported for renderer unit tests. */
|
|
43
38
|
export declare function renderZoomResult(result: AgentToolResult<unknown>, args: Static<typeof ZoomParams>, theme: Theme, context: RenderContextLike, options?: RenderResultOptionsLike): import("@earendil-works/pi-tui").Component | import("@earendil-works/pi-tui").Text;
|
|
44
39
|
export declare function registerReadingTools(pi: ExtensionAPI, ctx: PluginContext, surface: ReadingSurface): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reading.d.ts","sourceRoot":"","sources":["../../src/tools/reading.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"reading.d.ts","sourceRoot":"","sources":["../../src/tools/reading.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EAEZ,KAAK,EACN,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAWjD,OAAO,EASL,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAK7B,MAAM,qBAAqB,CAAC;AA+B7B,QAAA,MAAM,UAAU;;;;;;;;;;;;;EA8Bd,CAAC;AAiCH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;CACf;AASD,wCAAwC;AACxC,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,EAAE,CAOzE;AAyDD,wCAAwC;AACxC,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,EAAE,CA2DzF;AAED,wCAAwC;AACxC,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,iBAAiB,yCAUxF;AAED,wCAAwC;AACxC,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,EAChC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,EAC1B,OAAO,GAAE,uBAA4C,sFAUtD;AAED,wCAAwC;AACxC,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,iBAAiB,yCAiCrF;AAED,wCAAwC;AACxC,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,EAChC,IAAI,EAAE,MAAM,CAAC,OAAO,UAAU,CAAC,EAC/B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,EAC1B,OAAO,GAAE,uBAA4C,sFAUtD;AAmBD,wBAAgB,oBAAoB,CAClC,EAAE,EAAE,YAAY,EAChB,GAAG,EAAE,aAAa,EAClB,OAAO,EAAE,cAAc,GACtB,IAAI,CA6MN"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared Pi TUI rendering helpers for AFT-backed tools.
|
|
3
3
|
*/
|
|
4
|
+
import { shortenHomePath as shortenPath } from "@cortexkit/aft-bridge";
|
|
5
|
+
export { shortenPath };
|
|
4
6
|
import { type AgentToolResult, type Theme } from "@earendil-works/pi-coding-agent";
|
|
5
7
|
import { type Component, Container, Text } from "@earendil-works/pi-tui";
|
|
6
8
|
export interface RenderContextLike<TArgs = unknown> {
|
|
@@ -22,7 +24,6 @@ export interface RenderResultOptionsLike {
|
|
|
22
24
|
export declare function normalizeTerminalText(text: string): string;
|
|
23
25
|
export declare function reuseText(last: Component | undefined): Text;
|
|
24
26
|
export declare function reuseContainer(last: Component | undefined): Container;
|
|
25
|
-
export declare function shortenPath(path: string): string;
|
|
26
27
|
export declare function renderToolCall(toolName: string, summary: string | undefined, theme: Theme, context: RenderContextLike): Text;
|
|
27
28
|
export declare function accentPath(theme: Theme, path: string | undefined): string;
|
|
28
29
|
export declare function collectTextContent(result: AgentToolResult<unknown>): string;
|
|
@@ -42,6 +43,7 @@ export declare function collapsibleResult({ summary, full, expanded, context, }:
|
|
|
42
43
|
}): Component;
|
|
43
44
|
export declare function renderSections(sections: string[], context: RenderContextLike): Container;
|
|
44
45
|
export declare function asRecord(value: unknown): Record<string, unknown> | undefined;
|
|
46
|
+
export declare function asRecordOrEmpty(value: unknown): Record<string, unknown>;
|
|
45
47
|
export declare function asRecords(value: unknown): Record<string, unknown>[];
|
|
46
48
|
export declare function asString(value: unknown): string | undefined;
|
|
47
49
|
export declare function asNumber(value: unknown): number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-helpers.d.ts","sourceRoot":"","sources":["../../src/tools/render-helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"render-helpers.d.ts","sourceRoot":"","sources":["../../src/tools/render-helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,IAAI,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEvE,OAAO,EAAE,WAAW,EAAE,CAAC;AAEvB,OAAO,EAAE,KAAK,eAAe,EAAc,KAAK,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAC/F,OAAO,EAAE,KAAK,SAAS,EAAE,SAAS,EAAU,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAEjF,MAAM,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E,OAAO,GAAG,MAAM,GAAG,SAAS,CAOlE;AAED,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CA+ClE;AAED,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAQ7D"}
|
package/dist/tools/safety.d.ts
CHANGED
|
@@ -2,21 +2,13 @@
|
|
|
2
2
|
* aft_safety — operation undo, per-file history, named checkpoints, restore, list.
|
|
3
3
|
*/
|
|
4
4
|
import type { AgentToolResult, ExtensionAPI, Theme } from "@earendil-works/pi-coding-agent";
|
|
5
|
-
import { type Static, Type } from "typebox";
|
|
6
5
|
import type { PluginContext } from "../types.js";
|
|
7
6
|
import { type RenderContextLike, type RenderResultOptionsLike } from "./render-helpers.js";
|
|
8
|
-
declare const SafetyParams: Type.TObject<{
|
|
9
|
-
op: Type.TUnsafe<"undo" | "history" | "checkpoint" | "restore" | "list">;
|
|
10
|
-
path: Type.TOptional<Type.TString>;
|
|
11
|
-
name: Type.TOptional<Type.TString>;
|
|
12
|
-
files: Type.TOptional<Type.TArray<Type.TString>>;
|
|
13
|
-
}>;
|
|
14
7
|
/** Exported for renderer unit tests. */
|
|
15
|
-
export declare function buildSafetySections(args:
|
|
8
|
+
export declare function buildSafetySections(args: unknown, payload: unknown, theme: Theme): string[];
|
|
16
9
|
/** Exported for renderer unit tests. */
|
|
17
|
-
export declare function renderSafetyCall(args:
|
|
10
|
+
export declare function renderSafetyCall(args: unknown, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Text;
|
|
18
11
|
/** Exported for renderer unit tests. */
|
|
19
|
-
export declare function renderSafetyResult(result: AgentToolResult<unknown>, args:
|
|
12
|
+
export declare function renderSafetyResult(result: AgentToolResult<unknown>, args: unknown, theme: Theme, context: RenderContextLike, options?: RenderResultOptionsLike): import("@earendil-works/pi-tui").Component | import("@earendil-works/pi-tui").Text;
|
|
20
13
|
export declare function registerSafetyTool(pi: ExtensionAPI, ctx: PluginContext): void;
|
|
21
|
-
export {};
|
|
22
14
|
//# sourceMappingURL=safety.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"safety.d.ts","sourceRoot":"","sources":["../../src/tools/safety.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"safety.d.ts","sourceRoot":"","sources":["../../src/tools/safety.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAE5F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AASjD,OAAO,EAUL,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAK7B,MAAM,qBAAqB,CAAC;AA6B7B,wCAAwC;AACxC,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,EAAE,CAyF3F;AAED,wCAAwC;AACxC,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,iBAAiB,yCAWvF;AAED,wCAAwC;AACxC,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,EAChC,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,EAC1B,OAAO,GAAE,uBAA4C,sFAWtD;AAED,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,GAAG,IAAI,CAwF7E"}
|
package/dist/tools/semantic.d.ts
CHANGED
|
@@ -8,16 +8,17 @@ import { type Static, Type } from "typebox";
|
|
|
8
8
|
import type { PluginContext } from "../types.js";
|
|
9
9
|
import { type RenderContextLike, type RenderResultOptionsLike } from "./render-helpers.js";
|
|
10
10
|
declare const SearchParams: Type.TObject<{
|
|
11
|
-
query: Type.TString
|
|
11
|
+
query: Type.TOptional<Type.TString>;
|
|
12
|
+
pattern: Type.TOptional<Type.TString>;
|
|
12
13
|
topK: Type.TOptional<Type.TInteger>;
|
|
13
14
|
offset: Type.TOptional<Type.TInteger>;
|
|
14
15
|
includeTests: Type.TOptional<Type.TBoolean>;
|
|
15
16
|
path: Type.TOptional<Type.TString>;
|
|
16
17
|
}>;
|
|
17
18
|
/** Exported for renderer unit tests. */
|
|
18
|
-
export declare function buildSemanticSections(args:
|
|
19
|
+
export declare function buildSemanticSections(args: unknown, payload: unknown, theme: Theme): string[];
|
|
19
20
|
/** Exported for renderer unit tests. */
|
|
20
|
-
export declare function renderSemanticCall(args:
|
|
21
|
+
export declare function renderSemanticCall(args: unknown, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Text;
|
|
21
22
|
/** Exported for renderer unit tests. */
|
|
22
23
|
export declare function renderSemanticResult(result: AgentToolResult<unknown>, args: Static<typeof SearchParams>, theme: Theme, context: RenderContextLike, options?: RenderResultOptionsLike): import("@earendil-works/pi-tui").Component | import("@earendil-works/pi-tui").Text;
|
|
23
24
|
export declare function registerSemanticTool(pi: ExtensionAPI, ctx: PluginContext): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"semantic.d.ts","sourceRoot":"","sources":["../../src/tools/semantic.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAC5F,OAAO,EAAE,KAAK,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AASjD,OAAO,
|
|
1
|
+
{"version":3,"file":"semantic.d.ts","sourceRoot":"","sources":["../../src/tools/semantic.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAC5F,OAAO,EAAE,KAAK,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AASjD,OAAO,EASL,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAK7B,MAAM,qBAAqB,CAAC;AA6E7B,QAAA,MAAM,YAAY;;;;;;;EAgDjB,CAAC;AAEF,wCAAwC;AACxC,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,EAAE,CAmH7F;AAED,wCAAwC;AACxC,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,iBAAiB,yCAUzF;AAED,wCAAwC;AACxC,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,EAChC,IAAI,EAAE,MAAM,CAAC,OAAO,YAAY,CAAC,EACjC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,EAC1B,OAAO,GAAE,uBAA4C,sFAUtD;AAED,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,GAAG,IAAI,CAwF/E"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AftTransportPool } from "@cortexkit/aft-bridge";
|
|
2
2
|
import type { AftConfig } from "./config.js";
|
|
3
|
+
import type { OmpInternalUrlRouter } from "./omp-internal-urls.js";
|
|
3
4
|
/**
|
|
4
5
|
* Shared context passed to every tool wrapper.
|
|
5
6
|
* Bundles the bridge pool, the resolved AFT config, and the storage dir.
|
|
@@ -12,9 +13,17 @@ import type { AftConfig } from "./config.js";
|
|
|
12
13
|
export interface PluginContext {
|
|
13
14
|
pool: AftTransportPool;
|
|
14
15
|
config: AftConfig;
|
|
16
|
+
/** OMP's process-global internal URL router, absent on upstream Pi. */
|
|
17
|
+
ompRouter?: OmpInternalUrlRouter;
|
|
15
18
|
/** Whether hashline edit/read mode is active for this plugin registration. */
|
|
16
19
|
hashlineEffective?: boolean;
|
|
17
20
|
/** Absolute path to AFT's data storage dir (e.g. ~/.local/share/cortexkit/aft). */
|
|
18
21
|
storageDir: string;
|
|
22
|
+
/**
|
|
23
|
+
* Starts the work the extension defers until a session needs AFT (LSP
|
|
24
|
+
* discovery and installs, ONNX Runtime preparation, the warmup bridge).
|
|
25
|
+
* Idempotent; a no-op once the host has shut the session down.
|
|
26
|
+
*/
|
|
27
|
+
startSessionWork?: () => void;
|
|
19
28
|
}
|
|
20
29
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE;;;;;;;;GAQG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,gBAAgB,CAAC;IACvB,MAAM,EAAE,SAAS,CAAC;IAClB,uEAAuE;IACvE,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,8EAA8E;IAC9E,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,mFAAmF;IACnF,UAAU,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B"}
|
package/dist/workflow-hints.d.ts
CHANGED
|
@@ -3,19 +3,26 @@ import type { AftConfig } from "./config.js";
|
|
|
3
3
|
export interface WorkflowHintsOpts {
|
|
4
4
|
bashBackgroundEnabled: boolean;
|
|
5
5
|
bashCompressionEnabled: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Resolved `bash.rewrite` flag. Only rewritten `cat`/`head`/`tail` commands
|
|
8
|
+
* mint hashline tags through bash, so the hashline hint names them only when
|
|
9
|
+
* rewriting is on. Omitted means on.
|
|
10
|
+
*/
|
|
11
|
+
bashRewriteEnabled?: boolean;
|
|
6
12
|
/** Set of tool names KNOWN-ABSENT from the registered surface. */
|
|
7
13
|
absentTools: Set<string>;
|
|
8
14
|
/** Whether the hashline `edit` arm is the one actually registered. */
|
|
9
15
|
hashlineEffective?: boolean;
|
|
10
16
|
}
|
|
11
17
|
/**
|
|
12
|
-
* Routing rule for hashline sessions
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* for a tag it believes it already has.
|
|
18
|
+
* Routing rule for hashline sessions: which calls mint the tags a patch
|
|
19
|
+
* addresses (see `hashlineTagSourceSentence`). The bash rewrite path and each
|
|
20
|
+
* AFT navigation tool are named only when present. Kept byte-identical to the
|
|
21
|
+
* OpenCode copy.
|
|
17
22
|
*/
|
|
18
|
-
export declare
|
|
23
|
+
export declare function hashlineTagSourceHint(bashRewritesMintTags: boolean, isRegistered?: (toolName: string) => boolean): string;
|
|
24
|
+
/** The hashline hint for a session whose bash rewrites `cat`/`head`/`tail`. */
|
|
25
|
+
export declare const HASHLINE_TAG_SOURCE_HINT: string;
|
|
19
26
|
export declare function buildWorkflowHints(opts: WorkflowHintsOpts): string | null;
|
|
20
27
|
export declare function buildHintsFromConfig(config: AftConfig, absentTools: Set<string>, hashlineEffective?: boolean): string | null;
|
|
21
28
|
interface ToolSurfaceFlags {
|
|
@@ -29,14 +36,61 @@ interface ToolSurfaceFlags {
|
|
|
29
36
|
hoistEdit: boolean;
|
|
30
37
|
hoistRead: boolean;
|
|
31
38
|
bashStatus: boolean;
|
|
39
|
+
bashWatch: boolean;
|
|
40
|
+
bashWrite: boolean;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Name of the prompt section that carries the hints on hosts with structured
|
|
44
|
+
* system prompt sections. Pi renders it as
|
|
45
|
+
* `<aft_workflow_hints>\n…\n</aft_workflow_hints>` and requires names to match
|
|
46
|
+
* `^[a-z][a-z0-9_-]*$`.
|
|
47
|
+
*/
|
|
48
|
+
export declare const WORKFLOW_HINTS_SECTION = "aft_workflow_hints";
|
|
49
|
+
/**
|
|
50
|
+
* The parts of a `before_agent_start` event the hints handler reads, across
|
|
51
|
+
* the hosts the plugin runs on:
|
|
52
|
+
* - upstream Pi 0.86.0 and later expose `systemPromptOptions.sections`, a
|
|
53
|
+
* per-run copy that handlers may mutate, and `forceSystemPrompt`, which is
|
|
54
|
+
* set once any handler has returned `systemPrompt` for this run;
|
|
55
|
+
* - older upstream Pi passes `systemPromptOptions` without `sections` (and it
|
|
56
|
+
* is the session's base options object, so it must not be mutated);
|
|
57
|
+
* - oh-my-pi (OMP) passes `systemPrompt` as an array with one entry per
|
|
58
|
+
* provider system block and has no `systemPromptOptions`.
|
|
59
|
+
*/
|
|
60
|
+
export interface WorkflowHintsStartEvent {
|
|
61
|
+
systemPrompt: string | readonly string[];
|
|
62
|
+
systemPromptOptions?: {
|
|
63
|
+
sections?: Record<string, string>;
|
|
64
|
+
forceSystemPrompt?: string;
|
|
65
|
+
};
|
|
32
66
|
}
|
|
67
|
+
export type WorkflowHintsStartResult = {
|
|
68
|
+
systemPrompt: string | string[];
|
|
69
|
+
} | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Add the hints block to one `before_agent_start` run.
|
|
72
|
+
*
|
|
73
|
+
* Where the host has prompt sections, the block goes into its own section and
|
|
74
|
+
* nothing is returned. Returning `systemPrompt` would force the whole prompt
|
|
75
|
+
* for the run: Pi then sends one collapsed system message and drops the
|
|
76
|
+
* transcript-backed mid-conversation tool and prompt changes, so every later
|
|
77
|
+
* tool activation rewrites the whole prompt cache. As a section, the block is
|
|
78
|
+
* diffed like any other part of the prompt and, being identical on every run,
|
|
79
|
+
* is sent once and stays in the cached prefix.
|
|
80
|
+
*
|
|
81
|
+
* Hosts without sections only accept a returned replacement prompt, so the
|
|
82
|
+
* block is appended to the prompt they passed in: as a new last entry when the
|
|
83
|
+
* prompt is an array of system blocks (OMP), keeping the existing blocks
|
|
84
|
+
* intact, or after a blank line when it is a single string (older Pi).
|
|
85
|
+
*/
|
|
86
|
+
export declare function applyWorkflowHints(event: WorkflowHintsStartEvent, hintsBlock: string): WorkflowHintsStartResult;
|
|
33
87
|
/**
|
|
34
88
|
* Register the workflow-hints extension on Pi via `before_agent_start`.
|
|
35
89
|
*
|
|
36
|
-
* Pi
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
90
|
+
* Pi fires `before_agent_start` once per user prompt with the prompt it
|
|
91
|
+
* assembled; {@link applyWorkflowHints} adds the hints block to it without
|
|
92
|
+
* dropping other extensions' contributions. The block is built once here, so
|
|
93
|
+
* it is byte-identical on every run of the session.
|
|
40
94
|
* Magic Context's short-lived Pi children don't need these workflow hints.
|
|
41
95
|
*/
|
|
42
96
|
export declare function registerWorkflowHints(pi: ExtensionAPI, config: AftConfig, surface: ToolSurfaceFlags): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-hints.d.ts","sourceRoot":"","sources":["../src/workflow-hints.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"workflow-hints.d.ts","sourceR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;;;GAKG;AACH,eAAO,MAAM,sBAAsB,uBAAuB,CAAC;AAE3D;;;;;;;;;;GAUG;AACH,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;IACzC,mBAAmB,CAAC,EAAE;QACpB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAClC,iBAAiB,CAAC,EAAE,MAAM,CAAC;KAC5B,CAAC;CACH;AAED,MAAM,MAAM,wBAAwB,GAAG;IAAE,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAAE,GAAG,SAAS,CAAC;AAEvF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,uBAAuB,EAC9B,UAAU,EAAE,MAAM,GACjB,wBAAwB,CAmB1B;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,EAAE,EAAE,YAAY,EAChB,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,gBAAgB,GACxB,IAAI,CA8BN"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/aft-pi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.59.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Pi coding agent extension for Agent File Tools (AFT) — tree-sitter and LSP-powered code analysis",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -15,26 +15,27 @@
|
|
|
15
15
|
"README.md"
|
|
16
16
|
],
|
|
17
17
|
"scripts": {
|
|
18
|
-
"build": "bun build src/index.ts --outdir dist --target node --format esm --external @earendil-works/pi-coding-agent --external @earendil-works/pi-ai --external @earendil-works/pi-tui --external typebox --external diff && tsc --emitDeclarationOnly",
|
|
18
|
+
"build": "bun build src/index.ts --outdir dist --target node --format esm --external @earendil-works/pi-coding-agent --external @earendil-works/pi-ai --external @earendil-works/pi-tui --external @oh-my-pi/pi-coding-agent/internal-urls --external typebox --external diff && tsc --emitDeclarationOnly",
|
|
19
19
|
"typecheck": "tsc --noEmit",
|
|
20
20
|
"test": "bun test src/__tests__/",
|
|
21
21
|
"lint": "biome check src",
|
|
22
22
|
"prepublishOnly": "bun run build",
|
|
23
|
-
"test:unit": "bun test src/__tests__ --path-ignore-patterns 'src/__tests__/e2e/**'"
|
|
23
|
+
"test:unit": "bun test src/__tests__ --path-ignore-patterns 'src/__tests__/e2e/**'",
|
|
24
|
+
"test:e2e": "bun test src/__tests__/e2e/"
|
|
24
25
|
},
|
|
25
26
|
"dependencies": {
|
|
26
|
-
"@cortexkit/aft-bridge": "0.
|
|
27
|
+
"@cortexkit/aft-bridge": "0.59.0",
|
|
27
28
|
"comment-json": "^5.0.0",
|
|
28
29
|
"diff": "^8.0.4",
|
|
29
30
|
"zod": "^4.4.3"
|
|
30
31
|
},
|
|
31
32
|
"optionalDependencies": {
|
|
32
|
-
"@cortexkit/aft-darwin-arm64": "0.
|
|
33
|
-
"@cortexkit/aft-darwin-x64": "0.
|
|
34
|
-
"@cortexkit/aft-linux-arm64": "0.
|
|
35
|
-
"@cortexkit/aft-linux-x64": "0.
|
|
36
|
-
"@cortexkit/aft-win32-arm64": "0.
|
|
37
|
-
"@cortexkit/aft-win32-x64": "0.
|
|
33
|
+
"@cortexkit/aft-darwin-arm64": "0.59.0",
|
|
34
|
+
"@cortexkit/aft-darwin-x64": "0.59.0",
|
|
35
|
+
"@cortexkit/aft-linux-arm64": "0.59.0",
|
|
36
|
+
"@cortexkit/aft-linux-x64": "0.59.0",
|
|
37
|
+
"@cortexkit/aft-win32-arm64": "0.59.0",
|
|
38
|
+
"@cortexkit/aft-win32-x64": "0.59.0"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
41
|
"@earendil-works/pi-coding-agent": "^0.80.2",
|