@kolisachint/hoocode-agent 0.4.118 → 0.4.119

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 (68) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/dist/core/agent-session.d.ts +35 -1
  3. package/dist/core/agent-session.d.ts.map +1 -1
  4. package/dist/core/agent-session.js +157 -1
  5. package/dist/core/agent-session.js.map +1 -1
  6. package/dist/core/extensions/index.d.ts +1 -1
  7. package/dist/core/extensions/index.d.ts.map +1 -1
  8. package/dist/core/extensions/index.js.map +1 -1
  9. package/dist/core/extensions/plugins/authoring.d.ts.map +1 -1
  10. package/dist/core/extensions/plugins/authoring.js +5 -2
  11. package/dist/core/extensions/plugins/authoring.js.map +1 -1
  12. package/dist/core/extensions/plugins/formats/copilot.d.ts +16 -14
  13. package/dist/core/extensions/plugins/formats/copilot.d.ts.map +1 -1
  14. package/dist/core/extensions/plugins/formats/copilot.js +64 -46
  15. package/dist/core/extensions/plugins/formats/copilot.js.map +1 -1
  16. package/dist/core/extensions/plugins/formats/jsonManifest.d.ts.map +1 -1
  17. package/dist/core/extensions/plugins/formats/jsonManifest.js +6 -6
  18. package/dist/core/extensions/plugins/formats/jsonManifest.js.map +1 -1
  19. package/dist/core/extensions/plugins/formats/shared.d.ts +12 -1
  20. package/dist/core/extensions/plugins/formats/shared.d.ts.map +1 -1
  21. package/dist/core/extensions/plugins/formats/shared.js +16 -0
  22. package/dist/core/extensions/plugins/formats/shared.js.map +1 -1
  23. package/dist/core/extensions/plugins/formats/types.d.ts +7 -2
  24. package/dist/core/extensions/plugins/formats/types.d.ts.map +1 -1
  25. package/dist/core/extensions/plugins/formats/types.js.map +1 -1
  26. package/dist/core/extensions/plugins/index.d.ts.map +1 -1
  27. package/dist/core/extensions/plugins/index.js +2 -0
  28. package/dist/core/extensions/plugins/index.js.map +1 -1
  29. package/dist/core/extensions/plugins/install.d.ts +23 -1
  30. package/dist/core/extensions/plugins/install.d.ts.map +1 -1
  31. package/dist/core/extensions/plugins/install.js +63 -5
  32. package/dist/core/extensions/plugins/install.js.map +1 -1
  33. package/dist/core/extensions/plugins/marketplace.d.ts.map +1 -1
  34. package/dist/core/extensions/plugins/marketplace.js +22 -16
  35. package/dist/core/extensions/plugins/marketplace.js.map +1 -1
  36. package/dist/core/extensions/runner.d.ts +2 -0
  37. package/dist/core/extensions/runner.d.ts.map +1 -1
  38. package/dist/core/extensions/runner.js +15 -0
  39. package/dist/core/extensions/runner.js.map +1 -1
  40. package/dist/core/extensions/types.d.ts +33 -0
  41. package/dist/core/extensions/types.d.ts.map +1 -1
  42. package/dist/core/extensions/types.js.map +1 -1
  43. package/dist/core/settings-defaults.d.ts +1 -1
  44. package/dist/core/settings-defaults.d.ts.map +1 -1
  45. package/dist/core/settings-defaults.js +1 -1
  46. package/dist/core/settings-defaults.js.map +1 -1
  47. package/dist/core/settings-types.d.ts.map +1 -1
  48. package/dist/core/settings-types.js.map +1 -1
  49. package/dist/core/tools/plugins.d.ts.map +1 -1
  50. package/dist/core/tools/plugins.js +26 -5
  51. package/dist/core/tools/plugins.js.map +1 -1
  52. package/dist/core/tools/propose-plugin.d.ts.map +1 -1
  53. package/dist/core/tools/propose-plugin.js +10 -3
  54. package/dist/core/tools/propose-plugin.js.map +1 -1
  55. package/dist/extensions/core/mcp-loader.d.ts.map +1 -1
  56. package/dist/extensions/core/mcp-loader.js +1 -1
  57. package/dist/extensions/core/mcp-loader.js.map +1 -1
  58. package/dist/main.d.ts.map +1 -1
  59. package/dist/main.js +2 -1
  60. package/dist/main.js.map +1 -1
  61. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  62. package/dist/modes/interactive/interactive-mode.js +2 -0
  63. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  64. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  65. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  66. package/examples/extensions/sandbox/package.json +1 -1
  67. package/examples/extensions/with-deps/package.json +1 -1
  68. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,64 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.4.119] - 2026-07-13
