pi-fabric 0.62.0 → 0.62.2

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.
Files changed (62) hide show
  1. package/dist/capture/catalog.d.ts +3 -2
  2. package/dist/capture/catalog.d.ts.map +1 -1
  3. package/dist/capture/interceptor.d.ts +1 -1
  4. package/dist/capture/interceptor.d.ts.map +1 -1
  5. package/dist/capture/wrapper.d.ts +15 -0
  6. package/dist/capture/wrapper.d.ts.map +1 -0
  7. package/dist/chunks/{chunk-DVOJW7LJ.js → chunk-5VLBF2QS.js} +83 -2
  8. package/dist/chunks/chunk-5VLBF2QS.js.map +7 -0
  9. package/dist/chunks/{chunk-ZUQSDM5A.js → chunk-FDLTDTYJ.js} +106 -15
  10. package/dist/chunks/chunk-FDLTDTYJ.js.map +7 -0
  11. package/dist/chunks/{chunk-NFC54EHJ.js → chunk-OQP7IV6U.js} +2 -2
  12. package/dist/chunks/chunk-SOBEXOWK.js +38 -0
  13. package/dist/chunks/chunk-SOBEXOWK.js.map +7 -0
  14. package/dist/chunks/{chunk-PCTZDCIV.js → chunk-X2AL6J4G.js} +2 -2
  15. package/dist/chunks/{chunk-2SF432HH.js → chunk-YWV4KFMB.js} +196 -8
  16. package/dist/chunks/chunk-YWV4KFMB.js.map +7 -0
  17. package/dist/chunks/{dashboard-B6K3VWQL.js → dashboard-YGCVARPS.js} +2 -2
  18. package/dist/chunks/{fabric-runtime-state-KOP2OIZN.js → fabric-runtime-state-HVFOEZ32.js} +12 -10
  19. package/dist/chunks/fabric-runtime-state-HVFOEZ32.js.map +7 -0
  20. package/dist/chunks/{settings-6PTZLKP6.js → settings-RDYXA7V6.js} +7 -7
  21. package/dist/chunks/settings-RDYXA7V6.js.map +7 -0
  22. package/dist/compaction/hook.d.ts.map +1 -1
  23. package/dist/compaction/hook.js +1 -1
  24. package/dist/core/agent-dir.d.ts +2 -0
  25. package/dist/core/agent-dir.d.ts.map +1 -0
  26. package/dist/core/approval-controller.d.ts +1 -1
  27. package/dist/core/approval-controller.d.ts.map +1 -1
  28. package/dist/core/auto-approval-classifier.d.ts +1 -1
  29. package/dist/core/auto-approval-classifier.d.ts.map +1 -1
  30. package/dist/core/session-context.d.ts +14 -0
  31. package/dist/core/session-context.d.ts.map +1 -0
  32. package/dist/core/skill-block.d.ts +10 -0
  33. package/dist/core/skill-block.d.ts.map +1 -0
  34. package/dist/core/skill-prompt.d.ts +1 -1
  35. package/dist/core/skill-prompt.d.ts.map +1 -1
  36. package/dist/core/token-math.d.ts +16 -0
  37. package/dist/core/token-math.d.ts.map +1 -0
  38. package/dist/fabric-exec-tool.d.ts +1 -1
  39. package/dist/fabric-exec-tool.d.ts.map +1 -1
  40. package/dist/fabric-runtime-state.d.ts +1 -1
  41. package/dist/fabric-runtime-state.d.ts.map +1 -1
  42. package/dist/fabric-state.d.ts +1 -1
  43. package/dist/fabric-state.d.ts.map +1 -1
  44. package/dist/index.js +24 -23
  45. package/dist/index.js.map +3 -3
  46. package/dist/residency/host.js +3 -3
  47. package/dist/ui/dynamic-border.d.ts +8 -0
  48. package/dist/ui/dynamic-border.d.ts.map +1 -0
  49. package/dist/ui/highlight.d.ts.map +1 -1
  50. package/dist/ui/settings.d.ts +1 -1
  51. package/dist/ui/settings.d.ts.map +1 -1
  52. package/dist/ui/shiki-theme.d.ts +7 -0
  53. package/dist/ui/shiki-theme.d.ts.map +1 -0
  54. package/package.json +2 -1
  55. package/dist/chunks/chunk-2SF432HH.js.map +0 -7
  56. package/dist/chunks/chunk-DVOJW7LJ.js.map +0 -7
  57. package/dist/chunks/chunk-ZUQSDM5A.js.map +0 -7
  58. package/dist/chunks/fabric-runtime-state-KOP2OIZN.js.map +0 -7
  59. package/dist/chunks/settings-6PTZLKP6.js.map +0 -7
  60. /package/dist/chunks/{chunk-NFC54EHJ.js.map → chunk-OQP7IV6U.js.map} +0 -0
  61. /package/dist/chunks/{chunk-PCTZDCIV.js.map → chunk-X2AL6J4G.js.map} +0 -0
  62. /package/dist/chunks/{dashboard-B6K3VWQL.js.map → dashboard-YGCVARPS.js.map} +0 -0
