thoth-agents 0.1.6 → 0.1.7

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.
@@ -0,0 +1,22 @@
1
+ import type { CodexInstallScope } from '../codex-paths';
2
+ import type { HarnessAction, HarnessStatusReport, ModelConfigInput, OperationApplyResult, OperationContext, OperationPlan } from './types';
3
+ export interface CodexOperationContext extends OperationContext {
4
+ scope?: CodexInstallScope;
5
+ homeDir?: string;
6
+ codexHome?: string;
7
+ packageRoot?: string;
8
+ pluginId?: string;
9
+ }
10
+ export declare const codexOperationAdapter: {
11
+ readonly id: "codex";
12
+ readonly displayName: "Codex";
13
+ readonly available: true;
14
+ readonly description: "Codex agent-pack and managed subagent surfaces.";
15
+ readonly actions: HarnessAction[];
16
+ };
17
+ export declare function getCodexStatus(context?: CodexOperationContext): HarnessStatusReport;
18
+ export declare function buildCodexUpdatePlan(context?: CodexOperationContext): OperationPlan;
19
+ export declare function buildCodexSyncPlan(context?: CodexOperationContext): OperationPlan;
20
+ export declare function buildCodexInstallPlan(context?: CodexOperationContext): OperationPlan;
21
+ export declare function buildCodexModelPlan(input: ModelConfigInput, context?: CodexOperationContext): OperationPlan;
22
+ export declare function applyCodexPlan(plan: OperationPlan): OperationApplyResult;
@@ -0,0 +1,8 @@
1
+ import type { HarnessId } from '../../harness/types';
2
+ import type { HarnessOperationAdapter, OperationHarnessMetadata } from './types';
3
+ export declare const SUPPORTED_OPERATION_HARNESSES: HarnessId[];
4
+ export declare function isSupportedOperationHarness(value: string): value is HarnessId;
5
+ export declare function listOperationHarnesses(): HarnessOperationAdapter[];
6
+ export declare function getOperationHarness(harness: HarnessId): HarnessOperationAdapter;
7
+ export declare function resolveOperationHarness(harness: string): OperationHarnessMetadata;
8
+ export type { BackupExpectation, BackupStrategy, HarnessAction, HarnessOperationAdapter, HarnessStatusReport, ManagedState, ManagedSurface, ManagedTarget, ManagedTargetKind, ModelConfigInput, ModelRoleInput, OperationApplyResult, OperationContext, OperationDisclaimer, OperationHarnessMetadata, OperationPath, OperationPlan, OperationPlanItem, OperationWarning, WarningSeverity, } from './types';
@@ -0,0 +1,14 @@
1
+ import type { HarnessAction, HarnessStatusReport, ModelConfigInput, OperationApplyResult, OperationContext, OperationPlan } from './types';
2
+ export declare const opencodeOperationAdapter: {
3
+ readonly id: "opencode";
4
+ readonly displayName: "OpenCode";
5
+ readonly available: true;
6
+ readonly description: "OpenCode plugin and configuration surfaces.";
7
+ readonly actions: HarnessAction[];
8
+ };
9
+ export declare function getOpenCodeStatus(context?: OperationContext): HarnessStatusReport;
10
+ export declare function buildOpenCodeUpdatePlan(_context?: OperationContext): OperationPlan;
11
+ export declare function buildOpenCodeSyncPlan(_context?: OperationContext): OperationPlan;
12
+ export declare function buildOpenCodeInstallPlan(_context?: OperationContext): OperationPlan;
13
+ export declare function buildOpenCodeModelPlan(input: ModelConfigInput, _context?: OperationContext): OperationPlan;
14
+ export declare function applyOpenCodePlan(plan: OperationPlan): OperationApplyResult;
@@ -0,0 +1,126 @@
1
+ import type { HarnessId } from '../../harness/types';
2
+ export type ManagedState = 'installed' | 'missing' | 'drift' | 'outdated' | 'unknown';
3
+ export type OperationActionKind = 'status' | 'list' | 'install' | 'update' | 'sync' | 'repair' | 'model-config';
4
+ export type ManagedTargetKind = 'file' | 'directory' | 'config' | 'skill' | 'hook' | 'memory-state' | 'generated-artifact' | 'package' | 'surface' | 'unknown';
5
+ export type WarningSeverity = 'minor' | 'important' | 'critical';
6
+ export interface OperationPath {
7
+ path: string;
8
+ label?: string;
9
+ }
10
+ export interface OperationWarning {
11
+ severity: WarningSeverity;
12
+ message: string;
13
+ code?: string;
14
+ }
15
+ export interface OperationDisclaimer {
16
+ message: string;
17
+ code?: string;
18
+ }
19
+ export interface ManagedTarget {
20
+ kind: ManagedTargetKind;
21
+ path?: string;
22
+ label?: string;
23
+ state?: ManagedState;
24
+ expected?: string;
25
+ observed?: string;
26
+ description?: string;
27
+ }
28
+ export interface ManagedSurface {
29
+ id: string;
30
+ label: string;
31
+ state?: ManagedState;
32
+ path?: string;
33
+ description?: string;
34
+ }
35
+ export interface HarnessAction {
36
+ id: string;
37
+ kind: OperationActionKind;
38
+ label: string;
39
+ description: string;
40
+ dryRun: boolean;
41
+ requiresConfirmation: boolean;
42
+ supported?: boolean;
43
+ disabledReason?: string;
44
+ warnings?: OperationWarning[];
45
+ disclaimers?: OperationDisclaimer[];
46
+ }
47
+ export interface HarnessStatusReport {
48
+ harness: HarnessId;
49
+ displayName?: string;
50
+ state: ManagedState;
51
+ summary: string;
52
+ targets: ManagedTarget[];
53
+ diagnostics: OperationWarning[];
54
+ actions: HarnessAction[];
55
+ disclaimers?: OperationDisclaimer[];
56
+ }
57
+ export type BackupStrategy = 'none' | 'managed-backup-file' | 'existing-helper' | 'external';
58
+ export interface BackupExpectation {
59
+ required: boolean;
60
+ strategy: BackupStrategy;
61
+ destinations?: OperationPath[];
62
+ description?: string;
63
+ }
64
+ export interface OperationPlanItem {
65
+ title: string;
66
+ target: ManagedTarget;
67
+ state?: ManagedState;
68
+ preview?: string;
69
+ backup?: BackupExpectation;
70
+ warnings?: OperationWarning[];
71
+ disclaimers?: OperationDisclaimer[];
72
+ }
73
+ export interface OperationPlan {
74
+ id: string;
75
+ harness: HarnessId;
76
+ action: OperationActionKind;
77
+ title: string;
78
+ summary: string;
79
+ dryRun: boolean;
80
+ canApply: boolean;
81
+ targets: ManagedTarget[];
82
+ surfaces: ManagedSurface[];
83
+ backup: BackupExpectation;
84
+ items: OperationPlanItem[];
85
+ warnings: OperationWarning[];
86
+ disclaimers: OperationDisclaimer[];
87
+ }
88
+ export interface ModelRoleInput {
89
+ role: string;
90
+ model: string;
91
+ provider?: string;
92
+ }
93
+ export interface ModelConfigInput {
94
+ harness: HarnessId;
95
+ roles: ModelRoleInput[];
96
+ dryRun: boolean;
97
+ target?: ManagedTarget;
98
+ warnings?: OperationWarning[];
99
+ disclaimers?: OperationDisclaimer[];
100
+ }
101
+ export interface OperationApplyResult {
102
+ harness: HarnessId;
103
+ action: OperationActionKind;
104
+ applied: boolean;
105
+ summary: string;
106
+ changedTargets: ManagedTarget[];
107
+ backups: OperationPath[];
108
+ warnings: OperationWarning[];
109
+ disclaimers: OperationDisclaimer[];
110
+ }
111
+ export interface OperationContext {
112
+ cwd: string;
113
+ env?: Readonly<Record<string, string | undefined>>;
114
+ }
115
+ export interface OperationHarnessMetadata {
116
+ id: HarnessId | string;
117
+ displayName: string;
118
+ available: boolean;
119
+ description: string;
120
+ actions: HarnessAction[];
121
+ reason?: string;
122
+ }
123
+ export interface HarnessOperationAdapter extends OperationHarnessMetadata {
124
+ id: HarnessId;
125
+ available: true;
126
+ }
@@ -0,0 +1,6 @@
1
+ import { type RuntimeContext } from './runtime';
2
+ import type { CliParseResult, InstallArgs, OperationArgs } from './types';
3
+ export declare function parseOperationArgs(args: string[]): OperationArgs;
4
+ export declare function parseInstallArgs(args: string[]): InstallArgs;
5
+ export declare function parseGenerateArgs(args: string[]): CliParseResult;
6
+ export declare function parseCliArgs(args: string[], runtimeContext?: RuntimeContext): CliParseResult;
@@ -0,0 +1,21 @@
1
+ export interface RuntimeContext {
2
+ stdinIsTTY: boolean;
3
+ stdoutIsTTY: boolean;
4
+ stderrIsTTY?: boolean;
5
+ env: Record<string, string | undefined>;
6
+ }
7
+ interface ProcessLike {
8
+ stdin?: {
9
+ isTTY?: boolean;
10
+ };
11
+ stdout?: {
12
+ isTTY?: boolean;
13
+ };
14
+ stderr?: {
15
+ isTTY?: boolean;
16
+ };
17
+ env?: Record<string, string | undefined>;
18
+ }
19
+ export declare function detectRuntimeContext(processLike?: ProcessLike): RuntimeContext;
20
+ export declare function isInteractiveRuntime(context: RuntimeContext): boolean;
21
+ export {};
@@ -13,14 +13,31 @@ export interface RecommendedSkill {
13
13
  /** Optional commands to run after the skill is added */
14
14
  postInstallCommands?: string[];
15
15
  }
