@friskai/frisk-js 0.2.10 → 0.3.0

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 (60) hide show
  1. package/README.md +1 -1
  2. package/dist/adapters/langchain/frisk-tool-middleware.d.ts.map +1 -1
  3. package/dist/adapters/langchain/index.js +211 -159
  4. package/dist/adapters/langchain/index.js.map +15 -16
  5. package/dist/adapters/langchain/langchain-framework-adapter/langchain-framework-adapter.d.ts +3 -3
  6. package/dist/adapters/langchain/langchain-framework-adapter/langchain-framework-adapter.d.ts.map +1 -1
  7. package/dist/core/extensions.d.ts +30 -0
  8. package/dist/core/extensions.d.ts.map +1 -0
  9. package/dist/core/frisk-session.d.ts +7 -4
  10. package/dist/core/frisk-session.d.ts.map +1 -1
  11. package/dist/core/frisk.d.ts +14 -24
  12. package/dist/core/frisk.d.ts.map +1 -1
  13. package/dist/core/types.d.ts +5 -0
  14. package/dist/core/types.d.ts.map +1 -1
  15. package/dist/errors/index.d.ts +6 -0
  16. package/dist/errors/index.d.ts.map +1 -1
  17. package/dist/framework-adapter/base-framework-adapter.d.ts +3 -3
  18. package/dist/framework-adapter/base-framework-adapter.d.ts.map +1 -1
  19. package/dist/framework-adapter/framework-adapter.d.ts +3 -3
  20. package/dist/framework-adapter/framework-adapter.d.ts.map +1 -1
  21. package/dist/framework-adapter/index.d.ts +2 -2
  22. package/dist/framework-adapter/index.d.ts.map +1 -1
  23. package/dist/generated/sdk-meta.d.ts +1 -1
  24. package/dist/generated/sdk-meta.d.ts.map +1 -1
  25. package/dist/index.d.ts +2 -2
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +217 -171
  28. package/dist/index.js.map +12 -13
  29. package/dist/utils/redact.d.ts +5 -5
  30. package/dist/utils/redact.d.ts.map +1 -1
  31. package/package.json +3 -27
  32. package/dist/adapters/claude/claude-framework-adapter/claude-framework-adapter.d.ts +0 -99
  33. package/dist/adapters/claude/claude-framework-adapter/claude-framework-adapter.d.ts.map +0 -1
  34. package/dist/adapters/claude/claude-framework-adapter/get-claude-agent-sdk-version.d.ts +0 -2
  35. package/dist/adapters/claude/claude-framework-adapter/get-claude-agent-sdk-version.d.ts.map +0 -1
  36. package/dist/adapters/claude/claude-framework-adapter/wrap-tool-with-llm-reasoning.d.ts +0 -4
  37. package/dist/adapters/claude/claude-framework-adapter/wrap-tool-with-llm-reasoning.d.ts.map +0 -1
  38. package/dist/adapters/claude/frisk-claude-session.d.ts +0 -29
  39. package/dist/adapters/claude/frisk-claude-session.d.ts.map +0 -1
  40. package/dist/adapters/claude/frisk-claude.d.ts +0 -71
  41. package/dist/adapters/claude/frisk-claude.d.ts.map +0 -1
  42. package/dist/adapters/claude/index.d.ts +0 -3
  43. package/dist/adapters/claude/index.d.ts.map +0 -1
  44. package/dist/adapters/claude/index.js +0 -65732
  45. package/dist/adapters/claude/index.js.map +0 -449
  46. package/dist/adapters/claude/resolve-claude-tool-name.d.ts +0 -2
  47. package/dist/adapters/claude/resolve-claude-tool-name.d.ts.map +0 -1
  48. package/dist/native-bindings/index.d.ts +0 -23
  49. package/dist/native-bindings/index.d.ts.map +0 -1
  50. package/native/README.md +0 -55
  51. package/native/frisk-js.darwin-arm64.node +0 -0
  52. package/native/frisk-js.darwin-x64.node +0 -0
  53. package/native/frisk-js.linux-arm64-gnu.node +0 -0
  54. package/native/frisk-js.linux-arm64-musl.node +0 -0
  55. package/native/frisk-js.linux-x64-gnu.node +0 -0
  56. package/native/frisk-js.linux-x64-musl.node +0 -0
  57. package/native/frisk-js.win32-arm64-msvc.node +0 -0
  58. package/native/frisk-js.win32-x64-msvc.node +0 -0
  59. package/native/index.cjs +0 -580
  60. package/native/index.d.ts +0 -73
