@nac3/runtime 2.3.0-alpha.1 → 2.3.0-alpha.2

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/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- // NAC CLI v2.3.0-alpha.1
2
+ // NAC CLI v2.3.0-alpha.2
3
3
  // Usage:
4
4
  // nac validate <url-or-dir> [--severity=error|warn|info]
5
5
  // nac --version
@@ -18,7 +18,7 @@ const args = process.argv.slice(2);
18
18
  const cmd = args[0];
19
19
 
20
20
  function showHelp() {
21
- console.log('NAC CLI v2.3.0-alpha.1');
21
+ console.log('NAC CLI v2.3.0-alpha.2');
22
22
  console.log('');
23
23
  console.log('Usage:');
24
24
  console.log(' nac validate <url-or-dir> [--severity=error|warn|info]');
@@ -27,7 +27,7 @@ function showHelp() {
27
27
  }
28
28
 
29
29
  function showVersion() {
30
- console.log('@nac3/runtime CLI 2.3.0-alpha.1 (Native Agent Contract v2.3)');
30
+ console.log('@nac3/runtime CLI 2.3.0-alpha.2 (Native Agent Contract v2.3)');
31
31
  }
32
32
 
33
33
  if (!cmd || cmd === '--help' || cmd === '-h') { showHelp(); process.exit(0); }
@@ -2252,21 +2252,15 @@
2252
2252
  });
2253
2253
  throw NacError('not_found', 'No element with nac_id=' + action_id);
2254
2254
  }
2255
- /* invoke deliberately does NOT enforce visibility -- the
2256
- canonical use case is a mic / search / upload widget that
2257
- may live outside the visible viewport but is still a valid
2258
- NAC target (the agent never had to "see" it to use it).
2259
- Disabled state is still respected. */
2260
- if (el.disabled || el.getAttribute('aria-disabled') === 'true') {
2261
- _emitCommandRejected({
2262
- command_method: 'invoke',
2263
- command_target: action_id,
2264
- reason: 'disabled',
2265
- message: 'Element ' + action_id + ' is disabled',
2266
- source: (opts && opts.source) || undefined,
2267
- });
2268
- throw NacError('disabled', 'Element ' + action_id + ' is disabled');
2269
- }
2255
+ /* invoke deliberately does NOT enforce visibility OR disabled --
2256
+ the canonical use case is a mic / search / upload widget
2257
+ that may live outside the visible viewport or be visually
2258
+ disabled while a previous request is processing, but is
2259
+ still a valid NAC target (the agent's request is a logical
2260
+ message, not a synthetic click). Hosts that need to refuse
2261
+ an invoke based on UI state should do it in their
2262
+ nac:action:requested listener and emit nac:action:failed
2263
+ with a meaningful error code. */
2270
2264
  const verb = (payload && payload.verb)
2271
2265
  || el.getAttribute('data-nac-action')
2272
2266
  || '';
@@ -5158,7 +5152,7 @@
5158
5152
 
