oh-my-opencode-slim 0.9.14 → 1.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/README.md +131 -56
- package/dist/agents/council.d.ts +7 -8
- package/dist/agents/orchestrator.d.ts +1 -0
- package/dist/background/background-manager.d.ts +20 -1
- package/dist/background/index.d.ts +1 -1
- package/dist/background/multiplexer-session-manager.d.ts +2 -0
- package/dist/cli/index.js +351 -13849
- package/dist/cli/types.d.ts +1 -2
- package/dist/config/constants.d.ts +3 -3
- package/dist/config/council-schema.d.ts +45 -69
- package/dist/config/index.d.ts +1 -1
- package/dist/config/schema.d.ts +52 -33
- package/dist/config/utils.d.ts +7 -0
- package/dist/council/council-manager.d.ts +6 -13
- package/dist/hooks/auto-update-checker/types.d.ts +1 -1
- package/dist/hooks/foreground-fallback/index.d.ts +1 -1
- package/dist/hooks/phase-reminder/index.d.ts +1 -1
- package/dist/hooks/todo-continuation/todo-hygiene.d.ts +0 -1
- package/dist/index.js +7339 -26210
- package/dist/interview/service.d.ts +1 -0
- package/dist/multiplexer/factory.d.ts +5 -1
- package/dist/multiplexer/index.d.ts +1 -0
- package/dist/multiplexer/session-manager.d.ts +46 -0
- package/dist/multiplexer/tmux/index.d.ts +3 -1
- package/dist/multiplexer/types.d.ts +3 -3
- package/dist/multiplexer/zellij/index.d.ts +1 -1
- package/dist/tools/ast-grep/index.d.ts +1 -1
- package/dist/tools/background.d.ts +1 -1
- package/dist/tools/council.d.ts +2 -1
- package/dist/tools/index.d.ts +0 -2
- package/dist/tools/lsp/types.d.ts +1 -1
- package/dist/utils/agent-variant.d.ts +15 -1
- package/dist/utils/subagent-depth.d.ts +35 -0
- package/dist/utils/tmux-debug-log.d.ts +2 -0
- package/oh-my-opencode-slim.schema.json +47 -50
- package/package.json +11 -10
- package/src/skills/{cartography → codemap}/README.md +11 -9
- package/src/skills/{cartography → codemap}/SKILL.md +21 -18
- 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 +40 -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/dist/background/tmux-session-manager.d.ts +0 -63
- package/dist/cli/chutes-selection.d.ts +0 -3
- package/dist/cli/dynamic-model-selection.d.ts +0 -14
- package/dist/cli/external-rankings.d.ts +0 -8
- package/dist/cli/model-selection.d.ts +0 -30
- package/dist/cli/opencode-models.d.ts +0 -18
- package/dist/cli/opencode-selection.d.ts +0 -3
- package/dist/cli/precedence-resolver.d.ts +0 -16
- package/dist/cli/scoring-v2/engine.d.ts +0 -4
- package/dist/cli/scoring-v2/features.d.ts +0 -3
- package/dist/cli/scoring-v2/index.d.ts +0 -4
- package/dist/cli/scoring-v2/types.d.ts +0 -17
- package/dist/cli/scoring-v2/weights.d.ts +0 -2
- package/dist/hooks/post-read-nudge/index.d.ts +0 -18
- package/dist/interview/store.d.ts +0 -9
- package/dist/tools/grep/cli.d.ts +0 -3
- package/dist/tools/grep/constants.d.ts +0 -18
- package/dist/tools/grep/downloader.d.ts +0 -3
- package/dist/tools/grep/index.d.ts +0 -5
- package/dist/tools/grep/tools.d.ts +0 -2
- package/dist/tools/grep/types.d.ts +0 -35
- package/dist/tools/grep/utils.d.ts +0 -2
- package/dist/tools/quota/api.d.ts +0 -5
- package/dist/tools/quota/command.d.ts +0 -1
- package/dist/tools/quota/index.d.ts +0 -21
- package/dist/tools/quota/types.d.ts +0 -41
- package/dist/utils/tmux.d.ts +0 -32
- package/src/skills/cartography/scripts/cartographer.py +0 -456
- package/src/skills/cartography/scripts/test_cartographer.py +0 -87
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: simplify
|
|
3
|
+
description: Simplifies code for clarity without changing behavior. Use for readability, maintainability, and complexity reduction after behavior is understood.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Simplification
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Simplify code by reducing complexity while preserving exact behavior. The goal is not fewer lines — it's code that is easier to read, understand, modify, and debug. Every simplification must pass a simple test: "Would a new team member understand this faster than the original?"
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
- After a feature is working and tests pass, but the implementation feels heavier than it needs to be
|
|
15
|
+
- During code review when readability or complexity issues are flagged
|
|
16
|
+
- When you encounter deeply nested logic, long functions, or unclear names
|
|
17
|
+
- When refactoring code written under time pressure
|
|
18
|
+
- When consolidating related logic scattered across files
|
|
19
|
+
- After merging changes that introduced duplication or inconsistency
|
|
20
|
+
|
|
21
|
+
**When NOT to use:**
|
|
22
|
+
|
|
23
|
+
- Code is already clean and readable — don't simplify for the sake of it
|
|
24
|
+
- You don't understand what the code does yet — comprehend before you simplify
|
|
25
|
+
- The code is performance-critical and the "simpler" version would be measurably slower
|
|
26
|
+
- You're about to rewrite the module entirely — simplifying throwaway code wastes effort
|
|
27
|
+
|
|
28
|
+
## The Five Principles
|
|
29
|
+
|
|
30
|
+
### 1. Preserve Behavior Exactly
|
|
31
|
+
|
|
32
|
+
Don't change what the code does — only how it expresses it. All inputs, outputs, side effects, error behavior, and edge cases must remain identical. If you're not sure a simplification preserves behavior, don't make it.
|
|
33
|
+
|
|
34
|
+
Before every change, ask:
|
|
35
|
+
|
|
36
|
+
- Does this produce the same output for every input?
|
|
37
|
+
- Does this maintain the same error behavior?
|
|
38
|
+
- Does this preserve the same side effects and ordering?
|
|
39
|
+
- Do all existing tests still pass without modification?
|
|
40
|
+
|
|
41
|
+
### 2. Follow Project Conventions
|
|
42
|
+
|
|
43
|
+
Simplification means making code more consistent with the codebase, not imposing external preferences.
|
|
44
|
+
|
|
45
|
+
Before simplifying:
|
|
46
|
+
|
|
47
|
+
1. Read `AGENTS.md` / project conventions
|
|
48
|
+
2. Study how neighboring code handles similar patterns
|
|
49
|
+
3. Match the project's style for imports, naming, function style, error handling, and type annotations
|
|
50
|
+
|
|
51
|
+
Simplification that breaks project consistency is not simplification — it's churn.
|
|
52
|
+
|
|
53
|
+
### 3. Prefer Clarity Over Cleverness
|
|
54
|
+
|
|
55
|
+
Explicit code is better than compact code when the compact version requires a mental pause to parse.
|
|
56
|
+
|
|
57
|
+
- Replace nested ternaries with readable control flow
|
|
58
|
+
- Replace dense inline transforms with named intermediate steps when they clarify intent
|
|
59
|
+
- Keep helpful names even if they cost a few extra lines
|
|
60
|
+
|
|
61
|
+
### 4. Maintain Balance
|
|
62
|
+
|
|
63
|
+
Watch for over-simplification:
|
|
64
|
+
|
|
65
|
+
- Don't inline away names that carry meaning
|
|
66
|
+
- Don't merge unrelated logic into one larger function
|
|
67
|
+
- Don't remove abstractions that serve testability or extensibility
|
|
68
|
+
- Don't optimize for line count over comprehension
|
|
69
|
+
|
|
70
|
+
### 5. Scope to What Changed
|
|
71
|
+
|
|
72
|
+
Default to simplifying recently modified code. Avoid unrelated drive-by refactors unless explicitly asked.
|
|
73
|
+
|
|
74
|
+
## Process
|
|
75
|
+
|
|
76
|
+
### Step 1: Understand Before Touching
|
|
77
|
+
|
|
78
|
+
Before changing or removing anything, understand why it exists.
|
|
79
|
+
|
|
80
|
+
Answer:
|
|
81
|
+
|
|
82
|
+
- What is this code's responsibility?
|
|
83
|
+
- What calls it? What does it call?
|
|
84
|
+
- What are the edge cases and error paths?
|
|
85
|
+
- Are there tests that define expected behavior?
|
|
86
|
+
- Why might it have been written this way?
|
|
87
|
+
|
|
88
|
+
If you can't answer these, read more context first.
|
|
89
|
+
|
|
90
|
+
### Step 2: Look for Simplification Opportunities
|
|
91
|
+
|
|
92
|
+
Signals:
|
|
93
|
+
|
|
94
|
+
- Deep nesting
|
|
95
|
+
- Long functions with mixed responsibilities
|
|
96
|
+
- Nested ternaries
|
|
97
|
+
- Boolean flag arguments
|
|
98
|
+
- Repeated conditionals
|
|
99
|
+
- Generic or misleading names
|
|
100
|
+
- Duplicated logic
|
|
101
|
+
- Dead code
|
|
102
|
+
- Wrappers or abstractions that add no value
|
|
103
|
+
|
|
104
|
+
### Step 3: Apply Changes Incrementally
|
|
105
|
+
|
|
106
|
+
Make one simplification at a time.
|
|
107
|
+
|
|
108
|
+
For each simplification:
|
|
109
|
+
|
|
110
|
+
1. Make the change
|
|
111
|
+
2. Run relevant tests
|
|
112
|
+
3. Keep it only if behavior is preserved
|
|
113
|
+
|
|
114
|
+
Separate refactoring from feature work whenever possible.
|
|
115
|
+
|
|
116
|
+
### Step 4: Verify the Result
|
|
117
|
+
|
|
118
|
+
After simplifying, confirm:
|
|
119
|
+
|
|
120
|
+
- The code is genuinely easier to understand
|
|
121
|
+
- The diff is clean and reviewable
|
|
122
|
+
- Project conventions still match
|
|
123
|
+
- No behavior, error handling, or side effects changed
|
|
124
|
+
|
|
125
|
+
## Guidance for This Repository
|
|
126
|
+
|
|
127
|
+
- Prefer straightforward TypeScript over clever compression
|
|
128
|
+
- Preserve existing runtime behavior, tests, and hooks
|
|
129
|
+
- Favor explicit names and smaller focused helpers when they improve readability
|
|
130
|
+
- Keep refactors tightly scoped to the task or review feedback
|
|
131
|
+
|
|
132
|
+
## Verification Checklist
|
|
133
|
+
|
|
134
|
+
- [ ] Existing tests pass without modification
|
|
135
|
+
- [ ] Build/typecheck/lint still pass
|
|
136
|
+
- [ ] No unrelated files were refactored
|
|
137
|
+
- [ ] No error handling was weakened or removed
|
|
138
|
+
- [ ] The result is simpler to review than the original
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# src/skills/simplify/
|
|
2
|
+
|
|
3
|
+
## Responsibility
|
|
4
|
+
|
|
5
|
+
- Provide a behavior-preserving refactoring skill contract that constrains code cleanup to clarity-focused,
|
|
6
|
+
low-risk changes.
|
|
7
|
+
- Define explicit quality gates (understand-before-edit, behavior parity, incremental simplification, rollback-friendly diffs)
|
|
8
|
+
for any simplification task.
|
|
9
|
+
- Ship only metadata; no local runtime state machine is kept in this directory.
|
|
10
|
+
|
|
11
|
+
## Design
|
|
12
|
+
|
|
13
|
+
- Contract layer: `SKILL.md` is the executable prompt specification with explicit phases:
|
|
14
|
+
- pre-change understanding
|
|
15
|
+
- simplification candidate selection
|
|
16
|
+
- incremental transformation and verification
|
|
17
|
+
- final review checklist.
|
|
18
|
+
- Documentation layer: `README.md` explains intent, source provenance, and plugin install behavior.
|
|
19
|
+
- Policy model is declarative (`description`, allowed usage, checklist) consumed by the OpenCode skill executor,
|
|
20
|
+
without helper scripts or plugin code dependencies.
|
|
21
|
+
|
|
22
|
+
## Flow
|
|
23
|
+
|
|
24
|
+
- Agent discovery resolves `src/skills/simplify` as a custom skill entrypoint, then reads `SKILL.md` at runtime.
|
|
25
|
+
- Runtime behavior is gated by `src/cli/custom-skills.ts` (`allowedAgents: ['oracle']`) and by skill permissions
|
|
26
|
+
computed in `getSkillPermissionsForAgent()`.
|
|
27
|
+
- In practice the workflow is read-only and context-driven: simplify instructions require understanding of callers,
|
|
28
|
+
edge cases, and tests before mutation, then apply local, scoped refactors with validation.
|
|
29
|
+
- Consumers (Fixer/Oracle/Reviewer tasks) rely on this contract as operational constraints, not as executable TypeScript.
|
|
30
|
+
|
|
31
|
+
## Integration
|
|
32
|
+
|
|
33
|
+
- Installed by plugin installer (`installCustomSkills`) using `src/cli/install.ts` via `installCustomSkill()`.
|
|
34
|
+
- Permission surface is enforced by hook layer in `src/hooks/filter-available-skills/index.ts` (`permissionRules`).
|
|
35
|
+
- Release integrity: `scripts/verify-release-artifact.ts` checks for `src/skills/simplify/SKILL.md` in package tarballs.
|
|
36
|
+
- Operationally paired with codemap/fixer flows in `src/index.ts` orchestrations for post-feature readability hardening.
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import type { PluginInput } from '@opencode-ai/plugin';
|
|
2
|
-
import type { TmuxConfig } from '../config/schema';
|
|
3
|
-
/**
|
|
4
|
-
* Event shape for session events
|
|
5
|
-
*/
|
|
6
|
-
interface SessionEvent {
|
|
7
|
-
type: string;
|
|
8
|
-
properties?: {
|
|
9
|
-
info?: {
|
|
10
|
-
id?: string;
|
|
11
|
-
parentID?: string;
|
|
12
|
-
title?: string;
|
|
13
|
-
};
|
|
14
|
-
sessionID?: string;
|
|
15
|
-
status?: {
|
|
16
|
-
type: string;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* TmuxSessionManager tracks child sessions and spawns/closes tmux panes for them.
|
|
22
|
-
*
|
|
23
|
-
* Uses session.status events for completion detection instead of polling.
|
|
24
|
-
*/
|
|
25
|
-
export declare class TmuxSessionManager {
|
|
26
|
-
private client;
|
|
27
|
-
private tmuxConfig;
|
|
28
|
-
private serverUrl;
|
|
29
|
-
private sessions;
|
|
30
|
-
private pollInterval?;
|
|
31
|
-
private enabled;
|
|
32
|
-
constructor(ctx: PluginInput, tmuxConfig: TmuxConfig);
|
|
33
|
-
/**
|
|
34
|
-
* Handle session.created events.
|
|
35
|
-
* Spawns a tmux pane for child sessions (those with parentID).
|
|
36
|
-
*/
|
|
37
|
-
onSessionCreated(event: SessionEvent): Promise<void>;
|
|
38
|
-
/**
|
|
39
|
-
* Handle session.status events for completion detection.
|
|
40
|
-
* Uses session.status instead of deprecated session.idle.
|
|
41
|
-
*
|
|
42
|
-
* When a session becomes idle (completed), close its pane.
|
|
43
|
-
*/
|
|
44
|
-
onSessionStatus(event: SessionEvent): Promise<void>;
|
|
45
|
-
/**
|
|
46
|
-
* Handle session.deleted events.
|
|
47
|
-
* When a session is deleted, close its tmux pane immediately.
|
|
48
|
-
*/
|
|
49
|
-
onSessionDeleted(event: SessionEvent): Promise<void>;
|
|
50
|
-
private startPolling;
|
|
51
|
-
private stopPolling;
|
|
52
|
-
/**
|
|
53
|
-
* Poll sessions for status updates (fallback for reliability).
|
|
54
|
-
* Also handles timeout and missing session detection.
|
|
55
|
-
*/
|
|
56
|
-
private pollSessions;
|
|
57
|
-
private closeSession;
|
|
58
|
-
/**
|
|
59
|
-
* Clean up all tracked sessions.
|
|
60
|
-
*/
|
|
61
|
-
cleanup(): Promise<void>;
|
|
62
|
-
}
|
|
63
|
-
export {};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { OpenCodeFreeModel } from './types';
|
|
2
|
-
export declare function pickBestCodingChutesModel(models: OpenCodeFreeModel[]): OpenCodeFreeModel | null;
|
|
3
|
-
export declare function pickSupportChutesModel(models: OpenCodeFreeModel[], primaryModel?: string): OpenCodeFreeModel | null;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { DiscoveredModel, DynamicModelPlan, ExternalSignalMap, InstallConfig, ScoringEngineVersion } from './types';
|
|
2
|
-
declare const AGENTS: readonly ["orchestrator", "oracle", "designer", "explorer", "librarian", "fixer"];
|
|
3
|
-
type AgentName = (typeof AGENTS)[number];
|
|
4
|
-
export type V1RankedScore = {
|
|
5
|
-
model: string;
|
|
6
|
-
totalScore: number;
|
|
7
|
-
baseScore: number;
|
|
8
|
-
externalSignalBoost: number;
|
|
9
|
-
};
|
|
10
|
-
export declare function rankModelsV1WithBreakdown(models: DiscoveredModel[], agent: AgentName, externalSignals?: ExternalSignalMap): V1RankedScore[];
|
|
11
|
-
export declare function buildDynamicModelPlan(catalog: DiscoveredModel[], config: InstallConfig, externalSignals?: ExternalSignalMap, options?: {
|
|
12
|
-
scoringEngineVersion?: ScoringEngineVersion;
|
|
13
|
-
}): DynamicModelPlan | null;
|
|
14
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export interface ModelSelectionCandidate {
|
|
2
|
-
model: string;
|
|
3
|
-
status?: 'alpha' | 'beta' | 'deprecated' | 'active';
|
|
4
|
-
contextLimit?: number;
|
|
5
|
-
outputLimit?: number;
|
|
6
|
-
reasoning?: boolean;
|
|
7
|
-
toolcall?: boolean;
|
|
8
|
-
attachment?: boolean;
|
|
9
|
-
tags?: string[];
|
|
10
|
-
meta?: Record<string, unknown>;
|
|
11
|
-
}
|
|
12
|
-
export interface RankedModel<T extends ModelSelectionCandidate> {
|
|
13
|
-
candidate: T;
|
|
14
|
-
score: number;
|
|
15
|
-
}
|
|
16
|
-
export interface SelectionOptions<T extends ModelSelectionCandidate> {
|
|
17
|
-
excludeModels?: string[];
|
|
18
|
-
tieBreaker?: (left: T, right: T) => number;
|
|
19
|
-
}
|
|
20
|
-
export type ScoreFunction<T extends ModelSelectionCandidate> = (candidate: T) => number;
|
|
21
|
-
export interface RoleScoring<T extends ModelSelectionCandidate> {
|
|
22
|
-
primary: ScoreFunction<T>;
|
|
23
|
-
support: ScoreFunction<T>;
|
|
24
|
-
}
|
|
25
|
-
export declare function rankModels<T extends ModelSelectionCandidate>(models: T[], scoreFn: ScoreFunction<T>, options?: SelectionOptions<T>): RankedModel<T>[];
|
|
26
|
-
export declare function pickBestModel<T extends ModelSelectionCandidate>(models: T[], scoreFn: ScoreFunction<T>, options?: SelectionOptions<T>): T | null;
|
|
27
|
-
export declare function pickPrimaryAndSupport<T extends ModelSelectionCandidate>(models: T[], scoring: RoleScoring<T>, preferredPrimaryModel?: string): {
|
|
28
|
-
primary: T | null;
|
|
29
|
-
support: T | null;
|
|
30
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { DiscoveredModel, OpenCodeFreeModel } from './types';
|
|
2
|
-
export declare function parseOpenCodeModelsVerboseOutput(output: string, providerFilter?: string, freeOnly?: boolean): DiscoveredModel[];
|
|
3
|
-
export declare function discoverModelCatalog(): Promise<{
|
|
4
|
-
models: DiscoveredModel[];
|
|
5
|
-
error?: string;
|
|
6
|
-
}>;
|
|
7
|
-
export declare function discoverOpenCodeFreeModels(): Promise<{
|
|
8
|
-
models: OpenCodeFreeModel[];
|
|
9
|
-
error?: string;
|
|
10
|
-
}>;
|
|
11
|
-
export declare function discoverProviderFreeModels(providerID: string): Promise<{
|
|
12
|
-
models: OpenCodeFreeModel[];
|
|
13
|
-
error?: string;
|
|
14
|
-
}>;
|
|
15
|
-
export declare function discoverProviderModels(providerID: string): Promise<{
|
|
16
|
-
models: DiscoveredModel[];
|
|
17
|
-
error?: string;
|
|
18
|
-
}>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { OpenCodeFreeModel } from './types';
|
|
2
|
-
export declare function pickBestCodingOpenCodeModel(models: OpenCodeFreeModel[]): OpenCodeFreeModel | null;
|
|
3
|
-
export declare function pickSupportOpenCodeModel(models: OpenCodeFreeModel[], primaryModel?: string): OpenCodeFreeModel | null;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { AgentResolutionProvenance } from './types';
|
|
2
|
-
export interface AgentLayerInput {
|
|
3
|
-
agentName: string;
|
|
4
|
-
openCodeDirectOverride?: string;
|
|
5
|
-
manualUserPlan?: string[];
|
|
6
|
-
pinnedModel?: string;
|
|
7
|
-
dynamicRecommendation?: string[];
|
|
8
|
-
providerFallbackPolicy?: string[];
|
|
9
|
-
systemDefault: string[];
|
|
10
|
-
}
|
|
11
|
-
export interface ResolvedAgentLayerResult {
|
|
12
|
-
model: string;
|
|
13
|
-
chain: string[];
|
|
14
|
-
provenance: AgentResolutionProvenance;
|
|
15
|
-
}
|
|
16
|
-
export declare function resolveAgentWithPrecedence(input: AgentLayerInput): ResolvedAgentLayerResult;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { DiscoveredModel, ExternalSignalMap } from '../types';
|
|
2
|
-
import type { ScoredCandidate, ScoringAgentName } from './types';
|
|
3
|
-
export declare function scoreCandidateV2(model: DiscoveredModel, agent: ScoringAgentName, externalSignals?: ExternalSignalMap): ScoredCandidate;
|
|
4
|
-
export declare function rankModelsV2(models: DiscoveredModel[], agent: ScoringAgentName, externalSignals?: ExternalSignalMap): ScoredCandidate[];
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { DiscoveredModel, ExternalSignalMap } from '../types';
|
|
2
|
-
import type { FeatureVector, ScoringAgentName } from './types';
|
|
3
|
-
export declare function extractFeatureVector(model: DiscoveredModel, agent: ScoringAgentName, externalSignals?: ExternalSignalMap): FeatureVector;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { DiscoveredModel, ExternalSignalMap } from '../types';
|
|
2
|
-
export type ScoreFeatureName = 'status' | 'context' | 'output' | 'versionBonus' | 'reasoning' | 'toolcall' | 'attachment' | 'quality' | 'coding' | 'latencyPenalty' | 'pricePenalty';
|
|
3
|
-
export type FeatureVector = Record<ScoreFeatureName, number>;
|
|
4
|
-
export type FeatureWeights = Record<ScoreFeatureName, number>;
|
|
5
|
-
export type ScoringAgentName = 'orchestrator' | 'oracle' | 'designer' | 'explorer' | 'librarian' | 'fixer';
|
|
6
|
-
export interface ScoringContext {
|
|
7
|
-
agent: ScoringAgentName;
|
|
8
|
-
externalSignals?: ExternalSignalMap;
|
|
9
|
-
}
|
|
10
|
-
export interface ScoredCandidate {
|
|
11
|
-
model: DiscoveredModel;
|
|
12
|
-
totalScore: number;
|
|
13
|
-
scoreBreakdown: {
|
|
14
|
-
features: FeatureVector;
|
|
15
|
-
weighted: FeatureVector;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Post-Read nudge - appends a delegation reminder after file reads.
|
|
3
|
-
* Catches the "read files → implement myself" anti-pattern.
|
|
4
|
-
*/
|
|
5
|
-
interface ToolExecuteAfterInput {
|
|
6
|
-
tool: string;
|
|
7
|
-
sessionID?: string;
|
|
8
|
-
callID?: string;
|
|
9
|
-
}
|
|
10
|
-
interface ToolExecuteAfterOutput {
|
|
11
|
-
title: string;
|
|
12
|
-
output: string;
|
|
13
|
-
metadata: Record<string, unknown>;
|
|
14
|
-
}
|
|
15
|
-
export declare function createPostReadNudgeHook(): {
|
|
16
|
-
'tool.execute.after': (input: ToolExecuteAfterInput, output: ToolExecuteAfterOutput) => Promise<void>;
|
|
17
|
-
};
|
|
18
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { InterviewAssistantState, InterviewMessage, InterviewRecord } from './types';
|
|
2
|
-
export declare function transcriptPath(directory: string, id: string): string;
|
|
3
|
-
export declare function summaryPath(directory: string, id: string): string;
|
|
4
|
-
export declare function writeInterviewRecord(record: InterviewRecord): Promise<void>;
|
|
5
|
-
export declare function readInterviewRecord(directory: string, id: string): Promise<InterviewRecord | null>;
|
|
6
|
-
export declare function findActiveInterviewBySession(directory: string, sessionID: string): Promise<InterviewRecord | null>;
|
|
7
|
-
export declare function writeTranscript(record: InterviewRecord, messages: InterviewMessage[]): Promise<void>;
|
|
8
|
-
export declare function writeSummary(record: InterviewRecord, state: InterviewAssistantState, answerCount: number): Promise<void>;
|
|
9
|
-
export declare function ensureInterviewDirectory(directory: string): Promise<void>;
|
package/dist/tools/grep/cli.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export type GrepBackend = 'rg' | 'grep';
|
|
2
|
-
interface ResolvedCli {
|
|
3
|
-
path: string;
|
|
4
|
-
backend: GrepBackend;
|
|
5
|
-
}
|
|
6
|
-
export declare function getDataDir(): string;
|
|
7
|
-
export declare function resolveGrepCli(): ResolvedCli;
|
|
8
|
-
export declare function resolveGrepCliWithAutoInstall(): Promise<ResolvedCli>;
|
|
9
|
-
export declare const DEFAULT_MAX_DEPTH = 20;
|
|
10
|
-
export declare const DEFAULT_MAX_FILESIZE = "10M";
|
|
11
|
-
export declare const DEFAULT_MAX_COUNT = 500;
|
|
12
|
-
export declare const DEFAULT_MAX_COLUMNS = 1000;
|
|
13
|
-
export declare const DEFAULT_CONTEXT = 2;
|
|
14
|
-
export declare const DEFAULT_TIMEOUT_MS = 300000;
|
|
15
|
-
export declare const DEFAULT_MAX_OUTPUT_BYTES: number;
|
|
16
|
-
export declare const RG_SAFETY_FLAGS: readonly ["--no-follow", "--color=never", "--no-heading", "--line-number", "--with-filename"];
|
|
17
|
-
export declare const GREP_SAFETY_FLAGS: readonly ["-n", "-H", "--color=never"];
|
|
18
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { runRg, runRgCount } from './cli';
|
|
2
|
-
export { resolveGrepCli, resolveGrepCliWithAutoInstall } from './constants';
|
|
3
|
-
export { downloadAndInstallRipgrep, getInstalledRipgrepPath, } from './downloader';
|
|
4
|
-
export { grep } from './tools';
|
|
5
|
-
export type { CountResult, GrepMatch, GrepOptions, GrepResult } from './types';
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export interface GrepMatch {
|
|
2
|
-
file: string;
|
|
3
|
-
line: number;
|
|
4
|
-
text: string;
|
|
5
|
-
}
|
|
6
|
-
export interface GrepResult {
|
|
7
|
-
matches: GrepMatch[];
|
|
8
|
-
totalMatches: number;
|
|
9
|
-
filesSearched: number;
|
|
10
|
-
truncated: boolean;
|
|
11
|
-
error?: string;
|
|
12
|
-
}
|
|
13
|
-
export interface CountResult {
|
|
14
|
-
file: string;
|
|
15
|
-
count: number;
|
|
16
|
-
}
|
|
17
|
-
export interface GrepOptions {
|
|
18
|
-
pattern: string;
|
|
19
|
-
paths?: string[];
|
|
20
|
-
globs?: string[];
|
|
21
|
-
excludeGlobs?: string[];
|
|
22
|
-
context?: number;
|
|
23
|
-
caseSensitive?: boolean;
|
|
24
|
-
wholeWord?: boolean;
|
|
25
|
-
fixedStrings?: boolean;
|
|
26
|
-
multiline?: boolean;
|
|
27
|
-
hidden?: boolean;
|
|
28
|
-
noIgnore?: boolean;
|
|
29
|
-
fileType?: string[];
|
|
30
|
-
maxDepth?: number;
|
|
31
|
-
maxFilesize?: string;
|
|
32
|
-
maxCount?: number;
|
|
33
|
-
maxColumns?: number;
|
|
34
|
-
timeout?: number;
|
|
35
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
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[]>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
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
|
-
}
|
package/dist/utils/tmux.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { TmuxConfig } from '../config/schema';
|
|
2
|
-
/**
|
|
3
|
-
* Reset the server availability cache (useful when server might have started)
|
|
4
|
-
*/
|
|
5
|
-
export declare function resetServerCheck(): void;
|
|
6
|
-
/**
|
|
7
|
-
* Get cached tmux path, initializing if needed
|
|
8
|
-
*/
|
|
9
|
-
export declare function getTmuxPath(): Promise<string | null>;
|
|
10
|
-
/**
|
|
11
|
-
* Check if we're running inside tmux
|
|
12
|
-
*/
|
|
13
|
-
export declare function isInsideTmux(): boolean;
|
|
14
|
-
export interface SpawnPaneResult {
|
|
15
|
-
success: boolean;
|
|
16
|
-
paneId?: string;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Spawn a new tmux pane running `opencode attach <serverUrl> --session <sessionId>`
|
|
20
|
-
* This connects the new TUI to the existing server so it receives streaming updates.
|
|
21
|
-
* After spawning, applies the configured layout to auto-rebalance all panes.
|
|
22
|
-
* Returns the pane ID so it can be closed later.
|
|
23
|
-
*/
|
|
24
|
-
export declare function spawnTmuxPane(sessionId: string, description: string, config: TmuxConfig, serverUrl: string): Promise<SpawnPaneResult>;
|
|
25
|
-
/**
|
|
26
|
-
* Close a tmux pane by its ID and reapply layout to rebalance remaining panes
|
|
27
|
-
*/
|
|
28
|
-
export declare function closeTmuxPane(paneId: string): Promise<boolean>;
|
|
29
|
-
/**
|
|
30
|
-
* Start background check for tmux availability
|
|
31
|
-
*/
|
|
32
|
-
export declare function startTmuxCheck(): void;
|