nofax 0.2.41 → 0.2.42

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/CHANGELOG.md CHANGED
@@ -42,6 +42,15 @@ Local Nofax `0.2.x` behavior is unchanged by these removals.
42
42
  - The capability-path form is normalized to `/mcp` before MCP protocol handling.
43
43
  - Remote read operations perform no external messaging/provider calls; only explicit `nofax_notify` invokes ntfy.
44
44
 
45
+ ## 0.2.42 - 2026-09-24
46
+
47
+ ### Changed
48
+
49
+ - Local MCP choice-label normalization now preserves valid UTF-16 at the existing 32-code-unit human-facing boundary before ntfy transport, so an astral Unicode character cannot be split before durable request creation while duplicate-visible-label rejection and full decision values remain unchanged.
50
+ - Pending-request recovery now fails closed when a valid durable request file is malformed or otherwise unreadable instead of silently omitting it from `nofax_list_pending`; requests that genuinely disappear during enumeration remain safely skippable.
51
+
52
+ Pending, timeout, disconnect, setup/config failure, ambiguous transport failure, corrupt durable state, and notification delivery still never mean approval. Explicit Allow/Deny behavior, response-topic secrecy, first-terminal-wins semantics, notification authority, and the narrower remote Worker boundary are unchanged.
53
+
45
54
  ## 0.2.41 - 2026-09-24
46
55
 
47
56
  ### Changed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nofax",
3
- "version": "0.2.41",
3
+ "version": "0.2.42",
4
4
  "mcpName": "io.github.AKzar1el/nofax",
5
5
  "description": "Human-in-the-loop approvals and notifications for AI coding agents via CLI, MCP, and agent hooks.",
6
6
  "type": "module",
@@ -74,7 +74,7 @@ const LIST_PENDING_OUTPUT_SCHEMA = z.object({
74
74
 
75
75
  export function buildMcpServer({ handlers = createMcpToolHandlers() } = {}) {
76
76
  const server = new McpServer(
77
- { name: 'nofax', version: '0.2.41' },
77
+ { name: 'nofax', version: '0.2.42' },
78
78
  { instructions: SERVER_INSTRUCTIONS }
79
79
  );
80
80
 
package/src/mcp-tools.mjs CHANGED
@@ -115,19 +115,24 @@ function validateWaitSeconds(value) {
115
115
  return seconds;
116
116
  }
117
117
 
118
+ function boundChoiceLabel(label) {
119
+ const end = safeSliceEnd(label, Math.min(label.length, 32));
120
+ return label.slice(0, end);
121
+ }
122
+
118
123
  function validateChoiceOptions(options) {
119
124
  if (!Array.isArray(options) || options.length < 1 || options.length > 3) throw new Error('NOFAX_CHOICE_LIMIT');
120
125
  const normalized = options.map((option) => {
121
126
  if (typeof option === 'string') {
122
127
  const value = option.trim();
123
128
  if (!value || value.length > 80) throw new Error('NOFAX_CHOICE_INVALID');
124
- return { value, label: value.slice(0, 32) };
129
+ return { value, label: boundChoiceLabel(value) };
125
130
  }
126
131
  if (!option || typeof option.value !== 'string' || typeof option.label !== 'string') throw new Error('NOFAX_CHOICE_INVALID');
127
132
  const value = option.value.trim();
128
133
  const label = option.label.trim();
129
134
  if (!value || !label || value.length > 80) throw new Error('NOFAX_CHOICE_INVALID');
130
- return { value, label: label.slice(0, 32) };
135
+ return { value, label: boundChoiceLabel(label) };
131
136
  });
132
137
  if (new Set(normalized.map((option) => option.value)).size !== normalized.length) {
133
138
  throw new Error('NOFAX_CHOICE_DUPLICATE');
package/src/requests.mjs CHANGED
@@ -206,7 +206,10 @@ export async function listPendingRequests({ home, env, limit = 20 } = {}) {
206
206
  try {
207
207
  const request = await loadRequest({ home: root, requestId });
208
208
  if (request.status === 'pending') results.push(request);
209
- } catch {}
209
+ } catch (error) {
210
+ if (error?.message === 'NOFAX_REQUEST_NOT_FOUND') continue;
211
+ throw error;
212
+ }
210
213
  }
211
214
  return results
212
215
  .sort((left, right) => Date.parse(right.createdAt) - Date.parse(left.createdAt) || right.requestId.localeCompare(left.requestId))