omkit 0.8.23 → 0.8.25
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.
- package/README.md +15 -15
- package/dist/cli/commands/ui.d.ts +4 -3
- package/dist/cli/commands/ui.js +6 -12
- package/dist/cli/ui/app.d.ts +20 -5
- package/dist/cli/ui/app.js +252 -87
- package/dist/cli/ui/openFile.d.ts +6 -0
- package/dist/cli/ui/openFile.js +21 -0
- package/dist/cli/ui/views/OmList.d.ts +9 -2
- package/dist/cli/ui/views/OmList.js +32 -4
- package/dist/cli/ui/views/RunView.d.ts +31 -7
- package/dist/cli/ui/views/RunView.js +87 -8
- package/dist/cli/ui/views/Scrollback.d.ts +30 -0
- package/dist/cli/ui/views/Scrollback.js +21 -0
- package/dist/cli/ui/views/shellLines.d.ts +21 -0
- package/dist/cli/ui/views/shellLines.js +62 -0
- package/dist/client/discovery.js +6 -3
- package/dist/client/outline.d.ts +8 -1
- package/dist/client/outline.js +44 -0
- package/dist/client/registry.d.ts +10 -0
- package/dist/core/types.d.ts +7 -0
- package/dist/output/RunModel.d.ts +8 -0
- package/dist/output/RunModel.js +39 -6
- package/dist/output/writers/report/report.css +1795 -361
- package/dist/output/writers/report/report.js +26 -1
- package/dist/output/writers/views.d.ts +2 -1
- package/package.json +1 -1
|
@@ -102,6 +102,31 @@
|
|
|
102
102
|
/[&<>"']/g,
|
|
103
103
|
(c) => ({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" })[c]
|
|
104
104
|
);
|
|
105
|
+
/** A description key as a label: `docsUrl` / `docs-url` / `docs_url` → `Docs url`. */
|
|
106
|
+
const propLabel = (key) => {
|
|
107
|
+
const words = String(key)
|
|
108
|
+
.replace(/([a-z0-9])([A-Z])/g, "$1 $2")
|
|
109
|
+
.replace(/[-_]+/g, " ")
|
|
110
|
+
.trim()
|
|
111
|
+
.toLowerCase();
|
|
112
|
+
return words.charAt(0).toUpperCase() + words.slice(1);
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Key/value rows for a `.describe(…)`: the summary, then every further prop in the order it
|
|
116
|
+
* was written. A list reads as its items joined; a web address becomes a link.
|
|
117
|
+
*/
|
|
118
|
+
const descriptionRows = (d) =>
|
|
119
|
+
Object.entries(d)
|
|
120
|
+
.filter(([, v]) => v !== undefined && v !== null && v !== "")
|
|
121
|
+
.sort(([a], [b]) => (a === "summary" ? -1 : b === "summary" ? 1 : 0))
|
|
122
|
+
.map(([k, v]) => {
|
|
123
|
+
const text = Array.isArray(v) ? v.join(", ") : String(v);
|
|
124
|
+
const value = /^https?:\/\/\S+$/.test(text)
|
|
125
|
+
? `<a href="${esc(text)}" target="_blank" rel="noopener">${esc(text)}</a>`
|
|
126
|
+
: esc(text);
|
|
127
|
+
return `<div class="k">${esc(propLabel(k))}</div><div class="v">${value}</div>`;
|
|
128
|
+
})
|
|
129
|
+
.join("");
|
|
105
130
|
const basename = (p) => String(p).split(/[\\/]/).pop();
|
|
106
131
|
const fileUrl = (p) =>
|
|
107
132
|
"file:///" +
|
|
@@ -1558,7 +1583,7 @@
|
|
|
1558
1583
|
${call ? `<div class="tcall who-call">${callHtml(n, call)}</div>` : ""}
|
|
1559
1584
|
<div class="kv">
|
|
1560
1585
|
<div class="k">Duration</div><div class="v">${fmtDur(n.duration)}</div>
|
|
1561
|
-
${n.v.description ?
|
|
1586
|
+
${n.v.description ? descriptionRows(n.v.description) : ""}
|
|
1562
1587
|
${n.v.tags.length ? `<div class="k">Tags</div><div class="v">${chipsHtml(n.v.tags, Infinity, 40)}</div>` : ""}
|
|
1563
1588
|
${n.v.mcp ? `<div class="k">MCP</div><div class="v"><span class="badge-inline">${esc(n.v.mcp.mode)}</span></div>` : ""}
|
|
1564
1589
|
<div class="k">Id</div><div class="v mono-sm">${esc(n.id)}</div>
|
|
@@ -21,9 +21,10 @@ export interface NodeView {
|
|
|
21
21
|
readonly duration: number;
|
|
22
22
|
/** Absolute path to this node's own `.log`. */
|
|
23
23
|
readonly logFile: string;
|
|
24
|
-
/** What the definition's `.describe()` said
|
|
24
|
+
/** What the definition's `.describe()` said — its summary and any further props. */
|
|
25
25
|
readonly description?: {
|
|
26
26
|
readonly summary: string;
|
|
27
|
+
readonly [prop: string]: unknown;
|
|
27
28
|
};
|
|
28
29
|
/** The definition's `.mcp()` exposure; absent when it is not exposed. */
|
|
29
30
|
readonly mcp?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omkit",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.25",
|
|
4
4
|
"description": "A tiny runtime for developer workflows: typed actions that pass runtime capabilities and emit typed events, under one run and one shared log. The operational/runtime layer to tskb's knowledge layer.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|