raysurfer 0.3.0 → 0.3.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 +27 -0
- package/dist/client.d.ts +19 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10696 -18395
- package/dist/sdk-client.d.ts +13 -0
- package/dist/sdk-client.d.ts.map +1 -1
- package/dist/types.d.ts +7 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -7
package/README.md
CHANGED
|
@@ -90,6 +90,33 @@ interface RaysurferAgentOptions {
|
|
|
90
90
|
}
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
+
## Snippet Retrieval Scope
|
|
94
|
+
|
|
95
|
+
Control which snippets are retrieved using `publicSnips` and `snipsDesired`:
|
|
96
|
+
|
|
97
|
+
```typescript
|
|
98
|
+
import { RaySurfer } from "raysurfer";
|
|
99
|
+
|
|
100
|
+
// Include both public and company snippets
|
|
101
|
+
const client = new RaySurfer({
|
|
102
|
+
apiKey: "rs_...",
|
|
103
|
+
publicSnips: true, // Include public/shared snippets
|
|
104
|
+
snipsDesired: "company", // Also include company-level snippets (Team/Enterprise)
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
// Enterprise: Retrieve client-specific snippets only
|
|
108
|
+
const enterpriseClient = new RaySurfer({
|
|
109
|
+
apiKey: "rs_...",
|
|
110
|
+
snipsDesired: "client", // Client workspace snippets (Enterprise only)
|
|
111
|
+
});
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
| Configuration | Required Tier |
|
|
115
|
+
|--------------|---------------|
|
|
116
|
+
| `publicSnips: true` only | FREE (default) |
|
|
117
|
+
| `snipsDesired: "company"` | TEAM or ENTERPRISE |
|
|
118
|
+
| `snipsDesired: "client"` | ENTERPRISE only |
|
|
119
|
+
|
|
93
120
|
## API Reference
|
|
94
121
|
|
|
95
122
|
### RaySurfer Client
|
package/dist/client.d.ts
CHANGED
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* RaySurfer SDK client
|
|
3
3
|
*/
|
|
4
|
-
import type { AgentReview, AgentVerdict, ExecutionState, FewShotExample, FileWritten, GetCodeFilesResponse, RetrieveBestResponse, RetrieveCodeBlockResponse, StoreCodeBlockResponse, StoreExecutionResponse, SubmitExecutionResultResponse, TaskPattern } from "./types";
|
|
4
|
+
import type { AgentReview, AgentVerdict, ExecutionState, FewShotExample, FileWritten, GetCodeFilesResponse, RetrieveBestResponse, RetrieveCodeBlockResponse, SnipsDesired, StoreCodeBlockResponse, StoreExecutionResponse, SubmitExecutionResultResponse, TaskPattern } from "./types";
|
|
5
5
|
export interface RaySurferOptions {
|
|
6
|
+
/** RaySurfer API key */
|
|
6
7
|
apiKey?: string;
|
|
8
|
+
/** API base URL */
|
|
7
9
|
baseUrl?: string;
|
|
10
|
+
/** Request timeout in milliseconds */
|
|
8
11
|
timeout?: number;
|
|
12
|
+
/** Organization ID for dedicated namespace (team/enterprise tier) */
|
|
13
|
+
organizationId?: string;
|
|
14
|
+
/** Workspace ID for client-specific namespace (enterprise tier only) */
|
|
15
|
+
workspaceId?: string;
|
|
16
|
+
/** Whether to include public/shared snippets in retrieval (default: false) */
|
|
17
|
+
publicSnips?: boolean;
|
|
18
|
+
/** Scope of private snippets - "company" (Team/Enterprise) or "client" (Enterprise only) */
|
|
19
|
+
snipsDesired?: SnipsDesired;
|
|
20
|
+
/** Custom namespace for code storage/retrieval (overrides org-based namespacing) */
|
|
21
|
+
namespace?: string;
|
|
9
22
|
}
|
|
10
23
|
export interface StoreCodeBlockParams {
|
|
11
24
|
name: string;
|
|
@@ -57,6 +70,11 @@ export declare class RaySurfer {
|
|
|
57
70
|
private apiKey?;
|
|
58
71
|
private baseUrl;
|
|
59
72
|
private timeout;
|
|
73
|
+
private organizationId?;
|
|
74
|
+
private workspaceId?;
|
|
75
|
+
private publicSnips;
|
|
76
|
+
private snipsDesired?;
|
|
77
|
+
private namespace?;
|
|
60
78
|
constructor(options?: RaySurferOptions);
|
|
61
79
|
private request;
|
|
62
80
|
/** Store a new code block */
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EACV,WAAW,EACX,YAAY,EAOZ,cAAc,EACd,cAAc,EACd,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,yBAAyB,EACzB,sBAAsB,EACtB,sBAAsB,EACtB,6BAA6B,EAC7B,WAAW,EACZ,MAAM,SAAS,CAAC;AAIjB,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EACV,WAAW,EACX,YAAY,EAOZ,cAAc,EACd,cAAc,EACd,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,yBAAyB,EACzB,YAAY,EACZ,sBAAsB,EACtB,sBAAsB,EACtB,6BAA6B,EAC7B,WAAW,EACZ,MAAM,SAAS,CAAC;AAIjB,MAAM,WAAW,gBAAgB;IAC/B,wBAAwB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mBAAmB;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qEAAqE;IACrE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8EAA8E;IAC9E,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4FAA4F;IAC5F,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,oF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AO,CAAC,WAAW,EAAE,CAAC;IAmC5E;;;;;;;OAOG;IACG,YAAY,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAyD7E,OAAO,CAAC,cAAc;CAmBvB;AAGD,eAAe,SAAS,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -18,5 +18,5 @@ export type { RaySurferOptions, StoreCodeBlockParams, StoreExecutionParams, Retr
|
|
|
18
18
|
export { ExecutionState, AgentVerdict } from "./types";
|
|
19
19
|
export type { CodeBlock, ExecutionIO, AgentReview, ExecutionRecord, BestMatch, AlternativeCandidate, FewShotExample, TaskPattern, FileWritten, StoreCodeBlockResponse, StoreExecutionResponse, CodeBlockMatch, RetrieveCodeBlockResponse, RetrieveBestResponse, SubmitExecutionResultRequest, SubmitExecutionResultResponse, CodeFile, GetCodeFilesResponse, } from "./types";
|
|
20
20
|
export { RaySurferError, APIError, AuthenticationError } from "./errors";
|
|
21
|
-
export declare const VERSION = "0.3.
|
|
21
|
+
export declare const VERSION = "0.3.1";
|
|
22
22
|
//# sourceMappingURL=index.d.ts.map
|