@gajae-code/coding-agent 0.9.2 → 0.9.3

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 (69) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/types/capability/mcp.d.ts +3 -1
  3. package/dist/types/commands/mcp.d.ts +1 -1
  4. package/dist/types/modes/components/status-line/types.d.ts +6 -0
  5. package/dist/types/modes/components/status-line.d.ts +1 -0
  6. package/dist/types/modes/utils/ui-helpers.d.ts +12 -0
  7. package/dist/types/runtime-mcp/config-writer.d.ts +4 -3
  8. package/dist/types/runtime-mcp/types.d.ts +5 -4
  9. package/dist/types/session/agent-session.d.ts +16 -0
  10. package/dist/types/session/session-manager.d.ts +1 -0
  11. package/dist/types/tools/skill.d.ts +9 -8
  12. package/dist/types/utils/linkedom.d.ts +4 -0
  13. package/dist/types/utils/pasted-image-path.d.ts +5 -3
  14. package/package.json +11 -7
  15. package/scripts/build-binary.ts +2 -40
  16. package/scripts/compile-args.ts +91 -0
  17. package/scripts/generate-docs-index.ts +1 -0
  18. package/src/capability/mcp.ts +3 -1
  19. package/src/cli/mcp-cli.ts +108 -26
  20. package/src/cli.ts +21 -0
  21. package/src/commands/mcp.ts +8 -8
  22. package/src/commands/stats.ts +6 -2
  23. package/src/config/mcp-schema.json +21 -17
  24. package/src/coordinator-mcp/server.ts +7 -4
  25. package/src/discovery/builtin.ts +14 -0
  26. package/src/discovery/mcp-json.ts +14 -0
  27. package/src/gjc-runtime/state-runtime.ts +105 -12
  28. package/src/gjc-runtime/workflow-manifest.generated.json +4 -28
  29. package/src/gjc-runtime/workflow-manifest.ts +1 -7
  30. package/src/internal-urls/docs-index.generated.ts +3 -2
  31. package/src/internal-urls/gjc-protocol.ts +14 -1
  32. package/src/modes/components/assistant-message.ts +1 -1
  33. package/src/modes/components/status-line/presets.ts +5 -7
  34. package/src/modes/components/status-line/segments.ts +14 -0
  35. package/src/modes/components/status-line/types.ts +6 -0
  36. package/src/modes/components/status-line.ts +7 -1
  37. package/src/modes/components/tool-execution.ts +1 -1
  38. package/src/modes/controllers/event-controller.ts +9 -9
  39. package/src/modes/controllers/input-controller.ts +2 -2
  40. package/src/modes/interactive-mode.ts +12 -4
  41. package/src/modes/utils/ui-helpers.ts +154 -32
  42. package/src/prompts/tools/skill.md +2 -2
  43. package/src/runtime-mcp/config-writer.ts +4 -3
  44. package/src/runtime-mcp/config.ts +1 -0
  45. package/src/runtime-mcp/types.ts +5 -4
  46. package/src/session/agent-session.ts +117 -3
  47. package/src/session/session-manager.ts +68 -40
  48. package/src/tools/bash-interactive.ts +9 -4
  49. package/src/tools/browser/readable.ts +2 -2
  50. package/src/tools/fetch.ts +5 -5
  51. package/src/tools/skill.ts +14 -11
  52. package/src/utils/linkedom.ts +14 -0
  53. package/src/utils/pasted-image-path.ts +23 -9
  54. package/src/web/scrapers/arxiv.ts +2 -2
  55. package/src/web/scrapers/go-pkg.ts +2 -2
  56. package/src/web/scrapers/iacr.ts +2 -2
  57. package/src/web/scrapers/readthedocs.ts +2 -2
  58. package/src/web/scrapers/twitter.ts +3 -2
  59. package/src/web/scrapers/wikipedia.ts +2 -2
  60. package/src/export/html/template.css +0 -1060
  61. package/src/export/html/template.html +0 -47
  62. package/src/export/html/template.js +0 -2314
  63. package/vendor/insane-search/engine/tests/test_hardening.py +0 -57
  64. package/vendor/insane-search/engine/tests/test_smoke.py +0 -152
  65. package/vendor/insane-search/engine/tests/test_u1.py +0 -200
  66. package/vendor/insane-search/engine/tests/test_u4.py +0 -131
  67. package/vendor/insane-search/engine/tests/test_u5.py +0 -163
  68. package/vendor/insane-search/engine/tests/test_u7.py +0 -124
  69. package/vendor/insane-search/engine/tests/test_u8.py +0 -216
@@ -1,4 +1,4 @@
1
- import { parseHTML } from "linkedom";
1
+ import { parseHtmlLazy } from "../../utils/linkedom";
2
2
  import type { RenderResult, SpecialHandler } from "./types";
