@twinklerg/coden 0.1.1 → 0.1.3
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 +32 -14
- package/dist/index.js +198 -102
- package/dist/plugin/index.d.ts +25 -0
- package/dist/plugin/index.js +1 -0
- package/package.json +12 -3
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type JsonSchema = Record<string, unknown>;
|
|
2
|
+
export type ToolRisk = "read" | "modify" | "dangerous";
|
|
3
|
+
export interface ToolResult {
|
|
4
|
+
content: string;
|
|
5
|
+
isError?: boolean;
|
|
6
|
+
metadata?: Record<string, unknown>;
|
|
7
|
+
}
|
|
8
|
+
export interface ToolContext {
|
|
9
|
+
workspace: string;
|
|
10
|
+
signal: AbortSignal;
|
|
11
|
+
}
|
|
12
|
+
export interface ToolDefinition {
|
|
13
|
+
name: string;
|
|
14
|
+
description: string;
|
|
15
|
+
inputSchema: JsonSchema;
|
|
16
|
+
risk: ToolRisk;
|
|
17
|
+
execute(input: unknown, context: ToolContext): Promise<ToolResult>;
|
|
18
|
+
}
|
|
19
|
+
export declare const CODEN_PLUGIN_API_VERSION: 1;
|
|
20
|
+
export interface CodeNPlugin {
|
|
21
|
+
apiVersion: typeof CODEN_PLUGIN_API_VERSION;
|
|
22
|
+
name: string;
|
|
23
|
+
tools: ToolDefinition[];
|
|
24
|
+
}
|
|
25
|
+
export type PluginModuleExport = ToolDefinition | CodeNPlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var o=1;export{o as CODEN_PLUGIN_API_VERSION};
|
package/package.json
CHANGED
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twinklerg/coden",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "A minimal event-driven coding agent",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
|
-
"dist/index.js"
|
|
8
|
+
"dist/index.js",
|
|
9
|
+
"dist/plugin/index.js",
|
|
10
|
+
"dist/plugin/index.d.ts"
|
|
9
11
|
],
|
|
10
12
|
"bin": {
|
|
11
13
|
"coden": "./dist/index.js"
|
|
12
14
|
},
|
|
15
|
+
"exports": {
|
|
16
|
+
"./plugin": {
|
|
17
|
+
"types": "./dist/plugin/index.d.ts",
|
|
18
|
+
"default": "./dist/plugin/index.js"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
13
21
|
"scripts": {
|
|
14
22
|
"start": "bun run src/cli/index.ts",
|
|
15
|
-
"build": "mkdir -p dist && bun build src/cli/index.ts --target=node --minify --outfile dist/index.js && sed -i.bak '1s|^#!.*|#!/usr/bin/env node|' dist/index.js && rm -f dist/index.js.bak",
|
|
23
|
+
"build": "rm -rf dist && mkdir -p dist/plugin && bun build src/cli/index.ts --target=node --minify --outfile dist/index.js && bun build src/plugin/index.ts --target=node --format=esm --minify --outfile dist/plugin/index.js && tsc -p tsconfig.plugin.json && sed -i.bak '1s|^#!.*|#!/usr/bin/env node|' dist/index.js && rm -f dist/index.js.bak",
|
|
16
24
|
"prepack": "bun run build",
|
|
17
25
|
"test": "vitest run",
|
|
18
26
|
"test:watch": "vitest",
|
|
@@ -24,6 +32,7 @@
|
|
|
24
32
|
"@anthropic-ai/sdk": "^0.61.0",
|
|
25
33
|
"ajv": "^8.17.1",
|
|
26
34
|
"commander": "^14.0.0",
|
|
35
|
+
"marked": "^18.0.11",
|
|
27
36
|
"openai": "^5.16.0",
|
|
28
37
|
"picocolors": "^1.1.1"
|
|
29
38
|
},
|