@usabledev/usable-chat 1.173.1 → 1.174.1

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 (2) hide show
  1. package/cli.js +33 -1
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -203196,6 +203196,34 @@ ${effectiveSystemPrompt}`;
203196
203196
  }
203197
203197
  });
203198
203198
 
203199
+ // src/lib/rich-fragment-prompt.ts
203200
+ var RICH_FRAGMENT_RENDERING_PROMPT;
203201
+ var init_rich_fragment_prompt = __esm({
203202
+ "src/lib/rich-fragment-prompt.ts"() {
203203
+ "use strict";
203204
+ RICH_FRAGMENT_RENDERING_PROMPT = `## Fragment Rich Content Rendering
203205
+
203206
+ When creating or updating Usable fragment markdown:
203207
+ - Do NOT write raw inline HTML or SVG directly into markdown. Raw HTML/SVG is blocked by the canvas renderer.
203208
+ - To render SVG, use an explicit fenced block:
203209
+
203210
+ \`\`\`svg render
203211
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 600 250">
203212
+ <!-- SVG content -->
203213
+ </svg>
203214
+ \`\`\`
203215
+
203216
+ - To render HTML, use an explicit fenced block:
203217
+
203218
+ \`\`\`html render
203219
+ <div>HTML content</div>
203220
+ \`\`\`
203221
+
203222
+ - Plain \`svg\`, \`html\`, or other code fences stay code blocks. Only \`svg render\` and \`html render\` are rendered in the canvas sandbox.
203223
+ - Images in fragments should use \`usable://files/<full-file-id>\` for attached files or \`https://\` for external images. Other image URL schemes are blocked.`;
203224
+ }
203225
+ });
203226
+
203199
203227
  // src/core/types/system-prompt-source.ts
203200
203228
  function getPromptUnavailableBehavior(source) {
203201
203229
  return source?.type === "fragment" ? source.unavailableBehavior ?? "error" : "fallback";
@@ -203225,6 +203253,7 @@ var init_custom_expert = __esm({
203225
203253
  "src/core/types/custom-expert.ts"() {
203226
203254
  "use strict";
203227
203255
  init_zod();
203256
+ init_rich_fragment_prompt();
203228
203257
  init_system_prompt_source();
203229
203258
  expertRoutingSchema = external_exports.object({
203230
203259
  keywords: external_exports.array(external_exports.string().min(1).max(100)).min(1, "At least one keyword is required for routing"),
@@ -290436,6 +290465,7 @@ var defaultPersonaManifest;
290436
290465
  var init_manifest2 = __esm({
290437
290466
  "src/personas/default/manifest.ts"() {
290438
290467
  "use strict";
290468
+ init_rich_fragment_prompt();
290439
290469
  defaultPersonaManifest = {
290440
290470
  id: "default-assistant",
290441
290471
  name: "Assistant",
@@ -290818,6 +290848,8 @@ Detailed instructions for each tool are embedded in its MCP description; read th
290818
290848
  - **Capture verified insights** by using \`create-memory-fragment\` or \`update-memory-fragment\`; include appropriate tags (including repository tags) and residual risks so the team benefits immediately.
290819
290849
  - **Only document when implementation is complete AND verified** (preferably by the user).
290820
290850
 
290851
+ ${RICH_FRAGMENT_RENDERING_PROMPT}
290852
+
290821
290853
  ## \u270F\uFE0F Fragment Editing (when write tools are available)
290822
290854
 
290823
290855
  When editing fragments with \`update-memory-fragment\`, follow these rules strictly:
@@ -309097,7 +309129,7 @@ init_tui_select();
309097
309129
  init_model_registry();
309098
309130
 
309099
309131
  // package.json
309100
- var version2 = "1.173.1";
309132
+ var version2 = "1.174.1";
309101
309133
 
309102
309134
  // src/adapters/cli/model-catalog.ts
309103
309135
  init_codex_auth();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usabledev/usable-chat",
3
- "version": "1.173.1",
3
+ "version": "1.174.1",
4
4
  "description": "usable-chat — terminal harness for usable-chat (headless + TUI)",
5
5
  "type": "module",
6
6
  "bin": {