@ai-ecoverse/slicc-agent 7.14.1 → 7.14.3

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,7 +1,8 @@
1
1
  import { type Context, type Host, type Readable, type ReplicatedState } from '@earendil-works/chord';
2
2
  import type { ConversationView } from '@earendil-works/pi-durable';
3
3
  import type { Agent } from './agent.ts';
4
- import { type ApprovalJudge, type Approvals, type Decider } from './approvals/index.ts';
4
+ import { type ApprovalJudge, type Approvals, type Attendance, type Decider } from './approvals/index.ts';
5
+ import { type ApprovalPolicies } from './approvals/policy.ts';
5
6
  import { type AgentSudo } from './approvals/sudo.ts';
6
7
  import type { ChangesRuntime } from './changes/index.ts';
7
8
  import { type HostLicks, type HostScoops } from './control.ts';
@@ -54,7 +55,20 @@ export interface HostSecrets {
54
55
  list(): SecretListing;
55
56
  close?(): void;
56
57
  }
57
- export declare function hostAgent(agent: Agent, options?: {
58
+ type ApprovalOptions = {
59
+ approvals?: Approvals;
60
+ judge?: ApprovalJudge;
61
+ intent?: ScoopReviewHost['intent'];
62
+ approvalMs?: number;
63
+ };
64
+ export declare function approvalsOf(agent: Agent, policy: ApprovalPolicies, options: ApprovalOptions, context: Context): Promise<{
65
+ approvals: Approvals;
66
+ serving: {
67
+ decide: (by: Decider) => AgentControl['decide'];
68
+ owners: Attendance;
69
+ };
70
+ }>;
71
+ export type HostOptions = {
58
72
  serverId?: string;
59
73
  context?: Context;
60
74
  settings?: AgentSettings;
@@ -73,11 +87,8 @@ export declare function hostAgent(agent: Agent, options?: {
73
87
  uploads?: Uploads;
74
88
  thumbnail?: Thumbnail;
75
89
  labels?: LabelsRuntime;
76
- approvals?: Approvals;
77
- judge?: ApprovalJudge;
78
- intent?: ScoopReviewHost['intent'];
79
- approvalMs?: number;
80
- }): Promise<AgentHost>;
90
+ } & ApprovalOptions;
91
+ export declare function hostAgent(agent: Agent, options?: HostOptions): Promise<AgentHost>;
81
92
  interface Served {
82
93
  trusted: AgentControl;
83
94
  viewed: AgentControl;
@@ -93,6 +104,7 @@ interface Served {
93
104
  dispose(): void;
94
105
  } | undefined;
95
106
  decide: (by: Decider) => AgentControl['decide'];
107
+ owners?: Attendance;
96
108
  }
97
109
  export declare const CLOSED_TO_GUESTS = "a guest seat has only its transcript and propose";
98
110
  export declare const openToGuests: <F extends object>(factory: F) => F;
@@ -1,8 +1,8 @@
1
1
  export { ADOBE, ADOBE_PROXY, type AdobeConfig, type AdobeModelInfo, adobeClassifiers, adobeConfig, adobeIdentity, adobeModel, adobeProvider, adobeUsage, type Budget, SESSION_HEADER, VERSION_HEADER, withAdobeIdentity, } from './adobe.ts';
2
2
  export { type Agent, type AgentOptions, answerText, openAgent } from './agent.ts';
3
- export { APPROVAL_MS, type Approval, type ApprovalAnswer, type ApprovalDecided, type ApprovalDraft, type ApprovalJudge, type ApprovalKind, type ApprovalRequester, type ApprovalState, type Approvals, ApprovalsDoc, type ApprovalTier, type ApprovalVerdict, approvalJudge, attachApprovals, DEFAULT_POLICY, type DecidedBy, type Decider, JUDGE_ALLOW, JUDGE_DENY, JUDGE_KIND, JUDGE_MODEL, JUDGE_QUESTIONS, type Judgement, judgeModelOf, judgeSpender, judgeState, type OwnerIntent, ownerIntent, POLICY_FILE, REASONS, seedPolicy, VERDICT_REASONS, verdictOf, verdictRecorder, } from './approvals/index.ts';
3
+ export { APPROVAL_MS, type Approval, type ApprovalAnswer, type ApprovalDecided, type ApprovalDraft, type ApprovalJudge, type ApprovalKind, type ApprovalRequester, type ApprovalState, type Approvals, ApprovalsDoc, type ApprovalTier, type ApprovalVerdict, ASK_MIN_MS, approvalJudge, attachApprovals, DEFAULT_POLICY, type DecidedBy, type Decider, JUDGE_ALLOW, JUDGE_DENY, JUDGE_KIND, JUDGE_MODEL, JUDGE_QUESTIONS, type Judgement, judgeModelOf, judgeSpender, judgeState, type OwnerIntent, ownerIntent, POLICY_FILE, REASONS, routed, seedPolicy, VERDICT_REASONS, verdictOf, verdictRecorder, } from './approvals/index.ts';
4
4
  export { type ApprovalPolicy, type ApprovalPolicyChange, type ApprovalPolicySet, DEFAULT_APPROVAL_POLICY, type SudoPolicy, } from './approvals/policy.ts';
5
- export type { AgentSudo, SudoAnswer, SudoRequest } from './approvals/sudo.ts';
5
+ export type { AgentSudo, SudoAnswer, SudoDenial, SudoReply, SudoRequest, } from './approvals/sudo.ts';
6
6
  export { FILE_LIMIT, IMAGE_LIMIT, type SendAttachment, type ShownAttachment, splitUser, TOTAL_LIMIT, userParts, } from './attachments.ts';
7
7
  export { type AgentConnection, connectAgent } from './client.ts';
8
8
  export type { Clock } from './clock.ts';
@@ -1,4 +1,4 @@
1
- import type { SudoAnswer, SudoRequest } from './approvals/sudo.ts';
1
+ import type { SudoReply, SudoRequest } from './approvals/sudo.ts';
2
2
  import { type ApproveOptions } from './approvals/sudo-client.ts';
3
3
  import { type AgentConnection } from './client.ts';
4
4
  import { type KernelSource } from './kernel/users.ts';
@@ -20,7 +20,7 @@ export interface PortOptions {
20
20
  export interface AgentOwner {
21
21
  connect(options?: PortOptions): Promise<AgentConnection>;
22
22
  port(options?: PortOptions): Promise<PortEndpoint & Transferable>;
23
- approve(request: SudoRequest, options?: ApproveOptions): Promise<SudoAnswer>;
23
+ approve(request: SudoRequest, options?: ApproveOptions): Promise<SudoReply>;
24
24
  restart(): Promise<void>;
25
25
  release(): Promise<void>;
26
26
  }
@@ -1,5 +1,5 @@
1
- export type { SudoAnswer, SudoRequest } from './approvals/sudo.ts';
2
- export { type ApproveOptions, UNAVAILABLE } from './approvals/sudo-client.ts';
1
+ export type { SudoAnswer, SudoDenial, SudoReply, SudoRequest } from './approvals/sudo.ts';
2
+ export { type ApproveOptions, JUDGE_DENIED, UNAVAILABLE } from './approvals/sudo-client.ts';
3
3
  export { type AgentConnection, connectAgent } from './client.ts';
4
4
  export { connectGuest, GUEST_ONLY, type GuestConnection, SEAT_REFUSED, } from './guests/client.ts';
5
5
  export { type ByteSink, bridgePort, encodeFrame, FrameReader, type LinkEnd, linkEndpoint, MAX_FRAME, } from './link.ts';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-agent",
3
- "version": "7.14.1",
3
+ "version": "7.14.3",
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",
@@ -75,7 +75,7 @@
75
75
  "@ai-ecoverse/slicc-kernel": "1.171.0",
76
76
  "@ai-ecoverse/slicc-scrub": "1.1.0",
77
77
  "@ai-ecoverse/slicc-shared-web": "2.13.10",
78
- "@ai-ecoverse/slicc-spectrum": "1.108.4",
78
+ "@ai-ecoverse/slicc-spectrum": "1.108.5",
79
79
  "@ai-ecoverse/wasi-fnox": "1.43.0-1",
80
80
  "@ai-ecoverse/wasm-bash": "5.3.0-23",
81
81
  "@ai-ecoverse/wasm-coreutils": "9.12.0-15",