@lore-co/sdk 0.1.0 → 0.1.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 +28 -7
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@ The customer library for applications and integrations that call Lore
|
|
|
4
4
|
programmatically. It provides a typed client for learnings, activity, audited
|
|
5
5
|
context delivery, observations, and turns.
|
|
6
6
|
|
|
7
|
+
## Install
|
|
8
|
+
|
|
7
9
|
```sh
|
|
8
10
|
pnpm add @lore-co/sdk
|
|
9
11
|
```
|
|
@@ -18,15 +20,34 @@ const lore = new LoreClient({
|
|
|
18
20
|
},
|
|
19
21
|
});
|
|
20
22
|
|
|
21
|
-
const result = await lore.processTurn(
|
|
23
|
+
const result = await lore.processTurn({
|
|
24
|
+
connector: "incident-bot",
|
|
25
|
+
eventId: "incident-42:reply-3",
|
|
26
|
+
agent: "incident-bot",
|
|
27
|
+
sessionId: "incident-42",
|
|
28
|
+
previousAssistant: { content: "Restart the service." },
|
|
29
|
+
currentUser: { content: "No, fail over first." },
|
|
30
|
+
}, "incident-42:reply-3");
|
|
22
31
|
```
|
|
23
32
|
|
|
24
|
-
`observeEvent` calls `POST /v1/observations`; `
|
|
25
|
-
`POST /v1/
|
|
26
|
-
|
|
33
|
+
`observeEvent` calls `POST /v1/observations`; `deliverContext` calls audited
|
|
34
|
+
`POST /v1/context/deliveries`; and `processTurn` calls `POST /v1/turns` and
|
|
35
|
+
forwards the optional idempotency key. The client also exposes learning
|
|
36
|
+
inspection and lifecycle methods, activity listing, workspace-token
|
|
37
|
+
management, and Devin session registration. `observe`, `getContext`, and the
|
|
38
|
+
memory-named methods remain available for compatibility.
|
|
27
39
|
|
|
28
40
|
Use `@lore-co/adapter-generic` instead when the customer owns an agent runtime and
|
|
29
|
-
wants a higher-level prepare/observe bridge. CLI users should install
|
|
30
|
-
|
|
41
|
+
wants a higher-level prepare/observe bridge. CLI users should install
|
|
42
|
+
`@lore-co/cli` globally; they do not need this package.
|
|
43
|
+
|
|
44
|
+
## Production guidance
|
|
45
|
+
|
|
46
|
+
- Use an HTTPS API URL and keep workspace tokens in server-side secrets.
|
|
47
|
+
- Reuse stable connector, event, and session IDs when retrying requests.
|
|
48
|
+
- Handle `LoreApiError` for non-2xx responses and log its status without
|
|
49
|
+
exposing credentials.
|
|
31
50
|
|
|
32
|
-
Node.js 22 or newer is required.
|
|
51
|
+
Node.js 22 or newer is required. See the
|
|
52
|
+
[technical guide](../../docs/detailed.md#typescript-sdk) for the complete API
|
|
53
|
+
surface.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lore-co/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Typed HTTP client for Lore engineering memory",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"license": "FSL-1.1-MIT",
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"zod": "^4.4.3",
|
|
33
|
-
"@lore-co/core": "0.1.
|
|
33
|
+
"@lore-co/core": "0.1.1"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"dev": "tsc -p tsconfig.json --watch --preserveWatchOutput",
|