agent-afk 5.255.0 → 5.257.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 (56) hide show
  1. package/dist/agent/providers/shared/tool-call-trace.d.ts +1 -0
  2. package/dist/agent/session/preamble-strip.d.ts +3 -0
  3. package/dist/agent/trace/events.d.ts +4 -0
  4. package/dist/agent/trace/types.d.ts +1 -0
  5. package/dist/agent/whatif-episode-gate.d.ts +5 -0
  6. package/dist/cli/commands/whatif.d.ts +2 -0
  7. package/dist/cli/slash/commands/whatif.d.ts +2 -0
  8. package/dist/cli.mjs +699 -363
  9. package/dist/config/env.d.ts +23 -0
  10. package/dist/config/env.paths.d.ts +28 -0
  11. package/dist/config/env.whatif.d.ts +24 -0
  12. package/dist/index.mjs +112 -112
  13. package/dist/paths.d.ts +1 -0
  14. package/dist/telegram.mjs +138 -137
  15. package/dist/whatif/args.d.ts +28 -0
  16. package/dist/whatif/args.usage.d.ts +1 -0
  17. package/dist/whatif/compile.d.ts +6 -0
  18. package/dist/whatif/complete.d.ts +2 -0
  19. package/dist/whatif/complete.retry.d.ts +8 -0
  20. package/dist/whatif/cost.d.ts +27 -0
  21. package/dist/whatif/discover.d.ts +15 -0
  22. package/dist/whatif/episodes.d.ts +12 -0
  23. package/dist/whatif/index.d.ts +11 -0
  24. package/dist/whatif/json-extract.d.ts +3 -0
  25. package/dist/whatif/judge/claude.d.ts +2 -0
  26. package/dist/whatif/judge/index.d.ts +8 -0
  27. package/dist/whatif/judge/jev-connect.d.ts +5 -0
  28. package/dist/whatif/judge/jev.d.ts +9 -0
  29. package/dist/whatif/ledger.d.ts +10 -0
  30. package/dist/whatif/observe.d.ts +6 -0
  31. package/dist/whatif/operators/content-ops.d.ts +4 -0
  32. package/dist/whatif/operators/index.d.ts +6 -0
  33. package/dist/whatif/operators/launch-ops.d.ts +4 -0
  34. package/dist/whatif/operators/memory-ops.d.ts +3 -0
  35. package/dist/whatif/operators/sandbox-guard.d.ts +2 -0
  36. package/dist/whatif/operators/skill-plugin-ops.d.ts +3 -0
  37. package/dist/whatif/predict.d.ts +11 -0
  38. package/dist/whatif/report.d.ts +9 -0
  39. package/dist/whatif/run.d.ts +9 -0
  40. package/dist/whatif/run.limits.d.ts +2 -0
  41. package/dist/whatif/run.persist.d.ts +2 -0
  42. package/dist/whatif/run.verify.d.ts +30 -0
  43. package/dist/whatif/runner/afk-runner.d.ts +10 -0
  44. package/dist/whatif/runner/afk-runner.run.d.ts +16 -0
  45. package/dist/whatif/runner/afk-runner.snapshot.d.ts +4 -0
  46. package/dist/whatif/runner/capture-server.d.ts +9 -0
  47. package/dist/whatif/runner/child-env.d.ts +2 -0
  48. package/dist/whatif/runner/tool-log.d.ts +2 -0
  49. package/dist/whatif/sandbox.d.ts +14 -0
  50. package/dist/whatif/sandbox.home.d.ts +3 -0
  51. package/dist/whatif/stats.d.ts +7 -0
  52. package/dist/whatif/structural.d.ts +2 -0
  53. package/dist/whatif/structural.normalize.d.ts +5 -0
  54. package/dist/whatif/surface.d.ts +18 -0
  55. package/dist/whatif/types.d.ts +260 -0
  56. package/package.json +1 -1
