@ai-ecoverse/slicc-agent 7.34.4 → 7.36.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.
Files changed (71) hide show
  1. package/README.md +27 -10
  2. package/dist/agent.js +4 -0
  3. package/dist/agent.js.map +2 -2
  4. package/dist/approvals/index.js +4 -1
  5. package/dist/approvals/index.js.map +2 -2
  6. package/dist/approvals/judge.js +2 -1
  7. package/dist/approvals/judge.js.map +2 -2
  8. package/dist/approvals/owner-tools.js +165 -0
  9. package/dist/approvals/owner-tools.js.map +7 -0
  10. package/dist/approvals/policy.js +22 -3
  11. package/dist/approvals/policy.js.map +2 -2
  12. package/dist/approvals/record.js +3 -1
  13. package/dist/approvals/record.js.map +2 -2
  14. package/dist/approvals/verdict-shown.js +19 -0
  15. package/dist/approvals/verdict-shown.js.map +7 -0
  16. package/dist/control.js.map +2 -2
  17. package/dist/freezer/v6.js +3 -2
  18. package/dist/freezer/v6.js.map +2 -2
  19. package/dist/guests/guard.js +12 -8
  20. package/dist/guests/guard.js.map +2 -2
  21. package/dist/host.js +15 -4
  22. package/dist/host.js.map +2 -2
  23. package/dist/index.js.map +2 -2
  24. package/dist/local.js +159 -0
  25. package/dist/local.js.map +7 -0
  26. package/dist/main.js +9 -3
  27. package/dist/main.js.map +2 -2
  28. package/dist/page.js.map +2 -2
  29. package/dist/providers.js +29 -1
  30. package/dist/providers.js.map +2 -2
  31. package/dist/readonly.js +8 -1
  32. package/dist/readonly.js.map +2 -2
  33. package/dist/remote/approvals.js +27 -0
  34. package/dist/remote/approvals.js.map +7 -0
  35. package/dist/remote/client.js +39 -13
  36. package/dist/remote/client.js.map +2 -2
  37. package/dist/remote/decide.js +23 -0
  38. package/dist/remote/decide.js.map +7 -0
  39. package/dist/remote/host.js.map +2 -2
  40. package/dist/secrets/credentials.js +4 -2
  41. package/dist/secrets/credentials.js.map +2 -2
  42. package/dist/services.js +6 -1
  43. package/dist/services.js.map +2 -2
  44. package/dist/settings.js +50 -13
  45. package/dist/settings.js.map +2 -2
  46. package/dist/spectrum/approvals-port.js +5 -16
  47. package/dist/spectrum/approvals-port.js.map +2 -2
  48. package/dist/types/agent.d.ts +2 -0
  49. package/dist/types/approvals/judge.d.ts +3 -3
  50. package/dist/types/approvals/owner-tools.d.ts +39 -0
  51. package/dist/types/approvals/policy.d.ts +6 -0
  52. package/dist/types/approvals/record.d.ts +8 -3
  53. package/dist/types/approvals/verdict-shown.d.ts +10 -0
  54. package/dist/types/control.d.ts +1 -1
  55. package/dist/types/guests/guard.d.ts +3 -0
  56. package/dist/types/host.d.ts +1 -1
  57. package/dist/types/index.d.ts +2 -2
  58. package/dist/types/local.d.ts +38 -0
  59. package/dist/types/main.d.ts +20 -0
  60. package/dist/types/page.d.ts +1 -1
  61. package/dist/types/providers.d.ts +3 -1
  62. package/dist/types/readonly.d.ts +2 -1
  63. package/dist/types/remote/approvals.d.ts +27 -0
  64. package/dist/types/remote/client.d.ts +18 -1
  65. package/dist/types/remote/decide.d.ts +20 -0
  66. package/dist/types/remote/host.d.ts +3 -1
  67. package/dist/types/secrets/credentials.d.ts +1 -1
  68. package/dist/types/services.d.ts +7 -3
  69. package/dist/types/settings.d.ts +1 -0
  70. package/dist/types/spectrum/approvals-port.d.ts +1 -0
  71. package/package.json +2 -2
@@ -3,7 +3,7 @@ import { personal } from './people.ts';
3
3
  import { REASONS } from './reasons.ts';
4
4
  import { stoppable } from './stoppable.ts';
