@sellable/install 0.1.648 → 0.1.649
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.
|
@@ -963,23 +963,32 @@ export function executeExternalSkillsBridgeOperation(
|
|
|
963
963
|
});
|
|
964
964
|
}
|
|
965
965
|
|
|
966
|
+
/**
|
|
967
|
+
* @param {{
|
|
968
|
+
* actions?: Array<{type: string, id: string}>,
|
|
969
|
+
* profileId?: string,
|
|
970
|
+
* dataRoot?: string,
|
|
971
|
+
* bridge?: typeof executeExternalSkillsBridgeOperation,
|
|
972
|
+
* }} [options]
|
|
973
|
+
*/
|
|
966
974
|
export function proveDefaultProfileNativeSkills({
|
|
967
975
|
actions,
|
|
968
976
|
profileId,
|
|
969
977
|
dataRoot = SOUL_BRIDGE_DATA_ROOT,
|
|
978
|
+
bridge = executeExternalSkillsBridgeOperation,
|
|
970
979
|
} = {}) {
|
|
971
980
|
const managed = (actions ?? []).filter((action) => action.type === "skill");
|
|
972
981
|
if (managed.length === 0)
|
|
973
982
|
return { status: "EMPTY", digest: sha256("[]") };
|
|
974
|
-
const inventory =
|
|
983
|
+
const inventory = bridge(
|
|
975
984
|
{ operation: "list" },
|
|
976
985
|
{ dataRoot, callerProfileId: profileId }
|
|
977
986
|
);
|
|
978
987
|
const proofs = managed.map((action) => {
|
|
979
988
|
const skill = inventory.skills.find((entry) => entry.name === action.id);
|
|
980
989
|
if (!skill) fail("default_profile_native_skill_missing");
|
|
981
|
-
const viewed =
|
|
982
|
-
{ operation: "read", skillId: skill.
|
|
990
|
+
const viewed = bridge(
|
|
991
|
+
{ operation: "read", skillId: skill.skillId },
|
|
983
992
|
{ dataRoot, callerProfileId: profileId }
|
|
984
993
|
);
|
|
985
994
|
if (!viewed.ok || viewed.skill?.name !== action.id)
|