@ai-ecoverse/slicc-agent 7.31.0 → 7.33.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 (81) hide show
  1. package/README.md +28 -8
  2. package/dist/agent.js +4 -0
  3. package/dist/agent.js.map +2 -2
  4. package/dist/approvals/policy.js +27 -5
  5. package/dist/approvals/policy.js.map +2 -2
  6. package/dist/approvals/published.js +18 -0
  7. package/dist/approvals/published.js.map +7 -0
  8. package/dist/approvals/record.js +4 -1
  9. package/dist/approvals/record.js.map +2 -2
  10. package/dist/approvals/run-licks.js +137 -0
  11. package/dist/approvals/run-licks.js.map +7 -0
  12. package/dist/approvals/run-procs.js +127 -0
  13. package/dist/approvals/run-procs.js.map +7 -0
  14. package/dist/approvals/run.js +468 -0
  15. package/dist/approvals/run.js.map +7 -0
  16. package/dist/approvals/runnable.js +125 -0
  17. package/dist/approvals/runnable.js.map +7 -0
  18. package/dist/approvals/sudo.js +29 -1
  19. package/dist/approvals/sudo.js.map +2 -2
  20. package/dist/client.js +1 -0
  21. package/dist/client.js.map +2 -2
  22. package/dist/control.js +7 -1
  23. package/dist/control.js.map +2 -2
  24. package/dist/guests/view.js +8 -0
  25. package/dist/guests/view.js.map +2 -2
  26. package/dist/host.js +69 -16
  27. package/dist/host.js.map +2 -2
  28. package/dist/index.js +14 -0
  29. package/dist/index.js.map +2 -2
  30. package/dist/kernel/exec.js +42 -6
  31. package/dist/kernel/exec.js.map +2 -2
  32. package/dist/kernel/trace.js +203 -0
  33. package/dist/kernel/trace.js.map +7 -0
  34. package/dist/licks/extension.js +1 -0
  35. package/dist/licks/extension.js.map +2 -2
  36. package/dist/licks/lick.js +1 -0
  37. package/dist/licks/lick.js.map +2 -2
  38. package/dist/main.js +3 -0
  39. package/dist/main.js.map +2 -2
  40. package/dist/ran/index.js +55 -0
  41. package/dist/ran/index.js.map +7 -0
  42. package/dist/ran/shown.js +62 -0
  43. package/dist/ran/shown.js.map +7 -0
  44. package/dist/services.js +7 -2
  45. package/dist/services.js.map +2 -2
  46. package/dist/spectrum/approvals-port.js +69 -0
  47. package/dist/spectrum/approvals-port.js.map +2 -2
  48. package/dist/spectrum/messages.js +36 -9
  49. package/dist/spectrum/messages.js.map +3 -3
  50. package/dist/spectrum/monitor-port.js +2 -1
  51. package/dist/spectrum/monitor-port.js.map +2 -2
  52. package/dist/spectrum/tool-title.js +10 -12
  53. package/dist/spectrum/tool-title.js.map +3 -3
  54. package/dist/titles/cluster.js +15 -5
  55. package/dist/titles/cluster.js.map +2 -2
  56. package/dist/types/agent.d.ts +2 -0
  57. package/dist/types/approvals/policy.d.ts +10 -1
  58. package/dist/types/approvals/published.d.ts +3 -0
  59. package/dist/types/approvals/record.d.ts +44 -1
  60. package/dist/types/approvals/run-licks.d.ts +18 -0
  61. package/dist/types/approvals/run-procs.d.ts +40 -0
  62. package/dist/types/approvals/run.d.ts +60 -0
  63. package/dist/types/approvals/runnable.d.ts +55 -0
  64. package/dist/types/approvals/sudo.d.ts +3 -1
  65. package/dist/types/client.d.ts +2 -0
  66. package/dist/types/host.d.ts +10 -0
  67. package/dist/types/index.d.ts +4 -1
  68. package/dist/types/kernel/client.d.ts +47 -1
  69. package/dist/types/kernel/exec.d.ts +4 -0
  70. package/dist/types/kernel/trace.d.ts +45 -0
  71. package/dist/types/licks/lick.d.ts +1 -1
  72. package/dist/types/licks/triage.d.ts +1 -1
  73. package/dist/types/main.d.ts +2 -1
  74. package/dist/types/ran/index.d.ts +3 -0
  75. package/dist/types/ran/shown.d.ts +12 -0
  76. package/dist/types/services.d.ts +7 -2
  77. package/dist/types/spectrum/approvals-port.d.ts +10 -2
  78. package/dist/types/spectrum/messages.d.ts +1 -0
  79. package/dist/types/spectrum/tool-title.d.ts +1 -0
  80. package/dist/types/titles/cluster.d.ts +1 -0
  81. package/package.json +4 -4