3
3
  import { buildResult, loadPage } from "./types";
4
4
  import { convertWithMarkit, fetchBinary } from "./utils";
@@ -31,7 +31,7 @@ export const handleArxiv: SpecialHandler = async (
31
31
  if (!result.ok) return null;
32
32
 
33
33
  // Parse the Atom feed response
34
- const doc = parseHTML(result.content).document;
34
+ const doc = (await parseHtmlLazy(result.content)).document;
35
35
  const entry = doc.querySelector("entry");
36
36
 
37
37
  if (!entry) return null;
@@ -1,5 +1,5 @@
1
1
  import { tryParseJson } from "@gajae-code/utils";
2
- import { parseHTML } from "linkedom";
2
+ import { parseHtmlLazy } from "../../utils/linkedom";
3
3
  import type { RenderResult, SpecialHandler } from "./types";
4
4
  import { buildResult, htmlToBasicMarkdown, loadPage } from "./types";
5
5
 
@@ -97,7 +97,7 @@ export const handleGoPkg: SpecialHandler = async (
97
97
  });
98
98
  }
99
99
 
100
- const doc = parseHTML(pageResult.content).document;
100
+ const doc = (await parseHtmlLazy(pageResult.content)).document;
101
101
 
102
102
  // Extract actual module path from breadcrumb or header
103
103
  const breadcrumb = doc.querySelector(".go-Breadcrumb");
@@ -1,4 +1,4 @@
1
- import { parseHTML } from "linkedom";
1
+ import { parseHtmlLazy } from "../../utils/linkedom";
2
2
  import type { RenderResult, SpecialHandler } from "./types";
3
3
  import { buildResult, loadPage } from "./types";
4
4
  import { convertWithMarkit, fetchBinary } from "./utils";
@@ -30,7 +30,7 @@ export const handleIacr: SpecialHandler = async (
30
30
 
31
31
  if (!result.ok) return null;
32
32
 
33
- const doc = parseHTML(result.content).document;
33
+ const doc = (await parseHtmlLazy(result.content)).document;
34
34
 
35
35
  // Extract metadata from the page
36
36
  const title =
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Read the Docs handler for web-fetch
3
3
  */
4
- import { parseHTML } from "linkedom";
4
+ import { parseHtmlLazy } from "../../utils/linkedom";
5
5
  import { buildResult, htmlToBasicMarkdown, loadPage, type RenderResult, type SpecialHandler } from "./types";
6
6
 
7
7
  export const handleReadTheDocs: SpecialHandler = async (
@@ -39,7 +39,7 @@ export const handleReadTheDocs: SpecialHandler = async (
39
39
  }
40
40
 
41
41
  // Parse HTML
42
- const root = parseHTML(result.content).document;
42
+ const root = (await parseHtmlLazy(result.content)).document;
43
43
 
44
44
  // Extract main content from common Read the Docs selectors
45
45
  let mainContent =
@@ -1,5 +1,6 @@
1
- import { type HTMLElement, parseHTML } from "linkedom";
1
+ import type { HTMLElement } from "linkedom";
2
2
  import { ToolAbortError } from "../../tools/tool-errors";
3
+ import { parseHtmlLazy } from "../../utils/linkedom";
3
4
  import type { RenderResult, SpecialHandler } from "./types";
4
5
  import { buildResult, loadPage } from "./types";
5
6
 
@@ -33,7 +34,7 @@ export const handleTwitter: SpecialHandler = async (
33
34
 
34
35
  if (result.ok && result.content.length > 500) {
35
36
  // Parse the Nitter HTML
36
- const doc = parseHTML(result.content).document;
37
+ const doc = (await parseHtmlLazy(result.content)).document;
37
38
 
38
39
  // Extract tweet content
39
40
  const tweetContent = doc.querySelector(".tweet-content")?.textContent?.trim();
@@ -1,4 +1,4 @@
1
- import { parseHTML } from "linkedom";
1
+ import { parseHtmlLazy } from "../../utils/linkedom";
2
2
  import type { RenderResult, SpecialHandler } from "./types";
3
3
  import { buildResult, loadPage } from "./types";
4
4
 
@@ -45,7 +45,7 @@ export const handleWikipedia: SpecialHandler = async (
45
45
  const contentResult = await loadPage(contentUrl, { timeout, signal });
46
46
 
47
47
  if (contentResult.ok) {
48
- const doc = parseHTML(contentResult.content).document;
48
+ const doc = (await parseHtmlLazy(contentResult.content)).document;
49
49
 
50
50
  // Extract main content sections
51
51
  const sections = doc.querySelectorAll("section");