oh-my-opencode-serverlocal 0.1.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.ja-JP.md +775 -0
- package/README.ko-KR.md +796 -0
- package/README.md +792 -0
- package/README.zh-CN.md +765 -0
- package/dist/agents/council.d.ts +27 -0
- package/dist/agents/councillor.d.ts +2 -0
- package/dist/agents/designer.d.ts +2 -0
- package/dist/agents/explorer.d.ts +2 -0
- package/dist/agents/fixer.d.ts +2 -0
- package/dist/agents/index.d.ts +31 -0
- package/dist/agents/librarian.d.ts +2 -0
- package/dist/agents/observer.d.ts +2 -0
- package/dist/agents/oracle.d.ts +2 -0
- package/dist/agents/orchestrator.d.ts +28 -0
- package/dist/agents/permissions.d.ts +10 -0
- package/dist/cli/background-subagents.d.ts +13 -0
- package/dist/cli/companion.d.ts +4 -0
- package/dist/cli/config-io.d.ts +25 -0
- package/dist/cli/config-manager.d.ts +4 -0
- package/dist/cli/custom-skills-registry.d.ts +18 -0
- package/dist/cli/custom-skills.d.ts +13 -0
- package/dist/cli/doctor.d.ts +38 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.js +3565 -0
- package/dist/cli/install.d.ts +7 -0
- package/dist/cli/model-key-normalization.d.ts +1 -0
- package/dist/cli/paths.d.ts +35 -0
- package/dist/cli/providers.d.ts +145 -0
- package/dist/cli/skills.d.ts +24 -0
- package/dist/cli/system.d.ts +6 -0
- package/dist/cli/types.d.ts +47 -0
- package/dist/companion/manager.d.ts +50 -0
- package/dist/companion/updater.d.ts +36 -0
- package/dist/config/agent-mcps.d.ts +11 -0
- package/dist/config/constants.d.ts +38 -0
- package/dist/config/council-schema.d.ts +137 -0
- package/dist/config/index.d.ts +5 -0
- package/dist/config/loader.d.ts +88 -0
- package/dist/config/runtime-preset.d.ts +11 -0
- package/dist/config/schema.d.ts +1107 -0
- package/dist/config/strip-orchestrator-model.d.ts +9 -0
- package/dist/config/utils.d.ts +18 -0
- package/dist/council/council-manager.d.ts +53 -0
- package/dist/council/index.d.ts +1 -0
- package/dist/hooks/apply-patch/codec.d.ts +7 -0
- package/dist/hooks/apply-patch/errors.d.ts +25 -0
- package/dist/hooks/apply-patch/execution-context.d.ts +27 -0
- package/dist/hooks/apply-patch/index.d.ts +15 -0
- package/dist/hooks/apply-patch/matching.d.ts +26 -0
- package/dist/hooks/apply-patch/operations.d.ts +3 -0
- package/dist/hooks/apply-patch/prepared-changes.d.ts +17 -0
- package/dist/hooks/apply-patch/resolution.d.ts +19 -0
- package/dist/hooks/apply-patch/rewrite.d.ts +7 -0
- package/dist/hooks/apply-patch/test-helpers.d.ts +6 -0
- package/dist/hooks/apply-patch/types.d.ts +80 -0
- package/dist/hooks/auto-update-checker/cache.d.ts +11 -0
- package/dist/hooks/auto-update-checker/checker.d.ts +38 -0
- package/dist/hooks/auto-update-checker/constants.d.ts +12 -0
- package/dist/hooks/auto-update-checker/index.d.ts +18 -0
- package/dist/hooks/auto-update-checker/skill-sync.d.ts +67 -0
- package/dist/hooks/auto-update-checker/types.d.ts +34 -0
- package/dist/hooks/chat-headers.d.ts +16 -0
- package/dist/hooks/command-hook-utils.d.ts +5 -0
- package/dist/hooks/deepwork/index.d.ts +13 -0
- package/dist/hooks/delegate-task-retry/hook.d.ts +8 -0
- package/dist/hooks/delegate-task-retry/patterns.d.ts +11 -0
- package/dist/hooks/filter-available-skills/index.d.ts +19 -0
- package/dist/hooks/foreground-fallback/index.d.ts +122 -0
- package/dist/hooks/image-hook.d.ts +8 -0
- package/dist/hooks/index.d.ts +16 -0
- package/dist/hooks/json-error-recovery/hook.d.ts +18 -0
- package/dist/hooks/loop-command/index.d.ts +13 -0
- package/dist/hooks/phase-reminder/index.d.ts +25 -0
- package/dist/hooks/post-file-tool-nudge/index.d.ts +23 -0
- package/dist/hooks/reflect/index.d.ts +13 -0
- package/dist/hooks/session-lifecycle.d.ts +10 -0
- package/dist/hooks/task-session-manager/index.d.ts +58 -0
- package/dist/hooks/task-session-manager/pending-call-tracker.d.ts +13 -0
- package/dist/hooks/task-session-manager/task-context-tracker.d.ts +14 -0
- package/dist/hooks/types.d.ts +26 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +39519 -0
- package/dist/interview/dashboard-manager.d.ts +21 -0
- package/dist/interview/dashboard.d.ts +67 -0
- package/dist/interview/document.d.ts +29 -0
- package/dist/interview/helpers.d.ts +10 -0
- package/dist/interview/index.d.ts +1 -0
- package/dist/interview/manager.d.ts +21 -0
- package/dist/interview/parser.d.ts +11 -0
- package/dist/interview/prompts.d.ts +7 -0
- package/dist/interview/server.d.ts +15 -0
- package/dist/interview/service.d.ts +45 -0
- package/dist/interview/session-server.d.ts +21 -0
- package/dist/interview/types.d.ts +111 -0
- package/dist/interview/ui.d.ts +11 -0
- package/dist/loop/loop-session.d.ts +64 -0
- package/dist/mcp/context7.d.ts +6 -0
- package/dist/mcp/grep-app.d.ts +6 -0
- package/dist/mcp/index.d.ts +8 -0
- package/dist/mcp/types.d.ts +12 -0
- package/dist/mcp/websearch.d.ts +9 -0
- package/dist/multiplexer/cmux/close-policy.d.ts +20 -0
- package/dist/multiplexer/cmux/index.d.ts +102 -0
- package/dist/multiplexer/cmux/session-lifecycle.d.ts +92 -0
- package/dist/multiplexer/cmux/session-state.d.ts +45 -0
- package/dist/multiplexer/factory.d.ts +17 -0
- package/dist/multiplexer/herdr/index.d.ts +35 -0
- package/dist/multiplexer/index.d.ts +12 -0
- package/dist/multiplexer/session-manager.d.ts +69 -0
- package/dist/multiplexer/shared.d.ts +31 -0
- package/dist/multiplexer/tmux/index.d.ts +26 -0
- package/dist/multiplexer/types.d.ts +57 -0
- package/dist/multiplexer/zellij/index.d.ts +47 -0
- package/dist/tools/acp-run.d.ts +3 -0
- package/dist/tools/ast-grep/cli.d.ts +15 -0
- package/dist/tools/ast-grep/constants.d.ts +25 -0
- package/dist/tools/ast-grep/downloader.d.ts +5 -0
- package/dist/tools/ast-grep/index.d.ts +10 -0
- package/dist/tools/ast-grep/tools.d.ts +3 -0
- package/dist/tools/ast-grep/types.d.ts +30 -0
- package/dist/tools/ast-grep/utils.d.ts +4 -0
- package/dist/tools/cancel-task.d.ts +16 -0
- package/dist/tools/council.d.ts +10 -0
- package/dist/tools/index.d.ts +7 -0
- package/dist/tools/preset-manager.d.ts +26 -0
- package/dist/tools/smartfetch/binary.d.ts +3 -0
- package/dist/tools/smartfetch/cache.d.ts +6 -0
- package/dist/tools/smartfetch/constants.d.ts +12 -0
- package/dist/tools/smartfetch/index.d.ts +3 -0
- package/dist/tools/smartfetch/network.d.ts +38 -0
- package/dist/tools/smartfetch/secondary-model.d.ts +35 -0
- package/dist/tools/smartfetch/tool.d.ts +3 -0
- package/dist/tools/smartfetch/types.d.ts +122 -0
- package/dist/tools/smartfetch/utils.d.ts +20 -0
- package/dist/tui-state.d.ts +18 -0
- package/dist/tui.d.ts +13 -0
- package/dist/tui.js +1112 -0
- package/dist/utils/agent-variant.d.ts +23 -0
- package/dist/utils/background-job-board.d.ts +113 -0
- package/dist/utils/background-job-coordinator.d.ts +72 -0
- package/dist/utils/background-job-store.d.ts +46 -0
- package/dist/utils/compat.d.ts +29 -0
- package/dist/utils/councillor-models.d.ts +20 -0
- package/dist/utils/env.d.ts +3 -0
- package/dist/utils/escape-html.d.ts +1 -0
- package/dist/utils/frontmatter.d.ts +6 -0
- package/dist/utils/guards.d.ts +4 -0
- package/dist/utils/index.d.ts +10 -0
- package/dist/utils/internal-initiator.d.ts +11 -0
- package/dist/utils/logger.d.ts +6 -0
- package/dist/utils/polling.d.ts +21 -0
- package/dist/utils/session.d.ts +75 -0
- package/dist/utils/subagent-depth.d.ts +35 -0
- package/dist/utils/system-collapse.d.ts +6 -0
- package/dist/utils/task.d.ts +20 -0
- package/dist/utils/zip-extractor.d.ts +1 -0
- package/package.json +108 -0
- package/src/companion/companion-manifest.json +12 -0
- package/src/skills/clonedeps/README.md +23 -0
- package/src/skills/clonedeps/SKILL.md +240 -0
- package/src/skills/clonedeps/codemap.md +32 -0
- package/src/skills/codemap/README.md +59 -0
- package/src/skills/codemap/SKILL.md +163 -0
- package/src/skills/codemap/codemap.md +36 -0
- package/src/skills/codemap/scripts/codemap.mjs +483 -0
- package/src/skills/codemap/scripts/codemap.test.ts +129 -0
- package/src/skills/codemap.md +78 -0
- package/src/skills/deepwork/SKILL.md +122 -0
- package/src/skills/loop-engineering/SKILL.md +30 -0
- package/src/skills/oh-my-opencode-slim/SKILL.md +326 -0
- package/src/skills/reflect/SKILL.md +326 -0
- package/src/skills/simplify/README.md +19 -0
- package/src/skills/simplify/SKILL.md +138 -0
- package/src/skills/simplify/codemap.md +36 -0
- package/src/skills/verification-planning/SKILL.md +102 -0
- package/src/skills/worktrees/SKILL.md +171 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { BinaryFetch, DecodedBody, FetchResult, FetchWithRedirectsResult, LlmsProbeResult } from './types';
|
|
2
|
+
export declare function normalizeUrl(input: string): {
|
|
3
|
+
url: string;
|
|
4
|
+
upgradedToHttps: boolean;
|
|
5
|
+
fallbackUrl: string | undefined;
|
|
6
|
+
originalUrl: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function isDocsLikeUrl(url: URL): boolean;
|
|
9
|
+
export declare function buildPermissionPatterns(normalized: ReturnType<typeof normalizeUrl>, shouldProbeLlmsTxt: boolean): string[];
|
|
10
|
+
export declare function buildAllowedOrigins(patterns: string[]): Set<string>;
|
|
11
|
+
export declare function canUseCanonicalCacheAlias(baseUrl: string, aliasUrl: string): boolean;
|
|
12
|
+
export declare function isBinaryContentType(contentType: string): boolean;
|
|
13
|
+
export declare function getBinaryKind(contentType: string): BinaryFetch['binaryKind'];
|
|
14
|
+
export declare function looksLikeHtmlText(text: string): boolean;
|
|
15
|
+
export declare function runWithScopedTimeout<T>(parentSignal: AbortSignal, timeoutMs: number, fn: (signal: AbortSignal) => Promise<T>): Promise<T>;
|
|
16
|
+
export declare function readBodyLimited(response: Response, maxBytes?: number): Promise<{
|
|
17
|
+
data: Uint8Array<ArrayBuffer>;
|
|
18
|
+
truncated: boolean;
|
|
19
|
+
}>;
|
|
20
|
+
export declare function fetchWithRedirects(url: string, _timeoutMs: number, format: 'text' | 'markdown' | 'html', signal: AbortSignal, extraHeaders?: Record<string, string>, method?: 'GET' | 'HEAD', allowedOrigins?: Set<string>): Promise<FetchWithRedirectsResult>;
|
|
21
|
+
export declare function fetchWithUpgradeFallback(normalized: ReturnType<typeof normalizeUrl>, timeoutMs: number, format: 'text' | 'markdown' | 'html', signal: AbortSignal, extraHeaders?: Record<string, string>, method?: 'GET' | 'HEAD', allowedOrigins?: Set<string>): Promise<{
|
|
22
|
+
result: FetchWithRedirectsResult;
|
|
23
|
+
upgradedToHttps: boolean;
|
|
24
|
+
}>;
|
|
25
|
+
export declare function isHtmlLikeContentType(contentType: string): boolean;
|
|
26
|
+
export declare function decodeBody(data: Uint8Array, charset: string | undefined, contentType?: string): DecodedBody;
|
|
27
|
+
export declare function looksLikeTextBody(data: Uint8Array): boolean;
|
|
28
|
+
export declare function isGenericBinaryMime(contentType: string): boolean;
|
|
29
|
+
export declare function extractHeaderMetadata(headers: Headers, finalUrl: string): {
|
|
30
|
+
contentType: string | undefined;
|
|
31
|
+
charset: string | undefined;
|
|
32
|
+
etag: string | undefined;
|
|
33
|
+
lastModified: string | undefined;
|
|
34
|
+
contentLength: number | undefined;
|
|
35
|
+
filename: string | undefined;
|
|
36
|
+
};
|
|
37
|
+
export declare function buildConditionalHeaders(cached: FetchResult | undefined): Record<string, string> | undefined;
|
|
38
|
+
export declare function probeLlmsText(url: URL, timeoutMs: number, signal: AbortSignal, fallbackOrigin?: string): Promise<LlmsProbeResult>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { PluginInput } from '@opencode-ai/plugin';
|
|
2
|
+
import type { CachedFetch, SecondaryModel } from './types';
|
|
3
|
+
type OpenCodeClient = PluginInput['client'];
|
|
4
|
+
export declare function readSecondaryModelFromConfig(directory: string): Promise<SecondaryModel[]>;
|
|
5
|
+
export declare function decideSecondaryModelUse(fetchResult: CachedFetch, prompt: string | undefined, secondaryModels: SecondaryModel[]): {
|
|
6
|
+
use: boolean;
|
|
7
|
+
reason: "no_prompt";
|
|
8
|
+
} | {
|
|
9
|
+
use: boolean;
|
|
10
|
+
reason: "no_secondary_model_configured";
|
|
11
|
+
} | {
|
|
12
|
+
use: boolean;
|
|
13
|
+
reason: "empty_content";
|
|
14
|
+
} | {
|
|
15
|
+
use: boolean;
|
|
16
|
+
reason: "content_too_short";
|
|
17
|
+
} | {
|
|
18
|
+
use: boolean;
|
|
19
|
+
reason: "prompt_present";
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Exposed for tests so they can avoid real wall-clock sleeps.
|
|
23
|
+
* Not part of the public API.
|
|
24
|
+
*/
|
|
25
|
+
export declare const _testConfig: {
|
|
26
|
+
deleteRetryDelayMs: number;
|
|
27
|
+
};
|
|
28
|
+
export declare function runSecondaryModelWithFallback(client: OpenCodeClient, directory: string, models: SecondaryModel[], prompt: string, content: string): Promise<{
|
|
29
|
+
model: SecondaryModel;
|
|
30
|
+
text: string;
|
|
31
|
+
inputTruncated: boolean;
|
|
32
|
+
inputChars: number;
|
|
33
|
+
sourceChars: number;
|
|
34
|
+
}>;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
export type SmartfetchOptions = {
|
|
2
|
+
binaryDir?: string;
|
|
3
|
+
};
|
|
4
|
+
export type SecondaryModel = {
|
|
5
|
+
providerID: string;
|
|
6
|
+
modelID: string;
|
|
7
|
+
};
|
|
8
|
+
export type RedirectStep = {
|
|
9
|
+
from: string;
|
|
10
|
+
to: string;
|
|
11
|
+
status: number;
|
|
12
|
+
};
|
|
13
|
+
export type CachedFetch = {
|
|
14
|
+
requestedUrl: string;
|
|
15
|
+
finalUrl: string;
|
|
16
|
+
statusCode: number;
|
|
17
|
+
contentType: string;
|
|
18
|
+
charset?: string;
|
|
19
|
+
etag?: string;
|
|
20
|
+
lastModified?: string;
|
|
21
|
+
contentLength?: number;
|
|
22
|
+
filename?: string;
|
|
23
|
+
canonicalUrl?: string;
|
|
24
|
+
headings?: string[];
|
|
25
|
+
title?: string;
|
|
26
|
+
rawContent: string;
|
|
27
|
+
markdown: string;
|
|
28
|
+
text: string;
|
|
29
|
+
html: string;
|
|
30
|
+
extractedMain: boolean;
|
|
31
|
+
usedLlmsTxt: boolean;
|
|
32
|
+
sourceKind: 'llms_txt' | 'html' | 'text';
|
|
33
|
+
upgradedToHttps: boolean;
|
|
34
|
+
redirectChain: RedirectStep[];
|
|
35
|
+
truncated: boolean;
|
|
36
|
+
wordCount: number;
|
|
37
|
+
qualitySignals?: string[];
|
|
38
|
+
llmsProbeError?: string;
|
|
39
|
+
llmsProbeTruncated?: boolean;
|
|
40
|
+
cacheRevalidated?: boolean;
|
|
41
|
+
upstreamStatusCode?: number;
|
|
42
|
+
cacheHit?: boolean;
|
|
43
|
+
decodedCharset?: string;
|
|
44
|
+
decodeFallback?: boolean;
|
|
45
|
+
decodeWarning?: string;
|
|
46
|
+
secondaryModelInputTruncated?: boolean;
|
|
47
|
+
secondaryModelInputChars?: number;
|
|
48
|
+
secondaryModelSourceChars?: number;
|
|
49
|
+
};
|
|
50
|
+
export type BinaryFetch = {
|
|
51
|
+
requestedUrl: string;
|
|
52
|
+
finalUrl: string;
|
|
53
|
+
statusCode: number;
|
|
54
|
+
contentType: string;
|
|
55
|
+
charset?: string;
|
|
56
|
+
etag?: string;
|
|
57
|
+
lastModified?: string;
|
|
58
|
+
contentLength?: number;
|
|
59
|
+
filename?: string;
|
|
60
|
+
canonicalUrl?: string;
|
|
61
|
+
redirectChain: RedirectStep[];
|
|
62
|
+
upgradedToHttps: boolean;
|
|
63
|
+
truncated: boolean;
|
|
64
|
+
binary: true;
|
|
65
|
+
binaryKind: 'image' | 'audio' | 'video' | 'pdf' | 'binary';
|
|
66
|
+
downloadLimitBytes?: number;
|
|
67
|
+
metadataOnly?: boolean;
|
|
68
|
+
data?: Uint8Array;
|
|
69
|
+
llmsProbeError?: string;
|
|
70
|
+
llmsProbeTruncated?: boolean;
|
|
71
|
+
cacheRevalidated?: boolean;
|
|
72
|
+
upstreamStatusCode?: number;
|
|
73
|
+
cacheHit?: boolean;
|
|
74
|
+
};
|
|
75
|
+
export type FetchResult = CachedFetch | BinaryFetch;
|
|
76
|
+
export type DecodedBody = {
|
|
77
|
+
text: string;
|
|
78
|
+
decodedCharset: string;
|
|
79
|
+
decodeFallback: boolean;
|
|
80
|
+
decodeWarning?: string;
|
|
81
|
+
};
|
|
82
|
+
export type ExtractedContent = {
|
|
83
|
+
title?: string;
|
|
84
|
+
rawContent: string;
|
|
85
|
+
markdown: string;
|
|
86
|
+
text: string;
|
|
87
|
+
html: string;
|
|
88
|
+
extractedMain: boolean;
|
|
89
|
+
canonicalUrl?: string;
|
|
90
|
+
headings?: string[];
|
|
91
|
+
};
|
|
92
|
+
export type FetchWithRedirectsResult = {
|
|
93
|
+
blockedRedirect: true;
|
|
94
|
+
redirectUrl: string;
|
|
95
|
+
statusCode: number;
|
|
96
|
+
redirectChain: RedirectStep[];
|
|
97
|
+
} | {
|
|
98
|
+
response: Response;
|
|
99
|
+
finalUrl: string;
|
|
100
|
+
redirectChain: RedirectStep[];
|
|
101
|
+
};
|
|
102
|
+
export type LlmsProbeResult = {
|
|
103
|
+
url: string;
|
|
104
|
+
statusCode: number;
|
|
105
|
+
redirectChain: RedirectStep[];
|
|
106
|
+
text: string;
|
|
107
|
+
headers: {
|
|
108
|
+
contentType?: string;
|
|
109
|
+
charset?: string;
|
|
110
|
+
etag?: string;
|
|
111
|
+
lastModified?: string;
|
|
112
|
+
contentLength?: number;
|
|
113
|
+
filename?: string;
|
|
114
|
+
};
|
|
115
|
+
truncated: boolean;
|
|
116
|
+
decodedCharset: string;
|
|
117
|
+
decodeFallback: boolean;
|
|
118
|
+
decodeWarning?: string;
|
|
119
|
+
upgradedToHttps: boolean;
|
|
120
|
+
} | {
|
|
121
|
+
error?: string;
|
|
122
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { escapeHtml } from '../../utils/escape-html';
|
|
2
|
+
import { parseFrontmatter } from '../../utils/frontmatter';
|
|
3
|
+
import type { CachedFetch, ExtractedContent } from './types';
|
|
4
|
+
export { escapeHtml, parseFrontmatter };
|
|
5
|
+
export declare function wordCount(text: string): number;
|
|
6
|
+
export declare function frontmatter(metadata: Record<string, unknown>): string;
|
|
7
|
+
export declare function trimBlankRuns(input: string): string;
|
|
8
|
+
export declare function cleanHeadingText(input: string): string;
|
|
9
|
+
export declare function cleanFetchedMarkdown(input: string): string;
|
|
10
|
+
export declare function cleanFetchedText(input: string): string;
|
|
11
|
+
export declare function withTruncationMarker(content: string, format: 'text' | 'markdown' | 'html', truncated: boolean): string;
|
|
12
|
+
export declare function joinRenderedContent(metadata: string, content: string, format: 'text' | 'markdown' | 'html'): string;
|
|
13
|
+
export declare function renderMessageForFormat(content: string, format: 'text' | 'markdown' | 'html'): string;
|
|
14
|
+
export declare function buildRedirectResultMessage(originalUrl: string, redirectUrl: string, statusCode: number): string;
|
|
15
|
+
export declare function buildLlmsRequiredMessage(originalUrl: string, reason?: string): string;
|
|
16
|
+
export declare function extractFromHtml(html: string, finalUrl: string, extractMain: boolean): Promise<ExtractedContent>;
|
|
17
|
+
export declare function inferCanonicalUrlFromText(content: string, finalUrl: string): string | undefined;
|
|
18
|
+
export declare function extractHeadingsFromMarkdown(content: string): string[] | undefined;
|
|
19
|
+
export declare function detectQualitySignals(fetchResult: Pick<CachedFetch, 'text' | 'markdown' | 'rawContent' | 'wordCount' | 'sourceKind' | 'extractedMain'>): string[];
|
|
20
|
+
export declare function pickContent(fetchResult: CachedFetch, format: 'text' | 'markdown' | 'html'): string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface TuiSnapshot {
|
|
2
|
+
version: 1;
|
|
3
|
+
updatedAt: number;
|
|
4
|
+
agentModels: Record<string, string>;
|
|
5
|
+
agentVariants: Record<string, string>;
|
|
6
|
+
}
|
|
7
|
+
export declare function getTuiStatePath(projectDir: string): string;
|
|
8
|
+
export declare function readTuiSnapshot(projectDir: string): TuiSnapshot;
|
|
9
|
+
export declare function readTuiSnapshotAsync(projectDir: string): Promise<TuiSnapshot>;
|
|
10
|
+
export declare function recordTuiAgentModels(input: {
|
|
11
|
+
agentModels: Record<string, string>;
|
|
12
|
+
agentVariants?: Record<string, string>;
|
|
13
|
+
}, projectDir: string): void;
|
|
14
|
+
export declare function recordTuiAgentModel(input: {
|
|
15
|
+
agentName: string;
|
|
16
|
+
model: string;
|
|
17
|
+
variant?: string | null;
|
|
18
|
+
}, projectDir: string): void;
|
package/dist/tui.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { TuiPluginModule } from '@opencode-ai/plugin/tui';
|
|
2
|
+
import { type TuiSnapshot } from './tui-state';
|
|
3
|
+
export declare function splitSidebarModelId(model: string): {
|
|
4
|
+
provider?: string;
|
|
5
|
+
model: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function getSidebarAgentNames(snapshot: TuiSnapshot): string[];
|
|
8
|
+
export declare function readConfigInvalid(directory: string): boolean;
|
|
9
|
+
export declare function readCompactSidebar(directory: string): boolean;
|
|
10
|
+
declare const plugin: TuiPluginModule & {
|
|
11
|
+
id: string;
|
|
12
|
+
};
|
|
13
|
+
export default plugin;
|