@ai-ecoverse/slicc-agent 5.7.0 → 5.8.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,5 +1,32 @@
1
1
  import { type Extension, type Harness } from '@earendil-works/pi-durable';
2
+ import type { Approval, Approvals } from '../approvals/index.ts';
3
+ import { type GuestPolicy } from './policy.ts';
2
4
  export declare const GUEST_GUARD = "slicc-guest-guard";
3
5
  export declare const GUEST_REQUEST = "guest:";
4
- export declare const GUEST_TOOLS_BLOCKED = "Tool calls in a run a guest started need a review, which this agent can't do yet.";
5
- export declare function guestGuard(harness: () => Pick<Harness, 'submission'> | undefined): Extension;
6
+ export declare const GUEST_TOOL_MEMO = "slicc.guest-tool";
7
+ export declare const SUMMARY_LENGTH = 2000;
8
+ export declare const GATE_REASONS: {
9
+ readonly unknown: 'A guest started this run, and its seat names no review for tool calls that this agent knows.';
10
+ readonly ended: "A guest started this run, and that guest's seat has ended.";
11
+ readonly rejected: 'The owner declined this tool call in a run a guest started.';
12
+ readonly judged: 'The automatic check declined this tool call in a run a guest started';
13
+ readonly unanswered: 'Nobody approved this tool call in a run a guest started in time.';
14
+ readonly unroutable: "The cone can't review a tool call it is itself waiting on.";
15
+ readonly scoop: "No scoop can review a guest's tool call yet, so this one is denied.";
16
+ readonly withdrawn: 'The review of this tool call was withdrawn.';
17
+ };
18
+ export interface GateHost {
19
+ approvals: Pick<Approvals, 'state' | 'request' | 'settled' | 'withdraw'>;
20
+ policy(): GuestPolicy;
21
+ now?: () => number;
22
+ }
23
+ export interface GuestToolGate {
24
+ readonly extension: Extension;
25
+ bind(host: GateHost): void;
26
+ }
27
+ type Held = Pick<Harness, 'submission' | 'commit' | 'waitForTask'>;
28
+ export declare function canonical(value: unknown): string;
29
+ export declare function summaryOf(args: Record<string, unknown>): string;
30
+ export declare function reasonOf(item: Approval): string;
31
+ export declare function guestToolGate(harness: () => Held | undefined): GuestToolGate;
32
+ export {};
@@ -39,6 +39,9 @@ export interface Guests {
39
39
  revoke(id: string, context: Context): Promise<{
40
40
  revoked: boolean;
41
41
  }>;
42
+ forgetAlways(id: string, approval: string, context: Context): Promise<{
43
+ removed: boolean;
44
+ }>;
42
45
  admit(id: string, label: string): GuestPrincipal | null;
43
46
  record(id: string): SeatRecord | undefined;
44
47
  current(guest: GuestPrincipal): SeatRecord | undefined;
@@ -17,6 +17,13 @@ export type SeatSubmission = {
17
17
  approval: string | null;
18
18
  tools: GuestGate;
19
19
  };
20
+ export type AlwaysTool = {
21
+ approval: string;
22
+ tool: string;
23
+ arguments: string;
24
+ by: DecidedBy | null;
25
+ at: number;
26
+ };
20
27
  export type SeatRecord = GuestDraft & {
21
28
  createdAt: number;
22
29
  epoch: number;
@@ -28,6 +35,7 @@ export type SeatRecord = GuestDraft & {
28
35
  approval: string;
29
36
  at: number;
30
37
  };
38
+ alwaysTools?: AlwaysTool[];
31
39
  };
32
40
  export interface GuestSeat {
33
41
  id: string;
@@ -38,6 +46,7 @@ export interface GuestSeat {
38
46
  gates: GuestGates;
39
47
  connected: boolean;
40
48
  pending: number;
49
+ alwaysTools: AlwaysTool[];
41
50
  }
42
51
  export type GuestsState = {
43
52
  seats: Record<string, SeatRecord>;
@@ -95,6 +95,9 @@ export interface AgentControl {
95
95
  guestRevoke(id: string, context: Context): Promise<{
96
96
  revoked: boolean;
97
97
  }>;
98
+ guestAlwaysForget(seat: string, approval: string, context: Context): Promise<{
99
+ removed: boolean;
100
+ }>;
98
101
  approvalPolicySet(change: ApprovalPolicyChange, context: Context): Promise<ApprovalPolicySet>;
99
102
  decide(id: string, decision: ApprovalAnswer, reason: string | null, context: Context): Promise<ApprovalDecided>;
100
103
  }
@@ -241,7 +244,7 @@ export interface AgentSettingsChange {
241
244
  thinkingLevel: 'off' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | null;
242
245
  agentId?: string | null;
243
246
  }
244
- export declare const CONTROL_METHODS: ("abort" | "agentCommands" | "approvalPolicySet" | "changeAccept" | "changeRevert" | "changesOpen" | "compact" | "compactAgent" | "configure" | "createCone" | "createScoop" | "decide" | "discard" | "drop" | "freeze" | "guestOpen" | "guestRevoke" | "image" | "memoryRemove" | "memorySave" | "monitorClose" | "monitorOpen" | "newChat" | "reset" | "resolveAgentLick" | "resolveLick" | "rewind" | "rewindAgent" | "selectCone" | "send" | "sprinkleCall" | "sprinkleSend" | "stopAgent" | "thaw" | "toolLabel" | "unqueue" | "wait" | "webhook" | "withdraw")[];
247
+ export declare const CONTROL_METHODS: ("abort" | "agentCommands" | "approvalPolicySet" | "changeAccept" | "changeRevert" | "changesOpen" | "compact" | "compactAgent" | "configure" | "createCone" | "createScoop" | "decide" | "discard" | "drop" | "freeze" | "guestAlwaysForget" | "guestOpen" | "guestRevoke" | "image" | "memoryRemove" | "memorySave" | "monitorClose" | "monitorOpen" | "newChat" | "reset" | "resolveAgentLick" | "resolveLick" | "rewind" | "rewindAgent" | "selectCone" | "send" | "sprinkleCall" | "sprinkleSend" | "stopAgent" | "thaw" | "toolLabel" | "unqueue" | "wait" | "webhook" | "withdraw")[];
245
248
  export declare const OWNER_DEVICE_METHODS: readonly (keyof AgentControl & string)[];
246
249
  export declare const CONTROL_READS: readonly (keyof AgentControl & string)[];
247
250
  export declare const AgentControl: RemoteContract;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-agent",
3
- "version": "5.7.0",
3
+ "version": "5.8.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",
@@ -65,8 +65,8 @@
65
65
  "devDependencies": {
66
66
  "@ai-ecoverse/slicc-kernel": "1.100.3",
67
67
  "@ai-ecoverse/slicc-scrub": "1.0.0",
68
- "@ai-ecoverse/slicc-shared-web": "1.21.0",
69
- "@ai-ecoverse/slicc-spectrum": "1.81.0",
68
+ "@ai-ecoverse/slicc-shared-web": "1.21.1",
69
+ "@ai-ecoverse/slicc-spectrum": "1.83.0",
70
70
  "@ai-ecoverse/wasm-bash": "5.3.0-18",
71
71
  "@ai-ecoverse/wasm-coreutils": "9.12.0-7",
72
72
  "@ai-ecoverse/wasm-git": "2.55.0-15",
@@ -81,7 +81,7 @@
81
81
  "typescript": "7.0.2"
82
82
  },
83
83
  "dependencies": {
84
- "@ai-ecoverse/slicc-browsers": "1.7.3",
84
+ "@ai-ecoverse/slicc-browsers": "1.7.5",
85
85
  "@ai-ecoverse/slicc-vault": "1.9.1",
86
86
  "@earendil-works/chord": "1.2.0",
87
87
  "@earendil-works/pi-ai": "1.3.0",