opencode-ultra 0.3.0 → 0.4.1

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,93 @@
1
+ /**
2
+ * Extended type definitions for OpenCode client APIs that are not (yet) in @opencode-ai/sdk types.
3
+ * These describe the actual runtime shape observed in OpenCode 1.2.x.
4
+ */
5
+ /** Model identifier as passed through hook input */
6
+ export interface ModelRef {
7
+ providerID?: string;
8
+ modelID?: string;
9
+ }
10
+ /** Toast notification (TUI-only, non-standard) */
11
+ export interface ToastOptions {
12
+ body: {
13
+ title: string;
14
+ message: string;
15
+ variant?: "info" | "success" | "warning" | "error";
16
+ duration?: number;
17
+ };
18
+ }
19
+ /** Extended OpenCode client with optional TUI and MCP methods */
20
+ export interface ExtendedClient {
21
+ session: {
22
+ create: (opts: {
23
+ body: Record<string, unknown>;
24
+ query?: {
25
+ directory?: string;
26
+ };
27
+ }) => Promise<{
28
+ data?: {
29
+ id?: string;
30
+ };
31
+ }>;
32
+ prompt: (opts: {
33
+ path: {
34
+ id: string;
35
+ };
36
+ body: {
37
+ parts: Array<{
38
+ type: string;
39
+ text: string;
40
+ }>;
41
+ agent?: string;
42
+ };
43
+ query?: {
44
+ directory?: string;
45
+ };
46
+ }) => Promise<unknown>;
47
+ messages: (opts: {
48
+ path: {
49
+ id: string;
50
+ };
51
+ query?: {
52
+ directory?: string;
53
+ };
54
+ }) => Promise<{
55
+ data?: Array<{
56
+ info?: {
57
+ role?: string;
58
+ };
59
+ parts?: Array<{
60
+ type: string;
61
+ text?: string;
62
+ }>;
63
+ }>;
64
+ }>;
65
+ delete: (opts: {
66
+ path: {
67
+ id: string;
68
+ };
69
+ query?: {
70
+ directory?: string;
71
+ };
72
+ }) => Promise<unknown>;
73
+ listMessages?: (opts: {
74
+ id: string;
75
+ }) => Promise<{
76
+ messages?: unknown[];
77
+ } | unknown[]>;
78
+ };
79
+ tui?: {
80
+ showToast?: (opts: ToastOptions) => Promise<void>;
81
+ };
82
+ mcp?: {
83
+ add?: (opts: {
84
+ body: Record<string, unknown>;
85
+ }) => Promise<void>;
86
+ };
87
+ }
88
+ /** System transform hook input */
89
+ export interface SystemTransformInput {
90
+ sessionID?: string;
91
+ model?: ModelRef;
92
+ agent?: string;
93
+ }
@@ -0,0 +1,3 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ export declare function findAstGrepBinary(): string | null;
3
+ export declare function createAstSearchTool(ctx: PluginInput, binaryPath: string): any;
@@ -0,0 +1,2 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ export declare function createBatchReadTool(ctx: PluginInput): any;
@@ -0,0 +1,4 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ export declare function normalizeLedgerName(name: string): string;
3
+ export declare function createLedgerSaveTool(ctx: PluginInput): any;
4
+ export declare function createLedgerLoadTool(ctx: PluginInput): any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-ultra",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "Lightweight OpenCode 1.2.x plugin — ultrawork mode, multi-agent orchestration, rules injection",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",