16
+ export type RecommendedSkillInstallStatus = 'installed' | 'already-installed' | 'failed';
17
+ export interface RecommendedSkillInstallResult {
18
+ skill: RecommendedSkill;
19
+ status: RecommendedSkillInstallStatus;
20
+ skillPath: string;
21
+ error?: unknown;
22
+ }
23
+ interface InstallRecommendedSkillOptions {
24
+ homeDir?: string;
25
+ }
16
26
  /**
17
27
  * List of recommended skills.
18
28
  * Add new skills here to include them in the installation flow.
19
29
  */
20
30
  export declare const RECOMMENDED_SKILLS: RecommendedSkill[];
31
+ export declare function getRecommendedSkillPath(skill: RecommendedSkill, homeDir?: string): string;
32
+ export declare function isRecommendedSkillInstalled(skill: RecommendedSkill, options?: InstallRecommendedSkillOptions): boolean;
33
+ /**
34
+ * Install a recommended OpenCode skill with idempotent semantics.
35
+ */
36
+ export declare function installRecommendedSkill(skill: RecommendedSkill, options?: InstallRecommendedSkillOptions): RecommendedSkillInstallResult;
21
37
  /**
22
38
  * Install a skill using `npx skills add`.
23
39
  * @param skill - The skill to install
24
40
  * @returns True if installation succeeded, false otherwise
25
41
  */