@@ -1,2 +0,0 @@
1
- export declare function resolveClaudeToolName(rawToolName: string): string;
2
- //# sourceMappingURL=resolve-claude-tool-name.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolve-claude-tool-name.d.ts","sourceRoot":"","sources":["../../../src/adapters/claude/resolve-claude-tool-name.ts"],"names":[],"mappings":"AAAA,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAGjE"}
@@ -1,23 +0,0 @@
1
- /**
2
- * @friskai/frisk-js Native Bindings
3
- *
4
- * This module encapsulates all access to the native N-API bindings.
5
- * Other modules in the SDK should import from here rather than
6
- * directly accessing the native/ folder.
7
- *
8
- * @internal
9
- */
10
- /** Loaded native module exports resolved for current runtime platform. */
11
- export declare const nativeBindings: any;
12
- import type { JsProcessToolCallOptions, JsProcessToolCallResult, FriskHandle as NativeFriskHandleClass, RedactionResult, redactDictionary as redactDictionaryFn } from '../../native';
13
- /** Typed handle class exported by native bindings. */
14
- export declare const FriskHandle: typeof NativeFriskHandleClass;
15
- /** Typed redaction helper exported by native bindings. */
16
- export declare const redactDictionary: typeof redactDictionaryFn;
17
- /** Native `process` input type accepted by the Rust binding. */
18
- /** Native `process` result type returned by the Rust binding. */
19
- /** Native redaction result type returned by binding helpers. */
20
- export type { JsProcessToolCallOptions as NativeProcessToolCallOptions, JsProcessToolCallResult as NativeProcessToolCallResult, RedactionResult as NativeRedactionResult, };
21
- /** Concrete instance type for the native `FriskHandle` class. */
22
- export type FriskHandleInstance = InstanceType<typeof NativeFriskHandleClass>;
23
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/native-bindings/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAkBH,0EAA0E;AAC1E,eAAO,MAAM,cAAc,KAA+B,CAAA;AAG1D,OAAO,KAAK,EACV,wBAAwB,EACxB,uBAAuB,EACvB,WAAW,IAAI,sBAAsB,EACrC,eAAe,EACf,gBAAgB,IAAI,kBAAkB,EACvC,MAAM,cAAc,CAAA;AAGrB,sDAAsD;AACtD,eAAO,MAAM,WAAW,EAAE,OAAO,sBACL,CAAA;AAC5B,0DAA0D;AAC1D,eAAO,MAAM,gBAAgB,EAAE,OAAO,kBACL,CAAA;AAGjC,gEAAgE;AAChE,iEAAiE;AACjE,gEAAgE;AAChE,YAAY,EACV,wBAAwB,IAAI,4BAA4B,EACxD,uBAAuB,IAAI,2BAA2B,EACtD,eAAe,IAAI,qBAAqB,GACzC,CAAA;AAGD,iEAAiE;AACjE,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,OAAO,sBAAsB,CAAC,CAAA"}
package/native/README.md DELETED
@@ -1,55 +0,0 @@
1
- # Native Bindings
2
-
3
- This folder contains the native N-API bindings for the `@friskai/frisk-js` package.
4
-
5
- ## Contents
6
-
7
- | File | Description | Git Status |
8
- |------|-------------|------------|
9
- | `index.cjs` | Platform loader that detects the OS/architecture and loads the correct `.node` binary | ✅ Tracked |
10
- | `index.d.ts` | TypeScript type definitions for the native bindings | ✅ Tracked |
11
- | `*.node` | Native binary files (e.g., `frisk-js.darwin-arm64.node`) | ❌ Ignored |
12
-
13
- ## Why are `index.cjs` and `index.d.ts` committed?
14
-
15
- These files are **auto-generated** by [napi-rs](https://napi.rs/) during the Rust build process (`npm run build:rust`), but they are committed to source control for the following reasons:
16
-
17
- 1. **IDE Support**: The type definitions (`index.d.ts`) enable TypeScript IntelliSense and type checking without requiring a native build.
18
-
19
- 2. **CI/CD Verification**: Type checking can be performed in CI environments that may not have Rust toolchain installed.
20
-
21
- 3. **Stability**: These files only change when the Rust API changes, making them safe to commit.
22
-
23
- 4. **Standard Practice**: This is the recommended approach for napi-rs projects (see [@napi-rs/canvas](https://github.com/nicolebienz/canvas), [@swc/core](https://github.com/swc-project/swc), etc.).
24
-
25
- ## Why is `index.cjs` instead of `index.js`?
26
-
27
- The parent package uses `"type": "module"` in `package.json`, which means all `.js` files are treated as ES Modules. The napi-rs loader uses CommonJS syntax (`require`, `module.exports`), so we rename it to `.cjs` to ensure Node.js loads it correctly.
28
-
29
- ## Why are `.node` files ignored?
30
-
31
- The `.node` files are platform-specific native binaries compiled from Rust. They are:
32
-
33
- - **Large**: Binary files bloat the repository
34
- - **Platform-specific**: Only the binary for the current platform is needed
35
- - **Build artifacts**: Regenerated on every `npm run build:rust`
36
-
37
- ## Build Process
38
-
39
- The `npm run build:rust` command:
40
-
41
- 1. Compiles Rust code to a native `.node` binary
42
- 2. Generates `index.js` (platform loader) and `index.d.ts` (type definitions)
43
- 3. Renames `index.js` to `index.cjs` for ESM compatibility
44
-
45
- ```bash
46
- # Build native bindings
47
- npm run build:rust
48
-
49
- # Build TypeScript SDK
50
- npm run build:ts
51
-
52
- # Build everything
53
- npm run build
54
- ```
55
-
Binary file
Binary file
Binary file
Binary file
Binary file