{"version":"2.1.333","anchor":"session-hooks-track-declaredby","canonical_anchor":"plugin-hook-records-carry-declaredby","heading":"Hooks now record who declared them with a declaredBy field","tier":"internal","area":"Hooks","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333\/e\/session-hooks-track-declaredby","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333","markdown":"### Hooks now record who declared them with a declaredBy field\n\nHook entries gain a declaredBy field used to match and attribute them, and plugin-injected prompts are labelled with the plugin's name\n\n**Unclear.** What the two new markers on HTTP and script hooks change for users is not known.\n\n**What**\n\nA hook is a command or prompt that runs automatically at a set point in a session. Hook entries now carry a `declaredBy` field saying who declared the hook.\n\n- Hooks are matched and removed using `declaredBy`. Before, entries were told apart only by matcher, skill folder, personal setting and checkout.\n\n- Prompts that come from a plugin and are not sent `asUser` are wrapped with the plugin's name. The name is cleaned to 1 to 40 characters, or \"unnamed\".\n\n- HTTP and script hooks gain `pinsGit` and `forSpawnedAgent` flags.\n\n**Why**\n\nHooks from different sources no longer merge into a single entry. Prompts a plugin adds are labelled with the plugin they came from, so you can see where they came from.\n\n- Area: Hooks\n- Names: `declaredBy`, `pinsGit`, `forSpawnedAgent`\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}