26
42
  export declare function installSkill(skill: RecommendedSkill): boolean;
43
+ export {};
@@ -0,0 +1,7 @@
1
+ import { type TuiOperations } from './operations';
2
+ interface AppProps {
3
+ operations?: TuiOperations;
4
+ exitOnQuit?: boolean;
5
+ }
6
+ export declare function App({ operations, exitOnQuit, }: AppProps): import("react/jsx-runtime").JSX.Element | null;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ interface HeaderProps {
2
+ title: string;
3
+ subtitle?: string;
4
+ }
5
+ export declare function Header({ title, subtitle }: HeaderProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,12 @@
1
+ export interface MenuItem {
2
+ id: string;
3
+ label: string;
4
+ detail: string;
5
+ disabled?: boolean;
6
+ }
7
+ interface MenuProps {
8
+ items: MenuItem[];
9
+ selected: number;
10
+ }
11
+ export declare function Menu({ items, selected }: MenuProps): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { ModelOption } from '../model-catalog';
2
+ interface ModelChoiceScreenProps {
3
+ currentModel: string;
4
+ draftModel: string;
5
+ options: readonly ModelOption[];
6
+ selected: number;
7
+ }
8
+ export declare function ModelChoiceScreen({ currentModel, draftModel, options, selected, }: ModelChoiceScreenProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,14 @@
1
+ import type { HarnessId } from '../../../harness/types';
2
+ import type { ModelRoleInput } from '../../operations';
3
+ export interface ModelRoleView extends ModelRoleInput {
4
+ currentModel: string;
5
+ dirty: boolean;
6
+ }
7
+ interface ModelScreenProps {
8
+ harness: HarnessId;
9
+ roles: ModelRoleView[];
10
+ selected: number;
11
+ actions: readonly string[];
12
+ }
13
+ export declare function ModelScreen({ harness, roles, selected, actions, }: ModelScreenProps): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,8 @@
1
+ export declare function wrapTerminalText(text: string, width?: number): string[];
2
+ interface PathLineProps {
3
+ label?: string;
4
+ value: string;
5
+ width?: number;
6
+ }
7
+ export declare function PathLine({ label, value, width }: PathLineProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { OperationApplyResult, OperationPlan } from '../../operations';
2
+ interface PlanPreviewProps {
3
+ plan: OperationPlan;
4
+ selectedAction: 'apply' | 'cancel';
5
+ result?: OperationApplyResult;
6
+ }
7
+ export declare function PlanPreview({ plan, selectedAction, result, }: PlanPreviewProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { HarnessStatusReport } from '../../operations';
2
+ export type StatusSection = 'targets' | 'warnings' | 'disclaimers';
3
+ interface StatusViewProps {
4
+ report: HarnessStatusReport;
5
+ }
6
+ export declare function StatusView({ report }: StatusViewProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,3 @@
1
+ import { App } from './App';
2
+ export declare function runInteractiveTui(): Promise<number>;
3
+ export { App };