@sema-agent/core 1.445.0 → 1.446.0
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type SessionRepo } from "../internal/harness.js";
|
|
2
|
-
import { type AcquiredSession, type SessionStore, type
|
|
2
|
+
import { type AcquiredSession, type SessionStore, type SessionStoreSummary } from "./session.js";
|
|
3
3
|
export declare const SESSION_DEFAULT_TTL_DAYS = 7;
|
|
4
4
|
export type EvictPolicy = "delete" | "forget";
|
|
5
5
|
export interface TtlSessionStoreOptions {
|
|
@@ -24,7 +24,7 @@ export declare class TtlSessionStore implements SessionStore {
|
|
|
24
24
|
private createAndStore;
|
|
25
25
|
touch(sessionId: string): void;
|
|
26
26
|
noteTaskRun(sessionId: string, taskId: string): void;
|
|
27
|
-
list(): Promise<
|
|
27
|
+
list(): Promise<SessionStoreSummary[]>;
|
|
28
28
|
fork(sourceId: string, owner?: string | null): Promise<string | null>;
|
|
29
29
|
release(sessionId: string): Promise<void>;
|
|
30
30
|
forget(sessionId: string): void;
|
package/dist/core/session.d.ts
CHANGED
|
@@ -12,13 +12,14 @@ export interface AcquiredSession {
|
|
|
12
12
|
session: Session;
|
|
13
13
|
sessionId: string;
|
|
14
14
|
}
|
|
15
|
-
export interface
|
|
15
|
+
export interface SessionStoreSummary {
|
|
16
16
|
sessionId: string;
|
|
17
17
|
createdAt?: string;
|
|
18
18
|
lastActiveAt: number;
|
|
19
19
|
lastTaskId?: string;
|
|
20
20
|
forkedFrom?: string;
|
|
21
21
|
}
|
|
22
|
+
export type SessionSummary = SessionStoreSummary;
|
|
22
23
|
export interface SessionStore {
|
|
23
24
|
acquire(sessionId?: string, opts?: {
|
|
24
25
|
requireExisting?: boolean;
|
|
@@ -29,7 +30,7 @@ export interface SessionStore {
|
|
|
29
30
|
pin?(sessionId: string): void | Promise<void>;
|
|
30
31
|
unpin?(sessionId: string): void | Promise<void>;
|
|
31
32
|
noteTaskRun?(sessionId: string, taskId: string): void | Promise<void>;
|
|
32
|
-
list?(): Promise<
|
|
33
|
+
list?(): Promise<SessionStoreSummary[]>;
|
|
33
34
|
fork?(sourceId: string, owner?: string | null): Promise<string | null>;
|
|
34
35
|
readonly size: number;
|
|
35
36
|
dispose(): void | Promise<void>;
|
package/dist/index.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ export { SAFETY_AXIS_VOCABULARY } from "./core/safety-axis-vocab.js";
|
|
|
44
44
|
export { createSessionRulePolicy } from "./core/runner/session-rule-policy.js";
|
|
45
45
|
export { TtlSessionStore, type TtlSessionStoreOptions, type EvictPolicy } from "./core/session-store.js";
|
|
46
46
|
export { reconcileInterruptedSession, findOrphanToolCalls, type OrphanToolCall, type ReconcileReport, } from "./core/session-reconcile.js";
|
|
47
|
-
export { StoredSession, InMemorySessionRepo, InMemorySessionStorage, BaseSessionStorage, leafIdAfterEntry, validateEntriesForImport, StreamingImportValidator, boundedTail, SessionError, isSessionConflict, hasSessionFork, uuidv7, type Session, type SessionStore, type AcquiredSession, type SessionSummary, type SessionStorage, type SessionRepo, type SessionMetadata, type SessionTreeEntry, type SessionWriteOptions, } from "./core/session.js";
|
|
47
|
+
export { StoredSession, InMemorySessionRepo, InMemorySessionStorage, BaseSessionStorage, leafIdAfterEntry, validateEntriesForImport, StreamingImportValidator, boundedTail, SessionError, isSessionConflict, hasSessionFork, uuidv7, type Session, type SessionStore, type AcquiredSession, type SessionStoreSummary, type SessionSummary, type SessionStorage, type SessionRepo, type SessionMetadata, type SessionTreeEntry, type SessionWriteOptions, } from "./core/session.js";
|
|
48
48
|
export { warmResume } from "./core/warm-resume.js";
|
|
49
49
|
export { StubExecutionEnv } from "./core/stub-env.js";
|
|
50
50
|
export { NodeExecutionEnv, FileError, ExecutionError } from "./internal/harness.js";
|