@tasksai/install 0.1.25 → 0.1.27

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/package.json +1 -1
  2. package/runtime/server.py +23 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tasksai/install",
3
- "version": "0.1.25",
3
+ "version": "0.1.27",
4
4
  "description": "Shared TasksAI MCP installer CLI",
5
5
  "type": "module",
6
6
  "bin": {
package/runtime/server.py CHANGED
@@ -125,7 +125,7 @@ if not LICENSE_KEY:
125
125
  print("Find your key in your purchase confirmation email.", file=sys.stderr, flush=True)
126
126
  sys.exit(1)
127
127
 
128
- SERVER_VERSION = "2.4.1"
128
+ SERVER_VERSION = "2.4.3"
129
129
 
130
130
  AUTH_HEADERS = {
131
131
  "Authorization": f"Bearer {LICENSE_KEY}",
@@ -907,6 +907,8 @@ def inferred_plain_heading_level(lines, index):
907
907
  text = lines[index].strip()
908
908
  if not text or len(text) > 90 or "|" in text or ":" in text:
909
909
  return None
910
+ if re.match(r"^(?:[-*+]\s+|\d+\.\s+|>|<!--)", text):
911
+ return None
910
912
  if text.endswith((".", "?", "!", ";")):
911
913
  return None
912
914
 
@@ -930,9 +932,16 @@ def inferred_plain_heading_level(lines, index):
930
932
 
931
933
  def labeled_fact(line):
932
934
  """Return a label/value pair for a short professional fact line."""
935
+ bold_match = re.match(r"^\*\*([^*\n:]{1,55}):\*\*\s+(.+)$", line.strip())
936
+ if bold_match:
937
+ return bold_match.group(1).strip(), bold_match.group(2).strip()
933
938
  match = re.match(r"^([^:\n]{1,55}):\s+(.+)$", line.strip())
934
939
  if not match:
935
940
  return None
941
+ if re.search(r"[`*_\[\]]", match.group(1)):
942
+ # A colon after inline Markdown is sentence punctuation, not a
943
+ # short label/value field. Let the normal inline parser handle it.
944
+ return None
936
945
  return match.group(1).strip(), match.group(2).strip()
937
946
 
938
947
 
@@ -951,6 +960,7 @@ def add_labeled_fact(doc, label, value):
951
960
 
952
961
  def iter_inline_markdown(text):
953
962
  """Yield (text, marks) spans for common inline Markdown."""
963
+ text = re.sub(r"\\([\\`*_{}\[\]()#+.!-])", r"\1", text)
954
964
  token_re = re.compile(
955
965
  r"(`[^`]+`|\*\*[^*]+\*\*|__[^_]+__|\*[^*\s][^*]*\*|(?<!\w)_[^_\s][^_]*_(?!\w)|\[[^\]]+\]\([^)]+\))"
956
966
  )
@@ -1031,6 +1041,11 @@ def add_markdown_text(paragraph, text):
1031
1041
  run = paragraph.add_run(value)
1032
1042
  if marks.get("bold"):
1033
1043
  run.bold = True
1044
+ if re.match(r"^\+\d", value):
1045
+ # Aptos substitution in some headless Word renderers maps a
1046
+ # bold leading plus sign to a diamond. Arial preserves the
1047
+ # intended glyph and remains portable in Office.
1048
+ run.font.name = "Arial"
1034
1049
  if marks.get("italic"):
1035
1050
  run.italic = True
1036
1051
  if marks.get("code"):
@@ -1141,6 +1156,13 @@ def add_markdown_table(doc, rows, alignments):
1141
1156
  table.autofit = True
1142
1157
  repeat_table_header(table.rows[0])
1143
1158
  for row_index, row in enumerate(normalized):
1159
+ row_characters = sum(len(value) for value in row)
1160
+ longest_cell = max((len(value) for value in row), default=0)
1161
+ if row_index == 0 or (row_characters <= 600 and longest_cell <= 350):
1162
+ # Keep ordinary rows intact so a cell does not strand a fragment
1163
+ # on the next page. Exceptionally large rows may still split to
1164
+ # avoid creating a mostly blank page.
1165
+ prevent_table_row_split(table.rows[row_index])
1144
1166
  for column_index, value in enumerate(row):
1145
1167
  cell = table.cell(row_index, column_index)
1146
1168
  set_cell_margins(cell)