@@ -27,7 +27,7 @@ export declare function skipEntry(event: LickEvent, verdict: Verdict, now: numbe
27
27
  probabilities: Record<string, number>;
28
28
  model: string;
29
29
  cost: number | null;
30
- channel: "bash" | "cherry" | "cone-message" | "cron" | "discovery" | "fswatch" | "jshd" | "navigate" | "preview" | "scoop-idle" | "scoop-notify" | "scoop-wait" | "session-reload" | "sprinkle" | "sudo-request" | "upgrade" | "webhook" | "workflow";
30
+ channel: "bash" | "cherry" | "cone-message" | "cron" | "discovery" | "fswatch" | "jshd" | "navigate" | "preview" | "scoop-idle" | "scoop-notify" | "scoop-wait" | "session-reload" | "sprinkle" | "sudo-request" | "sudo-run" | "upgrade" | "webhook" | "workflow";
31
31
  source: string;
32
32
  title: string;
33
33
  text: string;
@@ -2,7 +2,7 @@ import type { Provider } from '@earendil-works/pi-ai';
2
2
  import type { Models } from '@earendil-works/pi-ai/models';
3
3
  import { type ModelRef, type Storage, type ToolRegistration } from '@earendil-works/pi-durable';
4
4
  import { codemodeTool } from './codemode/index.ts';
5
- import { type AgentHost } from './host.ts';
5
+ import { type AgentHost, type RunTimes } from './host.ts';
6
6
  import type { KernelClient } from './kernel/client.ts';
7
7
  import { type UserClients } from './kernel/users.ts';
8
8
  import { type Transport } from './net.ts';
@@ -36,6 +36,7 @@ export interface AgentWorkerOptions {
36
36
  mcpRedirect?: string;
37
37
  approvalMs?: number;
38
38
  stagedMs?: number;
39
+ runTimes?: RunTimes;
39
40
  }
40
41
  export declare function usersOf(admin: MessagePort | undefined, wanted: boolean | undefined, attach: KernelAttach): UserClients | undefined;
41
42
  export declare const STORE_DIR = "/.slicc";
@@ -0,0 +1,3 @@
1
+ import { type Extension, type ToolRegistration } from '@earendil-works/pi-durable';
2
+ export declare const RAN = "slicc-ran";
3
+ export declare function ranExtension(tools: readonly ToolRegistration[]): Extension;
@@ -0,0 +1,12 @@
1
+ import type { Ran, RanProgram } from '../kernel/trace.ts';
2
+ export declare const RAN_KEY = "ran";
3
+ export declare const META_PROGRAMS = 8;
4
+ export declare function ranOf(details: unknown): Ran | undefined;
5
+ export declare function saidIntent(raw: string | undefined): string;
6
+ export declare function listed(names: readonly string[]): string;
7
+ export declare function ranTitle(ran: Ran): string | undefined;
8
+ export declare function seconds(ms: number): string;
9
+ export declare function ranMeta(ran: Ran): string;
10
+ export declare function failed(program: RanProgram): string | undefined;
11
+ export declare function ranFailures(ran: Ran): string[];
12
+ export declare function ranLine(ran: Ran | undefined): string;
@@ -2,6 +2,8 @@ import type { Context, JsonValue, RemoteContract, ReplicatedState } from '@earen
2
2
  import type { BlockedReason, ConversationView } from '@earendil-works/pi-durable';
3
3
  import type { Approval, ApprovalDecided, ApprovalDecision } from './approvals/index.ts';
4
4
  import type { ApprovalPolicy, ApprovalPolicyChange, ApprovalPolicySet } from './approvals/policy.ts';
5
+ import type { RunAnswer } from './approvals/run.ts';
6
+ import type { Runnable } from './approvals/runnable.ts';
5
7
  import type { SendAttachment, ShownAttachment } from './attachments.ts';
6
8
  import type { ChangesView } from './changes/git.ts';
7
9
  import type { FrozenCone } from './freezer/index.ts';
@@ -108,6 +110,8 @@ export interface AgentControl {
108
110
  }>;
109
111
  approvalPolicySet(change: ApprovalPolicyChange, context: Context): Promise<ApprovalPolicySet>;
110
112
  decide(id: string, decision: ApprovalDecision, reason: string | null, context: Context): Promise<ApprovalDecided>;
113
+ approvalRun(id: string, context: Context): Promise<RunAnswer>;
114
+ approvalRunStop(id: string, context: Context): Promise<RunAnswer>;
111
115
  }
