@ai-ecoverse/slicc-agent 3.29.0 → 3.30.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.
- package/README.md +14 -2
- package/dist/client.js +4 -1
- package/dist/client.js.map +2 -2
- package/dist/host.js +28 -15
- package/dist/host.js.map +2 -2
- package/dist/page.js +4 -0
- package/dist/page.js.map +2 -2
- package/dist/remote/client.js +79 -0
- package/dist/remote/client.js.map +7 -0
- package/dist/remote/events.js +216 -0
- package/dist/remote/events.js.map +7 -0
- package/dist/remote/host.js +273 -0
- package/dist/remote/host.js.map +7 -0
- package/dist/scoops/index.js +18 -2
- package/dist/scoops/index.js.map +2 -2
- package/dist/services.js +2 -0
- package/dist/services.js.map +2 -2
- package/dist/types/client.d.ts +2 -0
- package/dist/types/page.d.ts +1 -0
- package/dist/types/remote/client.d.ts +30 -0
- package/dist/types/remote/events.d.ts +83 -0
- package/dist/types/remote/host.d.ts +58 -0
- package/dist/types/scoops/index.d.ts +1 -0
- package/dist/types/services.d.ts +2 -0
- package/package.json +5 -5
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { AgentEvent, EntryRecord } from '@earendil-works/pi-durable';
|
|
2
|
+
import type { Delivered } from '../services.ts';
|
|
3
|
+
export declare const SUMMARY = 200;
|
|
4
|
+
export type EndReason = 'stop' | 'aborted' | 'error';
|
|
5
|
+
export type RemoteEvent = {
|
|
6
|
+
t: 'user';
|
|
7
|
+
id: string;
|
|
8
|
+
text: string;
|
|
9
|
+
delivered: Delivered;
|
|
10
|
+
} | {
|
|
11
|
+
t: 'text';
|
|
12
|
+
id: string;
|
|
13
|
+
delta: string;
|
|
14
|
+
} | {
|
|
15
|
+
t: 'thinking';
|
|
16
|
+
id: string;
|
|
17
|
+
delta: string;
|
|
18
|
+
} | {
|
|
19
|
+
t: 'tool';
|
|
20
|
+
id: string;
|
|
21
|
+
call: string;
|
|
22
|
+
name: string;
|
|
23
|
+
summary: string;
|
|
24
|
+
} | {
|
|
25
|
+
t: 'tool-result';
|
|
26
|
+
id: string;
|
|
27
|
+
call: string;
|
|
28
|
+
ok: boolean;
|
|
29
|
+
summary: string;
|
|
30
|
+
} | {
|
|
31
|
+
t: 'run';
|
|
32
|
+
state: 'start' | 'end';
|
|
33
|
+
reason?: EndReason;
|
|
34
|
+
} | {
|
|
35
|
+
t: 'notice';
|
|
36
|
+
id: string;
|
|
37
|
+
text: string;
|
|
38
|
+
} | {
|
|
39
|
+
t: 'error';
|
|
40
|
+
id: string;
|
|
41
|
+
message: string;
|
|
42
|
+
detail?: string;
|
|
43
|
+
} | {
|
|
44
|
+
t: 'end';
|
|
45
|
+
reason: EndReason;
|
|
46
|
+
message?: string;
|
|
47
|
+
};
|
|
48
|
+
type Json = Record<string, unknown>;
|
|
49
|
+
interface Block {
|
|
50
|
+
type: string;
|
|
51
|
+
text?: string;
|
|
52
|
+
thinking?: string;
|
|
53
|
+
id?: string;
|
|
54
|
+
name?: string;
|
|
55
|
+
arguments?: Json;
|
|
56
|
+
}
|
|
57
|
+
interface ModelMessage {
|
|
58
|
+
role?: string;
|
|
59
|
+
content?: string | Block[];
|
|
60
|
+
timestamp?: number;
|
|
61
|
+
stopReason?: string;
|
|
62
|
+
errorMessage?: string;
|
|
63
|
+
toolCallId?: string;
|
|
64
|
+
toolName?: string;
|
|
65
|
+
isError?: boolean;
|
|
66
|
+
}
|
|
67
|
+
export declare function clip(text: string, limit?: number): string;
|
|
68
|
+
export declare function toolSummary(name: string, args: Json | undefined): string;
|
|
69
|
+
export declare function resultSummary(message: ModelMessage): string;
|
|
70
|
+
export declare function keyOf(timestamp: number | undefined, at: number): string;
|
|
71
|
+
export declare class Mapper {
|
|
72
|
+
#private;
|
|
73
|
+
reason: EndReason;
|
|
74
|
+
error: string | undefined;
|
|
75
|
+
constructor(thinking: boolean);
|
|
76
|
+
partial(message: ModelMessage | undefined): RemoteEvent[];
|
|
77
|
+
entry(entry: EntryRecord, delivered?: Delivered): RemoteEvent[];
|
|
78
|
+
last(): number;
|
|
79
|
+
event(event: AgentEvent): RemoteEvent[];
|
|
80
|
+
}
|
|
81
|
+
export declare function replayOf(entries: readonly EntryRecord[], partial: ModelMessage | undefined, thinking: boolean): RemoteEvent[];
|
|
82
|
+
export declare function idOf(event: RemoteEvent): string | undefined;
|
|
83
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { Context } from '@earendil-works/chord';
|
|
2
|
+
import { type AgentEvent, type Conversation, type EntryRecord, type Harness, type SnapshotEvent, type SubmissionId } from '@earendil-works/pi-durable';
|
|
3
|
+
import type { Delivered, SendMode, SendRequest, SendResponse } from '../services.ts';
|
|
4
|
+
import { Mapper, type RemoteEvent } from './events.ts';
|
|
5
|
+
export declare const MAX_QUEUED = 10000;
|
|
6
|
+
export declare const IDLE_MS = 120000;
|
|
7
|
+
export type RemoteOpened = {
|
|
8
|
+
ok: true;
|
|
9
|
+
stream: string;
|
|
10
|
+
delivered: Delivered | null;
|
|
11
|
+
head: string | null;
|
|
12
|
+
gap: boolean;
|
|
13
|
+
} | {
|
|
14
|
+
ok: false;
|
|
15
|
+
code: string;
|
|
16
|
+
message: string;
|
|
17
|
+
};
|
|
18
|
+
export interface RemoteBatch {
|
|
19
|
+
events: RemoteEvent[];
|
|
20
|
+
done: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface AgentRemote {
|
|
23
|
+
prompt(request: {
|
|
24
|
+
agentId: string | null;
|
|
25
|
+
text: string;
|
|
26
|
+
whenBusy: SendMode;
|
|
27
|
+
thinking: boolean;
|
|
28
|
+
}, context: Context): Promise<RemoteOpened>;
|
|
29
|
+
watch(request: {
|
|
30
|
+
agentId: string | null;
|
|
31
|
+
since: string | null;
|
|
32
|
+
thinking: boolean;
|
|
33
|
+
}, context: Context): Promise<RemoteOpened>;
|
|
34
|
+
next(stream: string, waitMs: number, context: Context): Promise<RemoteBatch>;
|
|
35
|
+
close(stream: string, context: Context): Promise<void>;
|
|
36
|
+
abort(agentId: string | null, context: Context): Promise<{
|
|
37
|
+
aborted: boolean;
|
|
38
|
+
}>;
|
|
39
|
+
}
|
|
40
|
+
export interface RemoteHost {
|
|
41
|
+
harness: Harness;
|
|
42
|
+
conversation(agentId: string | null, context: Context): Promise<Conversation>;
|
|
43
|
+
send(request: SendRequest, context: Context): Promise<SendResponse>;
|
|
44
|
+
now?: () => number;
|
|
45
|
+
limit?: number;
|
|
46
|
+
sweepMs?: number;
|
|
47
|
+
}
|
|
48
|
+
export declare function followed(mapper: Mapper, event: AgentEvent): RemoteEvent[];
|
|
49
|
+
export declare function resync(mapper: Mapper, snapshot: SnapshotEvent): RemoteEvent[];
|
|
50
|
+
export declare class Follower {
|
|
51
|
+
#private;
|
|
52
|
+
constructor(mapper: Mapper, entries: readonly EntryRecord[], submission: SubmissionId, delivered: Delivered, record: unknown);
|
|
53
|
+
drain(): RemoteEvent[];
|
|
54
|
+
take(batch: readonly AgentEvent[]): boolean;
|
|
55
|
+
}
|
|
56
|
+
export declare function createRemote(host: RemoteHost): AgentRemote & {
|
|
57
|
+
dispose(): Promise<void>;
|
|
58
|
+
};
|
|
@@ -40,5 +40,6 @@ export interface ScoopsSetup {
|
|
|
40
40
|
attach(options: AttachOptions, context: Context): Promise<ScoopsRuntime>;
|
|
41
41
|
}
|
|
42
42
|
export declare const COMMANDS: string[];
|
|
43
|
+
export declare function pnpmHomeOf(env: ExecutionEnv, context: Context): Promise<string>;
|
|
43
44
|
export declare function setupScoops(registry: Registry, licks: Licks, fileTools?: readonly ToolRegistration[]): ScoopsSetup;
|
|
44
45
|
export type { Rewound, Scoops } from './service.ts';
|
package/dist/types/services.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { ConversationView } from '@earendil-works/pi-durable';
|
|
|
3
3
|
import type { ChangesView } from './changes/git.ts';
|
|
4
4
|
import type { FrozenCone } from './freezer/index.ts';
|
|
5
5
|
import type { MemoryEntry, MemoryScope, MemoryTag } from './memory/format.ts';
|
|
6
|
+
import type { AgentRemote } from './remote/host.ts';
|
|
6
7
|
import type { Sprinkle } from './sprinkles/kind.ts';
|
|
7
8
|
export type SendMode = 'steer' | 'followUp' | 'reject';
|
|
8
9
|
export interface SendRequest {
|
|
@@ -161,6 +162,7 @@ export interface AgentSessions {
|
|
|
161
162
|
detach(context: Context): Promise<void>;
|
|
162
163
|
}
|
|
163
164
|
export declare const AgentSessions: import("@earendil-works/chord").Service<AgentSessions>;
|
|
165
|
+
export declare const AgentRemoteService: import("@earendil-works/chord").Service<AgentRemote>;
|
|
164
166
|
export declare const AGENT_SESSION = "agent";
|
|
165
167
|
export interface ModelChoice {
|
|
166
168
|
id: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc-agent",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.30.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",
|
|
@@ -62,11 +62,11 @@
|
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@ai-ecoverse/slicc-kernel": "1.26.3",
|
|
65
|
-
"@ai-ecoverse/slicc-shared-web": "1.12.
|
|
66
|
-
"@ai-ecoverse/slicc-spectrum": "1.
|
|
67
|
-
"@ai-ecoverse/wasm-bash": "5.3.0-
|
|
65
|
+
"@ai-ecoverse/slicc-shared-web": "1.12.1",
|
|
66
|
+
"@ai-ecoverse/slicc-spectrum": "1.48.0",
|
|
67
|
+
"@ai-ecoverse/wasm-bash": "5.3.0-17",
|
|
68
68
|
"@ai-ecoverse/wasm-coreutils": "9.7.0-3",
|
|
69
|
-
"@ai-ecoverse/wasm-git": "2.55.0-
|
|
69
|
+
"@ai-ecoverse/wasm-git": "2.55.0-13",
|
|
70
70
|
"@biomejs/biome": "2.5.15",
|
|
71
71
|
"@types/node": "24.19.1",
|
|
72
72
|
"esbuild": "0.28.2",
|