@primitive.ai/prim 0.1.0-alpha.43 → 0.1.0-alpha.44

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/dist/index.js CHANGED
@@ -1679,7 +1679,7 @@ function validDecisionUrl(value) {
1679
1679
  }
1680
1680
  function decisionLink(label, decisionUrl) {
1681
1681
  const url = validDecisionUrl(decisionUrl);
1682
- return url ? `\x1B]8;;${url}\x07${label}\x1B]8;;\x07` : label;
1682
+ return url ? `\x1B]8;;${url}\x07\x1B[34;4m${label}\x1B[0m\x1B]8;;\x07` : label;
1683
1683
  }
1684
1684
  function formatLabeled(labels, cap) {
1685
1685
  if (labels === void 0) {
@@ -1694,13 +1694,14 @@ function formatLabeled(labels, cap) {
1694
1694
  return `${labels.slice(0, cap).join(", ")} +${String(labels.length - cap)}`;
1695
1695
  }
1696
1696
  function formatTeammates(names, cap) {
1697
- return formatLabeled(names, cap);
1697
+ return formatLabeled(names?.map(stripControlChars), cap);
1698
1698
  }
1699
1699
  function formatTeammatesWithArea(teammates, cap) {
1700
1700
  return formatLabeled(
1701
1701
  teammates?.map((t) => {
1702
- const area = t.area?.trim();
1703
- const label = area ? `${t.name} - ${area}` : t.name;
1702
+ const name = stripControlChars(t.name);
1703
+ const area = stripControlChars(t.area ?? "").trim();
1704
+ const label = area ? `${name} - ${area}` : name;
1704
1705
  return decisionLink(label, t.decisionUrl);
1705
1706
  }),
1706
1707
  cap
@@ -166,7 +166,7 @@ function validDecisionUrl(value) {
166
166
  }
167
167
  function decisionLink(label, decisionUrl) {
168
168
  const url = validDecisionUrl(decisionUrl);
169
- return url ? `\x1B]8;;${url}\x07${label}\x1B]8;;\x07` : label;
169
+ return url ? `\x1B]8;;${url}\x07\x1B[34;4m${label}\x1B[0m\x1B]8;;\x07` : label;
170
170
  }
171
171
  function formatLabeled(labels, cap) {
172
172
  if (labels === void 0) {
@@ -181,13 +181,14 @@ function formatLabeled(labels, cap) {
181
181
  return `${labels.slice(0, cap).join(", ")} +${String(labels.length - cap)}`;
182
182
  }
183
183
  function formatTeammates(names, cap) {
184
- return formatLabeled(names, cap);
184
+ return formatLabeled(names?.map(stripControlChars), cap);
185
185
  }
186
186
  function formatTeammatesWithArea(teammates, cap) {
187
187
  return formatLabeled(
188
188
  teammates?.map((t) => {
189
- const area = t.area?.trim();
190
- const label = area ? `${t.name} - ${area}` : t.name;
189
+ const name = stripControlChars(t.name);
190
+ const area = stripControlChars(t.area ?? "").trim();
191
+ const label = area ? `${name} - ${area}` : name;
191
192
  return decisionLink(label, t.decisionUrl);
192
193
  }),
193
194
  cap
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primitive.ai/prim",
3
- "version": "0.1.0-alpha.43",
3
+ "version": "0.1.0-alpha.44",
4
4
  "description": "CLI for Primitive's decision graph — passive decision capture, conflict gate, and team presence",
5
5
  "type": "module",
6
6
  "license": "MIT",