pi-openai-toolkit 0.24.0 → 0.24.1

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 (37) hide show
  1. package/LICENSE +21 -21
  2. package/NOTICE +83 -83
  3. package/config.schema.json +264 -264
  4. package/docs/configuration.md +304 -304
  5. package/package.json +123 -123
  6. package/src/compact-client.ts +412 -412
  7. package/src/compaction-projection.ts +35 -35
  8. package/src/config/legacy.ts +469 -469
  9. package/src/config/migration.ts +115 -115
  10. package/src/config/notifications.ts +46 -42
  11. package/src/config/policy.ts +115 -115
  12. package/src/config/v2.ts +1128 -1128
  13. package/src/config.ts +320 -320
  14. package/src/debug.ts +238 -238
  15. package/src/deferred-tool-carryover.ts +282 -282
  16. package/src/details-store.ts +151 -151
  17. package/src/extension-runtime.ts +1095 -1095
  18. package/src/image-generation/extension.ts +189 -189
  19. package/src/image-generation/protocol.ts +579 -579
  20. package/src/image-generation/types.ts +300 -300
  21. package/src/native-fallback.ts +140 -140
  22. package/src/payload-rewrite.ts +515 -515
  23. package/src/pi-context-hook.ts +117 -117
  24. package/src/remote-v2-client.ts +811 -811
  25. package/src/request-context-cache.ts +155 -155
  26. package/src/responses-headers.ts +180 -180
  27. package/src/retired-remote-windows.ts +35 -35
  28. package/src/runtime.ts +875 -875
  29. package/src/serializer.ts +882 -882
  30. package/src/supported-environment.ts +27 -27
  31. package/src/types.ts +541 -541
  32. package/src/web-search/alpha-client.ts +876 -876
  33. package/src/web-search/extension.ts +530 -530
  34. package/src/web-search/payload.ts +299 -299
  35. package/src/web-search/prompt.ts +60 -60
  36. package/src/web-search/types.ts +166 -166
  37. package/tsconfig.check.json +50 -50