@@ -1,4 +1,5 @@
1
- import { wrapRegisteredTool, type ExtensionRunner, type RegisteredTool, type SourceInfo, type ToolDefinition } from "@earendil-works/pi-coding-agent";
1
+ import type { ExtensionRunner, RegisteredTool, SourceInfo, ToolDefinition } from "@earendil-works/pi-coding-agent";
2
+ import { wrapRegisteredToolForCapture } from "./wrapper.js";
2
3
  import type { FabricToolCaptureConfig } from "../config.js";
3
4
  import type { FabricRisk } from "../protocol.js";
4
5
  export interface CapturedToolEntry {
@@ -7,7 +8,7 @@ export interface CapturedToolEntry {
7
8
  registeredTool: RegisteredTool;
8
9
  sourceInfo: SourceInfo;
9
10
  runner: ExtensionRunner;
10
- wrappedTool: ReturnType<typeof wrapRegisteredTool>;
11
+ wrappedTool: ReturnType<typeof wrapRegisteredToolForCapture>;
11
12
  risk: FabricRisk;
12
13
  }
13
14
  export declare class CapturedToolCatalog {
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/capture/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,cAAc,EACpB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IAC1C,cAAc,EAAE,cAAc,CAAC;IAC/B,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,eAAe,CAAC;IACxB,WAAW,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;IACnD,IAAI,EAAE,UAAU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Ae,EAAE,cAAc,EAAE,EACjC,MAAM,EAAE,eAAe,EACvB,MAAM,EAAE,uBAAuB,EAC/B,aAAa,EAAE,MAAM,GACpB,IAAI;IAyBP,KAAK,IAAI,IAAI;IAKb,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAK3C,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS;IAIhD,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB;IAMxC,IAAI,IAAI,iBAAiB,EAAE;IAI3B,IAAI,IAAI,IAAI,MAAM,CAEjB;CAOF"}
@@ -1,4 +1,4 @@
1
- import { type ToolDefinition } from "@earendil-works/pi-coding-agent";
1
+ import type { ToolDefinition } from "@earendil-works/pi-coding-agent";
2
2
  import { type FabricToolCaptureConfig } from "../config.js";
3
3
  import { CapturedToolCatalog } from "./catalog.js";
4
4
  export interface RegisteredToolCaptureController {
@@ -1 +1 @@
1
- {"version":3,"file":"interceptor.d.ts","sourceRoot":"","sources":["../../src/capture/interceptor.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAyB,KAAK,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACnF,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAQnD,MAAM,WAAW,+BAA+B;IAC9C,SAAS,CAAC,MAAM,EAAE,uBAAuB,GAAG,IAAI,CAAC;IACjD,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,4BAA4B;IAC3C,gBAAgB,EAAE,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IAChD,OAAO,EAAE,mBAAmB,CAAC;IAC7B,aAAa,CAAC,EAAE,uBAAuB,CAAC;IAOxC,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAgGD,eAAO,MAAM,4BAA4B,GACvC,SAAS,4BAA4B,KACpC,OAAO,CAAC,+BAA+B,CAuCzC,CAAC"}
1
+ {"version":3,"file":"interceptor.d.ts","sourceRoot":"","sources":["../../src/capture/interceptor.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGV,cAAc,EACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAyB,KAAK,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACnF,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAQnD,MAAM,WAAW,+BAA+B;IAC9C,SAAS,CAAC,MAAM,EAAE,uBAAuB,GAAG,IAAI,CAAC;IACjD,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,4BAA4B;IAC3C,gBAAgB,EAAE,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IAChD,OAAO,EAAE,mBAAmB,CAAC;IAC7B,aAAa,CAAC,EAAE,uBAAuB,CAAC;IAOxC,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AA0GD,eAAO,MAAM,4BAA4B,GACvC,SAAS,4BAA4B,KACpC,OAAO,CAAC,+BAA+B,CAuCzC,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { ExtensionRunner, RegisteredTool } from "@earendil-works/pi-coding-agent";
2
+ type WrappedExecute = (toolCallId: unknown, params: unknown, signal: unknown, onUpdate: (update: any) => void, ctx?: unknown) => Promise<any>;
3
+ export interface WrappedRegisteredTool {
4
+ name: string;
5
+ label: string | undefined;
6
+ description: string | undefined;
7
+ parameters: unknown;
8
+ constrainedSampling: unknown;
9
+ prepareArguments: ((args: Record<string, unknown>) => unknown) | undefined;
10
+ executionMode: unknown;
11
+ execute: WrappedExecute;
12
+ }
13
+ export declare const wrapRegisteredToolForCapture: (registeredTool: RegisteredTool, runner: ExtensionRunner) => WrappedRegisteredTool;
14
+ export {};
15
+ //# sourceMappingURL=wrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wrapper.d.ts","sourceRoot":"","sources":["../../src/capture/wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAkB,MAAM,iCAAiC,CAAC;AAQvG,KAAK,cAAc,GAAG,CACpB,UAAU,EAAE,OAAO,EACnB,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,EAC/B,GAAG,CAAC,EAAE,OAAO,KACV,OAAO,CAAC,GAAG,CAAC,CAAC;AAElB,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,gBAAgB,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,GAAG,SAAS,CAAC;IAC3E,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,cAAc,CAAC;CACzB;AAoBD,eAAO,MAAM,4BAA4B,GACvC,gBAAgB,cAAc,EAC9B,QAAQ,eAAe,KACtB,qBA2BF,CAAC"}
@@ -39,6 +39,83 @@ import { readFileSync, statSync } from "node:fs";
39
39
  import { basename, extname } from "node:path";
40
40
  import { bundledLanguages } from "shiki/langs";
41
41
  import { bundledThemesInfo } from "shiki/themes";
42
+
43
+ // src/ui/shiki-theme.ts
44
+ var THEME_IMPORTS = {
45
+ "andromeeda": () => import("@shikijs/themes/andromeeda"),
46
+ "aurora-x": () => import("@shikijs/themes/aurora-x"),
47
+ "ayu-dark": () => import("@shikijs/themes/ayu-dark"),
48
+ "ayu-light": () => import("@shikijs/themes/ayu-light"),
49
+ "ayu-mirage": () => import("@shikijs/themes/ayu-mirage"),
50
+ "catppuccin-frappe": () => import("@shikijs/themes/catppuccin-frappe"),
51
+ "catppuccin-latte": () => import("@shikijs/themes/catppuccin-latte"),
52
+ "catppuccin-macchiato": () => import("@shikijs/themes/catppuccin-macchiato"),
53
+ "catppuccin-mocha": () => import("@shikijs/themes/catppuccin-mocha"),
54
+ "dark-plus": () => import("@shikijs/themes/dark-plus"),
55
+ "dracula": () => import("@shikijs/themes/dracula"),
56
+ "dracula-soft": () => import("@shikijs/themes/dracula-soft"),
57
+ "everforest-dark": () => import("@shikijs/themes/everforest-dark"),
58
+ "everforest-light": () => import("@shikijs/themes/everforest-light"),
59
+ "github-dark": () => import("@shikijs/themes/github-dark"),
60
+ "github-dark-default": () => import("@shikijs/themes/github-dark-default"),
61
+ "github-dark-dimmed": () => import("@shikijs/themes/github-dark-dimmed"),
62
+ "github-dark-high-contrast": () => import("@shikijs/themes/github-dark-high-contrast"),
63
+ "github-light": () => import("@shikijs/themes/github-light"),
64
+ "github-light-default": () => import("@shikijs/themes/github-light-default"),
65
+ "github-light-high-contrast": () => import("@shikijs/themes/github-light-high-contrast"),
66
+ "gruvbox-dark-hard": () => import("@shikijs/themes/gruvbox-dark-hard"),
67
+ "gruvbox-dark-medium": () => import("@shikijs/themes/gruvbox-dark-medium"),
68
+ "gruvbox-dark-soft": () => import("@shikijs/themes/gruvbox-dark-soft"),
69
+ "gruvbox-light-hard": () => import("@shikijs/themes/gruvbox-light-hard"),
70
+ "gruvbox-light-medium": () => import("@shikijs/themes/gruvbox-light-medium"),
71
+ "gruvbox-light-soft": () => import("@shikijs/themes/gruvbox-light-soft"),
72
+ "horizon": () => import("@shikijs/themes/horizon"),
73
+ "horizon-bright": () => import("@shikijs/themes/horizon-bright"),
74
+ "houston": () => import("@shikijs/themes/houston"),
75
+ "kanagawa-dragon": () => import("@shikijs/themes/kanagawa-dragon"),
76
+ "kanagawa-lotus": () => import("@shikijs/themes/kanagawa-lotus"),
77
+ "kanagawa-wave": () => import("@shikijs/themes/kanagawa-wave"),
78
+ "laserwave": () => import("@shikijs/themes/laserwave"),
79
+ "light-plus": () => import("@shikijs/themes/light-plus"),
80
+ "material-theme": () => import("@shikijs/themes/material-theme"),
81
+ "material-theme-darker": () => import("@shikijs/themes/material-theme-darker"),
82
+ "material-theme-lighter": () => import("@shikijs/themes/material-theme-lighter"),
83
+ "material-theme-ocean": () => import("@shikijs/themes/material-theme-ocean"),
84
+ "material-theme-palenight": () => import("@shikijs/themes/material-theme-palenight"),
85
+ "min-dark": () => import("@shikijs/themes/min-dark"),
86
+ "min-light": () => import("@shikijs/themes/min-light"),
87
+ "monokai": () => import("@shikijs/themes/monokai"),
88
+ "night-owl": () => import("@shikijs/themes/night-owl"),
89
+ "night-owl-light": () => import("@shikijs/themes/night-owl-light"),
90
+ "nord": () => import("@shikijs/themes/nord"),
91
+ "one-dark-pro": () => import("@shikijs/themes/one-dark-pro"),
92
+ "one-light": () => import("@shikijs/themes/one-light"),
93
+ "plastic": () => import("@shikijs/themes/plastic"),
94
+ "poimandres": () => import("@shikijs/themes/poimandres"),
95
+ "red": () => import("@shikijs/themes/red"),
96
+ "rose-pine": () => import("@shikijs/themes/rose-pine"),
97
+ "rose-pine-dawn": () => import("@shikijs/themes/rose-pine-dawn"),
98
+ "rose-pine-moon": () => import("@shikijs/themes/rose-pine-moon"),
99
+ "slack-dark": () => import("@shikijs/themes/slack-dark"),
100
+ "slack-ochin": () => import("@shikijs/themes/slack-ochin"),
101
+ "snazzy-light": () => import("@shikijs/themes/snazzy-light"),
102
+ "solarized-dark": () => import("@shikijs/themes/solarized-dark"),
103
+ "solarized-light": () => import("@shikijs/themes/solarized-light"),
104
+ "synthwave-84": () => import("@shikijs/themes/synthwave-84"),
105
+ "tokyo-night": () => import("@shikijs/themes/tokyo-night"),
106
+ "vesper": () => import("@shikijs/themes/vesper"),
107
+ "vitesse-black": () => import("@shikijs/themes/vitesse-black"),
108
+ "vitesse-dark": () => import("@shikijs/themes/vitesse-dark"),
109
+ "vitesse-light": () => import("@shikijs/themes/vitesse-light")
110
+ };
111
+ async function resolveShikiThemeObject(themeId) {
112
+ const loader = THEME_IMPORTS[themeId];
113
+ if (!loader) return void 0;
114
+ const mod = await loader();
115
+ return mod.default;
116
+ }
117
+
118
+ // src/ui/highlight.ts
42
119
  var configuredMaxHighlightChars = Number.parseInt(
43
120
  process.env.CODE_PREVIEW_MAX_HIGHLIGHT_CHARS ?? "",
44
121
  10
@@ -306,8 +383,12 @@ async function initHighlighting(theme, syntaxEnabled = true) {
306
383
  initializingTheme = theme;
307
384
  try {
308
385
  const { createHighlighter } = await import("shiki");
386
+ const themeObject = await resolveShikiThemeObject(theme);
387
+ if (!themeObject) {
388
+ throw new Error(`Unknown shiki theme: ${theme}`);
389
+ }
309
390
  const next = await createHighlighter({
310
- themes: [theme],
391
+ themes: [themeObject],
311
392
  langs: [...PRELOADED_LANGUAGES]
312
393
  });
313
394
  if (version !== initVersion) {
@@ -4988,4 +5069,4 @@ export {
4988
5069
  isActiveStatus,
4989
5070
  orderAgentsByCreation
4990
5071
  };
4991
- //# sourceMappingURL=chunk-DVOJW7LJ.js.map
5072
+ //# sourceMappingURL=chunk-5VLBF2QS.js.map