@@ -6,6 +6,7 @@ export declare function buildToolCallStartedPayload(args: {
6
6
  input: unknown;
7
7
  subagentId?: string | undefined;
8
8
  }): ToolCallStartedPayload;
9
+ export declare function buildErrorHead(isError: boolean, content: string): string | undefined;
9
10
  export declare function buildToolCallCompletedPayload(args: {
10
11
  toolUseId: string;
11
12
  name: string;
@@ -0,0 +1,3 @@
1
+ export declare function isPreamble(text: string): boolean;
2
+ export declare function extractSkillTitle(text: string): string | undefined;
3
+ export declare function extractUserContent(text: string): string | undefined;
@@ -47,6 +47,7 @@ export declare const ToolCallCompletedPayloadSchema: z.ZodObject<{
47
47
  batchIndex: z.ZodOptional<z.ZodNumber>;
48
48
  batchSize: z.ZodOptional<z.ZodNumber>;
49
49
  subagentId: z.ZodOptional<z.ZodString>;
50
+ errorHead: z.ZodOptional<z.ZodString>;
50
51
  }, z.core.$strip>;
51
52
  export declare const ToolCallPayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
52
53
  phase: z.ZodLiteral<"started">;
@@ -82,6 +83,7 @@ export declare const ToolCallPayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObject
82
83
  batchIndex: z.ZodOptional<z.ZodNumber>;
83
84
  batchSize: z.ZodOptional<z.ZodNumber>;
84
85
  subagentId: z.ZodOptional<z.ZodString>;
86
+ errorHead: z.ZodOptional<z.ZodString>;
85
87
  }, z.core.$strip>], "phase">;
86
88
  export declare const HookEventNameSchema: z.ZodEnum<{
87
89
  PreToolUse: "PreToolUse";
@@ -631,6 +633,7 @@ export declare const TraceEventInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject
631
633
  batchIndex: z.ZodOptional<z.ZodNumber>;
632
634
  batchSize: z.ZodOptional<z.ZodNumber>;
633
635
  subagentId: z.ZodOptional<z.ZodString>;
636
+ errorHead: z.ZodOptional<z.ZodString>;
634
637
  }, z.core.$strip>], "phase">;
635
638
  }, z.core.$strip>, z.ZodObject<{
636
639
  kind: z.ZodLiteral<"hook_decision">;
@@ -981,6 +984,7 @@ export declare const TraceEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
981
984
  batchIndex: z.ZodOptional<z.ZodNumber>;
982
985
  batchSize: z.ZodOptional<z.ZodNumber>;
983
986
  subagentId: z.ZodOptional<z.ZodString>;
987
+ errorHead: z.ZodOptional<z.ZodString>;
984
988
  }, z.core.$strip>], "phase">;
985
989
  }, z.core.$strip>, z.ZodObject<{
986
990
  ts: z.ZodString;
@@ -23,6 +23,7 @@ export interface ToolCallCompletedPayload {
23
23
  incompleteReason?: string;
24
24
  circuitBreaker?: boolean;
25
25
  failureClass?: ToolFailureClass;
26
+ errorHead?: string;
26
27
  batchIndex?: number;
27
28
  batchSize?: number;
28
29
  subagentId?: string;
@@ -0,0 +1,5 @@
1
+ import type { HookContext, HookDecision } from './hooks.js';
2
+ export declare function resetWhatifEpisodeGateForTests(): void;
3
+ export declare function isWhatifEpisode(): boolean;
4
+ export declare const EPISODE_BLOCK_REASON: string;
5
+ export declare function createWhatifEpisodeGate(): (context: HookContext) => HookDecision;
@@ -0,0 +1,2 @@
1
+ import { Command } from 'commander';
2
+ export declare function registerWhatifCommand(program: Command): void;
@@ -0,0 +1,2 @@
1
+ import type { SlashCommand } from '../types.js';
2
+ export declare const whatifCmd: SlashCommand;