@ai-ecoverse/slicc-agent 7.29.1 → 7.30.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.
@@ -1,6 +1,6 @@
1
- import { type Context, type ReplicatedState } from '@earendil-works/chord';
1
+ import { type Context, type MutableReplicatedState, type ReplicatedState } from '@earendil-works/chord';
2
2
  import type { AssistantMessage } from '@earendil-works/pi-ai';
3
- import { type ConversationId, type ConversationView, type Harness, type Tx } from '@earendil-works/pi-durable';
3
+ import { type ConversationId, type ConversationView, type Harness, type LiveState, type Tx } from '@earendil-works/pi-durable';
4
4
  import type { Agents } from '../agents.ts';
5
5
  import type { VaultState } from '../secrets/vault.ts';
6
6
  import { type Labeler } from './generate.ts';
@@ -8,28 +8,38 @@ export type LabelsState = {
8
8
  labels: Record<string, string>;
9
9
  };
10
10
  export declare const LabelsDoc: import("@earendil-works/pi-durable").SessionDocToken<LabelsState>;
11
- export declare const LABELS_KEPT = 500;
11
+ export declare const LABELS_KEPT = 1000;
12
12
  export declare const LABELS_PER_MINUTE = 6;
13
+ export declare const STEP_LABELS_PER_MINUTE = 30;
14
+ export declare const STEP_WAITERS = 8;
15
+ export declare const STEP_WAITS_PER_MINUTE = 60;
16
+ export declare const STEP_WATCHERS = 32;
13
17
  export declare const LABEL_WAIT_MS = 30000;
14
18
  export declare function visibleLabels(labels: ReplicatedState<Record<string, string>>, sources: readonly ReplicatedState<unknown>[], views: () => readonly ConversationView[]): {
15
- state: import("@earendil-works/chord").MutableReplicatedState<Record<string, string>>;
19
+ state: MutableReplicatedState<Record<string, string>>;
16
20
  dispose(): void;
17
21
  };
18
22
  export declare function watchLabel(labels: ReplicatedState<Record<string, string>>, waitMs?: number): (_agentId: string, callIds: readonly string[]) => Promise<string | null>;
23
+ export declare function stepId(callId: unknown): callId is string;
24
+ export declare function watchStep(labels: ReplicatedState<Record<string, string>>, waitMs?: number): (agentId: string, callId: string) => Promise<string | null>;
19
25
  export declare function cleanLabel(text: string): string;
20
26
  export declare function spend(tx: Tx, conversation: ConversationId, answer: Pick<AssistantMessage, 'provider' | 'model' | 'usage'>): Promise<void>;
21
27
  export interface LabelsAttach {
22
- harness: Pick<Harness, 'commit'>;
28
+ harness: Pick<Harness, 'commit' | 'snapshot'>;
23
29
  agents: Pick<Agents, 'conversation'>;
24
30
  label: Labeler;
25
31
  vault?: Pick<ReplicatedState<VaultState>, 'value'>;
26
32
  now?: () => number;
27
33
  perMinute?: number;
34
+ stepsPerMinute?: number;
35
+ stepWaitMs?: number;
28
36
  pollMs?: number;
29
37
  settleMs?: number;
30
38
  }
31
39
  export interface LabelsRuntime {
32
40
  labels: ReplicatedState<Record<string, string>>;
33
41
  label(agentId: string, callIds: readonly string[], context: Context): Promise<string | null>;
42
+ step(agentId: string, callId: string, context: Context): Promise<string | null>;
34
43
  }
44
+ export declare function pendingIn(live: Readonly<LiveState> | undefined, callId: string): boolean;
35
45
  export declare function attachLabels(options: LabelsAttach, context?: Context): Promise<LabelsRuntime>;
@@ -1,2 +1,5 @@
1
1
  export declare function labelKey(callIds: readonly string[]): string;
2
+ export declare const STEP_KEY = "step:";
3
+ export declare function stepKey(callId: string): string;
4
+ export declare function callIdsOfKey(key: string): string[];
2
5
  export declare function shownLabel(labels: Readonly<Record<string, string>> | undefined, callIds: readonly string[]): string | null | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-agent",
3
- "version": "7.29.1",
3
+ "version": "7.30.1",
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",
@@ -72,12 +72,12 @@
72
72
  "release": "semantic-release"
73
73
  },
74
74
  "devDependencies": {
75
- "@ai-ecoverse/slicc-jsh": "0.64.0",
76
- "@ai-ecoverse/slicc-kernel": "1.178.4",
75
+ "@ai-ecoverse/slicc-jsh": "0.64.4",
76
+ "@ai-ecoverse/slicc-kernel": "1.179.0",
77
77
  "@ai-ecoverse/slicc-scrub": "1.1.0",
78
78
  "@ai-ecoverse/slicc-shared-web": "2.14.2",
79
- "@ai-ecoverse/slicc-spectrum": "2.11.4",
80
- "@ai-ecoverse/wasi-fnox": "1.46.0-2",
79
+ "@ai-ecoverse/slicc-spectrum": "2.12.0",
80
+ "@ai-ecoverse/wasi-fnox": "1.47.0-1",
81
81
  "@ai-ecoverse/wasm-bash": "5.3.0-23",
82
82
  "@ai-ecoverse/wasm-coreutils": "9.12.0-15",
83
83
  "@ai-ecoverse/wasm-git": "2.55.0-22",