@evo-dev/core 0.0.1-alpha.6 → 0.0.1-alpha.7

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.
@@ -931,6 +931,12 @@ var CODEX_STOP_EVENTS_WITHOUT_ADDITIONAL_CONTEXT = new Set([
931
931
  "Stop",
932
932
  "SubagentStop"
933
933
  ]);
934
+ var COMPLETION_EVENTS_WITHOUT_DEVELOPMENT_DIAGNOSTICS = new Set([
935
+ "Stop",
936
+ "SubagentStop",
937
+ "TaskCompleted",
938
+ "TeammateIdle"
939
+ ]);
934
940
  function createDefaultHookSettings() {
935
941
  return {
936
942
  enabled: true,
package/dist/index.js CHANGED
@@ -9751,6 +9751,12 @@ var CODEX_STOP_EVENTS_WITHOUT_ADDITIONAL_CONTEXT = new Set([
9751
9751
  "Stop",
9752
9752
  "SubagentStop"
9753
9753
  ]);
9754
+ var COMPLETION_EVENTS_WITHOUT_DEVELOPMENT_DIAGNOSTICS = new Set([
9755
+ "Stop",
9756
+ "SubagentStop",
9757
+ "TaskCompleted",
9758
+ "TeammateIdle"
9759
+ ]);
9754
9760
  function createDefaultHookSettings() {
9755
9761
  return {
9756
9762
  enabled: true,
@@ -9931,6 +9937,11 @@ async function handleHookRuntime(input) {
9931
9937
  summary: `Hook ${input.event.type} ignored because EvoDev hooks are disabled.`
9932
9938
  };
9933
9939
  }
9940
+ if (isActiveClaudeStopHook(input)) {
9941
+ return createRuntimeResult(input, null, {
9942
+ summary: `${input.event.type} re-entry allowed to complete without hook output.`
9943
+ });
9944
+ }
9934
9945
  const diagnostics = await recordTeamNativeSessionFromHook(input);
9935
9946
  const projectDiagnostics = await recordDiscoveredProjectFromHook(input);
9936
9947
  let result;
@@ -10348,7 +10359,7 @@ ${context}`
10348
10359
  };
10349
10360
  }
10350
10361
  function appendDevelopmentHookDiagnostics(input, result) {
10351
- if (input.teamRuntimeDisplayMode !== "development" || !canDeliverTeamMessagesFromHook(input.target, input.event.type)) {
10362
+ if (input.teamRuntimeDisplayMode !== "development" || COMPLETION_EVENTS_WITHOUT_DEVELOPMENT_DIAGNOSTICS.has(input.event.type) || !canDeliverTeamMessagesFromHook(input.target, input.event.type)) {
10352
10363
  return result;
10353
10364
  }
10354
10365
  return {
@@ -10356,6 +10367,9 @@ function appendDevelopmentHookDiagnostics(input, result) {
10356
10367
  output: appendAdditionalContext(result.output, input.event.type, formatDevelopmentHookDiagnostics(input))
10357
10368
  };
10358
10369
  }
10370
+ function isActiveClaudeStopHook(input) {
10371
+ return input.target === "claude" && (input.event.type === "Stop" || input.event.type === "SubagentStop") && input.rawPayload.stop_hook_active === true;
10372
+ }
10359
10373
  function formatDevelopmentHookDiagnostics(input) {
10360
10374
  const metadata = Object.entries(input.event.payload.metadata);
10361
10375
  const inputFields = Object.keys(input.rawPayload).map((field) => field.replace(/[^A-Za-z0-9._-]/g, "-").slice(0, 80)).filter((field) => field.length > 0).slice(0, 30);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evo-dev/core",
3
- "version": "0.0.1-alpha.6",
3
+ "version": "0.0.1-alpha.7",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -226,6 +226,12 @@ const CODEX_STOP_EVENTS_WITHOUT_ADDITIONAL_CONTEXT = new Set<CanonicalHookEventT
226
226
  "Stop",
227
227
  "SubagentStop",
228
228
  ]);
229
+ const COMPLETION_EVENTS_WITHOUT_DEVELOPMENT_DIAGNOSTICS = new Set<CanonicalHookEventType>([
230
+ "Stop",
231
+ "SubagentStop",
232
+ "TaskCompleted",
233
+ "TeammateIdle",
234
+ ]);
229
235
 
230
236
  export function createDefaultHookSettings(): HookSettings {
231
237
  return {
@@ -438,6 +444,12 @@ export async function handleHookRuntime(input: HandleHookRuntimeInput): Promise<
438
444
  };
439
445
  }
440
446
 
447
+ if (isActiveClaudeStopHook(input)) {
448
+ return createRuntimeResult(input, null, {
449
+ summary: `${input.event.type} re-entry allowed to complete without hook output.`,
450
+ });
451
+ }
452
+
441
453
  const diagnostics = await recordTeamNativeSessionFromHook(input);
442
454
  const projectDiagnostics = await recordDiscoveredProjectFromHook(input);
443
455
  let result: HookRuntimeResult | undefined;
@@ -1026,6 +1038,7 @@ function appendDevelopmentHookDiagnostics(
1026
1038
  ): HookRuntimeResult {
1027
1039
  if (
1028
1040
  input.teamRuntimeDisplayMode !== "development" ||
1041
+ COMPLETION_EVENTS_WITHOUT_DEVELOPMENT_DIAGNOSTICS.has(input.event.type) ||
1029
1042
  !canDeliverTeamMessagesFromHook(input.target, input.event.type)
1030
1043
  ) {
1031
1044
  return result;
@@ -1040,6 +1053,14 @@ function appendDevelopmentHookDiagnostics(
1040
1053
  };
1041
1054
  }
1042
1055
 
1056
+ function isActiveClaudeStopHook(input: HandleHookRuntimeInput): boolean {
1057
+ return (
1058
+ input.target === "claude" &&
1059
+ (input.event.type === "Stop" || input.event.type === "SubagentStop") &&
1060
+ input.rawPayload.stop_hook_active === true
1061
+ );
1062
+ }
1063
+
1043
1064
  function formatDevelopmentHookDiagnostics(input: HandleHookRuntimeInput): string {
1044
1065
  const metadata = Object.entries(input.event.payload.metadata);
1045
1066
  const inputFields = Object.keys(input.rawPayload)