@sparkelf/dsh-dataops-managed 0.3.42 → 0.3.43

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/lib/client.js CHANGED
@@ -835,22 +835,22 @@ window.__ModuleLoader__.load({
835
835
  document.head.appendChild(tag);
836
836
  }
837
837
  var ManagedDataOpsSection_module_css_default = {
838
- "reviewRow": "_2dqzjG_reviewRow",
838
+ "reviewActions": "_2dqzjG_reviewActions",
839
+ "section": "_2dqzjG_section",
840
+ "actions": "_2dqzjG_actions",
839
841
  "heading": "_2dqzjG_heading",
840
- "reviewHint": "_2dqzjG_reviewHint",
841
842
  "refusal": "_2dqzjG_refusal",
842
- "card": "_2dqzjG_card",
843
- "row": "_2dqzjG_row",
843
+ "reviewRow": "_2dqzjG_reviewRow",
844
+ "title": "_2dqzjG_title",
844
845
  "meta": "_2dqzjG_meta",
845
- "actions": "_2dqzjG_actions",
846
+ "row": "_2dqzjG_row",
847
+ "reviewHint": "_2dqzjG_reviewHint",
846
848
  "label": "_2dqzjG_label",
847
- "reviewActions": "_2dqzjG_reviewActions",
848
- "section": "_2dqzjG_section",
849
- "title": "_2dqzjG_title",
850
849
  "copy": "_2dqzjG_copy",
851
- "fields": "_2dqzjG_fields",
852
850
  "status": "_2dqzjG_status",
853
- "reviewRows": "_2dqzjG_reviewRows"
851
+ "card": "_2dqzjG_card",
852
+ "reviewRows": "_2dqzjG_reviewRows",
853
+ "fields": "_2dqzjG_fields"
854
854
  };
855
855
  //#endregion
856
856
  //#region src/client/ReviewSettingsCard.tsx
@@ -1600,62 +1600,62 @@ window.__ModuleLoader__.load({
1600
1600
  document.head.appendChild(tag);
1601
1601
  }
1602
1602
  var SkillPlazaSection_module_css_default = {
1603
- "departmentSelect": "_9FdZvq_departmentSelect",
1604
- "notice": "_9FdZvq_notice",
1605
- "auditDialog": "_9FdZvq_auditDialog",
1606
- "reviewError": "_9FdZvq_reviewError",
1603
+ "risk": "_9FdZvq_risk",
1604
+ "findings": "_9FdZvq_findings",
1605
+ "cardIcon": "_9FdZvq_cardIcon",
1606
+ "finding": "_9FdZvq_finding",
1607
+ "cardTitle": "_9FdZvq_cardTitle",
1608
+ "tab": "_9FdZvq_tab",
1609
+ "reviewNote": "_9FdZvq_reviewNote",
1610
+ "riskEmpty": "_9FdZvq_riskEmpty",
1607
1611
  "findingText": "_9FdZvq_findingText",
1608
1612
  "cards": "_9FdZvq_cards",
1609
- "dialog": "_9FdZvq_dialog",
1610
- "departmentLabel": "_9FdZvq_departmentLabel",
1613
+ "detailRow": "_9FdZvq_detailRow",
1611
1614
  "empty": "_9FdZvq_empty",
1612
- "rejectedTag": "_9FdZvq_rejectedTag",
1615
+ "detailValue": "_9FdZvq_detailValue",
1616
+ "detailButton": "_9FdZvq_detailButton",
1613
1617
  "cardTop": "_9FdZvq_cardTop",
1614
- "auditFooter": "_9FdZvq_auditFooter",
1615
- "riskScore": "_9FdZvq_riskScore",
1616
- "severity": "_9FdZvq_severity",
1618
+ "detailLabel": "_9FdZvq_detailLabel",
1617
1619
  "mark": "_9FdZvq_mark",
1618
- "tabActive": "_9FdZvq_tabActive",
1619
- "riskSummary": "_9FdZvq_riskSummary",
1620
- "audit": "_9FdZvq_audit",
1621
- "findings": "_9FdZvq_findings",
1620
+ "detail": "_9FdZvq_detail",
1621
+ "departmentSelect": "_9FdZvq_departmentSelect",
1622
+ "tagTop": "_9FdZvq_tagTop",
1623
+ "pendingTag": "_9FdZvq_pendingTag",
1624
+ "auditDialog": "_9FdZvq_auditDialog",
1625
+ "card": "_9FdZvq_card",
1626
+ "demoTag": "_9FdZvq_demoTag",
1627
+ "auditFooter": "_9FdZvq_auditFooter",
1628
+ "title": "_9FdZvq_title",
1629
+ "tabs": "_9FdZvq_tabs",
1630
+ "titleCount": "_9FdZvq_titleCount",
1631
+ "tabCount": "_9FdZvq_tabCount",
1622
1632
  "departmentBar": "_9FdZvq_departmentBar",
1633
+ "findingHint": "_9FdZvq_findingHint",
1634
+ "reviewError": "_9FdZvq_reviewError",
1623
1635
  "emptyText": "_9FdZvq_emptyText",
1636
+ "section": "_9FdZvq_section",
1624
1637
  "status": "_9FdZvq_status",
1625
- "detailRow": "_9FdZvq_detailRow",
1626
- "detailValue": "_9FdZvq_detailValue",
1627
- "riskFailed": "_9FdZvq_riskFailed",
1628
- "riskEmpty": "_9FdZvq_riskEmpty",
1638
+ "departmentLabel": "_9FdZvq_departmentLabel",
1629
1639
  "cardEnd": "_9FdZvq_cardEnd",
1630
- "finding": "_9FdZvq_finding",
1631
- "cardIcon": "_9FdZvq_cardIcon",
1632
- "detailLabel": "_9FdZvq_detailLabel",
1633
- "section": "_9FdZvq_section",
1634
- "demoTag": "_9FdZvq_demoTag",
1635
- "tab": "_9FdZvq_tab",
1636
- "tabCount": "_9FdZvq_tabCount",
1640
+ "dialog": "_9FdZvq_dialog",
1637
1641
  "sharedTag": "_9FdZvq_sharedTag",
1638
- "noteField": "_9FdZvq_noteField",
1639
- "reviewNote": "_9FdZvq_reviewNote",
1640
- "riskHead": "_9FdZvq_riskHead",
1641
- "titleCount": "_9FdZvq_titleCount",
1642
+ "riskSummary": "_9FdZvq_riskSummary",
1643
+ "riskScore": "_9FdZvq_riskScore",
1644
+ "notice": "_9FdZvq_notice",
1645
+ "mine": "_9FdZvq_mine",
1646
+ "head": "_9FdZvq_head",
1647
+ "rejectedTag": "_9FdZvq_rejectedTag",
1642
1648
  "cardDesc": "_9FdZvq_cardDesc",
1643
- "detailButton": "_9FdZvq_detailButton",
1644
- "pendingTag": "_9FdZvq_pendingTag",
1645
- "reviewButton": "_9FdZvq_reviewButton",
1649
+ "severity": "_9FdZvq_severity",
1650
+ "headRow": "_9FdZvq_headRow",
1651
+ "noteField": "_9FdZvq_noteField",
1652
+ "riskFailed": "_9FdZvq_riskFailed",
1646
1653
  "emptyIcon": "_9FdZvq_emptyIcon",
1647
- "card": "_9FdZvq_card",
1648
- "head": "_9FdZvq_head",
1649
- "detail": "_9FdZvq_detail",
1650
- "findingHint": "_9FdZvq_findingHint",
1651
1654
  "cardMarks": "_9FdZvq_cardMarks",
1652
- "headRow": "_9FdZvq_headRow",
1653
- "risk": "_9FdZvq_risk",
1654
- "mine": "_9FdZvq_mine",
1655
- "title": "_9FdZvq_title",
1656
- "tabs": "_9FdZvq_tabs",
1657
- "cardTitle": "_9FdZvq_cardTitle",
1658
- "tagTop": "_9FdZvq_tagTop"
1655
+ "riskHead": "_9FdZvq_riskHead",
1656
+ "tabActive": "_9FdZvq_tabActive",
1657
+ "reviewButton": "_9FdZvq_reviewButton",
1658
+ "audit": "_9FdZvq_audit"
1659
1659
  };
1660
1660
  //#endregion
1661
1661
  //#region src/client/SkillPlazaSection.tsx
@@ -2310,19 +2310,19 @@ window.__ModuleLoader__.load({
2310
2310
  document.head.appendChild(tag);
2311
2311
  }
2312
2312
  var WanxiangBrand_module_css_default = {
2313
- "unit-left": "s0HPxG_unit-left",
2314
- "unit-top": "s0HPxG_unit-top",
2315
- "mark": "s0HPxG_mark",
2313
+ "unitTop": "s0HPxG_unitTop",
2314
+ "unitLeft": "s0HPxG_unitLeft",
2316
2315
  "harness": "s0HPxG_harness",
2317
- "animatedMark": "s0HPxG_animatedMark",
2318
- "unit-core": "s0HPxG_unit-core",
2319
- "sidebarName": "s0HPxG_sidebarName",
2320
2316
  "wordmark": "s0HPxG_wordmark",
2317
+ "mark": "s0HPxG_mark",
2318
+ "animatedMark": "s0HPxG_animatedMark",
2319
+ "unit-top": "s0HPxG_unit-top",
2321
2320
  "unit-right": "s0HPxG_unit-right",
2322
- "unitRight": "s0HPxG_unitRight",
2323
- "unitTop": "s0HPxG_unitTop",
2324
- "unitLeft": "s0HPxG_unitLeft",
2325
- "unitCore": "s0HPxG_unitCore"
2321
+ "sidebarName": "s0HPxG_sidebarName",
2322
+ "unitCore": "s0HPxG_unitCore",
2323
+ "unit-core": "s0HPxG_unit-core",
2324
+ "unit-left": "s0HPxG_unit-left",
2325
+ "unitRight": "s0HPxG_unitRight"
2326
2326
  };
2327
2327
  //#endregion
2328
2328
  //#region src/client/WanxiangBrand.tsx
@@ -2739,92 +2739,92 @@ window.__ModuleLoader__.load({
2739
2739
  document.head.appendChild(tag);
2740
2740
  }
2741
2741
  var PermissionCenterSection_module_css_default = {
2742
- "page": "PNbOqW_page",
2743
- "matrixPermHead": "PNbOqW_matrixPermHead",
2742
+ "matrixPermission": "PNbOqW_matrixPermission",
2743
+ "treeChildren": "PNbOqW_treeChildren",
2744
+ "adminTag": "PNbOqW_adminTag",
2744
2745
  "comboboxHint": "PNbOqW_comboboxHint",
2745
- "department": "PNbOqW_department",
2746
- "detailGrid": "PNbOqW_detailGrid",
2747
2746
  "muted": "PNbOqW_muted",
2748
- "tabBadge": "PNbOqW_tabBadge",
2749
2747
  "roleSearch": "PNbOqW_roleSearch",
2750
- "error": "PNbOqW_error",
2751
- "matrixToolActive": "PNbOqW_matrixToolActive",
2752
- "pager": "PNbOqW_pager",
2753
- "departments": "PNbOqW_departments",
2748
+ "panelFoot": "PNbOqW_panelFoot",
2749
+ "matrixTool": "PNbOqW_matrixTool",
2750
+ "treeActions": "PNbOqW_treeActions",
2751
+ "panel": "PNbOqW_panel",
2752
+ "matrixScroll": "PNbOqW_matrixScroll",
2753
+ "page": "PNbOqW_page",
2754
+ "tabDivider": "PNbOqW_tabDivider",
2755
+ "tabActive": "PNbOqW_tabActive",
2756
+ "matrix": "PNbOqW_matrix",
2757
+ "readOnly": "PNbOqW_readOnly",
2758
+ "comboboxPlaceholder": "PNbOqW_comboboxPlaceholder",
2759
+ "comboboxCheck": "PNbOqW_comboboxCheck",
2760
+ "title": "PNbOqW_title",
2761
+ "subtitle": "PNbOqW_subtitle",
2762
+ "matrixGroup": "PNbOqW_matrixGroup",
2763
+ "comboboxOptionActive": "PNbOqW_comboboxOptionActive",
2754
2764
  "roleTags": "PNbOqW_roleTags",
2755
- "protected": "PNbOqW_protected",
2756
2765
  "demo": "PNbOqW_demo",
2757
- "head": "PNbOqW_head",
2758
- "matrixHead": "PNbOqW_matrixHead",
2759
2766
  "tabGroup": "PNbOqW_tabGroup",
2760
- "comboboxTrigger": "PNbOqW_comboboxTrigger",
2761
- "comboboxEmpty": "PNbOqW_comboboxEmpty",
2762
- "matrixModule": "PNbOqW_matrixModule",
2763
- "dialogFooter": "PNbOqW_dialogFooter",
2764
- "field": "PNbOqW_field",
2765
- "copied": "PNbOqW_copied",
2766
- "dialogHint": "PNbOqW_dialogHint",
2767
- "onlyAdmin": "PNbOqW_onlyAdmin",
2768
2767
  "headText": "PNbOqW_headText",
2769
- "matrixRoleHead": "PNbOqW_matrixRoleHead",
2768
+ "error": "PNbOqW_error",
2769
+ "protected": "PNbOqW_protected",
2770
+ "treeToggle": "PNbOqW_treeToggle",
2771
+ "field": "PNbOqW_field",
2772
+ "matrixModule": "PNbOqW_matrixModule",
2773
+ "permission": "PNbOqW_permission",
2774
+ "departments": "PNbOqW_departments",
2775
+ "empty": "PNbOqW_empty",
2776
+ "detailGrid": "PNbOqW_detailGrid",
2770
2777
  "tabs": "PNbOqW_tabs",
2771
2778
  "dialogBody": "PNbOqW_dialogBody",
2772
- "comboboxOption": "PNbOqW_comboboxOption",
2773
- "treeChildren": "PNbOqW_treeChildren",
2774
- "scopeBadge": "PNbOqW_scopeBadge",
2775
- "title": "PNbOqW_title",
2776
- "comboboxCheck": "PNbOqW_comboboxCheck",
2777
- "matrixGroup": "PNbOqW_matrixGroup",
2778
- "adminTag": "PNbOqW_adminTag",
2779
+ "dialogHint": "PNbOqW_dialogHint",
2779
2780
  "roleSearchIcon": "PNbOqW_roleSearchIcon",
2780
- "comboboxList": "PNbOqW_comboboxList",
2781
- "treeActions": "PNbOqW_treeActions",
2782
- "candidates": "PNbOqW_candidates",
2783
- "comboboxSearch": "PNbOqW_comboboxSearch",
2784
- "roleRevoke": "PNbOqW_roleRevoke",
2781
+ "matrixHeadLeft": "PNbOqW_matrixHeadLeft",
2785
2782
  "tableScroll": "PNbOqW_tableScroll",
2783
+ "scopeBadge": "PNbOqW_scopeBadge",
2784
+ "matrixHead": "PNbOqW_matrixHead",
2785
+ "panelHead": "PNbOqW_panelHead",
2786
+ "head": "PNbOqW_head",
2787
+ "table": "PNbOqW_table",
2788
+ "notice": "PNbOqW_notice",
2789
+ "copied": "PNbOqW_copied",
2790
+ "search": "PNbOqW_search",
2786
2791
  "permCopy": "PNbOqW_permCopy",
2792
+ "roleTag": "PNbOqW_roleTag",
2793
+ "dialog": "PNbOqW_dialog",
2787
2794
  "comboboxMenu": "PNbOqW_comboboxMenu",
2788
- "permDescription": "PNbOqW_permDescription",
2789
- "headActions": "PNbOqW_headActions",
2790
- "empty": "PNbOqW_empty",
2791
- "permission": "PNbOqW_permission",
2792
- "search": "PNbOqW_search",
2793
- "matrixPermission": "PNbOqW_matrixPermission",
2795
+ "comboboxList": "PNbOqW_comboboxList",
2796
+ "comboboxOption": "PNbOqW_comboboxOption",
2797
+ "roleCell": "PNbOqW_roleCell",
2794
2798
  "roleGrant": "PNbOqW_roleGrant",
2799
+ "dialogFooter": "PNbOqW_dialogFooter",
2800
+ "matrixRoleHead": "PNbOqW_matrixRoleHead",
2801
+ "roleSearchWrap": "PNbOqW_roleSearchWrap",
2802
+ "treeSpacer": "PNbOqW_treeSpacer",
2803
+ "rowActions": "PNbOqW_rowActions",
2804
+ "sectionTitle": "PNbOqW_sectionTitle",
2805
+ "headActions": "PNbOqW_headActions",
2806
+ "treeRoot": "PNbOqW_treeRoot",
2795
2807
  "treeRow": "PNbOqW_treeRow",
2808
+ "candidates": "PNbOqW_candidates",
2809
+ "onlyAdmin": "PNbOqW_onlyAdmin",
2810
+ "pager": "PNbOqW_pager",
2811
+ "permDescription": "PNbOqW_permDescription",
2812
+ "matrixPermHead": "PNbOqW_matrixPermHead",
2813
+ "treeName": "PNbOqW_treeName",
2814
+ "comboboxTrigger": "PNbOqW_comboboxTrigger",
2815
+ "comboboxSearch": "PNbOqW_comboboxSearch",
2796
2816
  "tab": "PNbOqW_tab",
2797
- "matrixScroll": "PNbOqW_matrixScroll",
2798
- "panelHead": "PNbOqW_panelHead",
2799
- "roleCell": "PNbOqW_roleCell",
2800
- "matrixTool": "PNbOqW_matrixTool",
2801
- "deptAdmins": "PNbOqW_deptAdmins",
2802
- "subtitle": "PNbOqW_subtitle",
2803
- "rowActions": "PNbOqW_rowActions",
2804
- "treeSpacer": "PNbOqW_treeSpacer",
2805
- "notice": "PNbOqW_notice",
2806
2817
  "matrixNote": "PNbOqW_matrixNote",
2807
- "panel": "PNbOqW_panel",
2808
- "panelFoot": "PNbOqW_panelFoot",
2809
2818
  "combobox": "PNbOqW_combobox",
2810
- "waiting": "PNbOqW_waiting",
2811
- "sectionTitle": "PNbOqW_sectionTitle",
2812
- "matrix": "PNbOqW_matrix",
2813
- "matrixHeadLeft": "PNbOqW_matrixHeadLeft",
2814
- "dialog": "PNbOqW_dialog",
2815
- "treeToggle": "PNbOqW_treeToggle",
2816
- "readOnly": "PNbOqW_readOnly",
2817
- "candidate": "PNbOqW_candidate",
2818
- "tabDivider": "PNbOqW_tabDivider",
2819
- "table": "PNbOqW_table",
2820
- "tabActive": "PNbOqW_tabActive",
2821
- "treeName": "PNbOqW_treeName",
2822
- "comboboxPlaceholder": "PNbOqW_comboboxPlaceholder",
2823
2819
  "matrixRoleCell": "PNbOqW_matrixRoleCell",
2824
- "roleTag": "PNbOqW_roleTag",
2825
- "comboboxOptionActive": "PNbOqW_comboboxOptionActive",
2826
- "roleSearchWrap": "PNbOqW_roleSearchWrap",
2827
- "treeRoot": "PNbOqW_treeRoot"
2820
+ "candidate": "PNbOqW_candidate",
2821
+ "roleRevoke": "PNbOqW_roleRevoke",
2822
+ "comboboxEmpty": "PNbOqW_comboboxEmpty",
2823
+ "tabBadge": "PNbOqW_tabBadge",
2824
+ "waiting": "PNbOqW_waiting",
2825
+ "matrixToolActive": "PNbOqW_matrixToolActive",
2826
+ "department": "PNbOqW_department",
2827
+ "deptAdmins": "PNbOqW_deptAdmins"
2828
2828
  };
2829
2829
  //#endregion
2830
2830
  //#region src/client/combobox.ts
@@ -4475,18 +4475,18 @@ window.__ModuleLoader__.load({
4475
4475
  document.head.appendChild(tag);
4476
4476
  }
4477
4477
  var WorkspaceUpgradePrompt_module_css_default = {
4478
- "dialogText": "razUfG_dialogText",
4479
- "body": "razUfG_body",
4480
- "sessionRow": "razUfG_sessionRow",
4478
+ "banner": "razUfG_banner",
4479
+ "sessionList": "razUfG_sessionList",
4480
+ "copy": "razUfG_copy",
4481
+ "error": "razUfG_error",
4481
4482
  "title": "razUfG_title",
4482
- "sessionTitle": "razUfG_sessionTitle",
4483
+ "dialogBody": "razUfG_dialogBody",
4484
+ "dialogText": "razUfG_dialogText",
4483
4485
  "sessionPath": "razUfG_sessionPath",
4484
- "sessionList": "razUfG_sessionList",
4486
+ "body": "razUfG_body",
4485
4487
  "actions": "razUfG_actions",
4486
- "dialogBody": "razUfG_dialogBody",
4487
- "copy": "razUfG_copy",
4488
- "banner": "razUfG_banner",
4489
- "error": "razUfG_error"
4488
+ "sessionRow": "razUfG_sessionRow",
4489
+ "sessionTitle": "razUfG_sessionTitle"
4490
4490
  };
4491
4491
  //#endregion
4492
4492
  //#region src/client/WorkspaceUpgradePrompt.tsx
@@ -4799,24 +4799,24 @@ window.__ModuleLoader__.load({
4799
4799
  document.head.appendChild(tag);
4800
4800
  }
4801
4801
  var NotificationBell_module_css_default = {
4802
- "rowTitle": "tE0trG_rowTitle",
4803
- "bell": "tE0trG_bell",
4804
- "rowIcon": "tE0trG_rowIcon",
4805
- "linkButton": "tE0trG_linkButton",
4806
- "button": "tE0trG_button",
4807
- "actions": "tE0trG_actions",
4808
- "pager": "tE0trG_pager",
4809
- "badge": "tE0trG_badge",
4810
- "rowMeta": "tE0trG_rowMeta",
4811
4802
  "rowBody": "tE0trG_rowBody",
4803
+ "dialog": "tE0trG_dialog",
4804
+ "rowIcon": "tE0trG_rowIcon",
4812
4805
  "demo": "tE0trG_demo",
4806
+ "actions": "tE0trG_actions",
4807
+ "button": "tE0trG_button",
4813
4808
  "empty": "tE0trG_empty",
4809
+ "dot": "tE0trG_dot",
4814
4810
  "list": "tE0trG_list",
4815
- "row": "tE0trG_row",
4816
- "dialog": "tE0trG_dialog",
4811
+ "rowMeta": "tE0trG_rowMeta",
4817
4812
  "rowText": "tE0trG_rowText",
4818
- "dot": "tE0trG_dot",
4819
- "rowTime": "tE0trG_rowTime"
4813
+ "linkButton": "tE0trG_linkButton",
4814
+ "row": "tE0trG_row",
4815
+ "pager": "tE0trG_pager",
4816
+ "badge": "tE0trG_badge",
4817
+ "rowTime": "tE0trG_rowTime",
4818
+ "rowTitle": "tE0trG_rowTitle",
4819
+ "bell": "tE0trG_bell"
4820
4820
  };
4821
4821
  //#endregion
4822
4822
  //#region src/client/NotificationBell.tsx
package/lib/index.js CHANGED
@@ -972,6 +972,75 @@ function isToolCapabilityEnabled(name, state) {
972
972
  if (!state.enabled) return false;
973
973
  return state.capabilities[policy.capability] ?? policy.defaultEnabled ?? false;
974
974
  }
975
+ /** Keys a group-chat Session may carry as its opaque `actor`. */
976
+ const ACTOR_KEYS = [
977
+ "roleCodes",
978
+ "systemKeys",
979
+ "permissions",
980
+ "permissionKeys",
981
+ "primaryRole",
982
+ "userId"
983
+ ];
984
+ /**
985
+ * Whether an opaque Session actor is a usable DataOps scope.
986
+ *
987
+ * `Session.actor` is untyped by design -- the base never interprets it -- so the connector has to
988
+ * decide here. A value without any of the scope's identifying fields is not one of ours, and a
989
+ * disclosure rule must then hide rather than fall through to the workspace's scope: the Session
990
+ * belongs to someone else.
991
+ * @param actor - the opaque value the Session carries.
992
+ * @returns true when the actor can be read as a {@link DataOpsScope}.
993
+ */
994
+ function isScopeActor(actor) {
995
+ return isRecord$1(actor) && ACTOR_KEYS.some((key) => key in actor);
996
+ }
997
+ /**
998
+ * Whether the model must not see one managed tool in this Session.
999
+ *
1000
+ * A Session carrying a scope-like actor is a group-chat room acting for a member: the member's
1001
+ * own scope decides, never the workspace's. Otherwise the workspace scope applies, which is exactly
1002
+ * what the registration set was derived from, so an ordinary Session sees no change at all.
1003
+ * @param name - the registered tool name.
1004
+ * @param actor - `Session.actor`, or undefined outside a room.
1005
+ * @param workspaceScope - the scope the registration set was built from.
1006
+ * @returns true to hide the tool for this Session.
1007
+ */
1008
+ function sessionHidesTool(name, actor, workspaceScope) {
1009
+ if (actor !== void 0) return !isScopeActor(actor) || !isToolVisible(name, actor);
1010
+ if (workspaceScope === void 0) return true;
1011
+ return !isToolVisible(name, workspaceScope);
1012
+ }
1013
+ /**
1014
+ * Whether the model must not see one skill in this Session.
1015
+ *
1016
+ * A skill declares the permissions it needs in its frontmatter; the effective scope must hold all
1017
+ * of them. Skills without such a declaration are never claimed by the rule, so the plugin's own
1018
+ * connector gate stays the only thing that hides them.
1019
+ * @param permissions - `metadata.permissions` from the candidate, when the frontmatter carried it.
1020
+ * @param actor - `Session.actor`, or undefined outside a room.
1021
+ * @param workspaceScope - the scope the registration set was built from.
1022
+ * @returns true to hide the skill for this Session.
1023
+ */
1024
+ /**
1025
+ * Read the permissions a skill's frontmatter declares.
1026
+ *
1027
+ * The candidate carries provider frontmatter as opaque `metadata`; only `permissions` is a
1028
+ * disclosure fact here. A malformed value is ignored rather than hidden: the plugin only claims
1029
+ * candidates it can read.
1030
+ * @param metadata - `SkillCandidate.metadata`, when the provider supplied one.
1031
+ * @returns the declared permission keys, or an empty list.
1032
+ */
1033
+ function skillPermissions(metadata) {
1034
+ const value = metadata?.["permissions"];
1035
+ if (!Array.isArray(value)) return [];
1036
+ return value.filter((entry) => typeof entry === "string");
1037
+ }
1038
+ function sessionHidesSkill(permissions, actor, workspaceScope) {
1039
+ const effective = actor !== void 0 ? isScopeActor(actor) ? actor : void 0 : workspaceScope;
1040
+ if (effective === void 0) return true;
1041
+ const held = new Set(permissionList(effective) ?? []);
1042
+ return !permissions.every((permission) => held.has(permission));
1043
+ }
975
1044
  function isToolVisible(name, scope) {
976
1045
  const policy = AI_TOOL_ACCESS[name];
977
1046
  if (policy.superAdminOnly === true && !isSuperAdmin(scope)) return false;
@@ -4134,6 +4203,30 @@ async function apply(ctx, config) {
4134
4203
  return (scope.permissions ?? scope.permissionKeys ?? []).includes(CONNECTOR_SKILL_PERMISSION);
4135
4204
  };
4136
4205
  ctx.effect(() => () => aiTools.dispose(), "dataops-managed: skill and review tool disclosure");
4206
+ /**
4207
+ * Per-session disclosure.
4208
+ *
4209
+ * The registration set above is global to the workspace; a group-chat room acts for one member,
4210
+ * so its Session carries that member's scope as an opaque actor and the base asks these rules
4211
+ * while it assembles the step. Both registries are optional: an older base without them keeps
4212
+ * today's workspace-wide behaviour, and `addVisibilityFilter` is only called when it exists.
4213
+ */
4214
+ ctx.effect(() => {
4215
+ const tools = ctx.tools;
4216
+ const skills = ctx.skills;
4217
+ const disposers = [];
4218
+ if (typeof tools.addVisibilityFilter === "function") disposers.push(tools.addVisibilityFilter({
4219
+ appliesTo: (tool) => tool.name.startsWith("dataops_"),
4220
+ hidden: (session, tool) => sessionHidesTool(tool.name, session?.actor, aiTools.currentScope())
4221
+ }));
4222
+ if (typeof skills.addVisibilityFilter === "function") disposers.push(skills.addVisibilityFilter({
4223
+ appliesTo: (candidate) => skillPermissions(candidate.metadata).length > 0,
4224
+ hidden: (session, candidate) => sessionHidesSkill(skillPermissions(candidate.metadata), session?.actor, aiTools.currentScope())
4225
+ }));
4226
+ return () => {
4227
+ for (const dispose of disposers.splice(0)) dispose();
4228
+ };
4229
+ }, "dataops-managed: per-session tool and skill disclosure");
4137
4230
  ctx.effect(() => ctx.on("credentials/reference-updated", (ref) => {
4138
4231
  if (String(ref) !== config.credentialRef) return;
4139
4232
  aiTools.refresh(true);
@@ -209,6 +209,51 @@ export declare function isToolCapabilityEnabled(name: AiToolName, state: {
209
209
  readonly enabled: boolean;
210
210
  readonly capabilities: Record<string, boolean>;
211
211
  }): boolean;
212
+ /**
213
+ * Whether an opaque Session actor is a usable DataOps scope.
214
+ *
215
+ * `Session.actor` is untyped by design -- the base never interprets it -- so the connector has to
216
+ * decide here. A value without any of the scope's identifying fields is not one of ours, and a
217
+ * disclosure rule must then hide rather than fall through to the workspace's scope: the Session
218
+ * belongs to someone else.
219
+ * @param actor - the opaque value the Session carries.
220
+ * @returns true when the actor can be read as a {@link DataOpsScope}.
221
+ */
222
+ export declare function isScopeActor(actor: unknown): actor is DataOpsScope;
223
+ /**
224
+ * Whether the model must not see one managed tool in this Session.
225
+ *
226
+ * A Session carrying a scope-like actor is a group-chat room acting for a member: the member's
227
+ * own scope decides, never the workspace's. Otherwise the workspace scope applies, which is exactly
228
+ * what the registration set was derived from, so an ordinary Session sees no change at all.
229
+ * @param name - the registered tool name.
230
+ * @param actor - `Session.actor`, or undefined outside a room.
231
+ * @param workspaceScope - the scope the registration set was built from.
232
+ * @returns true to hide the tool for this Session.
233
+ */
234
+ export declare function sessionHidesTool(name: AiToolName, actor: unknown, workspaceScope: DataOpsScope | undefined): boolean;
235
+ /**
236
+ * Whether the model must not see one skill in this Session.
237
+ *
238
+ * A skill declares the permissions it needs in its frontmatter; the effective scope must hold all
239
+ * of them. Skills without such a declaration are never claimed by the rule, so the plugin's own
240
+ * connector gate stays the only thing that hides them.
241
+ * @param permissions - `metadata.permissions` from the candidate, when the frontmatter carried it.
242
+ * @param actor - `Session.actor`, or undefined outside a room.
243
+ * @param workspaceScope - the scope the registration set was built from.
244
+ * @returns true to hide the skill for this Session.
245
+ */
246
+ /**
247
+ * Read the permissions a skill's frontmatter declares.
248
+ *
249
+ * The candidate carries provider frontmatter as opaque `metadata`; only `permissions` is a
250
+ * disclosure fact here. A malformed value is ignored rather than hidden: the plugin only claims
251
+ * candidates it can read.
252
+ * @param metadata - `SkillCandidate.metadata`, when the provider supplied one.
253
+ * @returns the declared permission keys, or an empty list.
254
+ */
255
+ export declare function skillPermissions(metadata: Readonly<Record<string, unknown>> | undefined): readonly string[];
256
+ export declare function sessionHidesSkill(permissions: readonly string[], actor: unknown, workspaceScope: DataOpsScope | undefined): boolean;
212
257
  export declare function isToolVisible(name: AiToolName, scope: DataOpsScope): boolean;
213
258
  /**
214
259
  * Validate one `/api/ai/review/context` body.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sparkelf/dsh-dataops-managed",
3
- "version": "0.3.42",
3
+ "version": "0.3.43",
4
4
  "description": "DataOps JWT intake and credential-backed MCP tools for managed DeepSeek Harness workspaces.",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",