@raindrop-ai/ai-sdk 0.3.2 → 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 +26 -0
- package/dist/{chunk-VRVBVX6K.mjs → chunk-MCRACPKM.mjs} +873 -218
- package/dist/{index-BqXHiknB.d.mts → index-B_mpeckV.d.mts} +123 -38
- package/dist/{index-BqXHiknB.d.ts → index-B_mpeckV.d.ts} +123 -38
- package/dist/index.browser.d.mts +123 -38
- package/dist/index.browser.d.ts +123 -38
- package/dist/index.browser.js +730 -220
- package/dist/index.browser.mjs +730 -220
- package/dist/index.node.d.mts +1 -1
- package/dist/index.node.d.ts +1 -1
- package/dist/index.node.js +873 -218
- package/dist/index.node.mjs +1 -1
- package/dist/index.workers.d.mts +1 -1
- package/dist/index.workers.d.ts +1 -1
- package/dist/index.workers.js +873 -218
- package/dist/index.workers.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -71,6 +71,32 @@ This sets the `X-Raindrop-Project-Id` header on every event and trace. Omit it
|
|
|
71
71
|
(or pass `"default"`) to use your org's default **Production** project — the
|
|
72
72
|
existing behavior. Single-project orgs need nothing new.
|
|
73
73
|
|
|
74
|
+
## Application Git identity
|
|
75
|
+
|
|
76
|
+
Each client reports the application commit SHA when it can determine one. In Node.js, local Git discovery runs in the background and never delays or fails application calls. Browser and edge builds do not import Node Git/filesystem APIs. Automatic branch discovery is off by default.
|
|
77
|
+
|
|
78
|
+
```ts
|
|
79
|
+
const raindrop = createRaindropAISDK({
|
|
80
|
+
writeKey: process.env.RAINDROP_WRITE_KEY!,
|
|
81
|
+
appGit: {
|
|
82
|
+
commitSha: "0123456789abcdef0123456789abcdef01234567",
|
|
83
|
+
commitDirty: false,
|
|
84
|
+
branch: "main",
|
|
85
|
+
detectBranch: true,
|
|
86
|
+
sourceDirectory: "/path/to/application",
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
const withoutGit = createRaindropAISDK({
|
|
91
|
+
writeKey: process.env.RAINDROP_WRITE_KEY!,
|
|
92
|
+
appGit: false,
|
|
93
|
+
});
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
`commitSha`, `commitDirty`, and `branch` are explicit overrides. `detectBranch` opts into automatic branch lookup, `sourceDirectory` selects the application repository, and `autoDetect: false` disables automatic sources while retaining explicit values.
|
|
97
|
+
|
|
98
|
+
Integration authors combining this client with another telemetry exporter can pass the same core `appGitContext` to both feeds. The injected context takes precedence over `appGit`; stop every feed that shares it before calling `shutdown()`, which disposes the context. Disposal is idempotent.
|
|
99
|
+
|
|
74
100
|
## Payload size limits
|
|
75
101
|
|
|
76
102
|
Text fields (event input/output, tool/LLM span payloads such as `ai.prompt`,
|