oh-my-opencode-slim 0.9.13 → 0.9.14
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/dist/index.js +408 -125286
- package/dist/interview/{repository.d.ts → store.d.ts} +2 -5
- package/dist/tools/quota/api.d.ts +5 -0
- package/dist/tools/quota/command.d.ts +1 -0
- package/dist/tools/quota/index.d.ts +21 -0
- package/dist/tools/quota/types.d.ts +41 -0
- package/dist/tools/smartfetch/utils.d.ts +1 -1
- package/package.json +3 -3
- package/dist/hooks/autopilot/index.d.ts +0 -43
- package/dist/interview/schemas.d.ts +0 -27
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import type { InterviewAssistantState, InterviewMessage, InterviewRecord
|
|
1
|
+
import type { InterviewAssistantState, InterviewMessage, InterviewRecord } from './types';
|
|
2
2
|
export declare function transcriptPath(directory: string, id: string): string;
|
|
3
3
|
export declare function summaryPath(directory: string, id: string): string;
|
|
4
|
-
export declare function snapshotPath(directory: string, id: string): string;
|
|
5
|
-
export declare function ensureInterviewDirectory(directory: string): Promise<void>;
|
|
6
4
|
export declare function writeInterviewRecord(record: InterviewRecord): Promise<void>;
|
|
7
5
|
export declare function readInterviewRecord(directory: string, id: string): Promise<InterviewRecord | null>;
|
|
8
|
-
export declare function writeInterviewSnapshot(record: InterviewRecord, snapshot: InterviewSnapshot): Promise<void>;
|
|
9
|
-
export declare function readInterviewSnapshot(directory: string, id: string): Promise<InterviewSnapshot | null>;
|
|
10
6
|
export declare function findActiveInterviewBySession(directory: string, sessionID: string): Promise<InterviewRecord | null>;
|
|
11
7
|
export declare function writeTranscript(record: InterviewRecord, messages: InterviewMessage[]): Promise<void>;
|
|
12
8
|
export declare function writeSummary(record: InterviewRecord, state: InterviewAssistantState, answerCount: number): Promise<void>;
|
|
9
|
+
export declare function ensureInterviewDirectory(directory: string): Promise<void>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Account, AccountQuotaResult, AccountsConfig } from './types';
|
|
2
|
+
export declare const CONFIG_PATHS: string[];
|
|
3
|
+
export declare function loadAccountsConfig(): AccountsConfig | null;
|
|
4
|
+
export declare function fetchAccountQuota(account: Account): Promise<AccountQuotaResult>;
|
|
5
|
+
export declare function fetchAllQuotas(accounts: Account[]): Promise<AccountQuotaResult[]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compact quota display tool - groups models by quota family
|
|
3
|
+
*
|
|
4
|
+
* Output format:
|
|
5
|
+
* ```
|
|
6
|
+
* tornikevault
|
|
7
|
+
* Claude [░░░░░░░░░░] 0% 3h23m
|
|
8
|
+
* G-Flash [██████████] 100% 4h59m
|
|
9
|
+
* G-Pro [██████████] 100% 4h59m
|
|
10
|
+
*
|
|
11
|
+
* tzedgin
|
|
12
|
+
* Claude [░░░░░░░░░░] 0% 1h41m
|
|
13
|
+
* G-Flash [██████████] 100% 4h59m
|
|
14
|
+
* G-Pro [██████████] 100% 4h59m
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare const antigravity_quota: {
|
|
18
|
+
description: string;
|
|
19
|
+
args: {};
|
|
20
|
+
execute(args: Record<string, never>, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
21
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export interface Account {
|
|
2
|
+
email: string;
|
|
3
|
+
refreshToken: string;
|
|
4
|
+
projectId?: string;
|
|
5
|
+
managedProjectId?: string;
|
|
6
|
+
rateLimitResetTimes: Record<string, number>;
|
|
7
|
+
}
|
|
8
|
+
export interface AccountsConfig {
|
|
9
|
+
accounts: Account[];
|
|
10
|
+
activeIndex: number;
|
|
11
|
+
}
|
|
12
|
+
export interface QuotaInfo {
|
|
13
|
+
remainingFraction?: number;
|
|
14
|
+
resetTime?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface ModelInfo {
|
|
17
|
+
displayName?: string;
|
|
18
|
+
model?: string;
|
|
19
|
+
quotaInfo?: QuotaInfo;
|
|
20
|
+
recommended?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface QuotaResponse {
|
|
23
|
+
models?: Record<string, ModelInfo>;
|
|
24
|
+
}
|
|
25
|
+
export interface TokenResponse {
|
|
26
|
+
access_token: string;
|
|
27
|
+
}
|
|
28
|
+
export interface LoadCodeAssistResponse {
|
|
29
|
+
cloudaicompanionProject?: unknown;
|
|
30
|
+
}
|
|
31
|
+
export interface ModelQuota {
|
|
32
|
+
name: string;
|
|
33
|
+
percent: number;
|
|
34
|
+
resetIn: string;
|
|
35
|
+
}
|
|
36
|
+
export interface AccountQuotaResult {
|
|
37
|
+
email: string;
|
|
38
|
+
success: boolean;
|
|
39
|
+
error?: string;
|
|
40
|
+
models: ModelQuota[];
|
|
41
|
+
}
|
|
@@ -11,7 +11,7 @@ export declare function joinRenderedContent(metadata: string, content: string, f
|
|
|
11
11
|
export declare function renderMessageForFormat(content: string, format: 'text' | 'markdown' | 'html'): string;
|
|
12
12
|
export declare function buildRedirectResultMessage(originalUrl: string, redirectUrl: string, statusCode: number): string;
|
|
13
13
|
export declare function buildLlmsRequiredMessage(originalUrl: string, reason?: string): string;
|
|
14
|
-
export declare function extractFromHtml(html: string, finalUrl: string, extractMain: boolean): ExtractedContent
|
|
14
|
+
export declare function extractFromHtml(html: string, finalUrl: string, extractMain: boolean): Promise<ExtractedContent>;
|
|
15
15
|
export declare function inferCanonicalUrlFromText(content: string, finalUrl: string): string | undefined;
|
|
16
16
|
export declare function extractHeadingsFromMarkdown(content: string): string[] | undefined;
|
|
17
17
|
export declare function detectQualitySignals(fetchResult: Pick<CachedFetch, 'text' | 'markdown' | 'rawContent' | 'wordCount' | 'sourceKind' | 'extractedMain'>): string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oh-my-opencode-slim",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.14",
|
|
4
4
|
"description": "Lightweight agent orchestration plugin for OpenCode - a slimmed-down fork of oh-my-opencode",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"LICENSE"
|
|
37
37
|
],
|
|
38
38
|
"scripts": {
|
|
39
|
-
"build:plugin": "bun build src/index.ts --outdir dist --target node --format esm --external @ast-grep/napi --external @opencode-ai/plugin --external @opencode-ai/sdk",
|
|
40
|
-
"build:cli": "bun build src/cli/index.ts --outdir dist/cli --target node --format esm --external @ast-grep/napi --external @opencode-ai/plugin --external @opencode-ai/sdk",
|
|
39
|
+
"build:plugin": "bun build src/index.ts --outdir dist --target node --format esm --external @ast-grep/napi --external @opencode-ai/plugin --external @opencode-ai/sdk --external jsdom",
|
|
40
|
+
"build:cli": "bun build src/cli/index.ts --outdir dist/cli --target node --format esm --external @ast-grep/napi --external @opencode-ai/plugin --external @opencode-ai/sdk --external jsdom",
|
|
41
41
|
"build": "bun run build:plugin && bun run build:cli && tsc --emitDeclarationOnly && bun run generate-schema",
|
|
42
42
|
"prepare": "bun run build",
|
|
43
43
|
"contributors:add": "all-contributors add",
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { PluginInput } from '@opencode-ai/plugin';
|
|
2
|
-
import type { PluginConfig } from '../../config';
|
|
3
|
-
declare const AUTOPILOT_CONTINUE_PROMPT = "[AUTOPILOT] Continue executing work in this same session now. Do not acknowledge autopilot, do not ask for confirmation, and do not stop after a status message. Perform the next concrete action immediately (run a tool/command, edit files, or advance the active todo). Only stop when all todos are completed/cancelled or the user explicitly disables autopilot.";
|
|
4
|
-
interface MessagePart {
|
|
5
|
-
type: string;
|
|
6
|
-
text?: string;
|
|
7
|
-
}
|
|
8
|
-
interface TodoEntry {
|
|
9
|
-
status?: string;
|
|
10
|
-
}
|
|
11
|
-
type AutopilotCommand = 'enable' | 'disable' | 'status' | null;
|
|
12
|
-
declare function parseAutopilotCommand(text: string, keyword: string, disableKeyword: string): AutopilotCommand;
|
|
13
|
-
declare function extractTodoList(data: unknown): TodoEntry[];
|
|
14
|
-
declare function isActiveTodo(todo: TodoEntry): boolean;
|
|
15
|
-
export declare function createAutopilotHook(ctx: PluginInput, config: PluginConfig): {
|
|
16
|
-
'chat.message': (input: {
|
|
17
|
-
sessionID: string;
|
|
18
|
-
agent?: string;
|
|
19
|
-
messageID?: string;
|
|
20
|
-
}, output: {
|
|
21
|
-
parts: MessagePart[];
|
|
22
|
-
}) => Promise<void>;
|
|
23
|
-
event: (input: {
|
|
24
|
-
event: {
|
|
25
|
-
type: string;
|
|
26
|
-
properties?: {
|
|
27
|
-
sessionID?: string;
|
|
28
|
-
status?: {
|
|
29
|
-
type?: string;
|
|
30
|
-
};
|
|
31
|
-
info?: {
|
|
32
|
-
id?: string;
|
|
33
|
-
role?: string;
|
|
34
|
-
sessionID?: string;
|
|
35
|
-
time?: {
|
|
36
|
-
completed?: number;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
}) => Promise<void>;
|
|
42
|
-
};
|
|
43
|
-
export { AUTOPILOT_CONTINUE_PROMPT, extractTodoList, isActiveTodo, parseAutopilotCommand, };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const interviewQuestionSchema: z.ZodObject<{
|
|
3
|
-
id: z.ZodOptional<z.ZodString>;
|
|
4
|
-
question: z.ZodString;
|
|
5
|
-
options: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
6
|
-
suggested: z.ZodOptional<z.ZodString>;
|
|
7
|
-
area: z.ZodOptional<z.ZodString>;
|
|
8
|
-
}, z.core.$strip>;
|
|
9
|
-
export declare const interviewAssistantStateSchema: z.ZodObject<{
|
|
10
|
-
summary: z.ZodDefault<z.ZodString>;
|
|
11
|
-
clarity: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
12
|
-
criticalAreas: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
13
|
-
questions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
14
|
-
id: z.ZodOptional<z.ZodString>;
|
|
15
|
-
question: z.ZodString;
|
|
16
|
-
options: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
17
|
-
suggested: z.ZodOptional<z.ZodString>;
|
|
18
|
-
area: z.ZodOptional<z.ZodString>;
|
|
19
|
-
}, z.core.$strip>>>;
|
|
20
|
-
readyToExport: z.ZodDefault<z.ZodBoolean>;
|
|
21
|
-
}, z.core.$strip>;
|
|
22
|
-
export declare const interviewAnswersPayloadSchema: z.ZodObject<{
|
|
23
|
-
answers: z.ZodArray<z.ZodObject<{
|
|
24
|
-
questionId: z.ZodString;
|
|
25
|
-
answer: z.ZodString;
|
|
26
|
-
}, z.core.$strip>>;
|
|
27
|
-
}, z.core.$strip>;
|