micode 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/INSTALL_CLAUDE.md +175 -0
- package/README.md +192 -0
- package/dist/agents/brainstormer.d.ts +2 -0
- package/dist/agents/codebase-analyzer.d.ts +2 -0
- package/dist/agents/codebase-locator.d.ts +2 -0
- package/dist/agents/commander.d.ts +3 -0
- package/dist/agents/handoff-creator.d.ts +2 -0
- package/dist/agents/handoff-resumer.d.ts +2 -0
- package/dist/agents/implementer.d.ts +2 -0
- package/dist/agents/index.d.ts +13 -0
- package/dist/agents/pattern-finder.d.ts +2 -0
- package/dist/agents/project-initializer.d.ts +2 -0
- package/dist/agents/reviewer.d.ts +2 -0
- package/dist/hooks/auto-compact.d.ts +9 -0
- package/dist/hooks/comment-checker.d.ts +9 -0
- package/dist/hooks/context-injector.d.ts +15 -0
- package/dist/hooks/context-window-monitor.d.ts +15 -0
- package/dist/hooks/preemptive-compaction.d.ts +9 -0
- package/dist/hooks/session-recovery.d.ts +9 -0
- package/dist/hooks/token-aware-truncation.d.ts +15 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +15065 -0
- package/dist/tools/ast-grep/index.d.ts +80 -0
- package/dist/tools/background-task/index.d.ts +3 -0
- package/dist/tools/background-task/manager.d.ts +26 -0
- package/dist/tools/background-task/tools.d.ts +45 -0
- package/dist/tools/background-task/types.d.ts +27 -0
- package/dist/tools/look-at.d.ts +11 -0
- package/package.json +39 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export declare const ast_grep_search: {
|
|
2
|
+
description: string;
|
|
3
|
+
args: {
|
|
4
|
+
pattern: import("zod").ZodString;
|
|
5
|
+
lang: import("zod").ZodEnum<{
|
|
6
|
+
c: "c";
|
|
7
|
+
cpp: "cpp";
|
|
8
|
+
csharp: "csharp";
|
|
9
|
+
css: "css";
|
|
10
|
+
dart: "dart";
|
|
11
|
+
elixir: "elixir";
|
|
12
|
+
go: "go";
|
|
13
|
+
haskell: "haskell";
|
|
14
|
+
html: "html";
|
|
15
|
+
java: "java";
|
|
16
|
+
javascript: "javascript";
|
|
17
|
+
json: "json";
|
|
18
|
+
kotlin: "kotlin";
|
|
19
|
+
lua: "lua";
|
|
20
|
+
php: "php";
|
|
21
|
+
python: "python";
|
|
22
|
+
ruby: "ruby";
|
|
23
|
+
rust: "rust";
|
|
24
|
+
scala: "scala";
|
|
25
|
+
sql: "sql";
|
|
26
|
+
swift: "swift";
|
|
27
|
+
tsx: "tsx";
|
|
28
|
+
typescript: "typescript";
|
|
29
|
+
yaml: "yaml";
|
|
30
|
+
}>;
|
|
31
|
+
paths: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
32
|
+
};
|
|
33
|
+
execute(args: {
|
|
34
|
+
pattern: string;
|
|
35
|
+
lang: "c" | "cpp" | "csharp" | "css" | "dart" | "elixir" | "go" | "haskell" | "html" | "java" | "javascript" | "json" | "kotlin" | "lua" | "php" | "python" | "ruby" | "rust" | "scala" | "sql" | "swift" | "tsx" | "typescript" | "yaml";
|
|
36
|
+
paths?: string[] | undefined;
|
|
37
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
38
|
+
};
|
|
39
|
+
export declare const ast_grep_replace: {
|
|
40
|
+
description: string;
|
|
41
|
+
args: {
|
|
42
|
+
pattern: import("zod").ZodString;
|
|
43
|
+
rewrite: import("zod").ZodString;
|
|
44
|
+
lang: import("zod").ZodEnum<{
|
|
45
|
+
c: "c";
|
|
46
|
+
cpp: "cpp";
|
|
47
|
+
csharp: "csharp";
|
|
48
|
+
css: "css";
|
|
49
|
+
dart: "dart";
|
|
50
|
+
elixir: "elixir";
|
|
51
|
+
go: "go";
|
|
52
|
+
haskell: "haskell";
|
|
53
|
+
html: "html";
|
|
54
|
+
java: "java";
|
|
55
|
+
javascript: "javascript";
|
|
56
|
+
json: "json";
|
|
57
|
+
kotlin: "kotlin";
|
|
58
|
+
lua: "lua";
|
|
59
|
+
php: "php";
|
|
60
|
+
python: "python";
|
|
61
|
+
ruby: "ruby";
|
|
62
|
+
rust: "rust";
|
|
63
|
+
scala: "scala";
|
|
64
|
+
sql: "sql";
|
|
65
|
+
swift: "swift";
|
|
66
|
+
tsx: "tsx";
|
|
67
|
+
typescript: "typescript";
|
|
68
|
+
yaml: "yaml";
|
|
69
|
+
}>;
|
|
70
|
+
paths: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
71
|
+
apply: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
72
|
+
};
|
|
73
|
+
execute(args: {
|
|
74
|
+
pattern: string;
|
|
75
|
+
rewrite: string;
|
|
76
|
+
lang: "c" | "cpp" | "csharp" | "css" | "dart" | "elixir" | "go" | "haskell" | "html" | "java" | "javascript" | "json" | "kotlin" | "lua" | "php" | "python" | "ruby" | "rust" | "scala" | "sql" | "swift" | "tsx" | "typescript" | "yaml";
|
|
77
|
+
paths?: string[] | undefined;
|
|
78
|
+
apply?: boolean | undefined;
|
|
79
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
80
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
import type { BackgroundTask, BackgroundTaskInput } from "./types";
|
|
3
|
+
export declare class BackgroundTaskManager {
|
|
4
|
+
private tasks;
|
|
5
|
+
private notifications;
|
|
6
|
+
private pollingInterval?;
|
|
7
|
+
private ctx;
|
|
8
|
+
constructor(ctx: PluginInput);
|
|
9
|
+
launch(input: BackgroundTaskInput): Promise<BackgroundTask>;
|
|
10
|
+
cancel(taskId: string): Promise<boolean>;
|
|
11
|
+
cancelAll(): Promise<number>;
|
|
12
|
+
getTask(taskId: string): BackgroundTask | undefined;
|
|
13
|
+
getAllTasks(): BackgroundTask[];
|
|
14
|
+
getRunningTasks(): BackgroundTask[];
|
|
15
|
+
getTaskResult(taskId: string): Promise<string | undefined>;
|
|
16
|
+
formatTaskStatus(task: BackgroundTask): string;
|
|
17
|
+
private startPolling;
|
|
18
|
+
private stopPolling;
|
|
19
|
+
private pollRunningTasks;
|
|
20
|
+
private markForNotification;
|
|
21
|
+
getPendingNotifications(parentSessionID: string): BackgroundTask[];
|
|
22
|
+
handleEvent(event: {
|
|
23
|
+
type: string;
|
|
24
|
+
properties?: unknown;
|
|
25
|
+
}): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { BackgroundTaskManager } from "./manager";
|
|
2
|
+
export declare function createBackgroundTaskTools(manager: BackgroundTaskManager): {
|
|
3
|
+
background_task: {
|
|
4
|
+
description: string;
|
|
5
|
+
args: {
|
|
6
|
+
description: import("zod").ZodString;
|
|
7
|
+
prompt: import("zod").ZodString;
|
|
8
|
+
agent: import("zod").ZodString;
|
|
9
|
+
};
|
|
10
|
+
execute(args: {
|
|
11
|
+
description: string;
|
|
12
|
+
prompt: string;
|
|
13
|
+
agent: string;
|
|
14
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
15
|
+
};
|
|
16
|
+
background_output: {
|
|
17
|
+
description: string;
|
|
18
|
+
args: {
|
|
19
|
+
task_id: import("zod").ZodString;
|
|
20
|
+
block: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
21
|
+
timeout: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
22
|
+
};
|
|
23
|
+
execute(args: {
|
|
24
|
+
task_id: string;
|
|
25
|
+
block?: boolean | undefined;
|
|
26
|
+
timeout?: number | undefined;
|
|
27
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
28
|
+
};
|
|
29
|
+
background_cancel: {
|
|
30
|
+
description: string;
|
|
31
|
+
args: {
|
|
32
|
+
task_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
33
|
+
all: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
34
|
+
};
|
|
35
|
+
execute(args: {
|
|
36
|
+
task_id?: string | undefined;
|
|
37
|
+
all?: boolean | undefined;
|
|
38
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
39
|
+
};
|
|
40
|
+
background_list: {
|
|
41
|
+
description: string;
|
|
42
|
+
args: {};
|
|
43
|
+
execute(args: Record<string, never>, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface BackgroundTask {
|
|
2
|
+
id: string;
|
|
3
|
+
sessionID: string;
|
|
4
|
+
parentSessionID: string;
|
|
5
|
+
parentMessageID: string;
|
|
6
|
+
description: string;
|
|
7
|
+
prompt: string;
|
|
8
|
+
agent: string;
|
|
9
|
+
status: "running" | "completed" | "error" | "cancelled";
|
|
10
|
+
startedAt: Date;
|
|
11
|
+
completedAt?: Date;
|
|
12
|
+
result?: string;
|
|
13
|
+
error?: string;
|
|
14
|
+
progress?: {
|
|
15
|
+
toolCalls: number;
|
|
16
|
+
lastTool?: string;
|
|
17
|
+
lastUpdate: Date;
|
|
18
|
+
lastMessage?: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export interface BackgroundTaskInput {
|
|
22
|
+
description: string;
|
|
23
|
+
prompt: string;
|
|
24
|
+
agent: string;
|
|
25
|
+
parentSessionID: string;
|
|
26
|
+
parentMessageID: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const look_at: {
|
|
2
|
+
description: string;
|
|
3
|
+
args: {
|
|
4
|
+
filePath: import("zod").ZodString;
|
|
5
|
+
extract: import("zod").ZodOptional<import("zod").ZodString>;
|
|
6
|
+
};
|
|
7
|
+
execute(args: {
|
|
8
|
+
filePath: string;
|
|
9
|
+
extract?: string | undefined;
|
|
10
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
11
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "micode",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "OpenCode plugin with Brainstorm-Research-Plan-Implement workflow",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"files": ["dist", "INSTALL_CLAUDE.md"],
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "bun build src/index.ts --outdir dist --target bun --format esm && tsc --emitDeclarationOnly",
|
|
17
|
+
"clean": "rm -rf dist",
|
|
18
|
+
"typecheck": "tsc --noEmit",
|
|
19
|
+
"prepublishOnly": "bun run clean && bun run build"
|
|
20
|
+
},
|
|
21
|
+
"keywords": ["opencode", "plugin", "research", "plan", "implement"],
|
|
22
|
+
"author": "vtemian",
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git+https://github.com/vtemian/micode.git"
|
|
27
|
+
},
|
|
28
|
+
"homepage": "https://github.com/vtemian/micode#readme",
|
|
29
|
+
"bugs": {
|
|
30
|
+
"url": "https://github.com/vtemian/micode/issues"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@opencode-ai/plugin": "1.0.180"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"bun-types": "latest",
|
|
37
|
+
"typescript": "^5.7.3"
|
|
38
|
+
}
|
|
39
|
+
}
|