@colixsystems/widget-sdk 0.315.3 → 0.317.0

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/README.md CHANGED
@@ -90,7 +90,11 @@ See the design reference for the full architecture: [`docs/architecture/widget-m
90
90
 
91
91
  ## Status
92
92
 
93
- `v0.315.3` — pre-publish. The package surface (types, function names, export paths) is the v1 contract; runtime behaviour for some hooks is stubbed (each hook documents what's wired and what isn't). It is **not yet published to npm**.
93
+ `v0.317.0` — pre-publish. The package surface (types, function names, export paths) is the v1 contract; runtime behaviour for some hooks is stubbed (each hook documents what's wired and what isn't). It is **not yet published to npm**.
94
+
95
+ ### What's new in 0.317.0 (contract 1.257.0)
96
+
97
+ **An action script can store a PIN without keeping it — `crypto` joins `CONTRACT.actionScriptGlobals` (sc-15531).** `await crypto.hashSecret(value)` returns a salted one-way hash to store in place of a PIN, passcode or password an app's users choose, and `await crypto.verifySecret(attempt, storedHash)` resolves `true` or `false`. The hash is scrypt, computed on the host, and the value never reaches a log. Keep a count of wrong tries in a table to limit attempts. The action-sdk README has the limits. Nothing changes for widget authors.
94
98
 
95
99
  ### What's new in 0.315.3 (contract 1.255.1)
96
100
 
package/dist/contract.cjs CHANGED
@@ -4093,6 +4093,8 @@ const ACTION_SCRIPT_GLOBALS = [
4093
4093
  "respond",
4094
4094
  // sc-16548 — one turn of a workspace AI agent.
4095
4095
  "agents",
4096
+ // sc-15531 — hashSecret / verifySecret, so a PIN is never stored plain.
4097
+ "crypto",
4096
4098
  ];
4097
4099
  // Mirrors action.service.js SCRIPT_MAX_BYTES.
4098
4100
  const ACTION_SCRIPT_MAX_BYTES = 200 * 1024;
@@ -6967,7 +6969,9 @@ const CONTRACT = deepFreeze({
6967
6969
  // Text component sizes now clamp up to it instead of to 8.
6968
6970
  // 1.255.1: fix (sc-16882) — `ACTION_PAUSED` is gone from useAction's
6969
6971
  // refusals: no plan caps how many Actions run, so none is paused.
6970
- version: "1.255.1",
6972
+ // 1.257.0: additive (sc-15531) — `crypto` joins `actionScriptGlobals`:
6973
+ // `crypto.hashSecret` / `crypto.verifySecret` hash a PIN or passcode.
6974
+ version: "1.257.0",
6971
6975
  sharedTranslationKeys: SHARED_TRANSLATION_KEYS,
6972
6976
  hooks: HOOKS,
6973
6977
  primitives: PRIMITIVES,
package/dist/contract.js CHANGED
@@ -4088,6 +4088,8 @@ const ACTION_SCRIPT_GLOBALS = [
4088
4088
  "respond",
4089
4089
  // sc-16548 — one turn of a workspace AI agent.
4090
4090
  "agents",
4091
+ // sc-15531 — hashSecret / verifySecret, so a PIN is never stored plain.
4092
+ "crypto",
4091
4093
  ];
4092
4094
  // Mirrors action.service.js SCRIPT_MAX_BYTES.
4093
4095
  const ACTION_SCRIPT_MAX_BYTES = 200 * 1024;
@@ -6962,7 +6964,9 @@ const CONTRACT = deepFreeze({
6962
6964
  // Text component sizes now clamp up to it instead of to 8.
6963
6965
  // 1.255.1: fix (sc-16882) — `ACTION_PAUSED` is gone from useAction's
6964
6966
  // refusals: no plan caps how many Actions run, so none is paused.
6965
- version: "1.255.1",
6967
+ // 1.257.0: additive (sc-15531) — `crypto` joins `actionScriptGlobals`:
6968
+ // `crypto.hashSecret` / `crypto.verifySecret` hash a PIN or passcode.
6969
+ version: "1.257.0",
6966
6970
  sharedTranslationKeys: SHARED_TRANSLATION_KEYS,
6967
6971
  hooks: HOOKS,
6968
6972
  primitives: PRIMITIVES,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colixsystems/widget-sdk",
3
- "version": "0.315.3",
3
+ "version": "0.317.0",
4
4
  "description": "Common widget interface for AppStudio. Implements WidgetManifest, WidgetContext, property schema, and helper hooks.",
5
5
  "repository": {
6
6
  "type": "git",
package/src/contract.js CHANGED
@@ -4088,6 +4088,8 @@ const ACTION_SCRIPT_GLOBALS = [
4088
4088
  "respond",
4089
4089
  // sc-16548 — one turn of a workspace AI agent.
4090
4090
  "agents",
4091
+ // sc-15531 — hashSecret / verifySecret, so a PIN is never stored plain.
4092
+ "crypto",
4091
4093
  ];
4092
4094
  // Mirrors action.service.js SCRIPT_MAX_BYTES.
4093
4095
  const ACTION_SCRIPT_MAX_BYTES = 200 * 1024;
@@ -6962,7 +6964,9 @@ const CONTRACT = deepFreeze({
6962
6964
  // Text component sizes now clamp up to it instead of to 8.
6963
6965
  // 1.255.1: fix (sc-16882) — `ACTION_PAUSED` is gone from useAction's
6964
6966
  // refusals: no plan caps how many Actions run, so none is paused.
6965
- version: "1.255.1",
6967
+ // 1.257.0: additive (sc-15531) — `crypto` joins `actionScriptGlobals`:
6968
+ // `crypto.hashSecret` / `crypto.verifySecret` hash a PIN or passcode.
6969
+ version: "1.257.0",
6966
6970
  sharedTranslationKeys: SHARED_TRANSLATION_KEYS,
6967
6971
  hooks: HOOKS,
6968
6972
  primitives: PRIMITIVES,