@kolisachint/hoocode-agent 0.5.40 → 0.5.42

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 (73) hide show
  1. package/CHANGELOG.md +149 -0
  2. package/dist/core/agent-session.d.ts +10 -0
  3. package/dist/core/agent-session.d.ts.map +1 -1
  4. package/dist/core/agent-session.js +18 -1
  5. package/dist/core/agent-session.js.map +1 -1
  6. package/dist/core/builtin-skills.d.ts +11 -0
  7. package/dist/core/builtin-skills.d.ts.map +1 -1
  8. package/dist/core/builtin-skills.js +31 -0
  9. package/dist/core/builtin-skills.js.map +1 -1
  10. package/dist/core/canvas/scaffold.d.ts +1 -1
  11. package/dist/core/canvas/scaffold.d.ts.map +1 -1
  12. package/dist/core/canvas/scaffold.js +100 -5
  13. package/dist/core/canvas/scaffold.js.map +1 -1
  14. package/dist/core/footer-data-provider.d.ts.map +1 -1
  15. package/dist/core/footer-data-provider.js +6 -67
  16. package/dist/core/footer-data-provider.js.map +1 -1
  17. package/dist/core/git-branch.d.ts +35 -0
  18. package/dist/core/git-branch.d.ts.map +1 -0
  19. package/dist/core/git-branch.js +88 -0
  20. package/dist/core/git-branch.js.map +1 -0
  21. package/dist/core/session-identity.d.ts +25 -0
  22. package/dist/core/session-identity.d.ts.map +1 -0
  23. package/dist/core/session-identity.js +137 -0
  24. package/dist/core/session-identity.js.map +1 -0
  25. package/dist/core/session-manager.d.ts +38 -4
  26. package/dist/core/session-manager.d.ts.map +1 -1
  27. package/dist/core/session-manager.js +62 -10
  28. package/dist/core/session-manager.js.map +1 -1
  29. package/dist/core/slash-commands.d.ts.map +1 -1
  30. package/dist/core/slash-commands.js +1 -0
  31. package/dist/core/slash-commands.js.map +1 -1
  32. package/dist/extensions/core/canvas.d.ts.map +1 -1
  33. package/dist/extensions/core/canvas.js +2 -1
  34. package/dist/extensions/core/canvas.js.map +1 -1
  35. package/dist/init-templates.generated.d.ts.map +1 -1
  36. package/dist/init-templates.generated.js +4 -0
  37. package/dist/init-templates.generated.js.map +1 -1
  38. package/dist/modes/interactive/command-executor.d.ts +8 -0
  39. package/dist/modes/interactive/command-executor.d.ts.map +1 -1
  40. package/dist/modes/interactive/command-executor.js +39 -11
  41. package/dist/modes/interactive/command-executor.js.map +1 -1
  42. package/dist/modes/interactive/components/footer.d.ts +7 -0
  43. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  44. package/dist/modes/interactive/components/footer.js +14 -1
  45. package/dist/modes/interactive/components/footer.js.map +1 -1
  46. package/dist/modes/interactive/components/session-chip.d.ts +25 -0
  47. package/dist/modes/interactive/components/session-chip.d.ts.map +1 -0
  48. package/dist/modes/interactive/components/session-chip.js +62 -0
  49. package/dist/modes/interactive/components/session-chip.js.map +1 -0
  50. package/dist/modes/interactive/components/session-color-selector.d.ts +14 -0
  51. package/dist/modes/interactive/components/session-color-selector.d.ts.map +1 -0
  52. package/dist/modes/interactive/components/session-color-selector.js +54 -0
  53. package/dist/modes/interactive/components/session-color-selector.js.map +1 -0
  54. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
  55. package/dist/modes/interactive/components/session-selector.js +32 -3
  56. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  57. package/dist/modes/interactive/interactive-mode.d.ts +18 -0
  58. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  59. package/dist/modes/interactive/interactive-mode.js +75 -4
  60. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  61. package/dist/modes/interactive/theme/theme.d.ts +24 -0
  62. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  63. package/dist/modes/interactive/theme/theme.js +72 -11
  64. package/dist/modes/interactive/theme/theme.js.map +1 -1
  65. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  66. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  67. package/examples/extensions/sandbox/package.json +1 -1
  68. package/examples/extensions/with-deps/package.json +1 -1
  69. package/package.json +4 -4
  70. package/templates/agents/code-review.md +61 -0
  71. package/templates/agents/security-review.md +69 -0
  72. package/templates/skills/artifact-design/SKILL.md +191 -0
  73. package/templates/skills/canvas-design/SKILL.md +117 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,154 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.5.42] - 2026-08-31