5159
5153
  global.NAC = {
5160
5154
  __nac_v1_installed: true,
5161
- version: '2.3.0-alpha.1',
5155
+ version: '2.3.0-alpha.2',
5162
5156
  spec_version: '2.3',
5163
5157
  /* v2.2.0 (V22-01) -- strict validation toggle. When true,
5164
5158
  NAC.register throws on findings (manifest_role_unknown,
package/dist/nac.cjs CHANGED
@@ -2253,21 +2253,15 @@ const _g = typeof globalThis !== 'undefined' ? globalThis : (typeof window !== '
2253
2253
  });
2254
2254
  throw NacError('not_found', 'No element with nac_id=' + action_id);
2255
2255
  }
2256
- /* invoke deliberately does NOT enforce visibility -- the
2257
- canonical use case is a mic / search / upload widget that
2258
- may live outside the visible viewport but is still a valid
2259
- NAC target (the agent never had to "see" it to use it).
2260
- Disabled state is still respected. */
2261
- if (el.disabled || el.getAttribute('aria-disabled') === 'true') {
2262
- _emitCommandRejected({
2263
- command_method: 'invoke',
2264
- command_target: action_id,
2265
- reason: 'disabled',
2266
- message: 'Element ' + action_id + ' is disabled',
2267
- source: (opts && opts.source) || undefined,
2268
- });
2269
- throw NacError('disabled', 'Element ' + action_id + ' is disabled');
2270
- }
2256
+ /* invoke deliberately does NOT enforce visibility OR disabled --
2257
+ the canonical use case is a mic / search / upload widget
2258
+ that may live outside the visible viewport or be visually
2259
+ disabled while a previous request is processing, but is
2260
+ still a valid NAC target (the agent's request is a logical
2261
+ message, not a synthetic click). Hosts that need to refuse
2262
+ an invoke based on UI state should do it in their
2263
+ nac:action:requested listener and emit nac:action:failed
2264
+ with a meaningful error code. */
2271
2265
  const verb = (payload && payload.verb)
2272
2266
  || el.getAttribute('data-nac-action')
2273
2267
  || '';
@@ -5159,7 +5153,7 @@ const _g = typeof globalThis !== 'undefined' ? globalThis : (typeof window !== '
5159
5153
 
5160
5154
  global.NAC = {
5161
5155
  __nac_v1_installed: true,
5162
- version: '2.3.0-alpha.1',
5156
+ version: '2.3.0-alpha.2',
5163
5157
  spec_version: '2.3',
5164
5158
  /* v2.2.0 (V22-01) -- strict validation toggle. When true,
5165
5159
  NAC.register throws on findings (manifest_role_unknown,
package/dist/nac.mjs CHANGED
@@ -2253,21 +2253,15 @@ const _g = typeof globalThis !== 'undefined' ? globalThis : (typeof window !== '
2253
2253
  });
2254
2254
  throw NacError('not_found', 'No element with nac_id=' + action_id);
2255
2255
  }
2256
- /* invoke deliberately does NOT enforce visibility -- the
2257
- canonical use case is a mic / search / upload widget that
2258
- may live outside the visible viewport but is still a valid
2259
- NAC target (the agent never had to "see" it to use it).
2260
- Disabled state is still respected. */
2261
- if (el.disabled || el.getAttribute('aria-disabled') === 'true') {
2262
- _emitCommandRejected({
2263
- command_method: 'invoke',
2264
- command_target: action_id,
2265
- reason: 'disabled',
2266
- message: 'Element ' + action_id + ' is disabled',
2267
- source: (opts && opts.source) || undefined,
2268
- });
2269
- throw NacError('disabled', 'Element ' + action_id + ' is disabled');
2270
- }
2256
+ /* invoke deliberately does NOT enforce visibility OR disabled --
2257
+ the canonical use case is a mic / search / upload widget
2258
+ that may live outside the visible viewport or be visually
2259
+ disabled while a previous request is processing, but is
2260
+ still a valid NAC target (the agent's request is a logical
2261
+ message, not a synthetic click). Hosts that need to refuse
2262
+ an invoke based on UI state should do it in their
2263
+ nac:action:requested listener and emit nac:action:failed
2264
+ with a meaningful error code. */
2271
2265
  const verb = (payload && payload.verb)
2272
2266
  || el.getAttribute('data-nac-action')
2273
2267
  || '';
@@ -5159,7 +5153,7 @@ const _g = typeof globalThis !== 'undefined' ? globalThis : (typeof window !== '
5159
5153
 
5160
5154
  global.NAC = {
5161
5155
  __nac_v1_installed: true,
5162
- version: '2.3.0-alpha.1',
5156
+ version: '2.3.0-alpha.2',
5163
5157
  spec_version: '2.3',
5164
5158
  /* v2.2.0 (V22-01) -- strict validation toggle. When true,
5165
5159
  NAC.register throws on findings (manifest_role_unknown,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nac3/runtime",
3
- "version": "2.3.0-alpha.1",
3
+ "version": "2.3.0-alpha.2",
4
4
  "description": "Native Agent Contract -- spec + reference runtime that lets web UIs be driven by AI agents, voice runners, and accessibility tools.",
5
5
  "keywords": [
6
6
  "nac",