112
116
  export interface ImportRequest {
113
117
  upload: string | null;
@@ -279,7 +283,7 @@ export interface AgentSettingsChange {
279
283
  thinkingLevel: 'off' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | null;
280
284
  agentId?: string | null;
281
285
  }
282
- export declare const CONTROL_METHODS: ("abort" | "agentCommands" | "approvalPolicySet" | "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")[];
286
+ export declare const CONTROL_METHODS: ("abort" | "agentCommands" | "approvalPolicySet" | "approvalRun" | "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")[];
283
287
  export declare const OWNER_DEVICE_METHODS: readonly (keyof AgentControl & string)[];
284
288
  export declare const CONTROL_READS: readonly (keyof AgentControl & string)[];
285
289
  export declare const AgentControl: RemoteContract;
@@ -303,6 +307,7 @@ export interface AgentTranscript {
303
307
  readonly guests: ReplicatedState<GuestSeat[]>;
304
308
  readonly approvals: ReplicatedState<Approval[]>;
305
309
  readonly approvalPolicy: ReplicatedState<ApprovalPolicy>;
310
+ readonly approvalRunnable: ReplicatedState<Record<string, Runnable>>;
306
311
  }
307
312
  export interface PrivateRevision {
308
313
  revision: number;
@@ -314,7 +319,7 @@ export interface Command {
314
319
  source?: SkillSource;
315
320
  package?: SkillPackage;
316
321
  }
317
- export declare const TRANSCRIPT_STATES: ("agents" | "approvalPolicy" | "approvals" | "changes" | "commands" | "deliveries" | "frozen" | "guests" | "importing" | "labels" | "memories" | "memoryScopes" | "monitor" | "privateRevision" | "sprinkles" | "state" | "vault" | "views")[];
322
+ export declare const TRANSCRIPT_STATES: ("agents" | "approvalPolicy" | "approvalRunnable" | "approvals" | "changes" | "commands" | "deliveries" | "frozen" | "guests" | "importing" | "labels" | "memories" | "memoryScopes" | "monitor" | "privateRevision" | "sprinkles" | "state" | "vault" | "views")[];
318
323
  export declare const AgentTranscript: RemoteContract;
319
324
  export declare const REMOTE_METHODS: ("abort" | "close" | "history" | "next" | "prompt" | "watch")[];
320
325
  export declare const REMOTE_READS: readonly (keyof AgentRemote & string)[];
@@ -1,14 +1,22 @@
1
- import type { Approval, ApprovalDecision, ApprovalsEvents, ApprovalsPort } from '@ai-ecoverse/slicc-spectrum/ui';
2
- import type { Approval as Item } from '../approvals/record.ts';
1
+ import type { Approval, ApprovalDecision, ApprovalRecord, ApprovalRun, ApprovalsEvents, ApprovalsPort } from '@ai-ecoverse/slicc-spectrum/ui';
2
+ import type { Approval as Item, SudoRun } from '../approvals/record.ts';
3
+ import type { Runnable } from '../approvals/runnable.ts';
3
4
  import type { AgentConnection } from '../client.ts';
4
5
  import { Emitter } from './emitter.ts';
5
6
  export declare const ARGS_LENGTH = 65536;
6
7
  export declare function shown(item: Item, agentName: string | undefined): Approval;
7
8
  export type HostApprovals = ApprovalsPort;
9
+ export declare function runShown(run: SudoRun): ApprovalRun & {
10
+ survivors?: number[];
11
+ };
12
+ export declare function recordOf(item: Item, agentName: string | undefined, runnable: Runnable | undefined): ApprovalRecord;
8
13
  export declare const NOT_HERE = "This request can't be answered in this tab.";
9
14
  export declare class ApprovalsAdapter extends Emitter<ApprovalsEvents> implements ApprovalsPort {
10
15
  #private;
11
16
  readonly decide?: (id: string, decision: ApprovalDecision, reason?: string) => Promise<void>;
17
+ readonly history?: () => readonly ApprovalRecord[];
18
+ readonly run?: (id: string) => Promise<void>;
19
+ readonly stopRun?: (id: string) => Promise<void>;
12
20
  constructor(connection: AgentConnection, host?: HostApprovals);
13
21
  list(): readonly Approval[];
14
22
  }
@@ -34,6 +34,7 @@ interface ModelMessage {
34
34
  isError?: boolean;
35
35
  details?: {
36
36
  patch?: unknown;
37
+ ran?: unknown;
37
38
  };
38
39
  }
39
40
  export declare function textOf(content: ModelMessage['content']): string;
@@ -1,4 +1,5 @@
1
1
  type Json = Record<string, unknown>;
2
+ export declare function shownTitle(text: string): string;
2
3
  export declare function commandTitle(command: string): string;
3
4
  export declare function toolTitle(name: string, args: Json | undefined, trusted?: boolean): string;
4
5
  export {};
@@ -5,6 +5,7 @@ export type Run = {
5
5
  output: string;
6
6
  done: boolean;
7
7
  intent: string;
8
+ ran: string;
8
9
  };
9
10
  export type Cluster = {
10
11
  runs: Run[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-agent",
3
- "version": "7.31.0",
3
+ "version": "7.33.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",
@@ -76,7 +76,7 @@
76
76
  "@ai-ecoverse/slicc-kernel": "1.181.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.12.0",
79
+ "@ai-ecoverse/slicc-spectrum": "2.14.0",
80
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",
@@ -87,7 +87,7 @@
87
87
  "fake-indexeddb": "6.2.7",
88
88
  "lefthook": "2.2.2",
89
89
  "monocart-coverage-reports": "3.2.0",
90
- "playwright-core": "1.64.1",
90
+ "playwright-core": "1.65.0",
91
91
  "semantic-release": "25.0.9",
92
92
  "slicc-agent-5": "npm:@ai-ecoverse/slicc-agent@5.10.1",
93
93
  "typescript": "7.0.2"
@@ -112,7 +112,7 @@
112
112
  },
113
113
  "peerDependencies": {
114
114
  "@ai-ecoverse/slicc-kernel": ">=1.172.2 <2",
115
- "@ai-ecoverse/slicc-spectrum": "^2.4.1"
115
+ "@ai-ecoverse/slicc-spectrum": "^2.14.0"
116
116
  },
117
117
  "peerDependenciesMeta": {
118
118
  "@ai-ecoverse/slicc-spectrum": {