4
+
5
+ ### Added
6
+
7
+ - Two built-in review agents, `code-review` and `security-review`.
8
+
9
+ Both ride the existing `templates/agents/` channel, so they cost nothing to
10
+ wire: `embed-templates.mjs` already embeds that directory and `Task` already
11
+ dispatches by name. They are agents rather than skills because review is the
12
+ case isolation is for — a review reads far more code than its findings are
13
+ worth carrying, and in a subagent that reading never lands in the parent
14
+ context.
15
+
16
+ Their tool allowlists include `bash` for read-only git inspection but exclude
17
+ `edit` and `write`, so a review reports and the caller decides. A test pins
18
+ that.
19
+
20
+ - `/new-canvas` scaffolds a styled page instead of a placeholder.
21
+
22
+ The template served `<p>0 note(s). TODO: build the UI.` — unstyled, and with
23
+ no pattern to copy, so every canvas started by inventing one. It now ships a
24
+ small correct page: palette as custom properties with a
25
+ `prefers-color-scheme` block, an explicit `body` background, a list, an empty
26
+ state, and a reduced-motion-respecting highlight on rows that changed.
27
+
28
+ It also demonstrates the thing `canvas-design` asks for. State renders on the
29
+ server, so the page is right the moment it loads and stays right with
30
+ scripting off; a `/state` endpoint and a one-second poll update it in place so
31
+ what the agent changed appears without a reload. Everything from state goes
32
+ through an escape helper and `textContent`, never `innerHTML`.
33
+
34
+ No CDN and no webfont: the page is served from `127.0.0.1` and now works with
35
+ the network off, which a remote script or font would have thrown away. The
36
+ markup is built with plain strings and concatenation rather than template
37
+ literals, because this file is itself generated and a backtick or
38
+ dollar-brace in it is an escaping hazard for no gain.
39
+
40
+ - A built-in `canvas-design` skill, loaded only when a canvas is being built.
41
+
42
+ `/new-canvas` handed the model a protocol contract and nothing about design,
43
+ and the scaffold serves `<p>0 note(s). TODO: build the UI.` — so whatever a
44
+ canvas looked like was improvised from nothing. `artifact-design` does not
45
+ cover it and would mislead if it fired: a canvas is a live page served from a
46
+ loopback server, not a file written to disk.
47
+
48
+ What is different is the whole skill: the markup lives in a JS template
49
+ string, `node_modules` and `package.json` are forbidden so there is nothing to
50
+ install and no build, the protocol carries no theme so the page owns its
51
+ palette outright, state is mutated by both the agent and the person, actions
52
+ are tool schemas that cost tokens while an instance is open, and a reload
53
+ issues a new URL that kills the open tab.
54
+
55
+ Grounded in the catalog rather than invented: 22 of GitHub's 23 canvas
56
+ extensions import nothing but the SDK and `node:` builtins, and the flagship
57
+ `pr-artifact-explorer` is a read surface that sidesteps concurrent editing
58
+ entirely. The skill takes both as the house style.
59
+
60
+ It costs nothing per turn. `disable-model-invocation` keeps it out of
61
+ `<available_skills>`, materialization is unconditional so the file is always
62
+ on disk, and `canvasBuildBrief` names its absolute path at the one moment it
63
+ is worth reading. Measured: the surface is unchanged at 8,470.
64
+
65
+ - A built-in `artifact-design` skill for building self-contained HTML visuals.
66
+
67
+ hoocode writes a visual as one `.html` file on disk that `/canvas` can open.
68
+ The skill covers what that file needs to be good: reading the treatment the
69
+ request actually calls for, writing the color/type/layout plan before the
70
+ markup, designing both themes through custom properties, and avoiding the
71
+ handful of looks generated design keeps landing on.
72
+
73
+ Named for the output rather than the activity: a bare `design` would sit in
74
+ the prompt next to `/new-canvas` and read as software design as readily as
75
+ visual design. Note that "artifact" is new vocabulary in hoocode; it names the
76
+ thing produced, not Claude's hosted artifacts.
77
+
78
+ Libraries get an explicit no by default. A hosted page and a file on disk fail
79
+ differently: a CDN dependency is free for a page that is always viewed online,
80
+ and fatal for a file opened offline, where Tailwind-from-a-CDN is an unstyled
81
+ document. Webfonts are the exception, because a fallback stack degrades
82
+ instead of collapsing.
83
+
84
+ Delivery is a `file://` markdown link, which hoocode's renderer turns into an
85
+ OSC 8 hyperlink wherever the terminal supports one.
86
+
87
+ It is the first ungated built-in skill, because there is no feature switch
88
+ that predicts a request for a visual. Measured cost is +130 tokens per turn,
89
+ of which part is the `<available_skills>` block header that no default session
90
+ previously paid; the two agents add +180 together.
91
+
92
+ ## [0.5.41] - 2026-08-31
93
+
94
+ ### Added
95
+
96
+ - Sessions record the git branch they started on, and the resume list shows it.
97
+
98
+ A session you never named, that opened with "look at this", was unfindable in
99
+ the list — the first message said nothing and there was nothing else to go on.
100
+ The branch usually says exactly what the work was, and it is the rare piece of
101
+ meaning that can be written down safely: unlike a derived title it is a fact,
102
+ so it is still true a month later.
103
+
104
+ It has to be recorded rather than derived, because by the time anyone reads the
105
+ list the working tree has moved on. One optional field on the session header,
106
+ read from `.git/HEAD` at session creation — a walk up to the repo and one file
107
+ read, no subprocess outside the reftable case, sharing the footer's
108
+ implementation so the branch a session remembers is the string the footer was
109
+ showing at the time.
110
+
111
+ Shown in the picker only where it adds something: a session with a chosen name
112
+ already says what it is, and `main` names no particular work. Also in
113
+ `/session`. Sessions recorded before this simply have no branch and read as
114
+ they did.
115
+
116
+ - A session chip: the session's name, filled with its colour, laid into the
117
+ top-right of the input box.
118
+
119
+ The name used to live at the tail of the footer's busiest line — after the
120
+ brand mark, the mode, the path and the git branch, in `dim`, the quietest
121
+ colour a theme has. It answered *which session is this*, and it was the least
122
+ visible thing on screen. The chip puts the same fact where the cursor already
123
+ is, and gives it a colour so it can be recognised rather than read.
124
+
125
+ Every session now carries a name and a colour without anyone setting one. Both
126
+ are pure functions of the session id: a two-word slug from a 32x32 vocabulary
127
+ (`amber-harbor`), and a slot in the six-colour identity palette the agent tags
128
+ already use. Because they derive from the id, a resumed session comes back
129
+ wearing the same chip and a fork gets its own, with nothing to store. `/name`
130
+ and the new `/color` override either, and those choices are written to the
131
+ session's `session_info` entry, which now resolves its two fields
132
+ independently — setting a colour cannot clear a name, and renaming keeps the
133
+ colour you have already learned. `/color` on its own opens a swatch picker
134
+ that repaints the live chip as you move through it.
135
+
136
+ The chip is laid into border cells the box was already drawing, so it costs no
137
+ screen row, and it yields where it should: to the `↑ N more` scroll indicator
138
+ on the same border, and to the box itself below 48 columns, where the footer
139
+ takes the name back rather than leaving it nowhere. The editor's border colour
140
+ is untouched — it still carries thinking level and bash mode, so identity and
141
+ agent state never fight for the same pixels.
142
+
143
+ The fill's ink is picked from its own luminance, which is what lets one code
144
+ path render on a dark theme's bright hues and a light theme's deep inks alike.
145
+ `theme.fill()` is the new primitive for that: the palette lives on the
146
+ foreground side, where `theme.bg()` could not reach it.
147
+
148
+ The session picker shows the same colour as a swatch per row, and the slug for
149
+ sessions nobody has named, so a session recognised by its chip is found the
150
+ same way in the list.
151
+
3
152
  ## [0.5.40] - 2026-08-30
4
153
 
5
154
  ### Added
@@ -272,6 +272,10 @@ export declare class AgentSession {
272
272
  get sessionId(): string;
273
273
  /** Current session display name, if set */
274
274
  get sessionName(): string | undefined;
275
+ /** What to show for this session: the chosen name, else its auto-assigned slug */
276
+ get displayName(): string;
277
+ /** The session's colour slot (1-6), chosen or auto-assigned */
278
+ get sessionColorSlot(): number;
275
279
  /** Scoped models for cycling (from --models flag) */
276
280
  get scopedModels(): ReadonlyArray<{
277
281
  model: Model<any>;
@@ -519,6 +523,12 @@ export declare class AgentSession {
519
523
  * Set a display name for the current session.
520
524
  */
521
525
  setSessionName(name: string): void;
526
+ /**
527
+ * Set the colour slot (1-6) the session's chip is filled with. Written as its
528
+ * own field so it survives a later rename, and so setting it never disturbs
529
+ * the name.
530
+ */
531
+ setSessionColor(slot: number): void;
522
532
  /**
523
533
  * Navigate to a different node in the session tree.
524
534
  * Unlike fork() which creates a new session file, this stays in the same file.