@ascenda-one/agent-mcp 0.1.19 → 0.1.21

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.
Files changed (2) hide show
  1. package/dist/cli.js +9 -6
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -1117,8 +1117,8 @@ var require_tokenStore = __commonJS({
1117
1117
  var fs = __importStar(__require("fs"));
1118
1118
  var os = __importStar(__require("os"));
1119
1119
  var path = __importStar(__require("path"));
1120
- function ascendaHome() {
1121
- return process.env.ASCENDA_HOME ?? path.join(os.homedir(), ".ascenda");
1120
+ function ascendaHome(home = os.homedir()) {
1121
+ return process.env.ASCENDA_HOME ?? path.join(home, ".ascenda");
1122
1122
  }
1123
1123
  function defaultTokenFilePath2(toolInstallationId) {
1124
1124
  return path.join(ascendaHome(), "tokens", sanitizeFilePart(toolInstallationId));
@@ -2401,10 +2401,10 @@ var require_salt = __commonJS({
2401
2401
  exports.hashWithMachineSalt = hashWithMachineSalt;
2402
2402
  var crypto = __importStar(__require("crypto"));
2403
2403
  var fs = __importStar(__require("fs"));
2404
- var os = __importStar(__require("os"));
2405
2404
  var path = __importStar(__require("path"));
2405
+ var tokenStore_1 = require_tokenStore();
2406
2406
  function machineSaltFilePath() {
2407
- return path.join(os.homedir(), ".ascenda", "salt");
2407
+ return path.join((0, tokenStore_1.ascendaHome)(), "salt");
2408
2408
  }
2409
2409
  var cache = /* @__PURE__ */ new Map();
2410
2410
  function readOrCreateMachineSalt(saltFilePath = machineSaltFilePath()) {
@@ -2676,10 +2676,10 @@ var require_hookAdapter = __commonJS({
2676
2676
  exports.MissingInstallationIdError = MissingInstallationIdError;
2677
2677
  function resolveCliAgentInstallationId(toolType, identity = {}) {
2678
2678
  const fromEnv = process.env.ASCENDA_TOOL_INSTALLATION_ID?.trim();
2679
- if (fromEnv)
2679
+ if (fromEnv && belongsToToolType(toolType, fromEnv))
2680
2680
  return { toolInstallationId: qualify(toolType, fromEnv), source: "env" };
2681
2681
  const fromCredentials = identity.host ? (0, credentials_1.readHostCredentials)(identity.host)?.toolInstallationId?.trim() : void 0;
2682
- if (fromCredentials)
2682
+ if (fromCredentials && belongsToToolType(toolType, fromCredentials))
2683
2683
  return { toolInstallationId: qualify(toolType, fromCredentials), source: "credentials" };
2684
2684
  const candidates = (0, tokenStore_1.listPersistedToolInstallationIds)(toolType);
2685
2685
  if (candidates.length === 1)
@@ -2689,6 +2689,9 @@ var require_hookAdapter = __commonJS({
2689
2689
  function defaultSetupCommand(host) {
2690
2690
  return host ? `npx @ascenda-one/${host.replace(/_cli$/, "")}-hooks setup` : "the agent's setup command";
2691
2691
  }
2692
+ function belongsToToolType(toolType, value) {
2693
+ return !value.includes(":") || value.startsWith(`${toolType}:`);
2694
+ }
2692
2695
  function qualify(toolType, value) {
2693
2696
  return value.includes(":") ? value : `${toolType}:${value}`;
2694
2697
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "publishConfig": { "access": "public" },
3
3
  "name": "@ascenda-one/agent-mcp",
4
- "version": "0.1.19",
4
+ "version": "0.1.21",
5
5
  "description": "MCP server exposing ascenda_emit_work_signal — the one submission interface for agent-observed (semantic) work-friction signals.",
6
6
  "repository": {
7
7
  "type": "git",