@granular-software/sdk 0.4.32 → 0.4.33
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 +21 -0
- package/dist/agent-evals.d.mts +1 -1
- package/dist/agent-evals.d.ts +1 -1
- package/dist/agent-evals.js +775 -307
- package/dist/agent-evals.js.map +1 -1
- package/dist/agent-evals.mjs +775 -307
- package/dist/agent-evals.mjs.map +1 -1
- package/dist/cli/index.js +744 -21
- package/dist/{client-C2Gk641P.d.mts → client-DTvI5MUG.d.mts} +129 -33
- package/dist/{client-C2Gk641P.d.ts → client-DTvI5MUG.d.ts} +129 -33
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +9293 -9125
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9293 -9125
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -594,6 +594,27 @@ Registers ontology-scoped live handlers for effects declared in the ontology man
|
|
|
594
594
|
|
|
595
595
|
Open a live runtime session for the environment, then submit code to the sandbox. The code imports typed classes from `./sandbox-tools`.
|
|
596
596
|
|
|
597
|
+
### Live Session State And Durable Collections
|
|
598
|
+
|
|
599
|
+
`session.document` and `session.getHeap()` are local, fast views of the live runtime state synced over the WebSocket.
|
|
600
|
+
|
|
601
|
+
Older conversation history, timeline events, completed jobs, and saved heap artifacts are exposed through named durable collections:
|
|
602
|
+
|
|
603
|
+
```ts
|
|
604
|
+
const session = await env.sessions.create();
|
|
605
|
+
|
|
606
|
+
const liveHeap = session.getHeap();
|
|
607
|
+
const messages = await session.messages.list({ limit: 100 });
|
|
608
|
+
const timeline = await session.timeline.list({ limit: 100 });
|
|
609
|
+
const jobs = await session.jobs.list({ status: "all", limit: 100 });
|
|
610
|
+
const job = await session.jobs.get("job_123");
|
|
611
|
+
const entry = await session.heap.entries.get("customer_123");
|
|
612
|
+
const savedList = await session.heap.lists.get("recent_customers");
|
|
613
|
+
const transcript = await session.transcript.list({ limit: 100 });
|
|
614
|
+
```
|
|
615
|
+
|
|
616
|
+
Use the live state for current working context, and the collection APIs when you need durable history or artifacts that may have been moved out of the live document.
|
|
617
|
+
|
|
597
618
|
### `session.getDomainDocumentation()`
|
|
598
619
|
|
|
599
620
|
Get auto-generated TypeScript class declarations. Pass this to LLMs to help them write correct code.
|
package/dist/agent-evals.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as Prompt, f as EnvironmentSession, c as SessionHeapSnapshot,
|
|
1
|
+
import { P as Prompt, f as EnvironmentSession, c as SessionHeapSnapshot, bf as ManifestContent, aN as RecordObjectOptions, T as ToolWithHandler, G as Granular, C as ConnectOptions, J as CreateEnvironmentData, k as GranularOptions } from './client-DTvI5MUG.mjs';
|
|
2
2
|
import { GeneratedJobCodeIssue, HarnessControllerBudgets } from './agent-harness.mjs';
|
|
3
3
|
import '@automerge/automerge';
|
|
4
4
|
import '@automerge/automerge/slim';
|
package/dist/agent-evals.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as Prompt, f as EnvironmentSession, c as SessionHeapSnapshot,
|
|
1
|
+
import { P as Prompt, f as EnvironmentSession, c as SessionHeapSnapshot, bf as ManifestContent, aN as RecordObjectOptions, T as ToolWithHandler, G as Granular, C as ConnectOptions, J as CreateEnvironmentData, k as GranularOptions } from './client-DTvI5MUG.js';
|
|
2
2
|
import { GeneratedJobCodeIssue, HarnessControllerBudgets } from './agent-harness.js';
|
|
3
3
|
import '@automerge/automerge';
|
|
4
4
|
import '@automerge/automerge/slim';
|