@ai-ecoverse/slicc-agent 7.19.0 → 7.20.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.
@@ -9,6 +9,7 @@ import type { ImportProgress, ImportResult } from './freezer/v6.ts';
9
9
  import type { GuestOpened, Proposed, ProposeRequest } from './guests/index.ts';
10
10
  import type { GuestDraft, GuestGates, GuestSeat } from './guests/seats.ts';
11
11
  import type { MemoryEntry, MemoryScope, MemoryTag } from './memory/format.ts';
12
+ import type { EntriesPage, EntriesRequest } from './remote/history.ts';
12
13
  import type { AgentRemote } from './remote/host.ts';
13
14
  import type { VaultState } from './secrets/vault.ts';
14
15
  import type { DeviceSignIn } from './sign-ins.ts';
@@ -96,6 +97,7 @@ export interface AgentControl {
96
97
  image(ref: ImageRef, context: Context): Promise<StoredImage>;
97
98
  agentCommands(agentId: string, context: Context): Promise<Command[]>;
98
99
  toolLabel(agentId: string, callIds: string[], context: Context): Promise<string | null>;
100
+ entries(request: EntriesRequest, context: Context): Promise<EntriesPage>;
99
101
  guestOpen(draft: GuestDraft, context: Context): Promise<GuestOpened>;
100
102
  guestRevoke(id: string, context: Context): Promise<{
101
103
  revoked: boolean;
@@ -276,7 +278,7 @@ export interface AgentSettingsChange {
276
278
  thinkingLevel: 'off' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | null;
277
279
  agentId?: string | null;
278
280
  }
279
- export declare const CONTROL_METHODS: ("abort" | "agentCommands" | "approvalPolicySet" | "changeAccept" | "changeRevert" | "changesOpen" | "compact" | "compactAgent" | "configure" | "createCone" | "createScoop" | "decide" | "discard" | "drop" | "freeze" | "guestAlwaysForget" | "guestOpen" | "guestRevoke" | "image" | "importCancel" | "importProfile" | "memoryRemove" | "memorySave" | "monitorClose" | "monitorOpen" | "newChat" | "reset" | "resolveAgentLick" | "resolveLick" | "rewind" | "rewindAgent" | "selectCone" | "send" | "sprinkleCall" | "sprinkleSend" | "stopAgent" | "thaw" | "toolLabel" | "unqueue" | "wait" | "webhook" | "withdraw")[];
281
+ export declare const CONTROL_METHODS: ("abort" | "agentCommands" | "approvalPolicySet" | "changeAccept" | "changeRevert" | "changesOpen" | "compact" | "compactAgent" | "configure" | "createCone" | "createScoop" | "decide" | "discard" | "drop" | "entries" | "freeze" | "guestAlwaysForget" | "guestOpen" | "guestRevoke" | "image" | "importCancel" | "importProfile" | "memoryRemove" | "memorySave" | "monitorClose" | "monitorOpen" | "newChat" | "reset" | "resolveAgentLick" | "resolveLick" | "rewind" | "rewindAgent" | "selectCone" | "send" | "sprinkleCall" | "sprinkleSend" | "stopAgent" | "thaw" | "toolLabel" | "unqueue" | "wait" | "webhook" | "withdraw")[];
280
282
  export declare const OWNER_DEVICE_METHODS: readonly (keyof AgentControl & string)[];
281
283
  export declare const CONTROL_READS: readonly (keyof AgentControl & string)[];
282
284
  export declare const AgentControl: RemoteContract;
@@ -313,7 +315,7 @@ export interface Command {
313
315
  }
314
316
  export declare const TRANSCRIPT_STATES: ("agents" | "approvalPolicy" | "approvals" | "changes" | "commands" | "deliveries" | "frozen" | "guests" | "importing" | "labels" | "memories" | "memoryScopes" | "monitor" | "privateRevision" | "sprinkles" | "state" | "vault" | "views")[];
315
317
  export declare const AgentTranscript: RemoteContract;
316
- export declare const REMOTE_METHODS: ("abort" | "close" | "next" | "prompt" | "watch")[];
318
+ export declare const REMOTE_METHODS: ("abort" | "close" | "history" | "next" | "prompt" | "watch")[];
317
319
  export declare const REMOTE_READS: readonly (keyof AgentRemote & string)[];
318
320
  export interface GuestShown {
319
321
  id: string;
@@ -42,4 +42,5 @@ export declare function plain(error: unknown): unknown;
42
42
  export type Root = <R>(run: (ctx: Ctx) => Promise<R>, options: {
43
43
  signal?: AbortSignal;
44
44
  }) => Promise<R>;
45
+ export declare function offers(handle: Remote, name: string): boolean;
45
46
  export declare function bound<T extends object>(handle: Remote, root: Root, names: readonly string[], absent: (name: string) => Callable): T;
@@ -5,6 +5,8 @@ import type { Command } from '../services.ts';
5
5
  import { Emitter } from './emitter.ts';
6
6
  import { type ShownImport } from './import-port.ts';
7
7
  export declare const CONE = "cone";
8
+ export declare const OLDER_PAGE = 100;
9
+ export declare const OLDER_PAGES = 40;
8
10
  export declare function slashCommand({ kind, ...command }: Command): SlashCommand;
9
11
  export type AgentHold = VaultHold;
10
12
  export type AgentAdapterEvents = AgentEvents & {
@@ -34,7 +36,8 @@ export declare class AgentAdapter extends Emitter<AgentAdapterEvents> implements
34
36
  freeze(agentId?: string): void;
35
37
  setModel(agentId: string, model: string): void;
36
38
  setThinking(agentId: string, level: Thinking): void;
37
- older(): Promise<readonly Message[]>;
39
+ hasOlder(agentId?: string): boolean;
40
+ older(agentId?: string, before?: string): Promise<readonly Message[]>;
38
41
  commands(agentId?: string): readonly SlashCommand[];
39
42
  createScoop(parentId: string, name: string): Agent;
40
43
  drop(agentId: string): Promise<void>;
@@ -0,0 +1,20 @@
1
+ import type { ConversationView, EntryRecord } from '@earendil-works/pi-durable';
2
+ export interface KeptQuery {
3
+ minEntryId?: number;
4
+ maxEntryId?: number;
5
+ order: 'ascending' | 'descending';
6
+ }
7
+ export type KeptLoader = (query: KeptQuery, limit: number) => Promise<{
8
+ entries: readonly EntryRecord[];
9
+ more: boolean;
10
+ }>;
11
+ export declare class Kept {
12
+ #private;
13
+ constructor(load: KeptLoader, size: number, cap?: number);
14
+ get entries(): readonly EntryRecord[];
15
+ get earlier(): boolean;
16
+ get gap(): boolean;
17
+ merge(view: ConversationView): readonly EntryRecord[];
18
+ loadEarlier(): Promise<void>;
19
+ fillGap(): Promise<void>;
20
+ }
@@ -1,6 +1,7 @@
1
- import type { ConversationView } from '@earendil-works/pi-durable';
1
+ import type { ConversationView, EntryRecord } from '@earendil-works/pi-durable';
2
2
  export declare const KEEP: number;
3
3
  export declare const THUMB_EDGE = 256;
4
+ export declare const THUMB_WAIT_MS = 2000;
4
5
  export interface Picture {
5
6
  data: string;
6
7
  mimeType: string;
@@ -13,7 +14,8 @@ export interface FullImage {
13
14
  export declare const thumbnail: Thumbnail;
14
15
  export interface Slimmer {
15
16
  slim(view: ConversationView): ConversationView;
17
+ entries(records: readonly EntryRecord[]): Promise<EntryRecord[]>;
16
18
  shown(entry: number): boolean;
17
19
  dispose(): void;
18
20
  }
19
- export declare function slimmer(make: Thumbnail, ready: () => void): Slimmer;
21
+ export declare function slimmer(make: Thumbnail, ready: () => void, waitMs?: number): Slimmer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-agent",
3
- "version": "7.19.0",
3
+ "version": "7.20.0",
4
4
  "description": "SLICC's agent core on pi durable: an agent worker, session storage, remoting and pi extensions",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -73,7 +73,7 @@
73
73
  },
74
74
  "devDependencies": {
75
75
  "@ai-ecoverse/slicc-jsh": "0.64.0",
76
- "@ai-ecoverse/slicc-kernel": "1.174.0",
76
+ "@ai-ecoverse/slicc-kernel": "1.174.1",
77
77
  "@ai-ecoverse/slicc-scrub": "1.1.0",
78
78
  "@ai-ecoverse/slicc-shared-web": "2.13.10",
79
79
  "@ai-ecoverse/slicc-spectrum": "1.112.1",