@@ -1,60 +1,60 @@
1
- import type { WebSearchConfig } from "../types";
2
- import {
3
- resolveWebSearchRoute,
4
- WEB_RUN_TOOL_NAME,
5
- WEB_SEARCH_PROMPT_MARKER,
6
- type WebSearchModel,
7
- } from "./types";
8
-
9
- export const WEB_SEARCH_PROMPT_SECTION = `${WEB_SEARCH_PROMPT_MARKER}
10
- ## Web Search
11
-
12
- The hosted \`web_search\` tool is part of your tool list for this model. The API executes it server-side: it is a real callable tool even though no client-side function schema or description accompanies it. Call it whenever current or online information matters instead of guessing, cite the returned sources in the answer, and never claim that web search or internet access is unavailable while this section is present.`;
13
-
14
- export const LOCAL_WEB_SEARCH_PROMPT_SECTION = `${WEB_SEARCH_PROMPT_MARKER}
15
- ## Web Search
16
-
17
- The local \`web_search\` tool is available for this model. Use it when current or online information matters, and cite the sources returned by that tool. Do not claim that the provider API executes this local tool server-side.`;
18
-
19
- export const STANDALONE_ALPHA_WEB_SEARCH_PROMPT_SECTION = `${WEB_SEARCH_PROMPT_MARKER}
20
- ## Web Search
21
-
22
- The \`${WEB_RUN_TOOL_NAME}\` tool is available for this model. It is a sequential local wrapper backed by CPA/Codex standalone search at the provider's \`/alpha/search\` endpoint. It supports \`search_query\`, \`image_query\`, \`open\`, \`click\`, \`find\`, \`screenshot\`, \`finance\`, \`weather\`, \`sports\`, and \`time\`. Use it for current or online information, preserve reference ids when following results, and cite the returned sources.`;
23
-
24
- function removeToolkitWebSearchPrompt(systemPrompt: string): string {
25
- const markerIndex = systemPrompt.indexOf(WEB_SEARCH_PROMPT_MARKER);
26
- if (markerIndex < 0) return systemPrompt;
27
- return systemPrompt.slice(0, markerIndex).trimEnd();
28
- }
29
-
30
- function promptSectionForRoute(route: "local" | "hosted" | "standalone-alpha"): string {
31
- switch (route) {
32
- case "local":
33
- return LOCAL_WEB_SEARCH_PROMPT_SECTION;
34
- case "hosted":
35
- return WEB_SEARCH_PROMPT_SECTION;
36
- case "standalone-alpha":
37
- return STANDALONE_ALPHA_WEB_SEARCH_PROMPT_SECTION;
38
- }
39
- }
40
-
41
- export function appendWebSearchPrompt(args: {
42
- model: WebSearchModel | undefined;
43
- config: WebSearchConfig;
44
- systemPrompt: string;
45
- /** Lifecycle registration can override this when the selected local wrapper is unavailable. */
46
- routeAvailable?: boolean;
47
- }): string {
48
- const { model, config, systemPrompt } = args;
49
- const basePrompt = removeToolkitWebSearchPrompt(systemPrompt);
50
- const resolution = resolveWebSearchRoute({ model, config });
51
- if (args.routeAvailable === false || resolution.route === "none" || !resolution.available) return basePrompt;
52
-
53
- const section = promptSectionForRoute(resolution.route);
54
- return `${basePrompt.trimEnd()}\n\n${section}`;
55
- }
56
-
57
- export const _promptTest = {
58
- removeToolkitWebSearchPrompt,
59
- promptSectionForRoute,
60
- };
1
+ import type { WebSearchConfig } from "../types";
2
+ import {
3
+ resolveWebSearchRoute,
4
+ WEB_RUN_TOOL_NAME,
5
+ WEB_SEARCH_PROMPT_MARKER,
6
+ type WebSearchModel,
7
+ } from "./types";
8
+
9
+ export const WEB_SEARCH_PROMPT_SECTION = `${WEB_SEARCH_PROMPT_MARKER}
10
+ ## Web Search
11
+
12
+ The hosted \`web_search\` tool is part of your tool list for this model. The API executes it server-side: it is a real callable tool even though no client-side function schema or description accompanies it. Call it whenever current or online information matters instead of guessing, cite the returned sources in the answer, and never claim that web search or internet access is unavailable while this section is present.`;
13
+
14
+ export const LOCAL_WEB_SEARCH_PROMPT_SECTION = `${WEB_SEARCH_PROMPT_MARKER}
15
+ ## Web Search
16
+
17
+ The local \`web_search\` tool is available for this model. Use it when current or online information matters, and cite the sources returned by that tool. Do not claim that the provider API executes this local tool server-side.`;
18
+
19
+ export const STANDALONE_ALPHA_WEB_SEARCH_PROMPT_SECTION = `${WEB_SEARCH_PROMPT_MARKER}
20
+ ## Web Search
21
+
22
+ The \`${WEB_RUN_TOOL_NAME}\` tool is available for this model. It is a sequential local wrapper backed by CPA/Codex standalone search at the provider's \`/alpha/search\` endpoint. It supports \`search_query\`, \`image_query\`, \`open\`, \`click\`, \`find\`, \`screenshot\`, \`finance\`, \`weather\`, \`sports\`, and \`time\`. Use it for current or online information, preserve reference ids when following results, and cite the returned sources.`;
23
+
24
+ function removeToolkitWebSearchPrompt(systemPrompt: string): string {
25
+ const markerIndex = systemPrompt.indexOf(WEB_SEARCH_PROMPT_MARKER);
26
+ if (markerIndex < 0) return systemPrompt;
27
+ return systemPrompt.slice(0, markerIndex).trimEnd();
28
+ }
29
+
30
+ function promptSectionForRoute(route: "local" | "hosted" | "standalone-alpha"): string {
31
+ switch (route) {
32
+ case "local":
33
+ return LOCAL_WEB_SEARCH_PROMPT_SECTION;
34
+ case "hosted":
35
+ return WEB_SEARCH_PROMPT_SECTION;
36
+ case "standalone-alpha":
37
+ return STANDALONE_ALPHA_WEB_SEARCH_PROMPT_SECTION;
38
+ }
39
+ }
40
+
41
+ export function appendWebSearchPrompt(args: {
42
+ model: WebSearchModel | undefined;
43
+ config: WebSearchConfig;
44
+ systemPrompt: string;
45
+ /** Lifecycle registration can override this when the selected local wrapper is unavailable. */
46
+ routeAvailable?: boolean;
47
+ }): string {
48
+ const { model, config, systemPrompt } = args;
49
+ const basePrompt = removeToolkitWebSearchPrompt(systemPrompt);
50
+ const resolution = resolveWebSearchRoute({ model, config });
51
+ if (args.routeAvailable === false || resolution.route === "none" || !resolution.available) return basePrompt;
52
+
53
+ const section = promptSectionForRoute(resolution.route);
54
+ return `${basePrompt.trimEnd()}\n\n${section}`;
55
+ }
56
+
57
+ export const _promptTest = {
58
+ removeToolkitWebSearchPrompt,
59
+ promptSectionForRoute,
60
+ };
@@ -1,166 +1,166 @@
1
- import { VIRTUAL_MODEL_API } from "../runtime";
2
- import { getExactModelKey, isExactModelAllowed } from "../model-scope";
3
- import type { WebSearchConfig, WebSearchRoute } from "../types";
4
-
5
- export const WEB_SEARCH_CAPABLE_APIS = [
6
- "openai-responses",
7
- "openai-codex-responses",
8
- "azure-openai-responses",
9
- ] as const;
10
- /** The provider-relative alpha endpoint is only verified for OpenAI/Codex routes. */
11
- export const WEB_SEARCH_STANDALONE_APIS = ["openai-responses", "openai-codex-responses"] as const;
12
- export const WEB_SEARCH_SOURCE_INCLUDE = "web_search_call.action.sources";
13
- export const WEB_SEARCH_PROMPT_MARKER = "<!-- pi-openai-toolkit:web-search -->";
14
- export const WEB_RUN_TOOL_NAME = "web_run";
15
- export const LOCAL_WEB_SEARCH_TOOL_NAME = "web_search";
16
-
17
- export type WebSearchCapableApi = (typeof WEB_SEARCH_CAPABLE_APIS)[number];
18
- export type WebSearchStandaloneApi = (typeof WEB_SEARCH_STANDALONE_APIS)[number];
19
- export type WebSearchRouteSource = "exact" | "default" | "legacy" | "none";
20
- export type WebSearchRouteUnavailableReason = "missing-model" | "unsupported-api" | "invalid-route";
21
-
22
- export type WebSearchModel = {
23
- api?: string;
24
- provider?: string;
25
- id?: string;
26
- };
27
-
28
- export type WebSearchRouteResolution =
29
- | {
30
- route: "none";
31
- source: "none";
32
- modelKey?: string;
33
- reason: "disabled" | "unconfigured";
34
- }
35
- | {
36
- route: WebSearchRoute;
37
- source: Exclude<WebSearchRouteSource, "none">;
38
- modelKey?: string;
39
- available: boolean;
40
- reason?: WebSearchRouteUnavailableReason;
41
- };
42
-
43
- export type WebSearchPayloadOutcome =
44
- | "disabled"
45
- | "unsupported-model"
46
- | "non-object-payload"
47
- | "invalid-tools"
48
- | "invalid-include"
49
- | "existing-native-tool"
50
- | "injected-native-tool"
51
- | "local-route"
52
- | "standalone-route"
53
- | "removed-conflicting-tools"
54
- | "unavailable-route";
55
-
56
- export type WebSearchPayloadTransform = {
57
- payload: unknown;
58
- outcome: WebSearchPayloadOutcome;
59
- changed: boolean;
60
- /** Explicit route failures must abort rather than silently select another search path. */
61
- fatal?: boolean;
62
- errorMessage?: string;
63
- };
64
-
65
- export function getWebSearchModelKey(model: WebSearchModel | undefined): string | undefined {
66
- return getExactModelKey(model);
67
- }
68
-
69
- export function isWebSearchRoute(value: unknown): value is WebSearchRoute {
70
- return value === "local" || value === "hosted" || value === "standalone-alpha";
71
- }
72
-
73
- function selectedRoute(args: {
74
- route: WebSearchRoute;
75
- source: Exclude<WebSearchRouteSource, "none">;
76
- model: WebSearchModel | undefined;
77
- modelKey: string | undefined;
78
- }): WebSearchRouteResolution {
79
- if (!args.modelKey) {
80
- return {
81
- route: args.route,
82
- source: args.source,
83
- available: false,
84
- reason: "missing-model",
85
- };
86
- }
87
- if (
88
- args.route !== "local" &&
89
- args.model?.api !== VIRTUAL_MODEL_API &&
90
- (args.route === "standalone-alpha"
91
- ? !isWebSearchStandaloneCapableApi(args.model?.api)
92
- : !isWebSearchCapableApi(args.model?.api))
93
- ) {
94
- return {
95
- route: args.route,
96
- source: args.source,
97
- modelKey: args.modelKey,
98
- available: false,
99
- reason: "unsupported-api",
100
- };
101
- }
102
- return {
103
- route: args.route,
104
- source: args.source,
105
- modelKey: args.modelKey,
106
- available: true,
107
- };
108
- }
109
-
110
- export function isWebSearchCapableApi(api: unknown): api is WebSearchCapableApi {
111
- return typeof api === "string" && (WEB_SEARCH_CAPABLE_APIS as readonly string[]).includes(api);
112
- }
113
-
114
- export function isWebSearchStandaloneCapableApi(api: unknown): api is WebSearchStandaloneApi {
115
- return typeof api === "string" && (WEB_SEARCH_STANDALONE_APIS as readonly string[]).includes(api);
116
- }
117
-
118
- /**
119
- * Resolve exactly one configured Web Search route. The legacy model allowlist is
120
- * deliberately consulted only after explicit route fields so old configs retain
121
- * hosted behavior without becoming an implicit alpha-search opt-in.
122
- */
123
- export function resolveWebSearchRoute(args: {
124
- model: WebSearchModel | undefined;
125
- config: WebSearchConfig;
126
- }): WebSearchRouteResolution {
127
- const { model, config } = args;
128
- const modelKey = getWebSearchModelKey(model);
129
- if (!config.enabled) {
130
- return { route: "none", source: "none", modelKey, reason: "disabled" };
131
- }
132
-
133
- const exactRoute = modelKey ? config.routes?.[modelKey] : undefined;
134
- if (exactRoute !== undefined) {
135
- if (!isWebSearchRoute(exactRoute)) {
136
- return { route: "none", source: "none", modelKey, reason: "unconfigured" };
137
- }
138
- return selectedRoute({ route: exactRoute, source: "exact", model, modelKey });
139
- }
140
-
141
- if (config.defaultRoute !== undefined) {
142
- if (!isWebSearchRoute(config.defaultRoute)) {
143
- return { route: "none", source: "none", modelKey, reason: "unconfigured" };
144
- }
145
- return selectedRoute({ route: config.defaultRoute, source: "default", model, modelKey });
146
- }
147
-
148
- if (
149
- modelKey &&
150
- isExactModelAllowed(model, config.models) &&
151
- (model?.api === VIRTUAL_MODEL_API || isWebSearchCapableApi(model?.api))
152
- ) {
153
- return selectedRoute({ route: "hosted", source: "legacy", model, modelKey });
154
- }
155
-
156
- return { route: "none", source: "none", modelKey, reason: "unconfigured" };
157
- }
158
-
159
- /** Compatibility predicate for callers that specifically need the hosted path. */
160
- export function isWebSearchEnabledForModel(
161
- model: WebSearchModel | undefined,
162
- config: WebSearchConfig,
163
- ): boolean {
164
- const resolution = resolveWebSearchRoute({ model, config });
165
- return resolution.route === "hosted" && resolution.available;
166
- }
1
+ import { VIRTUAL_MODEL_API } from "../runtime";
2
+ import { getExactModelKey, isExactModelAllowed } from "../model-scope";
3
+ import type { WebSearchConfig, WebSearchRoute } from "../types";
4
+
5
+ export const WEB_SEARCH_CAPABLE_APIS = [
6
+ "openai-responses",
7
+ "openai-codex-responses",
8
+ "azure-openai-responses",
9
+ ] as const;
10
+ /** The provider-relative alpha endpoint is only verified for OpenAI/Codex routes. */
11
+ export const WEB_SEARCH_STANDALONE_APIS = ["openai-responses", "openai-codex-responses"] as const;
12
+ export const WEB_SEARCH_SOURCE_INCLUDE = "web_search_call.action.sources";
13
+ export const WEB_SEARCH_PROMPT_MARKER = "<!-- pi-openai-toolkit:web-search -->";
14
+ export const WEB_RUN_TOOL_NAME = "web_run";
15
+ export const LOCAL_WEB_SEARCH_TOOL_NAME = "web_search";
16
+
17
+ export type WebSearchCapableApi = (typeof WEB_SEARCH_CAPABLE_APIS)[number];
18
+ export type WebSearchStandaloneApi = (typeof WEB_SEARCH_STANDALONE_APIS)[number];
19
+ export type WebSearchRouteSource = "exact" | "default" | "legacy" | "none";
20
+ export type WebSearchRouteUnavailableReason = "missing-model" | "unsupported-api" | "invalid-route";
21
+
22
+ export type WebSearchModel = {
23
+ api?: string;
24
+ provider?: string;
25
+ id?: string;
26
+ };
27
+
28
+ export type WebSearchRouteResolution =
29
+ | {
30
+ route: "none";
31
+ source: "none";
32
+ modelKey?: string;
33
+ reason: "disabled" | "unconfigured";
34
+ }
35
+ | {
36
+ route: WebSearchRoute;
37
+ source: Exclude<WebSearchRouteSource, "none">;
38
+ modelKey?: string;
39
+ available: boolean;
40
+ reason?: WebSearchRouteUnavailableReason;
41
+ };
42
+
43
+ export type WebSearchPayloadOutcome =
44
+ | "disabled"
45
+ | "unsupported-model"
46
+ | "non-object-payload"
47
+ | "invalid-tools"
48
+ | "invalid-include"
49
+ | "existing-native-tool"
50
+ | "injected-native-tool"
51
+ | "local-route"
52
+ | "standalone-route"
53
+ | "removed-conflicting-tools"
54
+ | "unavailable-route";
55
+
56
+ export type WebSearchPayloadTransform = {
57
+ payload: unknown;
58
+ outcome: WebSearchPayloadOutcome;
59
+ changed: boolean;
60
+ /** Explicit route failures must abort rather than silently select another search path. */
61
+ fatal?: boolean;
62
+ errorMessage?: string;
63
+ };
64
+
65
+ export function getWebSearchModelKey(model: WebSearchModel | undefined): string | undefined {
66
+ return getExactModelKey(model);
67
+ }
68
+
69
+ export function isWebSearchRoute(value: unknown): value is WebSearchRoute {
70
+ return value === "local" || value === "hosted" || value === "standalone-alpha";
71
+ }
72
+
73
+ function selectedRoute(args: {
74
+ route: WebSearchRoute;
75
+ source: Exclude<WebSearchRouteSource, "none">;
76
+ model: WebSearchModel | undefined;
77
+ modelKey: string | undefined;
78
+ }): WebSearchRouteResolution {
79
+ if (!args.modelKey) {
80
+ return {
81
+ route: args.route,
82
+ source: args.source,
83
+ available: false,
84
+ reason: "missing-model",
85
+ };
86
+ }
87
+ if (
88
+ args.route !== "local" &&
89
+ args.model?.api !== VIRTUAL_MODEL_API &&
90
+ (args.route === "standalone-alpha"
91
+ ? !isWebSearchStandaloneCapableApi(args.model?.api)
92
+ : !isWebSearchCapableApi(args.model?.api))
93
+ ) {
94
+ return {
95
+ route: args.route,
96
+ source: args.source,
97
+ modelKey: args.modelKey,
98
+ available: false,
99
+ reason: "unsupported-api",
100
+ };
101
+ }
102
+ return {
103
+ route: args.route,
104
+ source: args.source,
105
+ modelKey: args.modelKey,
106
+ available: true,
107
+ };
108
+ }
109
+
110
+ export function isWebSearchCapableApi(api: unknown): api is WebSearchCapableApi {
111
+ return typeof api === "string" && (WEB_SEARCH_CAPABLE_APIS as readonly string[]).includes(api);
112
+ }
113
+
114
+ export function isWebSearchStandaloneCapableApi(api: unknown): api is WebSearchStandaloneApi {
115
+ return typeof api === "string" && (WEB_SEARCH_STANDALONE_APIS as readonly string[]).includes(api);
116
+ }
117
+
118
+ /**
119
+ * Resolve exactly one configured Web Search route. The legacy model allowlist is
120
+ * deliberately consulted only after explicit route fields so old configs retain
121
+ * hosted behavior without becoming an implicit alpha-search opt-in.
122
+ */
123
+ export function resolveWebSearchRoute(args: {
124
+ model: WebSearchModel | undefined;
125
+ config: WebSearchConfig;
126
+ }): WebSearchRouteResolution {
127
+ const { model, config } = args;
128
+ const modelKey = getWebSearchModelKey(model);
129
+ if (!config.enabled) {
130
+ return { route: "none", source: "none", modelKey, reason: "disabled" };
131
+ }
132
+
133
+ const exactRoute = modelKey ? config.routes?.[modelKey] : undefined;
134
+ if (exactRoute !== undefined) {
135
+ if (!isWebSearchRoute(exactRoute)) {
136
+ return { route: "none", source: "none", modelKey, reason: "unconfigured" };
137
+ }
138
+ return selectedRoute({ route: exactRoute, source: "exact", model, modelKey });
139
+ }
140
+
141
+ if (config.defaultRoute !== undefined) {
142
+ if (!isWebSearchRoute(config.defaultRoute)) {
143
+ return { route: "none", source: "none", modelKey, reason: "unconfigured" };
144
+ }
145
+ return selectedRoute({ route: config.defaultRoute, source: "default", model, modelKey });
146
+ }
147
+
148
+ if (
149
+ modelKey &&
150
+ isExactModelAllowed(model, config.models) &&
151
+ (model?.api === VIRTUAL_MODEL_API || isWebSearchCapableApi(model?.api))
152
+ ) {
153
+ return selectedRoute({ route: "hosted", source: "legacy", model, modelKey });
154
+ }
155
+
156
+ return { route: "none", source: "none", modelKey, reason: "unconfigured" };
157
+ }
158
+
159
+ /** Compatibility predicate for callers that specifically need the hosted path. */
160
+ export function isWebSearchEnabledForModel(
161
+ model: WebSearchModel | undefined,
162
+ config: WebSearchConfig,
163
+ ): boolean {
164
+ const resolution = resolveWebSearchRoute({ model, config });
165
+ return resolution.route === "hosted" && resolution.available;
166
+ }
@@ -1,50 +1,50 @@
1
- {
2
- "compilerOptions": {
3
- "noEmit": true,
4
- "module": "ESNext",
5
- "moduleResolution": "Bundler",
6
- "allowImportingTsExtensions": true,
7
- "target": "ES2022",
8
- "lib": ["ES2022", "DOM", "DOM.Iterable"],
9
- "skipLibCheck": true,
10
- "strict": true,
11
- "baseUrl": ".",
12
- "typeRoots": ["./node_modules/@types"]
13
- },
14
- "include": [
15
- "src/compact-client.ts",
16
- "src/compaction-projection.ts",
17
- "src/pi-context-hook.ts",
18
- "src/config.ts",
19
- "src/debug.ts",
20
- "src/details-store.ts",
21
- "src/deferred-tool-carryover.ts",
22
- "src/extension-runtime.ts",
23
- "src/image-generation/artifacts.ts",
24
- "src/image-generation/client.ts",
25
- "src/image-generation/eligibility.ts",
26
- "src/image-generation/extension.ts",
27
- "src/image-generation/protocol.ts",
28
- "src/image-generation/references.ts",
29
- "src/image-generation/render.ts",
30
- "src/image-generation/service.ts",
31
- "src/image-generation/types.ts",
32
- "src/responses-websocket/extension.ts",
33
- "src/responses-websocket/transport.ts",
34
- "src/model-scope.ts",
35
- "src/native-fallback.ts",
36
- "src/payload-rewrite.ts",
37
- "src/provider-headers.ts",
38
- "src/responses-headers.ts",
39
- "src/remote-v2-client.ts",
40
- "src/request-context-cache.ts",
41
- "src/runtime.ts",
42
- "src/serializer.ts",
43
- "src/supported-environment.ts",
44
- "src/types.ts",
45
- "src/web-search/extension.ts",
46
- "src/web-search/payload.ts",
47
- "src/web-search/prompt.ts",
48
- "src/web-search/types.ts"
49
- ]
50
- }
1
+ {
2
+ "compilerOptions": {
3
+ "noEmit": true,
4
+ "module": "ESNext",
5
+ "moduleResolution": "Bundler",
6
+ "allowImportingTsExtensions": true,
7
+ "target": "ES2022",
8
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
9
+ "skipLibCheck": true,
10
+ "strict": true,
11
+ "baseUrl": ".",
12
+ "typeRoots": ["./node_modules/@types"]
13
+ },
14
+ "include": [
15
+ "src/compact-client.ts",
16
+ "src/compaction-projection.ts",
17
+ "src/pi-context-hook.ts",
18
+ "src/config.ts",
19
+ "src/debug.ts",
20
+ "src/details-store.ts",
21
+ "src/deferred-tool-carryover.ts",
22
+ "src/extension-runtime.ts",
23
+ "src/image-generation/artifacts.ts",
24
+ "src/image-generation/client.ts",
25
+ "src/image-generation/eligibility.ts",
26
+ "src/image-generation/extension.ts",
27
+ "src/image-generation/protocol.ts",
28
+ "src/image-generation/references.ts",
29
+ "src/image-generation/render.ts",
30
+ "src/image-generation/service.ts",
31
+ "src/image-generation/types.ts",
32
+ "src/responses-websocket/extension.ts",
33
+ "src/responses-websocket/transport.ts",
34
+ "src/model-scope.ts",
35
+ "src/native-fallback.ts",
36
+ "src/payload-rewrite.ts",
37
+ "src/provider-headers.ts",
38
+ "src/responses-headers.ts",
39
+ "src/remote-v2-client.ts",
40
+ "src/request-context-cache.ts",
41
+ "src/runtime.ts",
42
+ "src/serializer.ts",
43
+ "src/supported-environment.ts",
44
+ "src/types.ts",
45
+ "src/web-search/extension.ts",
46
+ "src/web-search/payload.ts",
47
+ "src/web-search/prompt.ts",
48
+ "src/web-search/types.ts"
49
+ ]
50
+ }