@ai-ecoverse/slicc-agent 6.19.11 → 6.19.13

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.
@@ -17,6 +17,7 @@ export interface KernelEnvOptions {
17
17
  exports?: Readonly<Record<string, string>>;
18
18
  scrub?: Scrub;
19
19
  spawn?: (argv: readonly string[]) => readonly string[];
20
+ tag?: (context: Context) => Promise<string | undefined>;
20
21
  }
21
22
  export declare const STREAMED_READ: number;
22
23
  export declare const READ_CHUNK: number;
@@ -80,5 +81,6 @@ export type EnvRoute = {
80
81
  export declare function kernelEnvironment(client: KernelClient, options?: Omit<KernelEnvOptions, 'cwd'> & {
81
82
  identify?: (target: EnvTargetLike, context: Context) => Promise<Record<string, string>>;
82
83
  route?: (target: EnvTargetLike) => Promise<EnvRoute | undefined>;
84
+ tagOf?: (conversationId: number, context: Context) => Promise<string | undefined>;
83
85
  }): (target: EnvTargetLike, context?: Context) => SliccKernelEnv | Promise<SliccKernelEnv>;
84
86
  export {};
@@ -8,10 +8,11 @@ export declare const HELD = "output held: waiting for the vault";
8
8
  export interface ExecHooks {
9
9
  scrub?: () => ScrubStream;
10
10
  spawn?: (argv: readonly string[]) => readonly string[];
11
+ tag?: (context: Context) => Promise<string | undefined>;
11
12
  }
12
13
  export declare function sweep(client: Pick<KernelClient, 'kill' | 'ps'>, process: KernelProcess): Promise<void>;
13
14
  export interface Join {
14
15
  pgid?: number;
15
16
  refused(code: string): void;
16
17
  }
17
- export declare function execute(client: KernelClient, cwd: string, command: string | readonly string[], options: ShellExecOptions | undefined, context: Context, spawned?: (process: KernelProcess) => void, join?: Join, hooks?: ExecHooks): Promise<Result<ShellExecResult, ExecutionError>>;
18
+ export declare function execute(client: KernelClient, cwd: string, command: string | readonly string[], options: ShellExecOptions | undefined, context: Context, spawned?: (process: KernelProcess, tag?: string) => void, join?: Join, hooks?: ExecHooks): Promise<Result<ShellExecResult, ExecutionError>>;
@@ -2,7 +2,7 @@ import type { KernelClient, KernelProcess } from './client.ts';
2
2
  import { type Lineage } from './lineage.ts';
3
3
  export declare const REFUSED: Set<string>;
4
4
  export interface ProcessGroups {
5
- track(owner: number, process: KernelProcess): void;
5
+ track(owner: number, process: KernelProcess, tag?: string): void;
6
6
  of(owner: number): number[];
7
7
  owned(owner: number): number[];
8
8
  shared(owner: number): number | undefined;
@@ -13,7 +13,7 @@ export interface ProcessGroups {
13
13
  signal(owner: number, signal?: string): Promise<number[]>;
14
14
  lineage(pid: number | null): Promise<Lineage | undefined>;
15
15
  }
16
- export declare function processGroups(client: Pick<KernelClient, 'kill' | 'ps'>): ProcessGroups;
16
+ export declare function processGroups(client: Pick<KernelClient, 'kill' | 'ps' | 'fs'>): ProcessGroups;
17
17
  export declare function descendants(table: readonly {
18
18
  pid: number;
19
19
  ppid?: number;
@@ -4,9 +4,11 @@ export interface Lineage {
4
4
  spawned: boolean;
5
5
  argv: readonly string[];
6
6
  uid?: number;
7
+ tags: string[];
8
+ recent: string[];
7
9
  }
8
10
  export interface Spawns {
9
- started(process: KernelProcess, owner: number): void;
11
+ started(process: KernelProcess, owner: number, tag?: string): void;
10
12
  lineage(pid: number | null): Promise<Lineage | undefined>;
11
13
  }
12
- export declare function spawns(client: Pick<KernelClient, 'ps'>, warn?: (message: string) => void, bound?: number): Spawns;
14
+ export declare function spawns(client: Pick<KernelClient, 'ps' | 'fs'>, warn?: (message: string) => void, bound?: number): Spawns;
@@ -0,0 +1,23 @@
1
+ import type { KernelClient, KernelProcess } from './client.ts';
2
+ export declare const TAINT_TAG = "slicc-taint:";
3
+ export declare const CRON_TAGS = "/var/spool/cron/tags";
4
+ export type SeenRow = {
5
+ pid: number;
6
+ started?: number;
7
+ tag?: string;
8
+ tags?: readonly string[];
9
+ };
10
+ export interface Sightings {
11
+ mark(): number;
12
+ spawned(process: KernelProcess, tag: string): void;
13
+ observe(rows: readonly SeenRow[], at: number): Promise<void>;
14
+ recent(pid: number, rows: readonly SeenRow[], at: number): string[];
15
+ }
16
+ type Client = Pick<KernelClient, 'ps' | 'fs'>;
17
+ export declare function tagsOf(row: {
18
+ tag?: string;
19
+ tags?: readonly string[];
20
+ }): string[];
21
+ export declare function cronHeld(client: Client): Promise<Set<string> | null>;
22
+ export declare function sightings(client: Client, poll?: number, warn?: (message: string) => void): Sightings;
23
+ export {};
@@ -2,7 +2,7 @@ import type { Context } from '@earendil-works/chord';
2
2
  import type { Harness } from '@earendil-works/pi-durable';
3
3
  import type { ExecutionEnv } from '@earendil-works/pi-durable/env';
4
4
  import type { Agents, AgentsState } from '../agents.ts';
5
- import type { InheritedTaint } from '../guests/guard.ts';
5
+ import { type InheritedTaint } from '../guests/guard.ts';
6
6
  import type { Lineage } from '../kernel/lineage.ts';
7
7
  import { type Layout } from '../layout.ts';
8
8
  import type { Licks } from '../licks/licks.ts';
@@ -55,6 +55,7 @@ export interface Caller {
55
55
  fromAgent: boolean;
56
56
  scoop: string | null;
57
57
  depth: number;
58
+ tagged?: InheritedTaint[];
58
59
  }
59
60
  export type Flags = {
60
61
  values: Map<string, string[]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-agent",
3
- "version": "6.19.11",
3
+ "version": "6.19.13",
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",
@@ -71,7 +71,7 @@
71
71
  "@ai-ecoverse/slicc-spectrum": "1.104.3",
72
72
  "@ai-ecoverse/wasi-fnox": "1.39.0-6",
73
73
  "@ai-ecoverse/wasm-bash": "5.3.0-23",
74
- "@ai-ecoverse/wasm-coreutils": "9.12.0-13",
74
+ "@ai-ecoverse/wasm-coreutils": "9.12.0-15",
75
75
  "@ai-ecoverse/wasm-git": "2.55.0-20",
76
76
  "@biomejs/biome": "2.5.15",
77
77
  "@types/node": "24.19.2",
@@ -85,7 +85,7 @@
85
85
  "typescript": "7.0.2"
86
86
  },
87
87
  "dependencies": {
88
- "@ai-ecoverse/slicc-browsers": "1.18.4",
88
+ "@ai-ecoverse/slicc-browsers": "1.18.5",
89
89
  "@ai-ecoverse/slicc-vault": "1.15.4",
90
90
  "@aws-sdk/middleware-websocket": "^3.972.54",
91
91
  "@earendil-works/chord": "1.3.0",