@sellable/install 0.1.357-wip.20260720090000.6 → 0.1.357
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.
|
@@ -95,12 +95,12 @@ async function withClient(lockWorkspaceId, run) {
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
async function toolDenied(client, name, channelId, requesterId) {
|
|
98
|
+
async function toolDenied(client, name, channelId, requesterId, providerRequestId) {
|
|
99
99
|
try {
|
|
100
100
|
const result = await client.callTool({
|
|
101
101
|
name,
|
|
102
102
|
arguments: {},
|
|
103
|
-
_meta: { sellableAgent: { channelId, requesterId } },
|
|
103
|
+
_meta: { sellableAgent: { channelId, requesterId, providerRequestId } },
|
|
104
104
|
}, undefined, { timeout: 10_000, maxTotalTimeout: 10_000 });
|
|
105
105
|
return result?.isError === true;
|
|
106
106
|
} catch {
|
|
@@ -125,23 +125,24 @@ try {
|
|
|
125
125
|
) throw new Error("profile MCP contract rejected");
|
|
126
126
|
const channelId = channelIds[0];
|
|
127
127
|
const requesterId = requesterIds[0];
|
|
128
|
+
const providerRequestId = `runtime-probe-${profileId}`;
|
|
128
129
|
const main = await withClient(workspaceId, async (client) => {
|
|
129
130
|
const listed = (await client.listTools(undefined, { timeout: 10_000, maxTotalTimeout: 10_000 })).tools
|
|
130
131
|
.map((tool) => tool.name).sort();
|
|
131
132
|
const safe = await client.callTool({
|
|
132
133
|
name: "get_company_info",
|
|
133
134
|
arguments: {},
|
|
134
|
-
_meta: { sellableAgent: { channelId, requesterId } },
|
|
135
|
+
_meta: { sellableAgent: { channelId, requesterId, providerRequestId } },
|
|
135
136
|
}, undefined, { timeout: 10_000, maxTotalTimeout: 10_000 });
|
|
136
137
|
return {
|
|
137
138
|
tools: listed,
|
|
138
139
|
safeRead: safe?.isError !== true,
|
|
139
|
-
unexpectedToolDenied: await toolDenied(client, "__sellable_unapproved_probe__", channelId, requesterId),
|
|
140
|
-
wrongChannelDenied: await toolDenied(client, "get_company_info", "C0000000000", requesterId),
|
|
140
|
+
unexpectedToolDenied: await toolDenied(client, "__sellable_unapproved_probe__", channelId, requesterId, providerRequestId),
|
|
141
|
+
wrongChannelDenied: await toolDenied(client, "get_company_info", "C0000000000", requesterId, providerRequestId),
|
|
141
142
|
};
|
|
142
143
|
});
|
|
143
144
|
const wrongWorkspaceDenied = await withClient(`wrong-${workspaceId}`, (client) =>
|
|
144
|
-
toolDenied(client, "get_company_info", channelId, requesterId));
|
|
145
|
+
toolDenied(client, "get_company_info", channelId, requesterId, providerRequestId));
|
|
145
146
|
const ok =
|
|
146
147
|
main.safeRead && main.unexpectedToolDenied && main.wrongChannelDenied && wrongWorkspaceDenied &&
|
|
147
148
|
JSON.stringify(main.tools) === JSON.stringify([...tools].sort());
|
|
@@ -957,8 +957,8 @@ export function compileClaimToProfileDesired(activeClaim, config) {
|
|
|
957
957
|
]) ||
|
|
958
958
|
!exactObject(runtimeService, ["principalId", "policyHash", "credentialGeneration", "credentialFingerprint"]) ||
|
|
959
959
|
pinned.hermesCli !== "hermes" || pinned.hermesVersion !== "0.18.0" ||
|
|
960
|
-
pinned.installerPackage !== "@sellable/install@0.1.357
|
|
961
|
-
pinned.mcpPackage !== "@sellable/mcp@0.1.
|
|
960
|
+
pinned.installerPackage !== "@sellable/install@0.1.357" ||
|
|
961
|
+
pinned.mcpPackage !== "@sellable/mcp@0.1.619" ||
|
|
962
962
|
!Array.isArray(policy.toolInclude) || policy.toolInclude.length === 0 ||
|
|
963
963
|
!Number.isSafeInteger(slack.generation) || slack.generation < 1 ||
|
|
964
964
|
!/^A[A-Z0-9]{8,20}$/.test(slack.appId ?? "") ||
|
|
@@ -131,8 +131,8 @@ function validateDesired(desired) {
|
|
|
131
131
|
!Number.isSafeInteger(desired.slackGeneration) || desired.slackGeneration < 1 ||
|
|
132
132
|
!Number.isSafeInteger(desired.serviceCredentialGeneration) || desired.serviceCredentialGeneration < 1 ||
|
|
133
133
|
desired.hermesCli !== "hermes" || desired.hermesVersion !== "0.18.0" ||
|
|
134
|
-
desired.installerPackage !== "@sellable/install@0.1.357
|
|
135
|
-
desired.mcpPackage !== "@sellable/mcp@0.1.
|
|
134
|
+
desired.installerPackage !== "@sellable/install@0.1.357" ||
|
|
135
|
+
desired.mcpPackage !== "@sellable/mcp@0.1.619" ||
|
|
136
136
|
!Array.isArray(desired.toolInclude) || desired.toolInclude.length === 0 ||
|
|
137
137
|
desired.toolInclude.some((tool) => !/^[a-z][a-z0-9_]{0,127}$/.test(tool)) ||
|
|
138
138
|
new Set(desired.toolInclude).size !== desired.toolInclude.length ||
|
|
@@ -19,8 +19,8 @@ import { fileURLToPath } from "node:url";
|
|
|
19
19
|
import { deriveContainedProfileId } from "./profile-materializer.mjs";
|
|
20
20
|
|
|
21
21
|
export const PROVISIONING_ACTION = "PROVISION_HERMES_PROFILE";
|
|
22
|
-
export const PINNED_INSTALL_PACKAGE = "@sellable/install@0.1.357
|
|
23
|
-
export const PINNED_MCP_PACKAGE = "@sellable/mcp@0.1.
|
|
22
|
+
export const PINNED_INSTALL_PACKAGE = "@sellable/install@0.1.357";
|
|
23
|
+
export const PINNED_MCP_PACKAGE = "@sellable/mcp@0.1.619";
|
|
24
24
|
|
|
25
25
|
export function deriveAgentProfileId(workspaceId, agentId, hostId) {
|
|
26
26
|
return deriveContainedProfileId(workspaceId, agentId, hostId);
|
|
@@ -576,7 +576,7 @@ function inspectProvisionedProfile({
|
|
|
576
576
|
!matchesReadback(manifest, request) ||
|
|
577
577
|
manifest.serviceCredentialReference !== serviceCredentialReference ||
|
|
578
578
|
manifest.installerPackage !== PINNED_INSTALL_PACKAGE ||
|
|
579
|
-
manifest.installerVersion !== "0.1.357
|
|
579
|
+
manifest.installerVersion !== "0.1.357" ||
|
|
580
580
|
manifest.mcpPackage !== PINNED_MCP_PACKAGE ||
|
|
581
581
|
manifest.credentialKeyVersion !== credentialKeyVersion ||
|
|
582
582
|
!/^[a-f0-9]{16}$/.test(manifest.credentialFingerprint) ||
|
|
@@ -781,7 +781,7 @@ function successReceipt({
|
|
|
781
781
|
subject: `agent-profile:${observed.profileId}`,
|
|
782
782
|
cli: {
|
|
783
783
|
installPackage: PINNED_INSTALL_PACKAGE,
|
|
784
|
-
installVersion: "0.1.357
|
|
784
|
+
installVersion: "0.1.357",
|
|
785
785
|
mcpPackage: PINNED_MCP_PACKAGE,
|
|
786
786
|
command: "hermes profile bootstrap",
|
|
787
787
|
},
|
|
@@ -821,7 +821,7 @@ function failure(code, stages, extra = {}, request = null) {
|
|
|
821
821
|
subject: safeIdentity ? `agent-profile:${safeIdentity}` : "agent-profile:unbound",
|
|
822
822
|
cli: {
|
|
823
823
|
installPackage: PINNED_INSTALL_PACKAGE,
|
|
824
|
-
installVersion: "0.1.357
|
|
824
|
+
installVersion: "0.1.357",
|
|
825
825
|
mcpPackage: PINNED_MCP_PACKAGE,
|
|
826
826
|
command: "hermes profile bootstrap",
|
|
827
827
|
},
|