webfox 0.0.0-test.0 → 4.0.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/LICENSE +21 -0
- package/README.md +256 -3
- package/assets/webfox-lockup-dark.png +0 -0
- package/assets/webfox-lockup.png +0 -0
- package/dist/adapter-2YBFCBCZ.js +161 -0
- package/dist/adapter-67TIISDW.js +753 -0
- package/dist/adapter-AB7LKV7N.js +324 -0
- package/dist/adapter-AUYLTDPM.js +73 -0
- package/dist/adapter-HITGYUXN.js +494 -0
- package/dist/adapter-HPTMLH75.js +334 -0
- package/dist/adapter-I6OUKBZQ.js +492 -0
- package/dist/adapter-ISZQTZDP.js +166 -0
- package/dist/adapter-MAG7X663.js +230 -0
- package/dist/adapter-NEXSOHGT.js +232 -0
- package/dist/adapter-PADXKW43.js +162 -0
- package/dist/adapter-SDQX2533.js +123 -0
- package/dist/adapter-UAZNLDSS.js +237 -0
- package/dist/adapter-XBAQSK7I.js +282 -0
- package/dist/application-types.d.ts +34 -0
- package/dist/application.d.ts +2 -0
- package/dist/chunk-EF4VMDZL.js +85 -0
- package/dist/chunk-G2YAQEET.js +38 -0
- package/dist/chunk-I2UIACY3.js +12 -0
- package/dist/chunk-L425U55P.js +3051 -0
- package/dist/chunk-QRHDXM2L.js +31 -0
- package/dist/chunk-SMF5ALX7.js +762 -0
- package/dist/chunk-U4BLULLV.js +52 -0
- package/dist/chunk-WCTOYZVB.js +85 -0
- package/dist/chunk-X6ZBIHZC.js +21 -0
- package/dist/chunk-YZXM4U2C.js +21 -0
- package/dist/chunk-ZVTVERW5.js +20 -0
- package/dist/cli.js +641 -0
- package/dist/config.schema.json +4270 -0
- package/dist/configuration/defaults.d.ts +3 -0
- package/dist/configuration/file.d.ts +17 -0
- package/dist/configuration/options-schema.d.ts +2 -0
- package/dist/configuration/planning.d.ts +10 -0
- package/dist/configuration/schema.d.ts +9 -0
- package/dist/configuration/types.d.ts +37 -0
- package/dist/contents.d.ts +19 -0
- package/dist/domain.d.ts +89 -0
- package/dist/errors.d.ts +17 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +38 -0
- package/dist/package-metadata.d.ts +3 -0
- package/dist/pi-keybindings.d.ts +1 -0
- package/dist/pi-params.d.ts +3 -0
- package/dist/pi-render.d.ts +50 -0
- package/dist/pi-search-render.d.ts +4 -0
- package/dist/pi-text.d.ts +4 -0
- package/dist/pi-validation.d.ts +4 -0
- package/dist/pi.d.ts +2 -0
- package/dist/pi.js +563 -0
- package/dist/providers/brave/adapter.d.ts +7 -0
- package/dist/providers/brave/definition.d.ts +1 -0
- package/dist/providers/brave/types.d.ts +4 -0
- package/dist/providers/cli-json.d.ts +9 -0
- package/dist/providers/cloudflare/adapter.d.ts +5 -0
- package/dist/providers/cloudflare/definition.d.ts +1 -0
- package/dist/providers/cloudflare/types.d.ts +4 -0
- package/dist/providers/contract.d.ts +88 -0
- package/dist/providers/custom/adapter.d.ts +9 -0
- package/dist/providers/custom/definition.d.ts +1 -0
- package/dist/providers/custom/types.d.ts +9 -0
- package/dist/providers/definition.d.ts +32 -0
- package/dist/providers/exa/adapter.d.ts +8 -0
- package/dist/providers/exa/definition.d.ts +1 -0
- package/dist/providers/exa/types.d.ts +4 -0
- package/dist/providers/firecrawl/adapter.d.ts +7 -0
- package/dist/providers/firecrawl/definition.d.ts +1 -0
- package/dist/providers/firecrawl/types.d.ts +4 -0
- package/dist/providers/gemini/adapter.d.ts +14 -0
- package/dist/providers/gemini/definition.d.ts +1 -0
- package/dist/providers/gemini/types.d.ts +3 -0
- package/dist/providers/linkup/adapter.d.ts +7 -0
- package/dist/providers/linkup/definition.d.ts +1 -0
- package/dist/providers/linkup/types.d.ts +4 -0
- package/dist/providers/metadata.d.ts +15 -0
- package/dist/providers/ollama/adapter.d.ts +6 -0
- package/dist/providers/ollama/definition.d.ts +1 -0
- package/dist/providers/ollama/types.d.ts +4 -0
- package/dist/providers/openai/adapter.d.ts +7 -0
- package/dist/providers/openai/definition.d.ts +1 -0
- package/dist/providers/openai/types.d.ts +28 -0
- package/dist/providers/parallel/adapter.d.ts +6 -0
- package/dist/providers/parallel/definition.d.ts +1 -0
- package/dist/providers/parallel/types.d.ts +4 -0
- package/dist/providers/perplexity/adapter.d.ts +7 -0
- package/dist/providers/perplexity/definition.d.ts +1 -0
- package/dist/providers/perplexity/types.d.ts +4 -0
- package/dist/providers/registry.d.ts +16 -0
- package/dist/providers/serper/adapter.d.ts +5 -0
- package/dist/providers/serper/definition.d.ts +1 -0
- package/dist/providers/serper/types.d.ts +21 -0
- package/dist/providers/shared.d.ts +4 -0
- package/dist/providers/tavily/adapter.d.ts +6 -0
- package/dist/providers/tavily/definition.d.ts +1 -0
- package/dist/providers/tavily/types.d.ts +4 -0
- package/dist/providers/valyu/adapter.d.ts +8 -0
- package/dist/providers/valyu/definition.d.ts +1 -0
- package/dist/providers/valyu/types.d.ts +4 -0
- package/dist/render.d.ts +5 -0
- package/dist/runtime/credentials.d.ts +15 -0
- package/dist/runtime/duration.d.ts +2 -0
- package/dist/runtime/execute.d.ts +20 -0
- package/dist/runtime/lifecycle.d.ts +8 -0
- package/dist/runtime/outward.d.ts +11 -0
- package/dist/runtime/polling.d.ts +13 -0
- package/dist/runtime/process.d.ts +4 -0
- package/docs/cli-experience.md +177 -0
- package/docs/provider.md +177 -0
- package/docs/reference.md +181 -0
- package/example-config.yaml +36 -0
- package/examples/custom/README.md +57 -0
- package/examples/custom/provider.mjs +54 -0
- package/examples/custom/webfox.json +18 -0
- package/package.json +122 -8
- package/index.js +0 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CONFIG_SCHEMA_URL } from "../package-metadata.js";
|
|
2
|
+
import type { WebfoxConfig } from "./types.js";
|
|
3
|
+
export { CONFIG_SCHEMA_URL };
|
|
4
|
+
export interface ConfigPathOptions {
|
|
5
|
+
configPath?: string;
|
|
6
|
+
cwd?: string;
|
|
7
|
+
env?: Record<string, string | undefined>;
|
|
8
|
+
platform?: NodeJS.Platform;
|
|
9
|
+
home?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function resolveConfigPath(options?: ConfigPathOptions): string;
|
|
12
|
+
export declare function loadConfig(options?: ConfigPathOptions): Promise<WebfoxConfig>;
|
|
13
|
+
export declare function loadConfigSync(options?: ConfigPathOptions): WebfoxConfig;
|
|
14
|
+
export declare function parseConfigDocument(text: string, source?: string): import("yaml").Document.Parsed<import("yaml").Scalar.Parsed, true> | import("yaml").Document.Parsed<import("yaml").YAMLSeq.Parsed<import("yaml").ParsedNode>, true> | import("yaml").Document.Parsed<import("yaml").YAMLMap.Parsed<import("yaml").ParsedNode, import("yaml").ParsedNode | null>, true> | import("yaml").Document.Parsed<import("yaml").Alias.Parsed, true>;
|
|
15
|
+
export declare function parseConfig(text: string, source?: string): WebfoxConfig;
|
|
16
|
+
export declare function validateConfig(value: unknown, source?: string): WebfoxConfig;
|
|
17
|
+
export declare function redactConfig(config: WebfoxConfig): unknown;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { TObject } from "typebox";
|
|
2
|
+
import { type Capability, type ProviderId } from "../domain.js";
|
|
3
|
+
import type { ProviderDefinition } from "../providers/definition.js";
|
|
4
|
+
import type { WebfoxConfig } from "./types.js";
|
|
5
|
+
export declare function selectProvider(config: WebfoxConfig, capability: Capability, requested?: ProviderId): ProviderDefinition;
|
|
6
|
+
export declare function optionSchema(definition: ProviderDefinition, capability: Capability, mode?: "request" | "defaults"): TObject | undefined;
|
|
7
|
+
export declare function effectiveOptions(config: WebfoxConfig, definition: ProviderDefinition, capability: Capability, options?: Record<string, unknown>, mode?: "request" | "defaults"): Record<string, unknown>;
|
|
8
|
+
export declare function validateOptions(definition: ProviderDefinition, capability: Capability, options: Record<string, unknown>, mode?: "request" | "defaults"): void;
|
|
9
|
+
export declare function validateConfiguredOptions(config: WebfoxConfig): void;
|
|
10
|
+
export declare function deepMerge(base: Record<string, unknown>, override: Record<string, unknown>): Record<string, unknown>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Generated from the same lightweight definitions as help and planning. */
|
|
2
|
+
export declare const configurationSchema: {
|
|
3
|
+
type: string;
|
|
4
|
+
additionalProperties: boolean;
|
|
5
|
+
properties: Record<string, unknown>;
|
|
6
|
+
$schema: string;
|
|
7
|
+
$id: string;
|
|
8
|
+
title: string;
|
|
9
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Capability, ProviderId } from "../domain.js";
|
|
2
|
+
export type CredentialSource = {
|
|
3
|
+
env: string;
|
|
4
|
+
} | {
|
|
5
|
+
command: [string, ...string[]];
|
|
6
|
+
} | {
|
|
7
|
+
value: string;
|
|
8
|
+
};
|
|
9
|
+
export interface ExecutionConfig {
|
|
10
|
+
timeoutMs?: number;
|
|
11
|
+
researchTimeoutMs?: number;
|
|
12
|
+
retries?: number;
|
|
13
|
+
retryDelayMs?: number;
|
|
14
|
+
concurrency?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface CapabilityDefault {
|
|
17
|
+
provider?: ProviderId;
|
|
18
|
+
maxResults?: number;
|
|
19
|
+
}
|
|
20
|
+
export interface CustomCommand {
|
|
21
|
+
argv: [string, ...string[]];
|
|
22
|
+
cwd?: string;
|
|
23
|
+
env?: Record<string, CredentialSource>;
|
|
24
|
+
}
|
|
25
|
+
export interface ProviderConfiguration {
|
|
26
|
+
credentials?: Record<string, CredentialSource>;
|
|
27
|
+
baseUrl?: string;
|
|
28
|
+
accountId?: CredentialSource;
|
|
29
|
+
options?: Partial<Record<Capability, Record<string, unknown>>>;
|
|
30
|
+
commands?: Partial<Record<Capability, CustomCommand>>;
|
|
31
|
+
}
|
|
32
|
+
export interface WebfoxConfig {
|
|
33
|
+
$schema?: string;
|
|
34
|
+
defaults?: Partial<Record<Capability, CapabilityDefault>>;
|
|
35
|
+
execution?: ExecutionConfig;
|
|
36
|
+
providers?: Partial<Record<ProviderId, ProviderConfiguration>>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ContentsAnswer as DocumentContents, ProviderId, SerializedError } from "./domain.js";
|
|
2
|
+
/** Internal normalized page, before the adapter associates its request index. */
|
|
3
|
+
export interface ContentsAnswer extends DocumentContents {
|
|
4
|
+
error?: string | SerializedError;
|
|
5
|
+
inputIndex?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface ContentsResponse {
|
|
8
|
+
provider: ProviderId;
|
|
9
|
+
answers: ContentsAnswer[];
|
|
10
|
+
}
|
|
11
|
+
export interface IndexedContentsResponse {
|
|
12
|
+
provider: ProviderId;
|
|
13
|
+
answers: Array<DocumentContents & {
|
|
14
|
+
inputIndex: number;
|
|
15
|
+
error?: SerializedError;
|
|
16
|
+
}>;
|
|
17
|
+
}
|
|
18
|
+
/** Only adapters that themselves assemble pages in request order use this helper. */
|
|
19
|
+
export declare function orderedContents(response: ContentsResponse): IndexedContentsResponse;
|
package/dist/domain.d.ts
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
export declare const CAPABILITIES: readonly ["search", "contents", "answer", "research"];
|
|
2
|
+
export type Capability = (typeof CAPABILITIES)[number];
|
|
3
|
+
export declare const PROVIDER_IDS: readonly ["brave", "cloudflare", "custom", "exa", "firecrawl", "gemini", "linkup", "ollama", "openai", "parallel", "perplexity", "serper", "tavily", "valyu"];
|
|
4
|
+
export type ProviderId = (typeof PROVIDER_IDS)[number];
|
|
5
|
+
export declare const WEBFOX_ERROR_CODES: readonly ["INVALID_CONFIG", "INVALID_INPUT", "PROVIDER_UNAVAILABLE", "PROVIDER_FAILURE", "PARTIAL_BATCH", "TIMEOUT", "CANCELLED"];
|
|
6
|
+
export type WebfoxErrorCode = (typeof WEBFOX_ERROR_CODES)[number];
|
|
7
|
+
export interface SerializedError {
|
|
8
|
+
code: WebfoxErrorCode;
|
|
9
|
+
message: string;
|
|
10
|
+
retryable?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export type InputResult<T> = {
|
|
13
|
+
input: string;
|
|
14
|
+
ok: true;
|
|
15
|
+
value: T;
|
|
16
|
+
} | {
|
|
17
|
+
input: string;
|
|
18
|
+
ok: false;
|
|
19
|
+
error: SerializedError;
|
|
20
|
+
};
|
|
21
|
+
export interface SearchResult {
|
|
22
|
+
title: string;
|
|
23
|
+
url: string;
|
|
24
|
+
snippet: string;
|
|
25
|
+
score?: number;
|
|
26
|
+
metadata?: Record<string, unknown>;
|
|
27
|
+
}
|
|
28
|
+
export interface ContentsAnswer {
|
|
29
|
+
/** Final fetched URL; association with the requested URL is in InputResult.input. */
|
|
30
|
+
url: string;
|
|
31
|
+
content?: string;
|
|
32
|
+
summary?: unknown;
|
|
33
|
+
metadata?: Record<string, unknown>;
|
|
34
|
+
}
|
|
35
|
+
export interface TextAnswer {
|
|
36
|
+
text: string;
|
|
37
|
+
itemCount?: number;
|
|
38
|
+
metadata?: Record<string, unknown>;
|
|
39
|
+
}
|
|
40
|
+
export interface CapabilityValues {
|
|
41
|
+
search: {
|
|
42
|
+
results: SearchResult[];
|
|
43
|
+
};
|
|
44
|
+
contents: ContentsAnswer;
|
|
45
|
+
answer: TextAnswer;
|
|
46
|
+
research: TextAnswer;
|
|
47
|
+
}
|
|
48
|
+
export interface CapabilityDocument<T, C extends Capability = Capability> {
|
|
49
|
+
schemaVersion: 1;
|
|
50
|
+
capability: C;
|
|
51
|
+
provider: ProviderId;
|
|
52
|
+
status: "ok" | "partial";
|
|
53
|
+
results: InputResult<T>[];
|
|
54
|
+
}
|
|
55
|
+
export type SearchDocument = CapabilityDocument<CapabilityValues["search"], "search">;
|
|
56
|
+
export type ContentsDocument = CapabilityDocument<ContentsAnswer, "contents">;
|
|
57
|
+
export type AnswerDocument = CapabilityDocument<TextAnswer, "answer">;
|
|
58
|
+
export type ResearchDocument = CapabilityDocument<TextAnswer, "research">;
|
|
59
|
+
export type WebDocument = SearchDocument | ContentsDocument | AnswerDocument | ResearchDocument;
|
|
60
|
+
export interface ProgressEvent {
|
|
61
|
+
capability: Capability;
|
|
62
|
+
provider: ProviderId;
|
|
63
|
+
message: string;
|
|
64
|
+
/** Per-input lifecycle updates, indexed by original input order. */
|
|
65
|
+
inputIndex?: number;
|
|
66
|
+
input?: string;
|
|
67
|
+
state?: "queued" | "running" | "done" | "failed" | "cancelled";
|
|
68
|
+
}
|
|
69
|
+
export interface RequestOptions {
|
|
70
|
+
provider?: ProviderId;
|
|
71
|
+
options?: Record<string, unknown>;
|
|
72
|
+
/** Overall operation deadline, including preparation and retries. */
|
|
73
|
+
timeoutMs?: number;
|
|
74
|
+
signal?: AbortSignal;
|
|
75
|
+
onProgress?: (event: ProgressEvent) => void;
|
|
76
|
+
}
|
|
77
|
+
export interface SearchOptions extends RequestOptions {
|
|
78
|
+
queries: string[];
|
|
79
|
+
maxResults?: number;
|
|
80
|
+
}
|
|
81
|
+
export interface ContentsOptions extends RequestOptions {
|
|
82
|
+
urls: string[];
|
|
83
|
+
}
|
|
84
|
+
export interface AnswerOptions extends RequestOptions {
|
|
85
|
+
queries: string[];
|
|
86
|
+
}
|
|
87
|
+
export interface ResearchOptions extends RequestOptions {
|
|
88
|
+
input: string;
|
|
89
|
+
}
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SerializedError, WebfoxErrorCode } from "./domain.js";
|
|
2
|
+
export declare class WebfoxError extends Error {
|
|
3
|
+
readonly code: WebfoxErrorCode;
|
|
4
|
+
readonly options: {
|
|
5
|
+
cause?: unknown;
|
|
6
|
+
retryable?: boolean;
|
|
7
|
+
};
|
|
8
|
+
readonly name = "WebfoxError";
|
|
9
|
+
constructor(code: WebfoxErrorCode, message: string, options?: {
|
|
10
|
+
cause?: unknown;
|
|
11
|
+
retryable?: boolean;
|
|
12
|
+
});
|
|
13
|
+
toJSON(): SerializedError;
|
|
14
|
+
}
|
|
15
|
+
/** Classify structured transport/SDK fields, never error-message substrings. */
|
|
16
|
+
export declare function asWebfoxError(error: unknown): WebfoxError;
|
|
17
|
+
export declare function httpError(response: Response, message: string): WebfoxError;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { createWebfox } from "./application.js";
|
|
2
|
+
export { CONFIG_SCHEMA_URL, loadConfig, parseConfig, redactConfig, resolveConfigPath, validateConfig, } from "./configuration/file.js";
|
|
3
|
+
export { setCapabilityDefault } from "./configuration/defaults.js";
|
|
4
|
+
export { validateConfiguredOptions } from "./configuration/planning.js";
|
|
5
|
+
export { WebfoxError } from "./errors.js";
|
|
6
|
+
export * from "./domain.js";
|
|
7
|
+
export type * from "./application-types.js";
|
|
8
|
+
export type * from "./configuration/types.js";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createWebfox,
|
|
3
|
+
loadConfig,
|
|
4
|
+
parseConfig,
|
|
5
|
+
redactConfig,
|
|
6
|
+
resolveConfigPath,
|
|
7
|
+
setCapabilityDefault,
|
|
8
|
+
validateConfig
|
|
9
|
+
} from "./chunk-SMF5ALX7.js";
|
|
10
|
+
import "./chunk-WCTOYZVB.js";
|
|
11
|
+
import {
|
|
12
|
+
CONFIG_SCHEMA_URL,
|
|
13
|
+
validateConfiguredOptions
|
|
14
|
+
} from "./chunk-L425U55P.js";
|
|
15
|
+
import "./chunk-ZVTVERW5.js";
|
|
16
|
+
import {
|
|
17
|
+
CAPABILITIES,
|
|
18
|
+
PROVIDER_IDS,
|
|
19
|
+
WEBFOX_ERROR_CODES
|
|
20
|
+
} from "./chunk-G2YAQEET.js";
|
|
21
|
+
import {
|
|
22
|
+
WebfoxError
|
|
23
|
+
} from "./chunk-U4BLULLV.js";
|
|
24
|
+
export {
|
|
25
|
+
CAPABILITIES,
|
|
26
|
+
CONFIG_SCHEMA_URL,
|
|
27
|
+
PROVIDER_IDS,
|
|
28
|
+
WEBFOX_ERROR_CODES,
|
|
29
|
+
WebfoxError,
|
|
30
|
+
createWebfox,
|
|
31
|
+
loadConfig,
|
|
32
|
+
parseConfig,
|
|
33
|
+
redactConfig,
|
|
34
|
+
resolveConfigPath,
|
|
35
|
+
setCapabilityDefault,
|
|
36
|
+
validateConfig,
|
|
37
|
+
validateConfiguredOptions
|
|
38
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function expansionKey(): string;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type Theme } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
import { type Component } from "@earendil-works/pi-tui";
|
|
3
|
+
import type { Capability } from "./domain.js";
|
|
4
|
+
declare const inputStates: {
|
|
5
|
+
readonly queued: {
|
|
6
|
+
readonly glyph: "●";
|
|
7
|
+
readonly color: "dim";
|
|
8
|
+
};
|
|
9
|
+
readonly running: {
|
|
10
|
+
readonly glyph: "▶︎";
|
|
11
|
+
readonly color: "warning";
|
|
12
|
+
};
|
|
13
|
+
readonly done: {
|
|
14
|
+
readonly glyph: "✔︎";
|
|
15
|
+
readonly color: "success";
|
|
16
|
+
};
|
|
17
|
+
readonly failed: {
|
|
18
|
+
readonly glyph: "✘︎";
|
|
19
|
+
readonly color: "error";
|
|
20
|
+
};
|
|
21
|
+
readonly cancelled: {
|
|
22
|
+
readonly glyph: "■";
|
|
23
|
+
readonly color: "dim";
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export interface InputStatus {
|
|
27
|
+
input: string;
|
|
28
|
+
state: keyof typeof inputStates;
|
|
29
|
+
}
|
|
30
|
+
export declare class WebCall implements Component {
|
|
31
|
+
private readonly capability;
|
|
32
|
+
private args;
|
|
33
|
+
private theme;
|
|
34
|
+
private expanded;
|
|
35
|
+
constructor(capability: Capability);
|
|
36
|
+
update(args: unknown, theme: Theme, expanded: boolean): void;
|
|
37
|
+
render(width: number): string[];
|
|
38
|
+
invalidate(): void;
|
|
39
|
+
}
|
|
40
|
+
export declare function renderWebResult(result: {
|
|
41
|
+
content: {
|
|
42
|
+
type: string;
|
|
43
|
+
text?: string;
|
|
44
|
+
}[];
|
|
45
|
+
details?: unknown;
|
|
46
|
+
}, options: {
|
|
47
|
+
expanded: boolean;
|
|
48
|
+
isPartial: boolean;
|
|
49
|
+
}, theme: Theme, isError: boolean, capability?: Capability): Component;
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Theme } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
import { type Component } from "@earendil-works/pi-tui";
|
|
3
|
+
/** Search excerpts are text, not documents. Never parse their Markdown. */
|
|
4
|
+
export declare function renderSearchResult(details: unknown, fallback: string, theme: Theme): Component;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Pi's shell owns the background; truncation must not reset it. */
|
|
2
|
+
export declare function truncateLine(text: string, width: number): string;
|
|
3
|
+
/** Keep source punctuation literal and remove terminal control sequences. */
|
|
4
|
+
export declare function plainText(value: string): string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { TSchema } from "typebox";
|
|
2
|
+
/** Reject unknown fields before Pi's generic validator echoes the raw payload.
|
|
3
|
+
* Leave coercion, required fields, and all other validation to Pi unchanged. */
|
|
4
|
+
export declare function prepareToolArguments(schema: TSchema, args: unknown): unknown;
|
package/dist/pi.d.ts
ADDED