@columenlabs/lumen-ai 0.1.202 → 0.1.204

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.
@@ -79,12 +79,21 @@ export function toFrame(rows) {
79
79
  key: columnKey(label, taken),
80
80
  label: label.slice(0, 40),
81
81
  type,
82
- format: type === 'number' ? 'number' : 'text',
82
+ format: type === 'number' ? numberFormat(values) : 'text',
83
83
  ...(tags ? { tags: true } : {}),
84
84
  };
85
85
  });
86
86
  return { columns, data };
87
87
  }
88
+ /**
89
+ * How a number column reads: whole numbers without decimals (`27`, not `27.00`),
90
+ * years without a thousands comma (`2026`), anything else as a number.
91
+ */
92
+ function numberFormat(values) {
93
+ if (!values.every(Number.isInteger))
94
+ return 'number';
95
+ return values.every((v) => v >= 1900 && v <= 2100) ? 'integer' : 'rounded';
96
+ }
88
97
  /** A typed value for a column: numbers from numerals (a comma, %, $ or a true minus allowed). */
89
98
  export function coerce(col, value) {
90
99
  if (value === null || value === '')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@columenlabs/lumen-ai",
3
- "version": "0.1.202",
3
+ "version": "0.1.204",
4
4
  "description": "Lumen's assistant and agent parts: a chat assistant's server (Claude tiers, tools over MCP, the web, hand off, spend caps), serving an MCP server from a Worker, read-only tool sets and metered tool calls.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -52,8 +52,8 @@
52
52
  "@ai-sdk/openai": "4.0.108",
53
53
  "@anthropic-ai/sdk": "0.133.0",
54
54
  "@cloudflare/think": "0.23.0",
55
- "@columenlabs/lumen-ops": "0.1.202",
56
- "@columenlabs/lumen-ui-types": "0.1.202",
55
+ "@columenlabs/lumen-ops": "0.1.204",
56
+ "@columenlabs/lumen-ui-types": "0.1.204",
57
57
  "agents": "0.32.0",
58
58
  "ai": "7.0.162",
59
59
  "just-bash": "3.6.0",