raysurfer 0.6.2 → 0.7.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.
Files changed (2) hide show
  1. package/README.md +62 -4
  2. package/package.json +4 -3
package/README.md CHANGED
@@ -1,10 +1,12 @@
1
1
  # RaySurfer TypeScript SDK
2
2
 
3
- [Website](https://raysurfer.com) · [Docs](https://docs.raysurfer.com) · [Dashboard](https://raysurfer.com/dashboard/api-keys)
3
+ [Website](https://www.raysurfer.com) · [Docs](https://docs.raysurfer.com) · [Dashboard](https://www.raysurfer.com/dashboard/api-keys)
4
4
 
5
5
  <!-- Old: LLM output caching for AI agents. Retrieve proven code instead of regenerating it. -->
6
- Code reputation layer for AI agents. Let agents re-use generated
7
- code vs running 30 serial tools or generating code per execution.
6
+ <!-- Old: Code reputation layer for AI agents. Let agents re-use generated code vs running 30 serial tools or generating code per execution. -->
7
+ AI Maintained Skills for Vertical Agents. Re-use verified code
8
+ from prior runs rather than serial tool calls or generating code
9
+ per execution.
8
10
 
9
11
  ## Installation
10
12
 
@@ -21,7 +23,7 @@ export RAYSURFER_API_KEY=your_api_key_here
21
23
  ```
22
24
 
23
25
  Get your key from the
24
- [dashboard](https://raysurfer.com/dashboard/api-keys).
26
+ [dashboard](https://www.raysurfer.com/dashboard/api-keys).
25
27
 
26
28
  ## Low-Level API
27
29
 
@@ -353,6 +355,62 @@ const client = new ClaudeSDKClient({ publicSnips: true });
353
355
  const rs = new RaySurfer({ apiKey: "...", publicSnips: true });
354
356
  ```
355
357
 
358
+ ## Programmatic Tool Calling
359
+
360
+ Register local tools and let the server generate + execute code
361
+ that calls them:
362
+
363
+ ```typescript
364
+ import { RaySurfer } from "raysurfer";
365
+
366
+ const rs = new RaySurfer({ apiKey: "your_api_key" });
367
+
368
+ rs.tool("add", "Add two numbers together", { a: "integer", b: "integer" },
369
+ async (args) => String(Number(args.a) + Number(args.b))
370
+ );
371
+
372
+ rs.tool("multiply", "Multiply two numbers together", { a: "integer", b: "integer" },
373
+ async (args) => String(Number(args.a) * Number(args.b))
374
+ );
375
+
376
+ const result = await rs.execute(
377
+ "Add 5 and 3, then multiply the result by 2"
378
+ );
379
+ console.log(result.result); // "16"
380
+ console.log(result.toolCalls); // [{toolName: 'add', ...}, ...]
381
+ console.log(result.cacheHit); // true on subsequent runs
382
+ ```
383
+
384
+ ### How It Works
385
+
386
+ 1. SDK connects a WebSocket to the server for tool call routing
387
+ 2. Server generates Python code (or reuses reference code from a
388
+ similar prior run)
389
+ 3. Code runs in a sandboxed environment — tool calls are routed
390
+ back to your local functions via WebSocket
391
+ 4. Results are returned with full tool call history
392
+
393
+ ### Execute Options
394
+
395
+ ```typescript
396
+ const result = await rs.execute("Your task description", {
397
+ timeout: 300000, // Max time in ms (default 300000)
398
+ forceRegenerate: false, // Skip cache (default false)
399
+ });
400
+ ```
401
+
402
+ ### ExecuteResult Fields
403
+
404
+ | Field | Type | Description |
405
+ | ------------- | ------------------ | -------------------------------- |
406
+ | `executionId` | `string` | Unique execution identifier |
407
+ | `result` | `string \| null` | Stdout output from the script |
408
+ | `exitCode` | `number` | Process exit code (0 = success) |
409
+ | `durationMs` | `number` | Total execution time |
410
+ | `cacheHit` | `boolean` | Whether reference code was found |
411
+ | `error` | `string \| null` | Error message if exitCode != 0 |
412
+ | `toolCalls` | `ToolCallRecord[]` | All tool calls made |
413
+
356
414
  ## License
357
415
 
358
416
  MIT
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "raysurfer",
3
- "version": "0.6.2",
3
+ "version": "0.7.1",
4
4
  "_description_old": "Semantic code caching for LLM agents",
5
- "description": "Code reputation layer for AI agents",
5
+ "_description_old2": "Code reputation layer for AI agents",
6
+ "description": "AI maintained skills for vertical agents",
6
7
  "type": "module",
7
8
  "main": "./dist/index.js",
8
9
  "module": "./dist/index.js",
@@ -45,7 +46,7 @@
45
46
  "type": "git",
46
47
  "url": "https://github.com/rayxc-org/raysurfer-ts"
47
48
  },
48
- "homepage": "https://raysurfer.com",
49
+ "homepage": "https://www.raysurfer.com",
49
50
  "bugs": {
50
51
  "url": "https://github.com/rayxc-org/raysurfer-ts/issues"
51
52
  },