aamp-openclaw-plugin 0.1.20 → 0.1.22

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.
@@ -6,6 +6,7 @@ import { dirname, join } from 'node:path'
6
6
  import { createInterface } from 'node:readline/promises'
7
7
  import { stdin as input, stdout as output, stderr } from 'node:process'
8
8
  import { spawnSync } from 'node:child_process'
9
+ import { createRequire } from 'node:module'
9
10
  import { fileURLToPath } from 'node:url'
10
11
 
11
12
  const PLUGIN_ID = 'aamp-openclaw-plugin'
@@ -253,12 +254,19 @@ function installPluginFiles(credentialsFile = DEFAULT_CREDENTIALS_FILE) {
253
254
 
254
255
  writeJsonFile(join(extensionDir, 'package.json'), packageJson)
255
256
 
256
- const dependencyPackages = ['aamp-sdk', 'ws', 'nodemailer']
257
+ const dependencyPackages = ['ws', 'nodemailer']
257
258
  const nodeModulesDir = join(extensionDir, 'node_modules')
258
259
  mkdirSync(nodeModulesDir, { recursive: true })
259
260
 
261
+ const requireFromPlugin = createRequire(import.meta.url)
262
+
260
263
  for (const dep of dependencyPackages) {
261
- const depRoot = join(packageRoot, 'node_modules', dep)
264
+ let depRoot
265
+ try {
266
+ depRoot = dirname(requireFromPlugin.resolve(`${dep}/package.json`))
267
+ } catch {
268
+ depRoot = join(packageRoot, 'node_modules', dep)
269
+ }
262
270
  if (!existsSync(depRoot)) {
263
271
  throw new Error(`Missing dependency directory: ${depRoot}`)
264
272
  }
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "skills"
8
8
  ],
9
9
  "license": "MIT",
10
- "version": "0.1.20",
10
+ "version": "0.1.22",
11
11
  "description": "AAMP Agent Mail Protocol — OpenClaw plugin. Gives OpenClaw an AAMP mailbox identity and lets it receive, process and reply to AAMP tasks.",
12
12
  "type": "module",
13
13
  "main": "dist/index.js",
@@ -68,7 +68,6 @@
68
68
  "prepack": "npm run build"
69
69
  },
70
70
  "dependencies": {
71
- "aamp-sdk": "^0.1.9",
72
71
  "nodemailer": "^6.9.10",
73
72
  "ws": "^8.16.0"
74
73
  },