@ai-ecoverse/slicc-agent 7.34.3 → 7.35.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 (57) hide show
  1. package/README.md +25 -11
  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 +1 -1
  13. package/dist/approvals/record.js.map +2 -2
  14. package/dist/control.js.map +2 -2
  15. package/dist/freezer/v6.js +3 -2
  16. package/dist/freezer/v6.js.map +2 -2
  17. package/dist/guests/guard.js +12 -8
  18. package/dist/guests/guard.js.map +2 -2
  19. package/dist/host.js +5 -1
  20. package/dist/host.js.map +2 -2
  21. package/dist/index.js.map +2 -2
  22. package/dist/kernel/agent-users.js +43 -3
  23. package/dist/kernel/agent-users.js.map +2 -2
  24. package/dist/local.js +159 -0
  25. package/dist/local.js.map +7 -0
  26. package/dist/main.js +25 -14
  27. package/dist/main.js.map +2 -2
  28. package/dist/providers.js +29 -1
  29. package/dist/providers.js.map +2 -2
  30. package/dist/scoops/index.js +30 -16
  31. package/dist/scoops/index.js.map +2 -2
  32. package/dist/secrets/credentials.js +4 -2
  33. package/dist/secrets/credentials.js.map +2 -2
  34. package/dist/services.js +4 -0
  35. package/dist/services.js.map +2 -2
  36. package/dist/settings.js +50 -13
  37. package/dist/settings.js.map +2 -2
  38. package/dist/spectrum/approvals-port.js +4 -1
  39. package/dist/spectrum/approvals-port.js.map +2 -2
  40. package/dist/types/agent.d.ts +2 -0
  41. package/dist/types/approvals/judge.d.ts +3 -3
  42. package/dist/types/approvals/owner-tools.d.ts +39 -0
  43. package/dist/types/approvals/policy.d.ts +6 -0
  44. package/dist/types/approvals/record.d.ts +7 -3
  45. package/dist/types/control.d.ts +1 -1
  46. package/dist/types/guests/guard.d.ts +3 -0
  47. package/dist/types/index.d.ts +2 -2
  48. package/dist/types/kernel/agent-users.d.ts +3 -1
  49. package/dist/types/local.d.ts +38 -0
  50. package/dist/types/main.d.ts +20 -0
  51. package/dist/types/providers.d.ts +3 -1
  52. package/dist/types/scoops/index.d.ts +10 -3
  53. package/dist/types/secrets/credentials.d.ts +1 -1
  54. package/dist/types/services.d.ts +6 -2
  55. package/dist/types/settings.d.ts +1 -0
  56. package/dist/types/spectrum/approvals-port.d.ts +1 -0
  57. package/package.json +2 -2
@@ -7,8 +7,8 @@ import { type Layout } from '../layout.ts';
7
7
  import type { Licks } from '../licks/licks.ts';
8
8
  import { type Roles } from '../roles/roles.ts';
9
9
  import type { Choosable } from '../selection.ts';
10
- import { type CliOptions } from './cli.ts';
11
- import { type ControlPlane } from './requests.ts';
10
+ import { type CliOptions, createCli } from './cli.ts';
11
+ import { type ControlPlane, type PlaneOptions } from './requests.ts';
12
12
  import { type Scoops } from './service.ts';
13
13
  export declare const BUILTIN_ROLES: string[];
14
14
  export declare const PNPM_HOME = "/home/.local/share/pnpm";
@@ -38,9 +38,13 @@ export interface AttachOptions {
38
38
  spools?: Spools;
39
39
  agentDir?: string;
40
40
  }
41
+ export interface Spool {
42
+ user: string;
43
+ dir: string;
44
+ }
41
45
  export interface Spools {
42
46
  users(): readonly string[];
43
- prepare(user: string, dir: string, context: Context): Promise<void>;
47
+ prepare(spools: readonly Spool[], context: Context): Promise<void>;
44
48
  }
45
49
  export interface ScoopsRuntime {
46
50
  roles(context: Context): Promise<Roles>;
@@ -61,5 +65,8 @@ export interface Installed {
61
65
  }
62
66
  export declare function installCommands(env: ExecutionEnv, script: string, binDir: string, context: Context, warn?: (message: string) => void): Promise<Installed>;
63
67
  export declare function retire(env: ExecutionEnv, binDir: string, context: Context): Promise<void>;
68
+ export declare function spooled(env: ExecutionEnv, cli: ReturnType<typeof createCli>, spools: Spools, agents: Agents, options: PlaneOptions & {
69
+ dir: string;
70
+ }, context: Context): ControlPlane;
64
71
  export declare function setupScoops(registry: Registry, licks: Licks, fileTools?: readonly ToolRegistration[]): ScoopsSetup;
65
72
  export type { Rewound, Scoops } from './service.ts';
@@ -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;
@@ -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.3",
3
+ "version": "7.35.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",