@kybernesis/artifacts 0.1.0 → 0.1.2

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.
@@ -2,6 +2,8 @@
2
2
 
3
3
  When the answer is something the person will look at more than once, or is too big for a chat reply, make an artifact instead of writing it out: a report, a dashboard, a tracker, a plan, a comparison, an explainer. A short answer stays a short answer in the chat.
4
4
 
5
+ An artifact is how a page reaches people. KYBER Studio, the phone app and Buzz show it as a card they open, and in a Buzz channel everyone in that channel can open it. So when someone asks you to send, share or show them a page or document you made, such as an HTML file, a brief or a report, make it an artifact (give its path when it is already a file you wrote, such as one under /workspace) or update the one you made before. Do not try to upload or attach the file through a chat tool: those run on another machine and cannot reach the files you write while you work.
6
+
5
7
  - One artifact per thing. When the person asks for a change, update the same artifact; do not make a second one. Use list to find it again in a later conversation.
6
8
  - HTML is one self-contained page. Put the CSS and any script inline and write the data into the page. Nothing outside the page loads: no external scripts, fonts, images or requests.
7
9
  - Use plain, semantic HTML (headings, tables, lists, sections) so the app's own styles fit it. Keep colours to black, white and greys unless a chart needs to tell series apart.
@@ -20,7 +20,7 @@ async function contentFrom(input, ctx) {
20
20
  function forModel(output, verb) {
21
21
  return {
22
22
  type: "text",
23
- value: `${verb} artifact "${output.title}" (id ${output.artifactId}, version ${output.version}). The person sees it as a card in KYBER Studio and the phone app, so do not paste its content into your reply. Say in a sentence or two what it shows. On a channel without cards, tell them it is under this agent's Artifacts in KYBER Studio.`
23
+ value: `${verb} artifact "${output.title}" (id ${output.artifactId}, version ${output.version}). The person sees it as a card in KYBER Studio, the phone app and Buzz, so do not paste its content into your reply. Say in a sentence or two what it shows. On a channel without cards, tell them it is under this agent's Artifacts in KYBER Studio.`
24
24
  };
25
25
  }
26
26
  function result(meta) {
@@ -9,7 +9,7 @@ import { contentFrom, forModel, requireDisk, result } from "../lib/shared.mjs";
9
9
  import { defineTool } from "eve/tools";
10
10
  import { z } from "zod";
11
11
  var create_default = defineTool({
12
- description: "Make an artifact: a page the person keeps and comes back to, such as a report, a dashboard, a tracker, a plan or an explainer. It shows as a card in the person's KYBER Studio chat with an Open button. Give either `content` (the whole page) or `path` (a file in your sandbox). HTML is one self-contained file: inline CSS and script, data written into the page, no external scripts, fonts, images or network calls (they are blocked). To change an artifact later, use update with its id instead of making a new one.",
12
+ description: "Make an artifact: a page the person keeps and comes back to, such as a report, a dashboard, a tracker, a plan or an explainer. It shows as a card in the person's chat (KYBER Studio, the phone app, Buzz) with an Open button, and in a Buzz channel everyone there can open it. This is also how to send someone a page or document you already wrote to a file: pass its `path`, since chat uploads cannot reach your sandbox. Give either `content` (the whole page) or `path` (a file in your sandbox). HTML is one self-contained file: inline CSS and script, data written into the page, no external scripts, fonts, images or network calls (they are blocked). To change an artifact later, use update with its id instead of making a new one.",
13
13
  inputSchema: z.object({
14
14
  title: z.string().describe("A short name for the page, in the person's words, e.g. \"Website, last 7 days\"."),
15
15
  content: z.string().optional().describe("The whole page: one HTML document, or markdown when format is markdown."),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kybernesis/artifacts",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Artifacts for eve agents: pages an agent makes for a person (reports, dashboards, trackers) that KYBER Studio and the phone draw inline, stored on the agent's own machine.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",