@letta-ai/letta-agent-sdk 0.2.7 → 0.3.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 +91 -325
- package/dist/app-server-management.d.ts +28 -0
- package/dist/app-server-management.d.ts.map +1 -0
- package/dist/app-server-session.d.ts +13 -18
- package/dist/app-server-session.d.ts.map +1 -1
- package/dist/client-base.d.ts +61 -0
- package/dist/client-base.d.ts.map +1 -0
- package/dist/client-entry.d.ts +19 -0
- package/dist/client-entry.d.ts.map +1 -0
- package/dist/client-entry.js +9143 -0
- package/dist/client-entry.js.map +25 -0
- package/dist/client.d.ts +8 -49
- package/dist/client.d.ts.map +1 -1
- package/dist/cloud-management.d.ts +25 -0
- package/dist/cloud-management.d.ts.map +1 -0
- package/dist/cloud-session.d.ts.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8556 -6439
- package/dist/index.js.map +20 -37
- package/dist/interactiveToolPolicy.d.ts +7 -0
- package/dist/interactiveToolPolicy.d.ts.map +1 -1
- package/dist/local-app-server-session.d.ts +4 -0
- package/dist/local-app-server-session.d.ts.map +1 -0
- package/dist/management-types.d.ts +110 -0
- package/dist/management-types.d.ts.map +1 -0
- package/dist/management.d.ts +21 -0
- package/dist/management.d.ts.map +1 -0
- package/dist/remote-client-session-core.d.ts +8 -7
- package/dist/remote-client-session-core.d.ts.map +1 -1
- package/dist/session.d.ts +5 -1
- package/dist/session.d.ts.map +1 -1
- package/dist/tests/advanced-session.d.ts +1 -9
- package/dist/tests/advanced-session.d.ts.map +1 -1
- package/dist/transport.d.ts.map +1 -1
- package/dist/types.d.ts +193 -15
- package/dist/types.d.ts.map +1 -1
- package/dist/websocket.d.ts +9 -0
- package/dist/websocket.d.ts.map +1 -0
- package/package.json +9 -2
- package/dist/dream/agent.d.ts +0 -55
- package/dist/dream/agent.d.ts.map +0 -1
- package/dist/dream/aggregate.d.ts +0 -38
- package/dist/dream/aggregate.d.ts.map +0 -1
- package/dist/dream/batching.d.ts +0 -12
- package/dist/dream/batching.d.ts.map +0 -1
- package/dist/dream/clone.d.ts +0 -14
- package/dist/dream/clone.d.ts.map +0 -1
- package/dist/dream/cursors.d.ts +0 -7
- package/dist/dream/cursors.d.ts.map +0 -1
- package/dist/dream/index.d.ts +0 -67
- package/dist/dream/index.d.ts.map +0 -1
- package/dist/dream/memfs.d.ts +0 -75
- package/dist/dream/memfs.d.ts.map +0 -1
- package/dist/dream/normalize-core.d.ts +0 -67
- package/dist/dream/normalize-core.d.ts.map +0 -1
- package/dist/dream/prompts.d.ts +0 -26
- package/dist/dream/prompts.d.ts.map +0 -1
- package/dist/dream/redact.d.ts +0 -3
- package/dist/dream/redact.d.ts.map +0 -1
- package/dist/dream/reflect.d.ts +0 -49
- package/dist/dream/reflect.d.ts.map +0 -1
- package/dist/dream/registry.d.ts +0 -4
- package/dist/dream/registry.d.ts.map +0 -1
- package/dist/dream/runner.d.ts +0 -30
- package/dist/dream/runner.d.ts.map +0 -1
- package/dist/dream/sdk-messages.d.ts +0 -4
- package/dist/dream/sdk-messages.d.ts.map +0 -1
- package/dist/dream/select.d.ts +0 -6
- package/dist/dream/select.d.ts.map +0 -1
- package/dist/dream/sources/claude-code.d.ts +0 -18
- package/dist/dream/sources/claude-code.d.ts.map +0 -1
- package/dist/dream/sources/codex.d.ts +0 -20
- package/dist/dream/sources/codex.d.ts.map +0 -1
- package/dist/dream/sources/letta.d.ts +0 -3
- package/dist/dream/sources/letta.d.ts.map +0 -1
- package/dist/dream/sources/openhands.d.ts +0 -43
- package/dist/dream/sources/openhands.d.ts.map +0 -1
- package/dist/dream/sources/transcript-file.d.ts +0 -8
- package/dist/dream/sources/transcript-file.d.ts.map +0 -1
- package/dist/dream/store-utils.d.ts +0 -21
- package/dist/dream/store-utils.d.ts.map +0 -1
- package/dist/dream/transcripts.d.ts +0 -27
- package/dist/dream/transcripts.d.ts.map +0 -1
- package/dist/dream/types.d.ts +0 -48
- package/dist/dream/types.d.ts.map +0 -1
- package/dist/dream/workers.d.ts +0 -12
- package/dist/dream/workers.d.ts.map +0 -1
package/dist/dream/runner.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { LettaAgentClient } from "../client.js";
|
|
2
|
-
import type { SDKMessage, SkillSource } from "../types.js";
|
|
3
|
-
export interface RunAgentOptions {
|
|
4
|
-
agentId: string;
|
|
5
|
-
userPrompt: string;
|
|
6
|
-
cwd: string;
|
|
7
|
-
/** Progress label for logging. */
|
|
8
|
-
label: string;
|
|
9
|
-
/** Continue this existing conversation instead of starting a new one. */
|
|
10
|
-
resumeConversationId?: string;
|
|
11
|
-
/** Extra env for the session's harness process (see session options). */
|
|
12
|
-
env?: Record<string, string>;
|
|
13
|
-
/** Restrict Letta Code skills for this runtime. [] disables every source. */
|
|
14
|
-
skillSources?: SkillSource[];
|
|
15
|
-
/** Abort: closes the session and returns a failed result promptly. */
|
|
16
|
-
signal?: AbortSignal;
|
|
17
|
-
onProgress?: (line: string) => void;
|
|
18
|
-
}
|
|
19
|
-
export interface RunAgentResult {
|
|
20
|
-
agentId: string;
|
|
21
|
-
conversationId: string | null;
|
|
22
|
-
success: boolean;
|
|
23
|
-
error?: string;
|
|
24
|
-
/** Final assistant report (result.result when present, else last assistant message). */
|
|
25
|
-
report: string;
|
|
26
|
-
durationMs: number;
|
|
27
|
-
messages: SDKMessage[];
|
|
28
|
-
}
|
|
29
|
-
export declare function runAgentToCompletion(client: LettaAgentClient, options: RunAgentOptions): Promise<RunAgentResult>;
|
|
30
|
-
//# sourceMappingURL=runner.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/dream/runner.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE3D,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,yEAAyE;IACzE,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,6EAA6E;IAC7E,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,sEAAsE;IACtE,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wFAAwF;IACxF,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,UAAU,EAAE,CAAC;CACxB;AAED,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,cAAc,CAAC,CAgFzB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sdk-messages.d.ts","sourceRoot":"","sources":["../../src/dream/sdk-messages.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAyEnD,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,UAAU,EAAE,GACrB,gBAAgB,EAAE,GAAG,IAAI,CAgE3B"}
|
package/dist/dream/select.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { DiscoveredSession } from "./types.js";
|
|
2
|
-
/** A stable identity for a discovered session across sources. */
|
|
3
|
-
export declare function sessionKey(session: DiscoveredSession): string;
|
|
4
|
-
/** Filesystem-safe file name for one normalized session. */
|
|
5
|
-
export declare function sessionFileName(session: DiscoveredSession): string;
|
|
6
|
-
//# sourceMappingURL=select.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/dream/select.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD,iEAAiE;AACjE,wBAAgB,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAE7D;AAED,4DAA4D;AAC5D,wBAAgB,eAAe,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAGlE"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { PseudoRow } from "../normalize-core.js";
|
|
2
|
-
import type { TrajectorySource } from "../types.js";
|
|
3
|
-
interface CcParseOutput {
|
|
4
|
-
rows: PseudoRow[];
|
|
5
|
-
extras: {
|
|
6
|
-
cwd?: string;
|
|
7
|
-
gitBranch?: string;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
/** Claude Code session JSONL → pseudo-rows plus mined session context. */
|
|
11
|
-
export declare function parseClaudeCodeJsonl(text: string): CcParseOutput;
|
|
12
|
-
/**
|
|
13
|
-
* Trajectory source for local Claude Code sessions. `storeDir` overrides the
|
|
14
|
-
* default store (~/.claude/projects), mainly for tests.
|
|
15
|
-
*/
|
|
16
|
-
export declare function createClaudeCodeSource(storeDir?: string): TrajectorySource;
|
|
17
|
-
export {};
|
|
18
|
-
//# sourceMappingURL=claude-code.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"claude-code.d.ts","sourceRoot":"","sources":["../../../src/dream/sources/claude-code.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,SAAS,EAEV,MAAM,sBAAsB,CAAC;AAY9B,OAAO,KAAK,EAIV,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAkBrB,UAAU,aAAa;IACrB,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,MAAM,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9C;AAED,0EAA0E;AAC1E,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CA0HhE;AAsCD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAmD1E"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { PseudoRow } from "../normalize-core.js";
|
|
2
|
-
import type { TrajectorySource } from "../types.js";
|
|
3
|
-
interface CodexParseOutput {
|
|
4
|
-
rows: PseudoRow[];
|
|
5
|
-
extras: {
|
|
6
|
-
cwd?: string;
|
|
7
|
-
gitBranch?: string;
|
|
8
|
-
model?: string;
|
|
9
|
-
createdAt?: Date;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
/** Codex rollout JSONL → pseudo-rows plus mined session context. */
|
|
13
|
-
export declare function parseCodexRollout(text: string): CodexParseOutput;
|
|
14
|
-
/**
|
|
15
|
-
* Trajectory source for local Codex CLI sessions. `storeDir` overrides the
|
|
16
|
-
* default store (~/.codex/sessions), mainly for tests.
|
|
17
|
-
*/
|
|
18
|
-
export declare function createCodexSource(storeDir?: string): TrajectorySource;
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=codex.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../../src/dream/sources/codex.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,SAAS,EAEV,MAAM,sBAAsB,CAAC;AAa9B,OAAO,KAAK,EAIV,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAErB,UAAU,gBAAgB;IACxB,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,MAAM,EAAE;QACN,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,IAAI,CAAC;KAClB,CAAC;CACH;AAED,oEAAoE;AACpE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,CAgJhE;AA2CD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAkDrE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"letta.d.ts","sourceRoot":"","sources":["../../../src/dream/sources/letta.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAGV,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAkHrB,wBAAgB,iBAAiB,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAoE3E"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { PseudoRow } from "../normalize-core.js";
|
|
2
|
-
import type { TrajectorySource } from "../types.js";
|
|
3
|
-
interface OpenHandsTextContent {
|
|
4
|
-
type?: string;
|
|
5
|
-
text?: string;
|
|
6
|
-
}
|
|
7
|
-
interface OpenHandsEvent {
|
|
8
|
-
kind?: string;
|
|
9
|
-
id?: string;
|
|
10
|
-
timestamp?: string;
|
|
11
|
-
source?: string;
|
|
12
|
-
llm_message?: {
|
|
13
|
-
role?: string;
|
|
14
|
-
content?: OpenHandsTextContent[];
|
|
15
|
-
};
|
|
16
|
-
thought?: OpenHandsTextContent[];
|
|
17
|
-
action?: Record<string, unknown> | null;
|
|
18
|
-
tool_name?: string;
|
|
19
|
-
tool_call_id?: string;
|
|
20
|
-
tool_call?: {
|
|
21
|
-
arguments?: string;
|
|
22
|
-
} | null;
|
|
23
|
-
action_id?: string;
|
|
24
|
-
observation?: {
|
|
25
|
-
content?: OpenHandsTextContent[];
|
|
26
|
-
is_error?: boolean;
|
|
27
|
-
} | null;
|
|
28
|
-
error?: string;
|
|
29
|
-
rejection_reason?: string;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Convert OpenHands conversation events into pseudo-rows. Non-conversational
|
|
33
|
-
* events (system prompts, state updates, condensation, streaming deltas) are
|
|
34
|
-
* skipped.
|
|
35
|
-
*/
|
|
36
|
-
export declare function openHandsEventsToRows(events: OpenHandsEvent[]): PseudoRow[];
|
|
37
|
-
/**
|
|
38
|
-
* Trajectory source for OpenHands conversation exports. There is no default
|
|
39
|
-
* local store, so `discover` requires a locator.
|
|
40
|
-
*/
|
|
41
|
-
export declare function createOpenHandsSource(): TrajectorySource;
|
|
42
|
-
export {};
|
|
43
|
-
//# sourceMappingURL=openhands.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"openhands.d.ts","sourceRoot":"","sources":["../../../src/dream/sources/openhands.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EACV,SAAS,EAEV,MAAM,sBAAsB,CAAC;AAS9B,OAAO,KAAK,EAIV,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAErB,UAAU,oBAAoB;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,UAAU,cAAc;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE;QACZ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,oBAAoB,EAAE,CAAC;KAClC,CAAC;IAEF,OAAO,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAE1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE;QACZ,OAAO,CAAC,EAAE,oBAAoB,EAAE,CAAC;QACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,GAAG,IAAI,CAAC;IACT,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAyCD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,SAAS,EAAE,CAwE3E;AAsID;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,gBAAgB,CAyDxD"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { TrajectorySource } from "../types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Trajectory source for normalized-v1 transcript files: a single `.json`
|
|
4
|
-
* file, or a directory tree of them. There is no default store, so `discover`
|
|
5
|
-
* requires a locator.
|
|
6
|
-
*/
|
|
7
|
-
export declare function createTranscriptFileSource(): TrajectorySource;
|
|
8
|
-
//# sourceMappingURL=transcript-file.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transcript-file.d.ts","sourceRoot":"","sources":["../../../src/dream/sources/transcript-file.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAIV,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAuDrB;;;;GAIG;AACH,wBAAgB,0BAA0B,IAAI,gBAAgB,CAoC7D"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { Stats } from "node:fs";
|
|
2
|
-
import type { NormalizeRowsResult } from "./normalize-core.js";
|
|
3
|
-
import type { DiscoveredSession } from "./types.js";
|
|
4
|
-
export declare function statOrNull(path: string): Stats | null;
|
|
5
|
-
/** Recursively list files under `dir` whose basename matches `match`. */
|
|
6
|
-
export declare function listFilesRecursive(dir: string, match: (name: string) => boolean): string[];
|
|
7
|
-
/**
|
|
8
|
-
* Build a DiscoveredSession from a normalize result, or null when the session
|
|
9
|
-
* was skipped or invalid. Time bounds come from the conversation records
|
|
10
|
-
* (meta excluded); estTokens is ~chars/4 of the serialized transcript.
|
|
11
|
-
*/
|
|
12
|
-
export declare function buildDiscoveredSession(harness: string, sessionId: string, path: string, mtimeMs: number, result: NormalizeRowsResult): DiscoveredSession | null;
|
|
13
|
-
/**
|
|
14
|
-
* Resolve a session-id locator against ids of store sessions: exact match
|
|
15
|
-
* first, then unique-prefix semantics (all sessions whose id starts with the
|
|
16
|
-
* locator).
|
|
17
|
-
*/
|
|
18
|
-
export declare function matchSessionIds<T extends {
|
|
19
|
-
sessionId: string;
|
|
20
|
-
}>(locator: string, candidates: T[]): T[];
|
|
21
|
-
//# sourceMappingURL=store-utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"store-utils.d.ts","sourceRoot":"","sources":["../../src/dream/store-utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGrC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAGpD,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI,CAMrD;AAED,yEAAyE;AACzE,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,GAC/B,MAAM,EAAE,CAmBV;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,mBAAmB,GAC1B,iBAAiB,GAAG,IAAI,CAmB1B;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,EAC7D,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,CAAC,EAAE,GACd,CAAC,EAAE,CAIL"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { NormalizedSession } from "./types.js";
|
|
2
|
-
export interface TranscriptSourceSpec {
|
|
3
|
-
type: string;
|
|
4
|
-
/** A source-specific file, directory, session id, or conversation locator. */
|
|
5
|
-
locator?: string;
|
|
6
|
-
/** Keep the latest N eligible sessions from this source spec. */
|
|
7
|
-
limit?: number;
|
|
8
|
-
}
|
|
9
|
-
export interface CollectTranscriptsOptions {
|
|
10
|
-
sources: TranscriptSourceSpec[];
|
|
11
|
-
/**
|
|
12
|
-
* Include sessions containing activity strictly after this instant. The
|
|
13
|
-
* cutoff is applied to endTime; the full transcript is retained for context.
|
|
14
|
-
*/
|
|
15
|
-
after?: Date | string;
|
|
16
|
-
}
|
|
17
|
-
/** A fully normalized transcript plus its source-session metadata. */
|
|
18
|
-
export type Transcript = NormalizedSession;
|
|
19
|
-
/**
|
|
20
|
-
* Collect normalized transcript snapshots from local trajectory sources.
|
|
21
|
-
*
|
|
22
|
-
* Source specs are independent: the cutoff and each spec's limit are applied
|
|
23
|
-
* before results are combined. Overlapping specs are deduplicated by stable
|
|
24
|
-
* harness/session identity, and the returned list is globally chronological.
|
|
25
|
-
*/
|
|
26
|
-
export declare function collectTranscripts(options: CollectTranscriptsOptions): Promise<Transcript[]>;
|
|
27
|
-
//# sourceMappingURL=transcripts.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transcripts.d.ts","sourceRoot":"","sources":["../../src/dream/transcripts.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAGV,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAIpB,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,oBAAoB,EAAE,CAAC;IAChC;;;OAGG;IACH,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;CACvB;AAED,sEAAsE;AACtE,MAAM,MAAM,UAAU,GAAG,iBAAiB,CAAC;AAkH3C;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,UAAU,EAAE,CAAC,CA4BvB"}
|
package/dist/dream/types.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export interface NormalizedRecord {
|
|
2
|
-
role: "meta" | "user" | "reasoning" | "assistant" | "tool";
|
|
3
|
-
content?: string | null;
|
|
4
|
-
timestamp?: string;
|
|
5
|
-
source?: string;
|
|
6
|
-
tool_calls?: {
|
|
7
|
-
id: string;
|
|
8
|
-
name: string;
|
|
9
|
-
args: string;
|
|
10
|
-
}[];
|
|
11
|
-
tool_call_id?: string;
|
|
12
|
-
cwd?: string;
|
|
13
|
-
git_branch?: string;
|
|
14
|
-
model?: string;
|
|
15
|
-
}
|
|
16
|
-
export interface DiscoveredSession {
|
|
17
|
-
harness: string;
|
|
18
|
-
sessionId: string;
|
|
19
|
-
path: string;
|
|
20
|
-
startTime: string;
|
|
21
|
-
endTime: string;
|
|
22
|
-
estTokens: number;
|
|
23
|
-
recordCount: number;
|
|
24
|
-
mtimeMs: number;
|
|
25
|
-
cwd?: string;
|
|
26
|
-
}
|
|
27
|
-
export interface NormalizedSession {
|
|
28
|
-
session: DiscoveredSession;
|
|
29
|
-
records: NormalizedRecord[];
|
|
30
|
-
}
|
|
31
|
-
export interface TrajectorySource {
|
|
32
|
-
/** The scheme used in `--from <type>[:<locator>]`. */
|
|
33
|
-
type: string;
|
|
34
|
-
/**
|
|
35
|
-
* Discover candidate sessions. With no locator, scan the harness's default
|
|
36
|
-
* local store. With a locator, resolve it as a path (session file, session
|
|
37
|
-
* dir, project dir, or store dir) or a session-id prefix and return the
|
|
38
|
-
* matching session(s) — cursor filtering happens in the caller, so discover
|
|
39
|
-
* should return ALL sessions in the store when the locator names a store or
|
|
40
|
-
* is absent, and the single named session when it names one.
|
|
41
|
-
*/
|
|
42
|
-
discover(locator?: string): Promise<DiscoveredSession[]>;
|
|
43
|
-
/** Fully parse + normalize one discovered session. */
|
|
44
|
-
normalize(session: DiscoveredSession): Promise<NormalizedSession>;
|
|
45
|
-
}
|
|
46
|
-
export declare function estimateTokens(text: string): number;
|
|
47
|
-
export declare function isNormalizedRecordArray(value: unknown): value is NormalizedRecord[];
|
|
48
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/dream/types.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,WAAW,GAAG,WAAW,GAAG,MAAM,CAAC;IAC3D,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC1D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,gBAAgB,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,gBAAgB;IAC/B,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAC;IACzD,sDAAsD;IACtD,SAAS,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;CACnE;AAID,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEnD;AAUD,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,gBAAgB,EAAE,CAoC7B"}
|
package/dist/dream/workers.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { LettaAgentClient } from "../client.js";
|
|
2
|
-
export interface DreamWorkers {
|
|
3
|
-
reflectorAgentId: string;
|
|
4
|
-
aggregatorAgentId: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function ensureDreamWorkers(client: LettaAgentClient, options: {
|
|
7
|
-
reflectorAgentId?: string;
|
|
8
|
-
aggregatorAgentId?: string;
|
|
9
|
-
model?: string;
|
|
10
|
-
log?: (line: string) => void;
|
|
11
|
-
}): Promise<DreamWorkers>;
|
|
12
|
-
//# sourceMappingURL=workers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workers.d.ts","sourceRoot":"","sources":["../../src/dream/workers.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGrD,MAAM,WAAW,YAAY;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE;IACP,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9B,GACA,OAAO,CAAC,YAAY,CAAC,CAiDvB"}
|