@plucky-ai/chat-sdk 0.0.1-alpha.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.
package/README.md ADDED
@@ -0,0 +1,49 @@
1
+ # @plucky-ai/chat-sdk
2
+
3
+ A lightweight SDK for integrating Plucky Chat functionality into your applications.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @plucky-ai/chat-sdk
9
+ # or
10
+ yarn add @plucky-ai/chat-sdk
11
+ # or
12
+ pnpm add @plucky-ai/chat-sdk
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ```typescript
18
+ import { init, getAPI } from '@plucky-ai/chat-sdk'
19
+
20
+ // Initialize the SDK
21
+ const api = init({
22
+ // your configuration options
23
+ })
24
+
25
+ // Or get the existing API instance
26
+ const api = getAPI()
27
+ ```
28
+
29
+ ## API Reference
30
+
31
+ ### `init(options: InitOptions)`
32
+
33
+ Initializes the Plucky Chat SDK with the provided options.
34
+
35
+ ### `getAPI()`
36
+
37
+ Returns the current API instance, creating one if it doesn't exist.
38
+
39
+ ## Types
40
+
41
+ ```typescript
42
+ interface InitOptions {
43
+ // Configuration options for the SDK
44
+ }
45
+
46
+ interface PluckyAPI {
47
+ // API methods and properties
48
+ }
49
+ ```
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env bash
2
+
3
+ set -eux
4
+
5
+ # Build the project
6
+ npm run build:release
7
+
8
+ # Get the version from package.json before changing directory
9
+ VERSION="$(node -p "require('./package.json').version")"
10
+
11
+ # Extract the pre-release tag if it exists
12
+ if [[ "$VERSION" =~ -([a-zA-Z]+) ]]; then
13
+ # Extract the part before any dot in the pre-release identifier
14
+ TAG="${BASH_REMATCH[1]}"
15
+ else
16
+ TAG="latest"
17
+ fi
18
+
19
+ # Publish with the appropriate tag
20
+ npm publish --access public --tag "$TAG"