@taloswork/ose-shared 0.1.13 → 0.1.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taloswork/ose-shared",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "description": "Talos cross-OSE shared library — skills + MCP servers auto-loaded into every OSE (P93 2026-07-27).",
5
5
  "type": "module",
6
6
  "files": [
@@ -10,6 +10,6 @@
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },
13
- "_talosPublishHash": "sha256-HbLb5fXPsWxwD1td2ljod1H_UVd555EmCpblxk4GZ2g",
14
- "_talosPublishedAt": "2026-10-10T06:45:49.079Z"
13
+ "_talosPublishHash": "sha256-FPLwvw02-136i7MwhJ1ygv5BHnGVAeFc8T2Z8pUTgWo",
14
+ "_talosPublishedAt": "2026-10-13T04:58:22.606Z"
15
15
  }
@@ -9860,7 +9860,12 @@ function loadMupdf() {
9860
9860
  if (!_mupdf) {
9861
9861
  const deps = process.env.TALOS_SKILL_DEPS;
9862
9862
  const spec = deps ? (0, import_node_url.pathToFileURL)((0, import_node_path.join)(deps, "mupdf", "dist", "mupdf.js")).href : "mupdf";
9863
- _mupdf = import(spec);
9863
+ const loading = import(spec);
9864
+ _mupdf = loading;
9865
+ loading.catch(() => {
9866
+ if (_mupdf === loading)
9867
+ _mupdf = null;
9868
+ });
9864
9869
  }
9865
9870
  return _mupdf;
9866
9871
  }
@@ -29194,7 +29199,12 @@ function loadXmllint() {
29194
29199
  if (!_xmllint) {
29195
29200
  const deps = process.env.TALOS_SKILL_DEPS;
29196
29201
  const spec = deps ? (0, import_node_url2.pathToFileURL)((0, import_node_path2.join)(deps, "xmllint-wasm", "index-node.js")).href : "xmllint-wasm";
29197
- _xmllint = import(spec);
29202
+ const loading = import(spec);
29203
+ _xmllint = loading;
29204
+ loading.catch(() => {
29205
+ if (_xmllint === loading)
29206
+ _xmllint = null;
29207
+ });
29198
29208
  }
29199
29209
  return _xmllint;
29200
29210
  }