5
5
  export { fits, JUDGE_ALLOW, personal, REASONS, stoppable };
6
- export type ApprovalKind = 'guest-message' | 'guest-tool' | 'sudo' | 'capture';
6
+ export type ApprovalKind = 'guest-message' | 'guest-tool' | 'owner-tool' | 'sudo' | 'capture';
7
7
  export type ApprovalState = 'pending' | 'approved' | 'rejected' | 'unanswered' | 'withdrawn';
8
8
  export type ApprovalTier = 'user' | 'agent' | 'cone' | `scoop:${string}`;
9
9
  export type ApprovalAnswer = 'once' | 'always' | 'deny';
@@ -134,6 +134,10 @@ export type GuestToolApproval = Base & {
134
134
  kind: 'guest-tool';
135
135
  detail: GuestToolDetail;
136
136
  };
137
+ export type OwnerToolApproval = Base & {
138
+ kind: 'owner-tool';
139
+ detail: GuestToolDetail;
140
+ };
137
141
  export type SudoApproval = Base & {
138
142
  kind: 'sudo';
139
143
  detail: SudoDetail;
@@ -144,14 +148,14 @@ export type CaptureApproval = Base & {
144
148
  kind: 'capture';
145
149
  detail: CaptureDetail;
146
150
  };
147
- export type Approval = GuestMessageApproval | GuestToolApproval | SudoApproval | CaptureApproval;
151
+ export type Approval = GuestMessageApproval | GuestToolApproval | OwnerToolApproval | SudoApproval | CaptureApproval;
148
152
  type DraftOf<T extends Approval> = Pick<T, 'kind' | 'detail' | 'agentId' | 'requester'> & {
149
153
  seat?: string;
150
154
  tier: string;
151
155
  always?: boolean;
152
156
  expiresAt?: number;
153
157
  };
154
- export type ApprovalDraft = DraftOf<GuestMessageApproval> | DraftOf<GuestToolApproval> | (DraftOf<SudoApproval> & {
158
+ export type ApprovalDraft = DraftOf<GuestMessageApproval> | DraftOf<GuestToolApproval> | DraftOf<OwnerToolApproval> | (DraftOf<SudoApproval> & {
155
159
  replay?: SudoReplay;
156
160
  }) | DraftOf<CaptureApproval>;
157
161
  export type ApprovalsState = {
@@ -180,6 +184,7 @@ export declare const vetoed: ({ forbidden }: ApprovalVerdict) => boolean;
180
184
  export declare function approvable(verdict: ApprovalVerdict): boolean;
181
185
  export declare function route(verdict: ApprovalVerdict | undefined, requester: Pick<ApprovalRequester, 'kind'>, gate: Gate, present: boolean): Routed;
182
186
  export declare function alwaysOffered(item: Approval): boolean;
187
+ export declare const noApproval: (id: string) => string;
183
188
  export declare function gone(state: ApprovalState): string;
184
189
  export declare function cleanReason(reason: unknown): string | undefined;
185
190
  export declare const runLive: (item: Approval) => boolean;
@@ -0,0 +1,10 @@
1
+ import type { Approval } from './record.ts';
2
+ export declare function verdictOf(item: Approval): {
3
+ verdict?: {
4
+ level?: import("./record.ts").ApprovalLevel | undefined;
5
+ aligned?: boolean | undefined;
6
+ reason: string;
7
+ } | undefined;
8
+ judging?: boolean | undefined;
9
+ verdictError?: string | undefined;
10
+ };
@@ -25,5 +25,5 @@ export interface HostScoops {
25
25
  export declare function readable(out: string): string;
26
26
  type FreezerControl = Pick<FreezerRuntime, 'freeze' | 'newChat' | 'thaw' | 'discard' | 'importProfile' | 'cancelImport'>;
27
27
  export declare function submissionId(value: string): SubmissionId | undefined;
28
- export declare function createAgentControl(harness: Harness, target: Conversation | Cones, deliveries?: Deliveries, licks?: HostLicks, scoops?: HostScoops, skills?: Pick<SkillsRuntime, 'expand' | 'commandsFor'>, sprinkles?: Pick<SprinklesRuntime, 'send' | 'call'>, memory?: Pick<MemoryRuntime, 'save' | 'remove'>, freezer?: FreezerControl, changes?: Pick<ChangesRuntime, 'open' | 'accept' | 'revert'>, monitor?: Pick<Monitor, 'open' | 'close'>, secrets?: () => SecretListing, uploads?: Uploads, labels?: Pick<LabelsRuntime, 'label' | 'step'>, guests?: Pick<Guests, 'open' | 'revoke' | 'forgetAlways'>): Omit<AgentControl, 'approvalPolicySet' | 'approvalRunNotice'>;
28
+ export declare function createAgentControl(harness: Harness, target: Conversation | Cones, deliveries?: Deliveries, licks?: HostLicks, scoops?: HostScoops, skills?: Pick<SkillsRuntime, 'expand' | 'commandsFor'>, sprinkles?: Pick<SprinklesRuntime, 'send' | 'call'>, memory?: Pick<MemoryRuntime, 'save' | 'remove'>, freezer?: FreezerControl, changes?: Pick<ChangesRuntime, 'open' | 'accept' | 'revert'>, monitor?: Pick<Monitor, 'open' | 'close'>, secrets?: () => SecretListing, uploads?: Uploads, labels?: Pick<LabelsRuntime, 'label' | 'step'>, guests?: Pick<Guests, 'open' | 'revoke' | 'forgetAlways'>): Omit<AgentControl, 'approvalPolicySet' | 'approvalRunNotice' | 'ownerAlways' | 'ownerAlwaysForget'>;
29
29
  export {};
@@ -56,5 +56,8 @@ export declare function lickTaints(inputs: readonly SubmissionId[], licks: Reado
56
56
  export declare function runTaints(harness: TaintReader, conversationId: ConversationId, context: Context): Promise<InheritedTaint[]>;
57
57
  export declare function distinctTaints(taints: readonly InheritedTaint[]): InheritedTaint[];
58
58
  export declare function taintsOf(inputs: readonly SubmissionId[], seats: Readonly<Record<string, SeatRecord>>, harness: Pick<Harness, 'submission'>, context: Context): Promise<Taint[]>;
59
+ export declare function taskWatcher(harness: () => Pick<Held, 'waitForTask'> | undefined): (host: {
60
+ approvals: Pick<Approvals, 'withdraw'>;
61
+ }, id: string, task: number) => void;
59
62
  export declare function guestToolGate(harness: () => Held | undefined): GuestToolGate;
60
63
  export {};
@@ -113,7 +113,7 @@ interface Served {
113
113
  viewApprovals: ReplicatedState<unknown>;
114
114
  sudo?: AgentSudo;
115
115
  settings: AgentSettings;
116
- remote: AgentRemote;
116
+ remote: Omit<AgentRemote, 'decide'>;
117
117
  pages: Pages;
118
118
  inventory?: ReplicatedState<InventoryState>;
119
119
  guest?: (principal: GuestPrincipal) => {
@@ -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
3
  export { APPROVAL_MS, type Approval, type ApprovalAnswer, type ApprovalDecided, type ApprovalDecision, type ApprovalDraft, type ApprovalJudge, type ApprovalKind, type ApprovalRequester, type ApprovalState, type Approvals, ApprovalsDoc, type ApprovalTier, type ApprovalVerdict, ASK_MIN_MS, approvalJudge, attachApprovals, type CaptureApproval, type CaptureDetail, DEFAULT_POLICY, type DecidedBy, type Decider, JUDGE_ALLOW, JUDGE_KIND, JUDGE_MODEL, JUDGE_QUESTIONS, type Judgement, judgeModelOf, judgeSpender, judgeState, type OwnerIntent, ownerIntent, POLICY_FILE, REASONS, route, seedPolicy, VERDICT_REASONS, verdictOf, verdictRecorder, } from './approvals/index.ts';
4
- export { type ApprovalPolicy, type ApprovalPolicyChange, type ApprovalPolicySet, DEFAULT_APPROVAL_POLICY, type RunLatePolicy, type SudoPolicy, type SudoPolicyChange, } from './approvals/policy.ts';
5
- export type { SudoFile, SudoReplay, SudoRun, SudoRunState } from './approvals/record.ts';
4
+ export { type ApprovalPolicy, type ApprovalPolicyChange, type ApprovalPolicySet, DEFAULT_APPROVAL_POLICY, type OwnerPolicy, type OwnerTools, type RunLatePolicy, type SudoPolicy, type SudoPolicyChange, } from './approvals/policy.ts';
5
+ export type { OwnerToolApproval, SudoFile, SudoReplay, SudoRun, SudoRunState, } from './approvals/record.ts';
6
6
  export { RUN_ERRORS, type RunAnswer, SUDO_RUN_TASK, } from './approvals/run.ts';
7
7
  export { NOTICE_LIMITS, NOTICE_REASONS, type NoticeAnswer, type RunNotice, } from './approvals/run-notice.ts';
8
8
  export { RUN_REASONS, type RunGates, type Runnable, runnable, SUDO_RUN_PROTOCOL, } from './approvals/runnable.ts';
@@ -0,0 +1,38 @@
1
+ import type { ClassifierModel, Model, Provider } from '@earendil-works/pi-ai';
2
+ export declare const LOCAL = "local";
3
+ export declare const LOCAL_BASE = "LOCAL_BASE_URL";
4
+ export declare const LOCAL_CONTEXT = "LOCAL_CONTEXT_WINDOW";
5
+ export declare const DEFAULT_CONTEXT = 32768;
6
+ export declare const SMALL_CONTEXT = 16384;
7
+ export declare const DECISIONS_API: 'typesafe-system-one';
8
+ type Fetch = typeof fetch;
9
+ export interface ListedModel {
10
+ id: string;
11
+ context_length?: number;
12
+ max_context_length?: number;
13
+ meta?: {
14
+ n_ctx?: number;
15
+ };
16
+ architecture?: {
17
+ input_modalities?: string[];
18
+ output_modalities?: string[];
19
+ };
20
+ }
21
+ export declare const KEY_OVER_HTTP = "Seven\u2019s vault sends keys over https:// only, so this http:// endpoint can\u2019t take a key yet. Remove the account and add it again without a key, or use an https:// endpoint.";
22
+ export declare const ORIGINS_HINT = "If the server is running, let seven reach it: OLLAMA_ORIGINS=https://seven.sliccy.ai for Ollama, Enable CORS in LM Studio, --allowed-origins for vLLM, ORTLLAMA_ORIGINS for ortllama, or link slicc.";
23
+ export declare function localBase(value: string): string | {
24
+ problem: string;
25
+ };
26
+ export declare function localEndpoint(value: string): Record<string, string> | string;
27
+ export declare function localContext(value: string): Record<string, string> | string;
28
+ export declare function contextOf(model: ListedModel, fallback?: number): number;
29
+ export declare function localModel(model: ListedModel, baseUrl: string, fallback?: number): Model<'openai-completions'> | ClassifierModel<typeof DECISIONS_API>;
30
+ export declare function listLocal(base: string, { key, fetch: fetcher, signal }: {
31
+ key?: string;
32
+ fetch: Fetch;
33
+ signal?: AbortSignal;
34
+ }): Promise<ListedModel[]>;
35
+ export declare function localProvider({ fetch: fetcher, }?: {
36
+ fetch?: Fetch;
37
+ }): Provider;
38
+ export {};
@@ -4,10 +4,12 @@ import { type ModelRef, type Storage, type ToolRegistration } from '@earendil-wo
4
4
  import { codemodeTool } from './codemode/index.ts';
5
5
  import { type AgentHost, type RunTimes } from './host.ts';
6
6
  import type { KernelClient } from './kernel/client.ts';
7
+ import { SliccKernelEnv } from './kernel/env.ts';
7
8
  import { type UserClients } from './kernel/users.ts';
8
9
  import { type Transport } from './net.ts';
9
10
  import { type Assets } from './scoops/index.ts';
10
11
  import { type ModelBases } from './secrets/endpoints.ts';
12
+ import { type VaultRecords } from './secrets/records.ts';
11
13
  import { type PlainStore } from './secrets/store.ts';
12
14
  import { Vault } from './secrets/vault.ts';
13
15
  import { createSliccModels } from './settings.ts';
@@ -50,6 +52,24 @@ export declare function seesImages(models: Pick<Models, 'getModel'>, ref: ModelR
50
52
  export declare const MCP_CALLBACK = "oauth/mcp-callback";
51
53
  export declare function mcpRedirect({ origin, href }: AgentWorkerScope['location']): string;
52
54
  export declare function modelBases(providers: readonly Provider[], models: Pick<ReturnType<typeof createSliccModels>, 'getModels'>, env?: (providerId: string) => Readonly<Record<string, string>> | undefined): ModelBases[];
55
+ export declare function modelsOf(scope: AgentWorkerScope, options: AgentWorkerOptions, given: {
56
+ vault: Vault;
57
+ home: SliccKernelEnv;
58
+ transport: typeof fetch;
59
+ version: string;
60
+ }): Promise<{
61
+ store: PlainStore;
62
+ records: VaultRecords;
63
+ providers: Provider<import("@earendil-works/pi-ai").Api>[];
64
+ fields: import("./settings.ts").ProviderFields;
65
+ models: import("@earendil-works/pi-ai").MutableModels;
66
+ bases: () => ModelBases[];
67
+ endpoints: import("./secrets/endpoints.ts").Endpoints;
68
+ defaultModel: () => Promise<{
69
+ provider: string;
70
+ modelId: string;
71
+ }>;
72
+ }>;
53
73
  export declare function start(scope: AgentWorkerScope, ports: Promise<KernelPorts>, options: AgentWorkerOptions, vault: Vault): Promise<AgentHost>;
54
74
  export declare function alive(client: KernelClient): (pid: number) => Promise<boolean>;
55
75
  export declare function runAgentWorker(scope: AgentWorkerScope, options?: AgentWorkerOptions): Promise<AgentHost>;
@@ -4,6 +4,6 @@ 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';
6
6
  export { AGENT_LOCK, type AgentOwner, type AgentWorker, type KernelSource, type OwnerOptions, type PortOptions, startAgent, } from './owner.ts';
7
- export { type RemoteControl, type RemoteEvent, type RemoteOptions, remoteControl, } from './remote/client.ts';
7
+ export { type LinkApproval, type RemoteControl, type RemoteEvent, type RemoteOptions, remoteControl, } from './remote/client.ts';
8
8
  export type { InventoryAgent, InventorySnapshot, InventoryStatus, } from './services.ts';
9
9
  export { VIEW_ONLY } from './view-only.ts';
@@ -22,9 +22,10 @@ export interface KeyProvider {
22
22
  make: () => Provider;
23
23
  env: string;
24
24
  description: string;
25
- keyUrl: string;
25
+ keyUrl?: string;
26
26
  cors: boolean;
27
27
  signIn?: true;
28
+ keyless?: true;
28
29
  fields?: readonly FieldSpec[];
29
30
  }
30
31
  export declare function httpsBase(value: string): URL | undefined;
@@ -40,6 +41,7 @@ export interface Listing {
40
41
  auth: ProviderAuth;
41
42
  corsFree: boolean;
42
43
  vaultName: string;
44
+ keyless?: true;
43
45
  fields?: readonly FieldSpec[];
44
46
  }
45
47
  export declare const LISTINGS: ReadonlyMap<string, Listing>;
@@ -7,7 +7,8 @@ export declare const REFUSALS_OWNER = "Only the owner's page can see why MCP ser
7
7
  type Answer = (...args: unknown[]) => Promise<unknown>;
8
8
  export declare const controlAnswer: (name: string) => Answer;
9
9
  export declare const settingsAnswer: (name: string) => Answer;
10
+ export declare const NO_APPROVALS = "this agent has no approvals";
10
11
  export declare const remoteAnswer: (name: string) => Answer;
11
12
  export declare function viewPages(): AgentPages;
12
13
  export declare const pageAnswer: (name: string) => Answer;
13
- export declare function viewRemote(remote: AgentRemote): Pick<AgentRemote, 'watch' | 'history' | 'next' | 'close'>;
14
+ export declare function viewRemote(remote: Pick<AgentRemote, 'watch' | 'history' | 'next' | 'close'>): Pick<AgentRemote, 'watch' | 'history' | 'next' | 'close'>;
@@ -0,0 +1,27 @@
1
+ import type { Approval, ApprovalKind } from '../approvals/record.ts';
2
+ import type { AgentsSummary } from '../services.ts';
3
+ export interface LinkApproval {
4
+ id: string;
5
+ kind: ApprovalKind;
6
+ agentId?: string;
7
+ agentName?: string;
8
+ requester: {
9
+ kind: Approval['requester']['kind'];
10
+ name: string;
11
+ where?: string;
12
+ };
13
+ detail: Approval['detail'];
14
+ tier: string;
15
+ always: boolean;
16
+ stoppable: boolean;
17
+ verdict?: {
18
+ level?: 1 | 2 | 3;
19
+ aligned?: boolean;
20
+ reason: string;
21
+ };
22
+ judging?: boolean;
23
+ verdictError?: string;
24
+ createdAt: number;
25
+ expiresAt: number;
26
+ }
27
+ export declare function pendingApprovals(items: readonly Approval[] | undefined, agents: AgentsSummary | undefined): LinkApproval[];
@@ -1,11 +1,15 @@
1
+ import type { ApprovalDecision } from '../approvals/record.ts';
1
2
  import type { SendAttachment } from '../attachments.ts';
2
3
  import type { AgentConnection } from '../client.ts';
3
4
  import type { Delivered, InventorySnapshot, SendMode } from '../services.ts';
5
+ import { type LinkApproval } from './approvals.ts';
4
6
  import type { RemoteEvent } from './events.ts';
7
+ export type { LinkApproval } from './approvals.ts';
5
8
  export type { RemoteEvent } from './events.ts';
6
9
  export declare const POLL_MS = 25000;
7
10
  export interface RemoteOptions {
8
11
  agent?: () => string | null;
12
+ device?: string;
9
13
  }
10
14
  export interface RemoteControl {
11
15
  prompt(request: {
@@ -46,5 +50,18 @@ export interface RemoteControl {
46
50
  snapshot: InventorySnapshot;
47
51
  events?: AsyncIterable<InventorySnapshot>;
48
52
  }>;
53
+ approvals(request?: {
54
+ watch?: boolean;
55
+ }): Promise<{
56
+ approvals: LinkApproval[];
57
+ events?: AsyncIterable<LinkApproval[]>;
58
+ }>;
59
+ decide(request: {
60
+ id: string;
61
+ answer: ApprovalDecision;
62
+ reason?: string | null;
63
+ }): Promise<{
64
+ ok: true;
65
+ }>;
49
66
  }
50
- export declare function remoteControl(connection: Pick<AgentConnection, 'remote'> & Pick<Partial<AgentConnection>, 'inventory'>, options?: RemoteOptions): RemoteControl;
67
+ export declare function remoteControl(connection: Pick<AgentConnection, 'remote'> & Pick<Partial<AgentConnection>, 'inventory' | 'approvals' | 'agents' | 'readOnly'>, options?: RemoteOptions): RemoteControl;
@@ -0,0 +1,20 @@
1
+ import type { Context } from '@earendil-works/chord';
2
+ import type { ApprovalDecided, Decider } from '../approvals/index.ts';
3
+ import { type ApprovalDecision } from '../approvals/record.ts';
4
+ export interface RemoteDecide {
5
+ id: string;
6
+ answer: string;
7
+ reason: string | null;
8
+ device: string | null;
9
+ }
10
+ export type RemoteDecided = {
11
+ ok: true;
12
+ } | {
13
+ ok: false;
14
+ code: 'EINVAL' | 'ENOENT' | 'EACCES' | 'EOPNOTSUPP';
15
+ message: string;
16
+ };
17
+ export declare const BAD_ANSWER = "An answer is once, always, deny or stop.";
18
+ type Decide = (id: string, decision: ApprovalDecision, reason: string | null, context: Context) => Promise<ApprovalDecided>;
19
+ export declare function linkDecide(decide: (by: Decider) => Decide, linked: string | undefined): (request: RemoteDecide, context: Context) => Promise<RemoteDecided>;
20
+ export {};
@@ -3,6 +3,7 @@ import { type Conversation, type EntryRecord, type Harness, type LiveState, type
3
3
  import type { SendAttachment } from '../attachments.ts';
4
4
  import { type VaultState } from '../secrets/vault.ts';
5
5
  import type { Delivered, SendMode, SendRequest, SendResponse } from '../services.ts';
6
+ import type { RemoteDecide, RemoteDecided } from './decide.ts';
6
7
  import { Mapper, type RemoteEvent } from './events.ts';
7
8
  import { type RemoteHistory } from './history.ts';
8
9
  export declare const VAULT_BACK = "the vault is answering again";
@@ -51,6 +52,7 @@ export interface AgentRemote {
51
52
  abort(agentId: string | null, context: Context): Promise<{
52
53
  aborted: boolean;
53
54
  }>;
55
+ decide(request: RemoteDecide, context: Context): Promise<RemoteDecided>;
54
56
  }
55
57
  export interface RemoteHost {
56
58
  harness: Harness;
@@ -77,6 +79,6 @@ export declare class Follower {
77
79
  drain(): RemoteEvent[];
78
80
  take(entries: readonly EntryRecord[], live: LiveState | undefined, record: SubmissionRecord | undefined): boolean;
79
81
  }
80
- export declare function createRemote(host: RemoteHost): AgentRemote & {
82
+ export declare function createRemote(host: RemoteHost): Omit<AgentRemote, 'decide'> & {
81
83
  dispose(): Promise<void>;
82
84
  };
@@ -2,4 +2,4 @@ import type { CredentialStore } from '@earendil-works/pi-ai';
2
2
  import type { VaultRecords } from './records.ts';
3
3
  export declare const KEYS_IN_VAULT = "model keys are kept in seven's vault: enter them in Settings \u203A Accounts";
4
4
  export type FieldsOf = (providerId: string) => Readonly<Record<string, string>> | undefined;
5
- export declare function vaultCredentials(records: Pick<VaultRecords, 'model' | 'state'>, env?: FieldsOf, ready?: (providerId: string) => boolean): CredentialStore;
5
+ export declare function vaultCredentials(records: Pick<VaultRecords, 'model' | 'state'>, env?: FieldsOf, ready?: (providerId: string) => boolean, keyless?: () => readonly string[]): CredentialStore;
@@ -10,7 +10,7 @@ import type { ChangesView } from './changes/git.ts';
10
10
  import type { FrozenCone } from './freezer/index.ts';
11
11
  import type { ImportProgress, ImportResult } from './freezer/v6.ts';
12
12
  import type { GuestOpened, Proposed, ProposeRequest } from './guests/index.ts';
13
- import type { GuestDraft, GuestGates, GuestSeat } from './guests/seats.ts';
13
+ import type { GuestDraft, GuestGates, GuestSeat, ShownAlwaysTool } from './guests/seats.ts';
14
14
  import type { MemoryEntry, MemoryScope, MemoryTag } from './memory/format.ts';
15
15
  import type { EntriesPage, EntriesRequest } from './remote/history.ts';
16
16
  import type { AgentRemote } from './remote/host.ts';
@@ -109,6 +109,10 @@ export interface AgentControl {
109
109
  guestAlwaysForget(seat: string, approval: string, context: Context): Promise<{
110
110
  removed: boolean;
111
111
  }>;
112
+ ownerAlways(context: Context): Promise<ShownAlwaysTool[]>;
113
+ ownerAlwaysForget(approval: string, context: Context): Promise<{
114
+ removed: boolean;
115
+ }>;
112
116
  approvalPolicySet(change: ApprovalPolicyChange, context: Context): Promise<ApprovalPolicySet>;
113
117
  decide(id: string, decision: ApprovalDecision, reason: string | null, context: Context): Promise<ApprovalDecided>;
114
118
  approvalRun(id: string, context: Context): Promise<RunAnswer>;
@@ -285,7 +289,7 @@ export interface AgentSettingsChange {
285
289
  thinkingLevel: 'off' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | null;
286
290
  agentId?: string | null;
287
291
  }
288
- export declare const CONTROL_METHODS: ("abort" | "agentCommands" | "approvalPolicySet" | "approvalRun" | "approvalRunNotice" | "approvalRunStop" | "changeAccept" | "changeRevert" | "changesOpen" | "compact" | "compactAgent" | "configure" | "createCone" | "createScoop" | "decide" | "discard" | "drop" | "entries" | "freeze" | "guestAlwaysForget" | "guestOpen" | "guestRevoke" | "image" | "importCancel" | "importProfile" | "memoryRemove" | "memorySave" | "monitorClose" | "monitorOpen" | "newChat" | "reset" | "resolveAgentLick" | "resolveLick" | "rewind" | "rewindAgent" | "selectCone" | "send" | "sprinkleCall" | "sprinkleSend" | "stepLabel" | "stopAgent" | "thaw" | "toolLabel" | "unqueue" | "wait" | "webhook" | "withdraw")[];
292
+ export declare const CONTROL_METHODS: ("abort" | "agentCommands" | "approvalPolicySet" | "approvalRun" | "approvalRunNotice" | "approvalRunStop" | "changeAccept" | "changeRevert" | "changesOpen" | "compact" | "compactAgent" | "configure" | "createCone" | "createScoop" | "decide" | "discard" | "drop" | "entries" | "freeze" | "guestAlwaysForget" | "guestOpen" | "guestRevoke" | "image" | "importCancel" | "importProfile" | "memoryRemove" | "memorySave" | "monitorClose" | "monitorOpen" | "newChat" | "ownerAlways" | "ownerAlwaysForget" | "reset" | "resolveAgentLick" | "resolveLick" | "rewind" | "rewindAgent" | "selectCone" | "send" | "sprinkleCall" | "sprinkleSend" | "stepLabel" | "stopAgent" | "thaw" | "toolLabel" | "unqueue" | "wait" | "webhook" | "withdraw")[];
289
293
  export declare const OWNER_DEVICE_METHODS: readonly (keyof AgentControl & string)[];
290
294
  export declare const CONTROL_READS: readonly (keyof AgentControl & string)[];
291
295
  export declare const AgentControl: RemoteContract;
@@ -323,7 +327,7 @@ export interface Command {
323
327
  }
324
328
  export declare const TRANSCRIPT_STATES: ("agents" | "approvalPolicy" | "approvalRunnable" | "approvals" | "changes" | "commands" | "deliveries" | "frozen" | "guests" | "importing" | "labels" | "memories" | "memoryScopes" | "monitor" | "privateRevision" | "sprinkles" | "state" | "vault" | "views")[];
325
329
  export declare const AgentTranscript: RemoteContract;
326
- export declare const REMOTE_METHODS: ("abort" | "close" | "history" | "next" | "prompt" | "watch")[];
330
+ export declare const REMOTE_METHODS: ("abort" | "close" | "decide" | "history" | "next" | "prompt" | "watch")[];
327
331
  export declare const REMOTE_READS: readonly (keyof AgentRemote & string)[];
328
332
  export interface GuestShown {
329
333
  id: string;
@@ -26,6 +26,7 @@ export declare function sliccProviders(version?: string): Provider[];
26
26
  export declare function withDefaultRegions(credentials: CredentialStore): CredentialStore;
27
27
  export declare function catalogStore(store: PlainStore): ModelsStore;
28
28
  export declare function createSliccModels(credentials: CredentialStore, providers?: Provider<import("@earendil-works/pi-ai").Api>[], catalog?: ModelsStore): MutableModels;
29
+ export declare function keylessOf(records: Pick<VaultRecords, 'model'>, fields: Pick<ProviderFields, 'get' | 'ready'>): (providerId: string) => boolean;
29
30
  export interface ProviderFields {
30
31
  get(providerId: string): Readonly<Record<string, string>> | undefined;
31
32
  env(providerId: string): Readonly<Record<string, string>> | undefined;
@@ -4,6 +4,7 @@ import type { Runnable } from '../approvals/runnable.ts';
4
4
  import type { AgentConnection } from '../client.ts';
5
5
  import { Emitter } from './emitter.ts';
6
6
  export declare const ARGS_LENGTH = 65536;
7
+ export declare const OWNER_NAME = "you";
7
8
  export declare function shown(item: Item, agentName: string | undefined): Approval;
8
9
  export type HostApprovals = ApprovalsPort;
9
10
  export declare function runShown(run: SudoRun): ApprovalRun & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-agent",
3
- "version": "7.34.4",
3
+ "version": "7.36.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",
@@ -77,7 +77,7 @@
77
77
  "@ai-ecoverse/slicc-scrub": "1.1.1",
78
78
  "@ai-ecoverse/slicc-shared-web": "2.14.4",
79
79
  "@ai-ecoverse/slicc-spectrum": "2.16.1",
80
- "@ai-ecoverse/slicc-vault": "1.26.3",
80
+ "@ai-ecoverse/slicc-vault": "1.27.0",
81
81
  "@ai-ecoverse/wasi-fnox": "1.48.0-1",
82
82
  "@ai-ecoverse/wasm-bash": "5.3.0-23",
83
83
  "@ai-ecoverse/wasm-coreutils": "9.12.0-15",