@arcteninc/core 0.0.108 → 0.0.110
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 +53 -66
- package/dist/index.cjs +3 -16
- package/dist/index.d.ts +5 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +447 -8679
- package/dist/lib/useAgent.d.ts +1 -2
- package/dist/lib/useAgent.d.ts.map +1 -1
- package/dist/types/tool-description.d.ts +1 -0
- package/dist/types/tool-description.d.ts.map +1 -1
- package/dist/types/use-agent.d.ts +2 -45
- package/dist/types/use-agent.d.ts.map +1 -1
- package/package.json +2 -26
- package/scripts/cli-extract-types-auto.ts +0 -0
- package/dist/components/ArctenAgent.d.ts +0 -46
- package/dist/components/ArctenAgent.d.ts.map +0 -1
- package/dist/components/ai-elements/prompt-input.d.ts +0 -187
- package/dist/components/ai-elements/prompt-input.d.ts.map +0 -1
- package/dist/components/ai-elements/reasoning.d.ts +0 -17
- package/dist/components/ai-elements/reasoning.d.ts.map +0 -1
- package/dist/components/ai-elements/response.d.ts +0 -8
- package/dist/components/ai-elements/response.d.ts.map +0 -1
- package/dist/components/ai-elements/shimmer.d.ts +0 -10
- package/dist/components/ai-elements/shimmer.d.ts.map +0 -1
- package/dist/components/citation-button.d.ts +0 -14
- package/dist/components/citation-button.d.ts.map +0 -1
- package/dist/components/citation-text-renderer.d.ts +0 -31
- package/dist/components/citation-text-renderer.d.ts.map +0 -1
- package/dist/components/secure-modals/EmailModal.d.ts +0 -10
- package/dist/components/secure-modals/EmailModal.d.ts.map +0 -1
- package/dist/components/secure-modals/FormModal.d.ts +0 -20
- package/dist/components/secure-modals/FormModal.d.ts.map +0 -1
- package/dist/components/secure-modals/PasswordModal.d.ts +0 -10
- package/dist/components/secure-modals/PasswordModal.d.ts.map +0 -1
- package/dist/components/secure-modals/PhoneModal.d.ts +0 -10
- package/dist/components/secure-modals/PhoneModal.d.ts.map +0 -1
- package/dist/components/secure-modals/PinModal.d.ts +0 -11
- package/dist/components/secure-modals/PinModal.d.ts.map +0 -1
- package/dist/components/secure-modals/SecureModalProvider.d.ts +0 -13
- package/dist/components/secure-modals/SecureModalProvider.d.ts.map +0 -1
- package/dist/components/secure-modals/TextModal.d.ts +0 -11
- package/dist/components/secure-modals/TextModal.d.ts.map +0 -1
- package/dist/components/secure-modals/index.d.ts +0 -10
- package/dist/components/secure-modals/index.d.ts.map +0 -1
- package/dist/components/secure-modals/types.d.ts +0 -34
- package/dist/components/secure-modals/types.d.ts.map +0 -1
- package/dist/components/tool-call-approval.d.ts +0 -9
- package/dist/components/tool-call-approval.d.ts.map +0 -1
- package/dist/components/tool-call-result.d.ts +0 -8
- package/dist/components/tool-call-result.d.ts.map +0 -1
- package/dist/components/ui/autotextarea.d.ts +0 -19
- package/dist/components/ui/autotextarea.d.ts.map +0 -1
- package/dist/components/ui/badge.d.ts +0 -10
- package/dist/components/ui/badge.d.ts.map +0 -1
- package/dist/components/ui/button.d.ts +0 -14
- package/dist/components/ui/button.d.ts.map +0 -1
- package/dist/components/ui/collapsible.d.ts +0 -6
- package/dist/components/ui/collapsible.d.ts.map +0 -1
- package/dist/components/ui/command.d.ts +0 -19
- package/dist/components/ui/command.d.ts.map +0 -1
- package/dist/components/ui/dialog.d.ts +0 -16
- package/dist/components/ui/dialog.d.ts.map +0 -1
- package/dist/components/ui/dropdown-menu.d.ts +0 -26
- package/dist/components/ui/dropdown-menu.d.ts.map +0 -1
- package/dist/components/ui/hover-card.d.ts +0 -7
- package/dist/components/ui/hover-card.d.ts.map +0 -1
- package/dist/components/ui/input-group.d.ts +0 -17
- package/dist/components/ui/input-group.d.ts.map +0 -1
- package/dist/components/ui/input.d.ts +0 -4
- package/dist/components/ui/input.d.ts.map +0 -1
- package/dist/components/ui/kbd.d.ts +0 -4
- package/dist/components/ui/kbd.d.ts.map +0 -1
- package/dist/components/ui/select.d.ts +0 -16
- package/dist/components/ui/select.d.ts.map +0 -1
- package/dist/components/ui/textarea.d.ts +0 -4
- package/dist/components/ui/textarea.d.ts.map +0 -1
- package/dist/components/ui/tooltip.d.ts +0 -8
- package/dist/components/ui/tooltip.d.ts.map +0 -1
- package/dist/core.css +0 -1
- package/dist/utils/form-generator.d.ts +0 -29
- package/dist/utils/form-generator.d.ts.map +0 -1
- package/dist/utils/secure-param-detector.d.ts +0 -26
- package/dist/utils/secure-param-detector.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @arcteninc/core
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Core hooks, utilities, and types for building AI-powered agent interfaces. This package contains the headless functionality - for UI components, see `@arcteninc/ui`.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -14,92 +14,85 @@ pnpm add @arcteninc/core
|
|
|
14
14
|
bun add @arcteninc/core
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## Package Split
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
This package has been split into two packages:
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
- **@arcteninc/core** (this package): Hooks (`useAgent`), utilities, types, and CLI tools
|
|
22
|
+
- **@arcteninc/ui**: React components (`ArctenAgent`) and UI primitives
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
This split allows you to use only the core functionality without the UI bundle if you're building a custom interface.
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
## Usage
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
npm install -D tailwindcss
|
|
29
|
-
npx tailwindcss init
|
|
30
|
-
```
|
|
28
|
+
### Using the `useAgent` Hook
|
|
31
29
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
30
|
+
```tsx
|
|
31
|
+
import { useAgent } from "@arcteninc/core";
|
|
32
|
+
|
|
33
|
+
function MyCustomAgent() {
|
|
34
|
+
const {
|
|
35
|
+
messages,
|
|
36
|
+
sendMessage,
|
|
37
|
+
status,
|
|
38
|
+
error,
|
|
39
|
+
stop,
|
|
40
|
+
} = useAgent({
|
|
41
|
+
apiBaseUrl: "https://api.arcten.com",
|
|
42
|
+
tokenEndpoint: "/api/arcten/token",
|
|
43
|
+
user: { id: "user-123" },
|
|
44
|
+
tools: [/* your tools */],
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
// Build your custom UI using the hook
|
|
48
|
+
return (
|
|
49
|
+
<div>
|
|
50
|
+
{messages.map((msg) => (
|
|
51
|
+
<div key={msg.id}>{msg.content}</div>
|
|
52
|
+
))}
|
|
53
|
+
<input
|
|
54
|
+
onKeyDown={(e) => {
|
|
55
|
+
if (e.key === "Enter") {
|
|
56
|
+
sendMessage({ text: e.target.value });
|
|
57
|
+
}
|
|
58
|
+
}}
|
|
59
|
+
/>
|
|
60
|
+
</div>
|
|
61
|
+
);
|
|
46
62
|
}
|
|
47
63
|
```
|
|
48
64
|
|
|
49
|
-
|
|
65
|
+
### Using the UI Component
|
|
50
66
|
|
|
51
|
-
|
|
52
|
-
@tailwind base;
|
|
53
|
-
@tailwind components;
|
|
54
|
-
@tailwind utilities;
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## Usage
|
|
67
|
+
If you want the pre-built UI component, install and use `@arcteninc/ui`:
|
|
58
68
|
|
|
59
|
-
|
|
69
|
+
```bash
|
|
70
|
+
npm install @arcteninc/ui
|
|
71
|
+
```
|
|
60
72
|
|
|
61
73
|
```tsx
|
|
62
|
-
|
|
63
|
-
import
|
|
64
|
-
|
|
65
|
-
// 2. Import the styles (REQUIRED - styles are NOT auto-applied)
|
|
66
|
-
import "@arcteninc/core/styles";
|
|
74
|
+
import { ArctenAgent } from "@arcteninc/ui";
|
|
75
|
+
import "@arcteninc/ui/styles";
|
|
67
76
|
|
|
68
77
|
function App() {
|
|
69
78
|
return (
|
|
70
79
|
<ArctenAgent
|
|
71
|
-
|
|
80
|
+
apiBaseUrl="https://api.arcten.com"
|
|
72
81
|
tokenEndpoint="/api/arcten/token"
|
|
82
|
+
user={{ id: "user-123" }}
|
|
73
83
|
/>
|
|
74
84
|
);
|
|
75
85
|
}
|
|
76
86
|
```
|
|
77
87
|
|
|
78
|
-
|
|
88
|
+
## CLI Tools
|
|
79
89
|
|
|
80
|
-
|
|
90
|
+
This package includes CLI tools for type extraction:
|
|
81
91
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
#### Option 1: Import in your CSS file (Recommended)
|
|
85
|
-
|
|
86
|
-
```css
|
|
87
|
-
/* In your globals.css or main CSS file */
|
|
88
|
-
@import "@arcteninc/core/styles";
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
#### Option 2: Import in your JavaScript/TypeScript
|
|
92
|
-
|
|
93
|
-
```tsx
|
|
94
|
-
// In your main entry file (e.g., app.tsx, _app.tsx, layout.tsx)
|
|
95
|
-
import "@arcteninc/core/styles";
|
|
92
|
+
```bash
|
|
93
|
+
npx @arcteninc/core arcten-extract-types
|
|
96
94
|
```
|
|
97
95
|
|
|
98
|
-
#### Option 3: Import via CDN (if using unpkg or similar)
|
|
99
|
-
|
|
100
|
-
```html
|
|
101
|
-
<link rel="stylesheet" href="https://unpkg.com/@arcteninc/core@latest/dist/core.css" />
|
|
102
|
-
```
|
|
103
96
|
## Development
|
|
104
97
|
|
|
105
98
|
To install dependencies:
|
|
@@ -119,9 +112,3 @@ To watch for changes:
|
|
|
119
112
|
```bash
|
|
120
113
|
bun run dev
|
|
121
114
|
```
|
|
122
|
-
|
|
123
|
-
## Notes
|
|
124
|
-
|
|
125
|
-
- The CSS is pre-compiled and includes all necessary Tailwind styles
|
|
126
|
-
- You don't need to configure Tailwind CSS in your project to use this package
|
|
127
|
-
- The styles are self-contained and won't conflict with your existing styles
|