thinkwell 0.1.2 → 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 CHANGED
@@ -7,11 +7,12 @@ A TypeScript library for easy scripting of AI agents. Thinkwell provides a fluen
7
7
  ## Quick Start
8
8
 
9
9
  ```typescript
10
+ import { CLAUDE_CODE } from "thinkwell/connectors";
10
11
  import { Agent } from "thinkwell";
11
- import { GreetingSchema } from "./schemas.js";
12
+ import { GreetingSchema } from "./greeting.schemas.js";
12
13
 
13
14
  /**
14
- * A greeting response.
15
+ * A friendly greeting.
15
16
  * @JSONSchema
16
17
  */
17
18
  export interface Greeting {
@@ -19,16 +20,35 @@ export interface Greeting {
19
20
  message: string;
20
21
  }
21
22
 
22
- const agent = await Agent.connect("npx -y @zed-industries/claude-code-acp");
23
-
24
- const result = await agent
25
- .think(GreetingSchema)
26
- .text("Say hello!")
27
- .run();
28
-
29
- console.log(result.message);
30
-
31
- agent.close();
23
+ const agent = await Agent.connect(CLAUDE_CODE);
24
+
25
+ try {
26
+ const greeting: Greeting = await agent
27
+ .think(GreetingSchema)
28
+ .text(`
29
+ Use the current_time tool to get the current time, and create a friendly
30
+ greeting message appropriate for that time of day.
31
+ `)
32
+
33
+ .tool(
34
+ "current_time",
35
+ "Produces the current date, time, and time zone.",
36
+ async () => {
37
+ const now = new Date();
38
+ return {
39
+ timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
40
+ time: now.toLocaleTimeString,
41
+ date: now.toLocaleDateString(),
42
+ };
43
+ }
44
+ )
45
+
46
+ .run();
47
+
48
+ console.log(`✨ ${greeting.message}`);
49
+ } finally {
50
+ agent.close();
51
+ }
32
52
  ```
33
53
 
34
54
  ## License
@@ -0,0 +1,7 @@
1
+ export declare const CLAUDE_CODE = "npx -y @zed-industries/claude-code-acp";
2
+ export declare const CODEX = "npx -y @zed-industries/codex-acp";
3
+ export declare const GEMINI = "npx -y @google/gemini-cli --experimental-acp";
4
+ export declare const OPENCODE = "opencode acp";
5
+ export declare const AUGMENT = "auggie --acp";
6
+ export declare const KIRO = "kiro-cli chat acp";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connectors/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,2CAA2C,CAAC;AACpE,eAAO,MAAM,KAAK,qCAAqC,CAAC;AACxD,eAAO,MAAM,MAAM,iDAAiD,CAAC;AACrE,eAAO,MAAM,QAAQ,iBAAiB,CAAC;AACvC,eAAO,MAAM,OAAO,iBAAiB,CAAC;AACtC,eAAO,MAAM,IAAI,sBAAsB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export const CLAUDE_CODE = "npx -y @zed-industries/claude-code-acp";
2
+ export const CODEX = "npx -y @zed-industries/codex-acp";
3
+ export const GEMINI = "npx -y @google/gemini-cli --experimental-acp";
4
+ export const OPENCODE = "opencode acp";
5
+ export const AUGMENT = "auggie --acp";
6
+ export const KIRO = "kiro-cli chat acp";
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/connectors/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,wCAAwC,CAAC;AACpE,MAAM,CAAC,MAAM,KAAK,GAAG,kCAAkC,CAAC;AACxD,MAAM,CAAC,MAAM,MAAM,GAAG,8CAA8C,CAAC;AACrE,MAAM,CAAC,MAAM,QAAQ,GAAG,cAAc,CAAC;AACvC,MAAM,CAAC,MAAM,OAAO,GAAG,cAAc,CAAC;AACtC,MAAM,CAAC,MAAM,IAAI,GAAG,mBAAmB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thinkwell",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "TypeScript library for blending deterministic code with LLM-powered reasoning",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -9,6 +9,10 @@
9
9
  ".": {
10
10
  "types": "./dist/index.d.ts",
11
11
  "import": "./dist/index.js"
12
+ },
13
+ "./connectors": {
14
+ "types": "./dist/connectors/index.d.ts",
15
+ "import": "./dist/connectors/index.js"
12
16
  }
13
17
  },
14
18
  "files": [