portable-agent-layer 0.85.11 → 0.85.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "portable-agent-layer",
3
- "version": "0.85.11",
3
+ "version": "0.85.12",
4
4
  "description": "PAL — Portable Agent Layer: persistent personal context for AI coding assistants",
5
5
  "type": "module",
6
6
  "bin": {
@@ -209,13 +209,43 @@ function bindingFindings(): Finding[] {
209
209
  : issues.map(bindingFinding);
210
210
  }
211
211
 
212
+ function resolves(name: string, from: string): boolean {
213
+ try {
214
+ Bun.resolveSync(`${name}/package.json`, from);
215
+ return true;
216
+ } catch {
217
+ try {
218
+ Bun.resolveSync(name, from);
219
+ return true;
220
+ } catch {
221
+ return false;
222
+ }
223
+ }
224
+ }
225
+
226
+ export function unresolvedDependencies(pkg: string): string[] {
227
+ try {
228
+ const { dependencies = {} } = JSON.parse(
229
+ readFileSync(resolve(pkg, "package.json"), "utf-8")
230
+ );
231
+ return Object.keys(dependencies).filter((name) => !resolves(name, pkg));
232
+ } catch {
233
+ return [];
234
+ }
235
+ }
236
+
212
237
  function dependencyFinding(): Finding {
213
- return existsSync(resolve(palPkg(), "node_modules"))
238
+ const missing = unresolvedDependencies(palPkg());
239
+ return missing.length === 0
214
240
  ? passed("dependencies", "Dependencies installed")
215
- : failing("dependencies", "PAL's dependencies are not installed", {
216
- say: "Install them",
217
- command: "pal cli install",
218
- });
241
+ : failing(
242
+ "dependencies",
243
+ `PAL's dependencies do not resolve: ${missing.join(", ")}`,
244
+ {
245
+ say: "Install them",
246
+ command: "pal cli install",
247
+ }
248
+ );
219
249
  }
220
250
 
221
251
  export function stateFindings(): Finding[] {