@rbbtsn0w/adg 0.4.0-beta.9 → 0.4.0

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.
@@ -386,7 +386,8 @@ function parseOutput(hookEvent, stdout) {
386
386
  const text = stdout.trim();
387
387
  if (!text) return {};
388
388
  try {
389
- return JSON.parse(text);
389
+ const parsed = JSON.parse(text);
390
+ return (typeof parsed === "object" && parsed !== null) ? parsed : {};
390
391
  } catch (error) {
391
392
  if (hookEvent === "SessionStart") return { additionalContext: text };
392
393
  fail("hook command returned invalid JSON", error);
@@ -185,12 +185,14 @@ function removeProjection(scanDir, name, realDir) {
185
185
  st = undefined;
186
186
  }
187
187
  if (realDir) {
188
- // The real store dir is known: drop the in-place manifest + convention aliases.
189
- rmSync(join(realDir, ANTIGRAVITY_MANIFEST), { force: true });
190
- writeAntigravityMcpConfig(realDir, readManifest(realDir), { components: [] });
191
- writeAntigravityHooks(realDir, readManifest(realDir), { components: [] });
192
- for (const field of CONVENTION_FIELDS)
193
- rmIfSymlink(join(realDir, field));
188
+ if (existsSync(realDir)) {
189
+ // The real store dir is known: drop the in-place manifest + convention aliases.
190
+ rmSync(join(realDir, ANTIGRAVITY_MANIFEST), { force: true });
191
+ writeAntigravityMcpConfig(realDir, readManifest(realDir), { components: [] });
192
+ writeAntigravityHooks(realDir, readManifest(realDir), { components: [] });
193
+ for (const field of CONVENTION_FIELDS)
194
+ rmIfSymlink(join(realDir, field));
195
+ }
194
196
  if (resolve(target) === resolve(realDir))
195
197
  return; // in-place: target IS the store folder — never delete it
196
198
  // Aliased exposure we created (symlink, or a copy-fallback dir): safe to drop wholesale.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbbtsn0w/adg",
3
- "version": "0.4.0-beta.9",
3
+ "version": "0.4.0",
4
4
  "description": "Agent Directory Group (ADG) toolkit — two domains: plugins and skills.",
5
5
  "type": "module",
6
6
  "license": "MIT",