@ai-ecoverse/slicc-agent 7.30.0 → 7.30.2

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,9 @@
1
1
  import { type Context, type ReplicatedState } from '@earendil-works/chord';
2
- import type { Harness } from '@earendil-works/pi-durable';
2
+ import type { Conversation, Harness } from '@earendil-works/pi-durable';
3
3
  import type { Clock } from '../clock.ts';
4
4
  import { type ApprovalJudge } from './judge.ts';
5
+ import { type ApprovalPolicies } from './policy.ts';
6
+ import { type Attendance } from './present.ts';
5
7
  import { type Approval, type ApprovalDraft, type ApprovalKind, type ApprovalState, type DecidedBy } from './record.ts';
6
8
  export * from './intent.ts';
7
9
  export * from './judge.ts';
@@ -31,11 +33,13 @@ export interface Approvals {
31
33
  withdraw(id: string, reason: string | null, context: Context): Promise<Approval | undefined>;
32
34
  withdrawSeat(seat: string, context: Context): Promise<number>;
33
35
  expire(id: string, context: Context): Promise<Approval | undefined>;
36
+ resume(agentId: string): void;
34
37
  close(): void;
35
38
  }
36
39
  export interface ScoopRouter {
37
40
  route(item: Approval): Promise<void>;
38
41
  }
42
+ export declare const STOP_WAIT_MS = 30000;
39
43
  export interface ApprovalsAttach {
40
44
  harness: Pick<Harness, 'commit' | 'watchDoc'>;
41
45
  now?: () => number;
@@ -47,6 +51,23 @@ export interface ApprovalsAttach {
47
51
  sudoApprover?: () => unknown;
48
52
  present?: (item: Approval, context: Context) => Promise<boolean>;
49
53
  stop?: (agentId: string, context: Context) => Promise<void>;
54
+ turnOf?: (agentId: string, context: Context) => Promise<Conversation | undefined>;
55
+ stopWaitMs?: number;
50
56
  }
57
+ export declare function stopOf(agents: {
58
+ conversation(agentId: string, context: Context): Promise<(Conversation & {
59
+ abort(context: Context): Promise<void>;
60
+ }) | undefined>;
61
+ }): Pick<ApprovalsAttach, 'stop' | 'turnOf'>;
62
+ export declare function stoppingAttach(agent: {
63
+ agents: Parameters<typeof stopOf>[0] & {
64
+ state(): unknown;
65
+ };
66
+ harness: ApprovalsAttach['harness'];
67
+ scoopReviews: ApprovalsAttach['scoops'];
68
+ }, policy: ApprovalPolicies, owners: Attendance, options?: {
69
+ judge?: ApprovalJudge;
70
+ approvalMs?: number;
71
+ }): ApprovalsAttach;
51
72
  export declare const NO_STOP = "This agent can't stop a turn.";
52
73
  export declare function attachApprovals(options: ApprovalsAttach, context?: Context): Promise<Approvals>;
@@ -18,9 +18,13 @@ export interface KernelEnvOptions {
18
18
  scrub?: Scrub;
19
19
  spawn?: (argv: readonly string[]) => readonly string[];
20
20
  tag?: (context: Context) => Promise<string | undefined>;
21
+ abandonOnAbort?: boolean;
21
22
  }
22
23
  export declare const STREAMED_READ: number;
23
24
  export declare const READ_CHUNK: number;
25
+ export declare const abandonOf: (options?: {
26
+ abandonOnAbort?: boolean;
27
+ }) => Pick<KernelEnvOptions, 'abandonOnAbort'>;
24
28
  export declare function scrubbedFile(scrub: Scrub, bytes: Uint8Array): Promise<Uint8Array>;
25
29
  export declare function quote(value: string): string;
26
30
  export declare function prefixed(command: string, exports: Readonly<Record<string, string>> | undefined): string;
@@ -10,6 +10,7 @@ export interface ExecHooks {
10
10
  scrub?: () => ScrubStream;
11
11
  spawn?: (argv: readonly string[]) => readonly string[];
12
12
  tag?: (context: Context) => Promise<string | undefined>;
13
+ abandonOnAbort?: boolean;
13
14
  }
14
15
  export declare function sweep(client: Pick<KernelClient, 'kill' | 'ps'>, process: KernelProcess): Promise<void>;
15
16
  export interface Join {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-agent",
3
- "version": "7.30.0",
3
+ "version": "7.30.2",
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",
@@ -73,11 +73,11 @@
73
73
  },
74
74
  "devDependencies": {
75
75
  "@ai-ecoverse/slicc-jsh": "0.64.4",
76
- "@ai-ecoverse/slicc-kernel": "1.178.4",
76
+ "@ai-ecoverse/slicc-kernel": "1.179.0",
77
77
  "@ai-ecoverse/slicc-scrub": "1.1.0",
78
78
  "@ai-ecoverse/slicc-shared-web": "2.14.2",
79
- "@ai-ecoverse/slicc-spectrum": "2.11.4",
80
- "@ai-ecoverse/wasi-fnox": "1.46.0-2",
79
+ "@ai-ecoverse/slicc-spectrum": "2.12.0",
80
+ "@ai-ecoverse/wasi-fnox": "1.47.0-1",
81
81
  "@ai-ecoverse/wasm-bash": "5.3.0-23",
82
82
  "@ai-ecoverse/wasm-coreutils": "9.12.0-15",
83
83
  "@ai-ecoverse/wasm-git": "2.55.0-22",