@@ -102926,9 +102926,13 @@ async function convertToPdfViaSoffice(inputPath, options = {}) {
102926
102926
  const profileDir = await (0, import_promises.mkdtemp)((0, import_node_path.join)((0, import_node_os.tmpdir)(), "talos-lo-profile-"));
102927
102927
  const outDir = await (0, import_promises.mkdtemp)((0, import_node_path.join)((0, import_node_os.tmpdir)(), "talos-lo-out-"));
102928
102928
  try {
102929
+ let env2;
102929
102930
  if (isMacAppSoffice(soffice)) {
102930
102931
  await (0, import_promises.mkdir)((0, import_node_path.join)(profileDir, "user"), { recursive: true });
102931
102932
  await (0, import_promises.writeFile)((0, import_node_path.join)(profileDir, "user", "registrymodifications.xcu"), macFontReplacementXcu(missingWebFonts()));
102933
+ const fontsConf = (0, import_node_path.join)(profileDir, "fonts.conf");
102934
+ await (0, import_promises.writeFile)(fontsConf, MAC_FONTCONFIG_CONF);
102935
+ env2 = { ...process.env, FONTCONFIG_FILE: fontsConf };
102932
102936
  }
102933
102937
  await runSoffice(soffice, [
102934
102938
  "--headless",
@@ -102942,7 +102946,7 @@ async function convertToPdfViaSoffice(inputPath, options = {}) {
102942
102946
  "--outdir",
102943
102947
  outDir,
102944
102948
  inputPath
102945
- ], options.timeoutMs ?? sofficeTimeoutMs((0, import_node_fs.statSync)(inputPath).size));
102949
+ ], options.timeoutMs ?? sofficeTimeoutMs((0, import_node_fs.statSync)(inputPath).size), env2);
102946
102950
  const pdfs = (await (0, import_promises.readdir)(outDir)).filter((f) => f.toLowerCase().endsWith(".pdf"));
102947
102951
  const chosen = pickConvertedPdf(pdfs, inputPath);
102948
102952
  if (!chosen)
@@ -102971,6 +102975,17 @@ var MAC_CJK_FONT_REPLACEMENT_XCU = `<?xml version="1.0" encoding="UTF-8"?>
102971
102975
  <item oor:path="/org.openoffice.Office.Common/Font/Substitution/FontPairs"><node oor:name="_0" oor:op="replace"><prop oor:name="Always" oor:op="fuse"><value>true</value></prop><prop oor:name="OnScreenOnly" oor:op="fuse"><value>false</value></prop><prop oor:name="ReplaceFont" oor:op="fuse"><value>Microsoft YaHei</value></prop><prop oor:name="SubstituteFont" oor:op="fuse"><value>\u51AC\u9752\u9ED1\u4F53\u7B80\u4F53\u4E2D\u6587</value></prop></node><node oor:name="_1" oor:op="replace"><prop oor:name="Always" oor:op="fuse"><value>true</value></prop><prop oor:name="OnScreenOnly" oor:op="fuse"><value>false</value></prop><prop oor:name="ReplaceFont" oor:op="fuse"><value>Microsoft JhengHei</value></prop><prop oor:name="SubstituteFont" oor:op="fuse"><value>\u9ED1\u4F53-\u7E41</value></prop></node></item>
102972
102976
  </oor:items>
102973
102977
  `;
102978
+ var MAC_FONTCONFIG_CONF = `<?xml version="1.0"?>
102979
+ <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
102980
+ <fontconfig>
102981
+ <dir>/System/Library/Fonts</dir>
102982
+ <dir>/Library/Fonts</dir>
102983
+ <dir>~/Library/Fonts</dir>
102984
+ <cachedir prefix="xdg">fontconfig</cachedir>
102985
+ <alias binding="same"><family>Microsoft YaHei</family><prefer><family>Hiragino Sans GB</family></prefer></alias>
102986
+ <alias binding="same"><family>Microsoft JhengHei</family><prefer><family>Heiti TC</family></prefer></alias>
102987
+ </fontconfig>
102988
+ `;
102974
102989
  var SANS = { group: "sans", mac: "Arial", cloud: "Liberation Sans" };
102975
102990
  var SERIF_TIMES = { group: "serif", mac: "Times New Roman", cloud: "Liberation Serif" };
102976
102991
  var SERIF_GEORGIA = { group: "serif", mac: "Georgia", cloud: "Liberation Serif" };
@@ -103032,9 +103047,9 @@ function macFontReplacementXcu(missing) {
103032
103047
  const extra = missing.map((f, i) => fontPair(i + 2, f, WEB_FONT_SUBSTITUTES[f]?.mac ?? "Arial")).join("");
103033
103048
  return MAC_CJK_FONT_REPLACEMENT_XCU.replace("</node></item>", `</node>${extra}</item>`);
103034
103049
  }
103035
- function runSoffice(bin, args, timeoutMs) {
103050
+ function runSoffice(bin, args, timeoutMs, env2) {
103036
103051
  return new Promise((resolve, reject2) => {
103037
- const child = (0, import_node_child_process.spawn)(bin, args, { stdio: ["ignore", "pipe", "pipe"] });
103052
+ const child = (0, import_node_child_process.spawn)(bin, args, { stdio: ["ignore", "pipe", "pipe"], ...env2 ? { env: env2 } : {} });
103038
103053
  let stderr = "";
103039
103054
  const timer = setTimeout(() => {
103040
103055
  child.kill("SIGKILL");
@@ -90725,7 +90725,12 @@ function loadMupdf() {
90725
90725
  if (!_mupdf) {
90726
90726
  const deps = process.env.TALOS_SKILL_DEPS;
90727
90727
  const spec = deps ? (0, import_node_url.pathToFileURL)((0, import_node_path.join)(deps, "mupdf", "dist", "mupdf.js")).href : "mupdf";
90728
- _mupdf = import(spec);
90728
+ const loading = import(spec);
90729
+ _mupdf = loading;
90730
+ loading.catch(() => {
90731
+ if (_mupdf === loading)
90732
+ _mupdf = null;
90733
+ });
90729
90734
  }
90730
90735
  return _mupdf;
90731
90736
  }
@@ -24,7 +24,12 @@ function loadMupdf() {
24
24
  if (!_mupdf) {
25
25
  const deps = process.env.TALOS_SKILL_DEPS;
26
26
  const spec = deps ? (0, import_node_url.pathToFileURL)((0, import_node_path.join)(deps, "mupdf", "dist", "mupdf.js")).href : "mupdf";
27
- _mupdf = import(spec);
27
+ const loading = import(spec);
28
+ _mupdf = loading;
29
+ loading.catch(() => {
30
+ if (_mupdf === loading)
31
+ _mupdf = null;
32
+ });
28
33
  }
29
34
  return _mupdf;
30
35
  }
@@ -24,7 +24,12 @@ function loadMupdf() {
24
24
  if (!_mupdf) {
25
25
  const deps = process.env.TALOS_SKILL_DEPS;
26
26
  const spec = deps ? (0, import_node_url.pathToFileURL)((0, import_node_path.join)(deps, "mupdf", "dist", "mupdf.js")).href : "mupdf";
27
- _mupdf = import(spec);
27
+ const loading = import(spec);
28
+ _mupdf = loading;
29
+ loading.catch(() => {
30
+ if (_mupdf === loading)
31
+ _mupdf = null;
32
+ });
28
33
  }
29
34
  return _mupdf;
30
35
  }
@@ -27618,7 +27618,12 @@ function loadMupdf() {
27618
27618
  if (!_mupdf) {
27619
27619
  const deps = process.env.TALOS_SKILL_DEPS;
27620
27620
  const spec = deps ? (0, import_node_url.pathToFileURL)((0, import_node_path.join)(deps, "mupdf", "dist", "mupdf.js")).href : "mupdf";
27621
- _mupdf = import(spec);
27621
+ const loading = import(spec);
27622
+ _mupdf = loading;
27623
+ loading.catch(() => {
27624
+ if (_mupdf === loading)
27625
+ _mupdf = null;
27626
+ });
27622
27627
  }
27623
27628
  return _mupdf;
27624
27629
  }
@@ -28333,7 +28338,12 @@ function loadXmllint() {
28333
28338
  if (!_xmllint) {
28334
28339
  const deps = process.env.TALOS_SKILL_DEPS;
28335
28340
  const spec = deps ? (0, import_node_url2.pathToFileURL)((0, import_node_path2.join)(deps, "xmllint-wasm", "index-node.js")).href : "xmllint-wasm";
28336
- _xmllint = import(spec);
28341
+ const loading = import(spec);
28342
+ _xmllint = loading;
28343
+ loading.catch(() => {
28344
+ if (_xmllint === loading)
28345
+ _xmllint = null;
28346
+ });
28337
28347
  }
28338
28348
  return _xmllint;
28339
28349
  }
@@ -33239,7 +33239,12 @@ function loadMupdf() {
33239
33239
  if (!_mupdf) {
33240
33240
  const deps = process.env.TALOS_SKILL_DEPS;
33241
33241
  const spec = deps ? (0, import_node_url.pathToFileURL)((0, import_node_path2.join)(deps, "mupdf", "dist", "mupdf.js")).href : "mupdf";
33242
- _mupdf = import(spec);
33242
+ const loading = import(spec);
33243
+ _mupdf = loading;
33244
+ loading.catch(() => {
33245
+ if (_mupdf === loading)
33246
+ _mupdf = null;
33247
+ });
33243
33248
  }
33244
33249
  return _mupdf;
33245
33250
  }
@@ -39892,7 +39897,12 @@ function loadXmllint() {
39892
39897
  if (!_xmllint) {
39893
39898
  const deps = process.env.TALOS_SKILL_DEPS;
39894
39899
  const spec = deps ? (0, import_node_url2.pathToFileURL)((0, import_node_path3.join)(deps, "xmllint-wasm", "index-node.js")).href : "xmllint-wasm";
39895
- _xmllint = import(spec);
39900
+ const loading = import(spec);
39901
+ _xmllint = loading;
39902
+ loading.catch(() => {
39903
+ if (_xmllint === loading)
39904
+ _xmllint = null;
39905
+ });
39896
39906
  }
39897
39907
  return _xmllint;
39898
39908
  }
@@ -8041,8 +8041,13 @@ var TALOS_RESERVED_DIR_NAMES = {
8041
8041
  installScratch: ".tmp",
8042
8042
  /** `bundled/.quarantine/` — integrity-failed bundles kept for post-mortem. */
8043
8043
  quarantine: ".quarantine",
8044
- /** `data/ose/<id>/sessions/.locks/` — cross-process session ownership locks. */
8045
- sessionLocks: ".locks"
8044
+ /** `sessions/.locks/` and `<skillLearningDir>/.locks/` — the lock
8045
+ * directories builds ≤ v0.88.0 kept for the per-session ownership lock and
8046
+ * the skill-learning file leases, both removed 2026-10-13 (a lock that
8047
+ * outlived its writer named a reused pid). Still reserved so a listing of
8048
+ * either root never takes a leftover for an id; `ensureAgentDirs`
8049
+ * (runtime start, session start) removes the leftovers. */
8050
+ locks: ".locks"
8046
8051
  };
8047
8052
  var TALOS_BOOTSTRAP_DIR_NAME = TALOS_RESERVED_DIR_NAMES.bootstrap;
8048
8053
  function getTalosOsCacheDir() {
@@ -22053,7 +22053,12 @@ function loadMupdf() {
22053
22053
  if (!_mupdf) {
22054
22054
  const deps = process.env.TALOS_SKILL_DEPS;
22055
22055
  const spec = deps ? (0, import_node_url.pathToFileURL)((0, import_node_path.join)(deps, "mupdf", "dist", "mupdf.js")).href : "mupdf";
22056
- _mupdf = import(spec);
22056
+ const loading = import(spec);
22057
+ _mupdf = loading;
22058
+ loading.catch(() => {
22059
+ if (_mupdf === loading)
22060
+ _mupdf = null;
22061
+ });
22057
22062
  }
22058
22063
  return _mupdf;
22059
22064
  }
@@ -24,7 +24,12 @@ function loadMupdf() {
24
24
  if (!_mupdf) {
25
25
  const deps = process.env.TALOS_SKILL_DEPS;
26
26
  const spec = deps ? (0, import_node_url.pathToFileURL)((0, import_node_path.join)(deps, "mupdf", "dist", "mupdf.js")).href : "mupdf";
27
- _mupdf = import(spec);
27
+ const loading = import(spec);
28
+ _mupdf = loading;
29
+ loading.catch(() => {
30
+ if (_mupdf === loading)
31
+ _mupdf = null;
32
+ });
28
33
  }
29
34
  return _mupdf;
30
35
  }
@@ -22053,7 +22053,12 @@ function loadMupdf() {
22053
22053
  if (!_mupdf) {
22054
22054
  const deps = process.env.TALOS_SKILL_DEPS;
22055
22055
  const spec = deps ? (0, import_node_url.pathToFileURL)((0, import_node_path.join)(deps, "mupdf", "dist", "mupdf.js")).href : "mupdf";
22056
- _mupdf = import(spec);
22056
+ const loading = import(spec);
22057
+ _mupdf = loading;
22058
+ loading.catch(() => {
22059
+ if (_mupdf === loading)
22060
+ _mupdf = null;
22061
+ });
22057
22062
  }
22058
22063
  return _mupdf;
22059
22064
  }
@@ -24,7 +24,12 @@ function loadMupdf() {
24
24
  if (!_mupdf) {
25
25
  const deps = process.env.TALOS_SKILL_DEPS;
26
26
  const spec = deps ? (0, import_node_url.pathToFileURL)((0, import_node_path.join)(deps, "mupdf", "dist", "mupdf.js")).href : "mupdf";
27
- _mupdf = import(spec);
27
+ const loading = import(spec);
28
+ _mupdf = loading;
29
+ loading.catch(() => {
30
+ if (_mupdf === loading)
31
+ _mupdf = null;
32
+ });
28
33
  }
29
34
  return _mupdf;
30
35
  }
@@ -24,7 +24,12 @@ function loadMupdf() {
24
24
  if (!_mupdf) {
25
25
  const deps = process.env.TALOS_SKILL_DEPS;
26
26
  const spec = deps ? (0, import_node_url.pathToFileURL)((0, import_node_path.join)(deps, "mupdf", "dist", "mupdf.js")).href : "mupdf";
27
- _mupdf = import(spec);
27
+ const loading = import(spec);
28
+ _mupdf = loading;
29
+ loading.catch(() => {
30
+ if (_mupdf === loading)
31
+ _mupdf = null;
32
+ });
28
33
  }
29
34
  return _mupdf;
30
35
  }
@@ -10633,7 +10633,12 @@ function loadMupdf() {
10633
10633
  if (!_mupdf) {
10634
10634
  const deps = process.env.TALOS_SKILL_DEPS;
10635
10635
  const spec = deps ? (0, import_node_url.pathToFileURL)((0, import_node_path.join)(deps, "mupdf", "dist", "mupdf.js")).href : "mupdf";
10636
- _mupdf = import(spec);
10636
+ const loading = import(spec);
10637
+ _mupdf = loading;
10638
+ loading.catch(() => {
10639
+ if (_mupdf === loading)
10640
+ _mupdf = null;
10641
+ });
10637
10642
  }
10638
10643
  return _mupdf;
10639
10644
  }