4
+
5
+ ### Added
6
+
7
+ - **Single-turn capability loop**: `InstallPlugin` and `ProposePlugin` now
8
+ activate the plugin in the live session — skills, slash commands, and
9
+ subagents are usable on the model's very next request, in the same turn, with
10
+ no `/reload`. Plugins bundling executable capabilities (hooks, MCP servers)
11
+ trigger an automatic reload when the turn ends. `UninstallPlugin` schedules
12
+ the same idle reload so cleanup is autonomous too.
13
+ - Mid-run context refresh: tool or system-prompt changes made while a run is
14
+ streaming (deferred MCP schema resolution via `ResolveMcpTools`, live plugin
15
+ activation) now reach the next provider request within the same run, via the
16
+ agent loop's `prepareNextTurn` hook. Previously the loop's context was frozen
17
+ at run start, so `ResolveMcpTools`-resolved tools were not callable until the
18
+ next user prompt.
19
+ - Well-known marketplaces: the official Claude plugins directory
20
+ (`anthropics/claude-plugins-official`, 250+ plugins) is registered as a
21
+ curated, trusted marketplace out of the box. Its index is cloned lazily into
22
+ `.agents/marketplace-cache/` on first `SearchPlugins` call (offline degrades
23
+ gracefully) and is never auto-updated.
24
+ - Reusability sensing: system-prompt guidance now nudges the model to
25
+ `SearchPlugins` before hand-rolling a missing capability, and to author a
26
+ reusable recipe as a plugin with `ProposePlugin` autonomously when no
27
+ marketplace plugin covers it.
28
+
29
+ - Real-world GitHub Copilot plugin support: the Copilot adapter now reads the
30
+ convention established by `github/copilot-plugins` — plugin manifests at
31
+ `.github/plugin/plugin.json` over a Claude-mirror capability tree, marketplace
32
+ indices at `.github/plugin/marketplace.json`, manifest dir-path overrides
33
+ (`"skills": "./skills/"`), and the `{ "source": "github", "repo", "path" }`
34
+ source shorthand. The legacy authored layout (`.github/copilot-plugin.json` +
35
+ prompts/chatmodes) still parses. `github/copilot-plugins` joins the well-known
36
+ trusted marketplaces (searchable with `platform: "github"`).
37
+ - Manifest-less marketplace plugins (bare capability trees, e.g.
38
+ copilot-plugins' `spark`) now install: a native manifest is synthesized from
39
+ the marketplace entry so the standard loader carries them.
40
+ - Hooks + bundled scripts verified end to end through the install path: script
41
+ exec bits survive install, the `{ description, hooks }` `hooks.json` wrapper
42
+ parses, `${CLAUDE_PLUGIN_ROOT}` resolves to the installed root, event JSON
43
+ arrives on stdin, and exit-code 2 blocks the tool call.
44
+
45
+ ### Changed
46
+
47
+ - `deferMcpSchemas` now defaults to **on**: MCP tool schemas are deferred
48
+ (names only in context, resolved on demand via `ResolveMcpTools`), cutting
49
+ the context cost of MCP-heavy plugins. Set `deferMcpSchemas: false` to
50
+ restore eager schema registration.
51
+ - `ProposePlugin`'s Copilot output now follows the real-world convention: one
52
+ shared capability tree plus a `.github/plugin/plugin.json` marker manifest
53
+ (previously `.github/copilot-plugin.json` + `.prompt.md`/`.chatmode.md`
54
+ files).
55
+
56
+ ### Known limitations
57
+
58
+ - Remote MCP servers (`{ "type": "http", "url": ... }` in a plugin's
59
+ `.mcp.json`, e.g. workiq) are not yet supported — the MCP loader is
60
+ stdio-only; such servers are skipped at plugin load.
61
+
3
62
  ## [0.4.118] - 2026-07-12
4
63
 
5
64
  ## [0.4.117] - 2026-07-12
@@ -17,7 +17,7 @@ import type { ImageContent, Model, TextContent } from "@kolisachint/hoocode-ai";
17
17
  import { type SessionStats } from "./agent-session-stats.js";
18
18
  import { type NavigateTreeOptions, type NavigateTreeResult } from "./agent-session-tree-navigation.js";
19
19
  import { type BashResult } from "./bash-executor.js";
20
- import { type ContextUsage, type ExtensionCommandContextActions, type ExtensionErrorListener, ExtensionRunner, type ExtensionUIContext, type InputSource, type ReplacedSessionContext, type SessionStartEvent, type ShutdownHandler, type ToolDefinition, type ToolInfo } from "./extensions/index.js";
20
+ import { type ContextUsage, type ExtensionCommandContextActions, type ExtensionErrorListener, ExtensionRunner, type ExtensionUIContext, type InputSource, type PluginActivationResult, type ReplacedSessionContext, type SessionStartEvent, type ShutdownHandler, type ToolDefinition, type ToolInfo } from "./extensions/index.js";
21
21
  import type { ModelRegistry } from "./model-registry.js";
22
22
  import { type PromptTemplate } from "./prompt-templates.js";
23
23
  import type { ResourceLoader } from "./resource-loader.js";
@@ -167,6 +167,20 @@ export declare class AgentSession {
167
167
  private _toolPromptGuidelines;
168
168
  private _baseSystemPrompt;
169
169
  private _baseSystemPromptOptions;
170
+ /**
171
+ * Set when tools or the system prompt change while a run is in flight (a tool
172
+ * registered mid-turn, a plugin activated live). The agent loop snapshots its
173
+ * context at run start; this flag makes prepareNextTurn hand the loop a fresh
174
+ * systemPrompt + tools before the next provider request, so mid-turn
175
+ * capability changes are visible within the same turn.
176
+ */
177
+ private _runtimeContextDirty;
178
+ /**
179
+ * Set when a change needs a full reload (executable plugin capabilities:
180
+ * hooks, MCP servers, providers) that cannot be wired mid-turn. Consumed on
181
+ * agent_end: once the session is idle the reload runs automatically.
182
+ */
183
+ private _reloadWhenIdle;
170
184
  constructor(config: AgentSessionConfig);
171
185
  /** Model registry for API key resolution and model discovery */
172
186
  get modelRegistry(): ModelRegistry;
@@ -437,6 +451,26 @@ export declare class AgentSession {
437
451
  private _refreshToolRegistry;
438
452
  private _buildRuntime;
439
453
  reload(): Promise<void>;
454
+ /**
455
+ * Activate a just-installed or just-authored plugin in the LIVE session, no
456
+ * reload required. Passive capabilities — skills, slash commands, subagents,
457
+ * themes — register immediately and become visible to the model on its next
458
+ * provider request, even mid-turn (via the prepareNextTurn context refresh).
459
+ *
460
+ * Executable capabilities (hooks, MCP servers, providers) cannot be safely
461
+ * wired into a run that is already streaming; when the plugin bundles any,
462
+ * this schedules an automatic full reload for when the session next goes
463
+ * idle (end of the current turn), so they still activate autonomously.
464
+ */
465
+ activatePlugin(pluginDir: string): PluginActivationResult;
466
+ /**
467
+ * Ask for a full reload once the session is idle — used when a change (e.g.
468
+ * uninstalling a plugin) can only take effect through the reload path. Runs
469
+ * immediately when already idle.
470
+ */
471
+ requestReloadWhenIdle(): void;
472
+ /** Run the pending idle reload through the mode's reload flow when bound (UI refresh included). */
473
+ private _runIdleReload;
440
474
  /**
441
475
  * Cancel in-progress retry.
442
476
  */