@ai-ecoverse/slicc-agent 4.2.0 → 4.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 +9 -1
- package/dist/client.js +5 -2
- package/dist/client.js.map +2 -2
- package/dist/control.js +3 -2
- package/dist/control.js.map +2 -2
- package/dist/host.js +21 -9
- package/dist/host.js.map +3 -3
- package/dist/main.js +24 -10
- package/dist/main.js.map +2 -2
- package/dist/readonly.js +9 -2
- package/dist/readonly.js.map +2 -2
- package/dist/secrets/legacy.js +112 -0
- package/dist/secrets/legacy.js.map +7 -0
- package/dist/services.js.map +2 -2
- package/dist/settings.js +8 -2
- package/dist/settings.js.map +2 -2
- package/dist/spectrum/agent-port.js +31 -8
- package/dist/spectrum/agent-port.js.map +2 -2
- package/dist/spectrum/index.js +6 -0
- package/dist/spectrum/index.js.map +3 -3
- package/dist/spectrum/messages.js +18 -4
- package/dist/spectrum/messages.js.map +2 -2
- package/dist/spectrum/notices-port.js +42 -0
- package/dist/spectrum/notices-port.js.map +7 -0
- package/dist/titles/cluster.js +61 -0
- package/dist/titles/cluster.js.map +7 -0
- package/dist/titles/generate.js +33 -13
- package/dist/titles/generate.js.map +2 -2
- package/dist/titles/labels.js +218 -0
- package/dist/titles/labels.js.map +7 -0
- package/dist/titles/shown.js +12 -0
- package/dist/titles/shown.js.map +7 -0
- package/dist/types/client.d.ts +1 -0
- package/dist/types/control.d.ts +2 -1
- package/dist/types/host.d.ts +2 -0
- package/dist/types/secrets/legacy.d.ts +36 -0
- package/dist/types/services.d.ts +4 -0
- package/dist/types/settings.d.ts +2 -0
- package/dist/types/spectrum/agent-port.d.ts +1 -0
- package/dist/types/spectrum/index.d.ts +3 -0
- package/dist/types/spectrum/messages.d.ts +2 -0
- package/dist/types/spectrum/notices-port.d.ts +15 -0
- package/dist/types/titles/cluster.d.ts +15 -0
- package/dist/types/titles/generate.d.ts +13 -1
- package/dist/types/titles/labels.d.ts +33 -0
- package/dist/types/titles/shown.d.ts +2 -0
- package/package.json +4 -4
|
@@ -36,6 +36,8 @@ interface ModelMessage {
|
|
|
36
36
|
}
|
|
37
37
|
export declare function textOf(content: ModelMessage['content']): string;
|
|
38
38
|
export declare function fromPatch(patch: string): ToolCall['diff'];
|
|
39
|
+
export declare const CONNECT_IT = "Connect it in Settings \u203A Accounts.";
|
|
40
|
+
export declare function providerName(provider: string | undefined, fallback?: string): string;
|
|
39
41
|
export declare function errorPart(error: string, provider?: string): MessagePart;
|
|
40
42
|
export declare function errorAction(message: string): ErrorAction;
|
|
41
43
|
export declare function assistant(id: string, message: ModelMessage, status?: AssistantStatus): AssistantMessage;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Notice, NoticesPort } from '@ai-ecoverse/slicc-spectrum/ui';
|
|
2
|
+
import type { AgentSettings } from '../services.ts';
|
|
3
|
+
import { type Report } from './attempt.ts';
|
|
4
|
+
import { Emitter } from './emitter.ts';
|
|
5
|
+
export declare const KEYS_MOVED = "keys-moved";
|
|
6
|
+
export declare function movedNotice(accounts: readonly string[]): Notice;
|
|
7
|
+
export declare class NoticesAdapter extends Emitter<{
|
|
8
|
+
notices: readonly Notice[];
|
|
9
|
+
}> implements NoticesPort {
|
|
10
|
+
#private;
|
|
11
|
+
constructor(settings: AgentSettings, report: Report);
|
|
12
|
+
list(): readonly Notice[];
|
|
13
|
+
act(): Promise<void>;
|
|
14
|
+
dismiss(id: string): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ConversationView, EntryRecord } from '@earendil-works/pi-durable';
|
|
2
|
+
export type Run = {
|
|
3
|
+
name: string;
|
|
4
|
+
input: string;
|
|
5
|
+
output: string;
|
|
6
|
+
done: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type Cluster = {
|
|
9
|
+
runs: Run[];
|
|
10
|
+
at: number;
|
|
11
|
+
settled: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare function callIdsOf(views: readonly ConversationView[]): Set<string>;
|
|
14
|
+
export declare function clusterOf(entries: readonly EntryRecord[], callIds: readonly string[]): Cluster | undefined;
|
|
15
|
+
export declare function describe(runs: readonly Run[]): string;
|
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
import type { Context } from '@earendil-works/chord';
|
|
2
|
+
import type { AssistantMessage } from '@earendil-works/pi-ai';
|
|
2
3
|
import type { Models } from '@earendil-works/pi-ai/models';
|
|
3
4
|
import type { EntryRecord } from '@earendil-works/pi-durable';
|
|
4
5
|
import type { ExecutionEnv } from '@earendil-works/pi-durable/env';
|
|
5
6
|
export declare const TITLE_PROMPT = "Give this chat a title of three to six words that says what it is about, in the language the user writes in. Answer with the title only, without quotes.";
|
|
7
|
+
export declare const LABEL_PROMPT = "Label this group of tool runs in three to eight words, as an imperative that says what they do, such as \"Check the failing build logs\". Answer with the label only, without quotes.";
|
|
6
8
|
export declare const TRANSCRIPT_LENGTH = 4000;
|
|
7
9
|
export declare function titlesOn(text: string | undefined): boolean;
|
|
10
|
+
export declare function labelsOn(text: string | undefined): boolean;
|
|
8
11
|
export declare function settingsText(env: Pick<ExecutionEnv, 'readTextFile'>, home: string, dir?: string): (context: Context) => Promise<string | undefined>;
|
|
9
12
|
export declare function transcriptOf(entries: readonly EntryRecord[]): string;
|
|
13
|
+
export declare function scrubbed(raw: string): Promise<string>;
|
|
10
14
|
export declare function scrubTranscript(entries: readonly EntryRecord[]): Promise<string>;
|
|
11
|
-
|
|
15
|
+
type Settings = (context: Context) => Promise<string | undefined>;
|
|
16
|
+
export type Asked = {
|
|
17
|
+
text: string;
|
|
18
|
+
answer: AssistantMessage;
|
|
19
|
+
};
|
|
20
|
+
export declare function titler(models: Models, settings: Settings): (transcript: string, model: string, context: Context) => Promise<string | undefined>;
|
|
21
|
+
export declare function labeler(models: Models, settings: Settings): (transcript: string, model: string, context: Context, admit?: () => boolean) => Promise<Asked | undefined>;
|
|
22
|
+
export type Labeler = ReturnType<typeof labeler>;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type Context, type ReplicatedState } from '@earendil-works/chord';
|
|
2
|
+
import { type ConversationView, type Harness } from '@earendil-works/pi-durable';
|
|
3
|
+
import type { Agents } from '../agents.ts';
|
|
4
|
+
import type { VaultState } from '../secrets/vault.ts';
|
|
5
|
+
import { type Labeler } from './generate.ts';
|
|
6
|
+
export type LabelsState = {
|
|
7
|
+
labels: Record<string, string>;
|
|
8
|
+
};
|
|
9
|
+
export declare const LabelsDoc: import("@earendil-works/pi-durable").SessionDocToken<LabelsState>;
|
|
10
|
+
export declare const LABELS_KEPT = 500;
|
|
11
|
+
export declare const LABELS_PER_MINUTE = 6;
|
|
12
|
+
export declare const LABEL_WAIT_MS = 30000;
|
|
13
|
+
export declare function visibleLabels(labels: ReplicatedState<Record<string, string>>, sources: readonly ReplicatedState<unknown>[], views: () => readonly ConversationView[]): {
|
|
14
|
+
state: import("@earendil-works/chord").MutableReplicatedState<Record<string, string>>;
|
|
15
|
+
dispose(): void;
|
|
16
|
+
};
|
|
17
|
+
export declare function watchLabel(labels: ReplicatedState<Record<string, string>>, waitMs?: number): (_agentId: string, callIds: readonly string[]) => Promise<string | null>;
|
|
18
|
+
export declare function cleanLabel(text: string): string;
|
|
19
|
+
export interface LabelsAttach {
|
|
20
|
+
harness: Pick<Harness, 'commit'>;
|
|
21
|
+
agents: Pick<Agents, 'conversation'>;
|
|
22
|
+
label: Labeler;
|
|
23
|
+
vault?: Pick<ReplicatedState<VaultState>, 'value'>;
|
|
24
|
+
now?: () => number;
|
|
25
|
+
perMinute?: number;
|
|
26
|
+
pollMs?: number;
|
|
27
|
+
settleMs?: number;
|
|
28
|
+
}
|
|
29
|
+
export interface LabelsRuntime {
|
|
30
|
+
labels: ReplicatedState<Record<string, string>>;
|
|
31
|
+
label(agentId: string, callIds: readonly string[], context: Context): Promise<string | null>;
|
|
32
|
+
}
|
|
33
|
+
export declare function attachLabels(options: LabelsAttach, context?: Context): Promise<LabelsRuntime>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc-agent",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.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",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@ai-ecoverse/slicc-kernel": "1.47.1",
|
|
65
65
|
"@ai-ecoverse/slicc-scrub": "1.0.0",
|
|
66
|
-
"@ai-ecoverse/slicc-shared-web": "1.
|
|
67
|
-
"@ai-ecoverse/slicc-spectrum": "1.
|
|
66
|
+
"@ai-ecoverse/slicc-shared-web": "1.14.0",
|
|
67
|
+
"@ai-ecoverse/slicc-spectrum": "1.72.0",
|
|
68
68
|
"@ai-ecoverse/wasm-bash": "5.3.0-18",
|
|
69
69
|
"@ai-ecoverse/wasm-coreutils": "9.12.0-5",
|
|
70
70
|
"@ai-ecoverse/wasm-git": "2.55.0-15",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"fake-indexeddb": "6.2.5",
|
|
75
75
|
"lefthook": "2.1.17",
|
|
76
76
|
"monocart-coverage-reports": "2.13.2",
|
|
77
|
-
"playwright-core": "1.
|
|
77
|
+
"playwright-core": "1.64.0",
|
|
78
78
|
"semantic-release": "25.0.9",
|
|
79
79
|
"typescript": "7.0.2"
|
|
80
80
|
},
|