thinkwell 0.3.0-alpha.1 → 0.3.0-alpha.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/dist/cli/main.d.ts +14 -0
- package/dist/cli/main.d.ts.map +1 -0
- package/dist/cli/main.js +231 -0
- package/dist/cli/main.js.map +1 -0
- package/package.json +7 -6
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
/**
|
|
3
|
+
* Thinkwell CLI - Bun-native entry point for compiled binary.
|
|
4
|
+
*
|
|
5
|
+
* This is the main entry point for the self-contained Bun-compiled binary.
|
|
6
|
+
* Unlike the Node.js launcher (bin/thinkwell), this runs directly in Bun
|
|
7
|
+
* and can be compiled with `bun build --compile`.
|
|
8
|
+
*
|
|
9
|
+
* The bun-plugin is imported at the top level, which registers it with Bun's
|
|
10
|
+
* plugin system. This means any TypeScript files loaded after this point
|
|
11
|
+
* will automatically have @JSONSchema types processed.
|
|
12
|
+
*/
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=main.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AACA;;;;;;;;;;GAUG"}
|
package/dist/cli/main.js
ADDED
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
/**
|
|
3
|
+
* Thinkwell CLI - Bun-native entry point for compiled binary.
|
|
4
|
+
*
|
|
5
|
+
* This is the main entry point for the self-contained Bun-compiled binary.
|
|
6
|
+
* Unlike the Node.js launcher (bin/thinkwell), this runs directly in Bun
|
|
7
|
+
* and can be compiled with `bun build --compile`.
|
|
8
|
+
*
|
|
9
|
+
* The bun-plugin is imported at the top level, which registers it with Bun's
|
|
10
|
+
* plugin system. This means any TypeScript files loaded after this point
|
|
11
|
+
* will automatically have @JSONSchema types processed.
|
|
12
|
+
*/
|
|
13
|
+
import { existsSync } from "node:fs";
|
|
14
|
+
import { resolve, isAbsolute } from "node:path";
|
|
15
|
+
import { pathToFileURL } from "node:url";
|
|
16
|
+
// Import the bun-plugin - this registers it with Bun's plugin system.
|
|
17
|
+
// The plugin will intercept all .ts/.tsx file loads and process @JSONSchema types.
|
|
18
|
+
import { registerModule } from "@thinkwell/bun-plugin";
|
|
19
|
+
// Import thinkwell packages so they get bundled into the compiled binary.
|
|
20
|
+
// These are registered as virtual modules so user scripts can import from them.
|
|
21
|
+
import * as thinkwell from "thinkwell";
|
|
22
|
+
import * as thinkwellAcp from "@thinkwell/acp";
|
|
23
|
+
import * as thinkwellProtocol from "@thinkwell/protocol";
|
|
24
|
+
// Register modules for virtual resolution in compiled binary.
|
|
25
|
+
// This enables user scripts to import from "thinkwell:agent" etc.
|
|
26
|
+
registerModule("thinkwell", thinkwell);
|
|
27
|
+
registerModule("@thinkwell/acp", thinkwellAcp);
|
|
28
|
+
registerModule("@thinkwell/protocol", thinkwellProtocol);
|
|
29
|
+
import { runInit } from "./init-command.js";
|
|
30
|
+
// Get version from package.json at build time
|
|
31
|
+
const VERSION = "0.3.0-alpha.2"; // Will be replaced by build script
|
|
32
|
+
function showHelp() {
|
|
33
|
+
console.log(`
|
|
34
|
+
thinkwell - Run TypeScript scripts with automatic schema generation
|
|
35
|
+
|
|
36
|
+
Usage:
|
|
37
|
+
thinkwell <script.ts> [args...] Run a TypeScript script
|
|
38
|
+
thinkwell run <script.ts> [args...] Explicit run command
|
|
39
|
+
thinkwell init [project-name] Initialize a new project
|
|
40
|
+
thinkwell types [dir] Generate .d.ts files for IDE support
|
|
41
|
+
thinkwell types --watch [dir] Watch and regenerate .d.ts files
|
|
42
|
+
thinkwell --help Show this help message
|
|
43
|
+
thinkwell --version Show version
|
|
44
|
+
|
|
45
|
+
Examples:
|
|
46
|
+
thinkwell hello.ts Run hello.ts
|
|
47
|
+
thinkwell run hello.ts --verbose Run with arguments
|
|
48
|
+
thinkwell init my-agent Create a new project
|
|
49
|
+
./script.ts Via shebang: #!/usr/bin/env thinkwell
|
|
50
|
+
thinkwell types Generate declarations in current dir
|
|
51
|
+
thinkwell types src Generate declarations in src/
|
|
52
|
+
thinkwell types --watch Watch for changes and regenerate
|
|
53
|
+
|
|
54
|
+
The thinkwell CLI automatically:
|
|
55
|
+
- Generates JSON Schema for types marked with @JSONSchema
|
|
56
|
+
- Resolves thinkwell:* imports to built-in modules
|
|
57
|
+
- Creates .thinkwell.d.ts files for IDE autocomplete (types command)
|
|
58
|
+
|
|
59
|
+
For more information, visit: https://github.com/dherman/thinkwell
|
|
60
|
+
`);
|
|
61
|
+
}
|
|
62
|
+
async function runTypes(args) {
|
|
63
|
+
// Import the types command implementation from the bundled bun-plugin
|
|
64
|
+
const { generateDeclarations, watchDeclarations } = await import("@thinkwell/bun-plugin");
|
|
65
|
+
const watchMode = args.includes("--watch") || args.includes("-w");
|
|
66
|
+
const dirArg = args.find((arg) => !arg.startsWith("-"));
|
|
67
|
+
const rootDir = dirArg ? resolve(dirArg) : process.cwd();
|
|
68
|
+
// Validate directory exists
|
|
69
|
+
if (!existsSync(rootDir)) {
|
|
70
|
+
console.error(`Error: Directory not found: ${rootDir}`);
|
|
71
|
+
process.exit(1);
|
|
72
|
+
}
|
|
73
|
+
const formatError = (error, sourceFile) => {
|
|
74
|
+
const lines = [`Error processing: ${sourceFile}`, ` ${error.message}`];
|
|
75
|
+
if (process.env.DEBUG) {
|
|
76
|
+
lines.push(` Stack: ${error.stack?.split("\n").slice(1, 3).join("\n ")}`);
|
|
77
|
+
}
|
|
78
|
+
return lines.join("\n");
|
|
79
|
+
};
|
|
80
|
+
if (watchMode) {
|
|
81
|
+
console.log(`Watching for changes in ${rootDir}...`);
|
|
82
|
+
console.log("Press Ctrl+C to stop.\n");
|
|
83
|
+
const watcher = watchDeclarations({
|
|
84
|
+
rootDir,
|
|
85
|
+
onWrite: (_source, decl) => {
|
|
86
|
+
console.log(`✓ ${decl}`);
|
|
87
|
+
},
|
|
88
|
+
onRemove: (_source, decl) => {
|
|
89
|
+
console.log(`✗ ${decl} (removed)`);
|
|
90
|
+
},
|
|
91
|
+
onError: (error, source) => {
|
|
92
|
+
console.error(formatError(error, source));
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
// Initial generation
|
|
96
|
+
console.log("Generating initial declarations...\n");
|
|
97
|
+
await generateDeclarations({
|
|
98
|
+
rootDir,
|
|
99
|
+
onWrite: (_source, decl) => {
|
|
100
|
+
console.log(`✓ ${decl}`);
|
|
101
|
+
},
|
|
102
|
+
onError: (error, source) => {
|
|
103
|
+
console.error(formatError(error, source));
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
console.log("\nWatching for changes...\n");
|
|
107
|
+
// Keep process alive
|
|
108
|
+
process.on("SIGINT", () => {
|
|
109
|
+
watcher.stop();
|
|
110
|
+
console.log("\nStopped watching.");
|
|
111
|
+
process.exit(0);
|
|
112
|
+
});
|
|
113
|
+
// Prevent the process from exiting
|
|
114
|
+
await new Promise(() => { });
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
console.log(`Generating declarations in ${rootDir}...\n`);
|
|
118
|
+
let errorCount = 0;
|
|
119
|
+
const generated = await generateDeclarations({
|
|
120
|
+
rootDir,
|
|
121
|
+
onWrite: (_source, decl) => {
|
|
122
|
+
console.log(`✓ ${decl}`);
|
|
123
|
+
},
|
|
124
|
+
onError: (error, source) => {
|
|
125
|
+
errorCount++;
|
|
126
|
+
console.error(formatError(error, source));
|
|
127
|
+
},
|
|
128
|
+
});
|
|
129
|
+
if (generated.length === 0 && errorCount === 0) {
|
|
130
|
+
console.log("No @JSONSchema types found.");
|
|
131
|
+
console.log("");
|
|
132
|
+
console.log("To mark a type for schema generation, add the @JSONSchema JSDoc tag:");
|
|
133
|
+
console.log("");
|
|
134
|
+
console.log(" /** @JSONSchema */");
|
|
135
|
+
console.log(" interface MyType {");
|
|
136
|
+
console.log(" name: string;");
|
|
137
|
+
console.log(" }");
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
console.log(`\nGenerated ${generated.length} declaration file(s).`);
|
|
141
|
+
if (errorCount > 0) {
|
|
142
|
+
console.log(`Encountered ${errorCount} error(s).`);
|
|
143
|
+
process.exit(1);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
async function runScript(args) {
|
|
149
|
+
const scriptPath = args[0];
|
|
150
|
+
// Resolve the script path
|
|
151
|
+
const resolvedPath = isAbsolute(scriptPath)
|
|
152
|
+
? scriptPath
|
|
153
|
+
: resolve(process.cwd(), scriptPath);
|
|
154
|
+
// Check if the script file exists
|
|
155
|
+
if (!existsSync(resolvedPath)) {
|
|
156
|
+
console.error(`Error: Script not found: ${scriptPath}`);
|
|
157
|
+
console.error("");
|
|
158
|
+
console.error("Make sure the file exists and the path is correct.");
|
|
159
|
+
process.exit(1);
|
|
160
|
+
}
|
|
161
|
+
// Set up process.argv for the script
|
|
162
|
+
// The script should see: [bun, script.ts, ...args]
|
|
163
|
+
const originalArgv = process.argv;
|
|
164
|
+
process.argv = [process.argv[0], resolvedPath, ...args.slice(1)];
|
|
165
|
+
try {
|
|
166
|
+
// Dynamically import the script.
|
|
167
|
+
// Because the bun-plugin is registered, it will intercept this import
|
|
168
|
+
// and process any @JSONSchema types in the file.
|
|
169
|
+
const scriptUrl = pathToFileURL(resolvedPath).href;
|
|
170
|
+
await import(scriptUrl);
|
|
171
|
+
}
|
|
172
|
+
catch (error) {
|
|
173
|
+
// Restore argv before handling error
|
|
174
|
+
process.argv = originalArgv;
|
|
175
|
+
if (error instanceof Error) {
|
|
176
|
+
// Check if it's a module not found error for thinkwell packages
|
|
177
|
+
if (error.message.includes("Cannot find module") ||
|
|
178
|
+
error.message.includes("Cannot find package")) {
|
|
179
|
+
console.error(`Error: ${error.message}`);
|
|
180
|
+
console.error("");
|
|
181
|
+
console.error("If your script uses thinkwell:* imports, make sure to use");
|
|
182
|
+
console.error("the import syntax like: import { Agent } from 'thinkwell:agent'");
|
|
183
|
+
process.exit(1);
|
|
184
|
+
}
|
|
185
|
+
throw error;
|
|
186
|
+
}
|
|
187
|
+
throw error;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
async function main() {
|
|
191
|
+
const args = process.argv.slice(2);
|
|
192
|
+
// Handle "init" subcommand first - does NOT require schema plugin
|
|
193
|
+
if (args[0] === "init") {
|
|
194
|
+
await runInit(args.slice(1));
|
|
195
|
+
process.exit(0);
|
|
196
|
+
}
|
|
197
|
+
// Handle --help (global)
|
|
198
|
+
if (args.includes("--help") || args.includes("-h") || args.length === 0) {
|
|
199
|
+
showHelp();
|
|
200
|
+
process.exit(0);
|
|
201
|
+
}
|
|
202
|
+
// Handle --version
|
|
203
|
+
if (args.includes("--version") || args.includes("-v")) {
|
|
204
|
+
console.log(`thinkwell ${VERSION}`);
|
|
205
|
+
process.exit(0);
|
|
206
|
+
}
|
|
207
|
+
// Handle "types" subcommand
|
|
208
|
+
if (args[0] === "types") {
|
|
209
|
+
await runTypes(args.slice(1));
|
|
210
|
+
process.exit(0);
|
|
211
|
+
}
|
|
212
|
+
// Handle "run" subcommand - just strip it
|
|
213
|
+
const runArgs = args[0] === "run" ? args.slice(1) : args;
|
|
214
|
+
// If no script provided after "run", show help
|
|
215
|
+
if (runArgs.length === 0) {
|
|
216
|
+
console.error("Error: No script provided.");
|
|
217
|
+
console.error("");
|
|
218
|
+
console.error("Usage: thinkwell run <script.ts> [args...]");
|
|
219
|
+
process.exit(1);
|
|
220
|
+
}
|
|
221
|
+
await runScript(runArgs);
|
|
222
|
+
}
|
|
223
|
+
main().catch((error) => {
|
|
224
|
+
console.error("Unexpected error:");
|
|
225
|
+
console.error(` ${error.message || error}`);
|
|
226
|
+
if (process.env.DEBUG) {
|
|
227
|
+
console.error(error.stack);
|
|
228
|
+
}
|
|
229
|
+
process.exit(1);
|
|
230
|
+
});
|
|
231
|
+
//# sourceMappingURL=main.js.map
|
|
@@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AK,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAEzD,+CAA+C;IAC/C,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;QAC5C,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAClB,OAAO,CAAC,KAAK,CAAC,4CAA4C,CAAC,CAAC;QAC5D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,MAAM,SAAS,CAAC,OAAO,CAAC,CAAC;AAC3B,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACnC,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC,OAAO,IAAI,KAAK,EAAE,CAAC,CAAC;IAC7C,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC;QACtB,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thinkwell",
|
|
3
|
-
"version": "0.3.0-alpha.
|
|
3
|
+
"version": "0.3.0-alpha.3",
|
|
4
4
|
"description": "TypeScript library for blending deterministic code with LLM-powered reasoning",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"license": "MIT",
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@agentclientprotocol/sdk": "^0.12.0",
|
|
38
|
-
"@thinkwell/acp": "0.3.0-alpha.
|
|
39
|
-
"@thinkwell/
|
|
40
|
-
"@thinkwell/
|
|
41
|
-
"@thinkwell/protocol": "0.3.0-alpha.
|
|
38
|
+
"@thinkwell/acp": "0.3.0-alpha.3",
|
|
39
|
+
"@thinkwell/bun-plugin": "0.3.0-alpha.3",
|
|
40
|
+
"@thinkwell/conductor": "0.3.0-alpha.3",
|
|
41
|
+
"@thinkwell/protocol": "0.3.0-alpha.3"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/node": "^24.10.4",
|
|
@@ -47,7 +47,8 @@
|
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
49
49
|
"build": "tsc",
|
|
50
|
-
"
|
|
50
|
+
"build:binary": "bun scripts/build-binary.ts",
|
|
51
|
+
"clean": "rm -rf dist dist-bin",
|
|
51
52
|
"test": "node --test --import tsx src/**/*.test.ts"
|
|
52
53
|
}
|
|
53
54
|
}
|