@rbbtsn0w/adg 0.6.0-beta.8 → 0.6.0-beta.9
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.
|
@@ -365,6 +365,8 @@ export async function addPlugins(opts) {
|
|
|
365
365
|
const generated = resolveDefaultDsl(workRoot, {
|
|
366
366
|
name: structuralIdentity,
|
|
367
367
|
description: defaultDescription ?? opts.defaultDescription ?? structuralIdentity,
|
|
368
|
+
}, {
|
|
369
|
+
...(parsed.kind === "github" && resolvedRevision ? { resolvedRevision } : {}),
|
|
368
370
|
});
|
|
369
371
|
const authorized = opts.authorizedComponents;
|
|
370
372
|
const unauthorizedRisk = generated.components.some((c) => (c === "hooks" || c === "mcp") && !authorized?.includes(c));
|
|
@@ -40,7 +40,9 @@ export function updateLock(pluginsDir, now = new Date().toISOString(), opts = {}
|
|
|
40
40
|
let definition = entry.definition;
|
|
41
41
|
if (!existsSync(join(source, ADG_MANIFEST_PATH))) {
|
|
42
42
|
try {
|
|
43
|
-
const generated = resolveDefaultDsl(source, { name, description: entry.definition?.description ?? name }
|
|
43
|
+
const generated = resolveDefaultDsl(source, { name, description: entry.definition?.description ?? name }, {
|
|
44
|
+
...(entry.origin.type === "github" && entry.resolvedRevision ? { resolvedRevision: entry.resolvedRevision } : {}),
|
|
45
|
+
});
|
|
44
46
|
const authorized = entry.definition?.authorizedComponents;
|
|
45
47
|
const unauthorizedRisk = generated.components.some((component) => (component === "hooks" || component === "mcp") && !authorized?.includes(component));
|
|
46
48
|
if (entry.definition && unauthorizedRisk) {
|
package/dist/src/default-dsl.js
CHANGED
|
@@ -45,7 +45,9 @@ export function resolveDefaultDsl(root, metadata, options = {}) {
|
|
|
45
45
|
manifest: {
|
|
46
46
|
schemaVersion: ADG_SCHEMA_VERSION,
|
|
47
47
|
name: defaultPluginName(metadata.name),
|
|
48
|
-
version:
|
|
48
|
+
version: options.resolvedRevision
|
|
49
|
+
? `0.0.0-git.${options.resolvedRevision}`
|
|
50
|
+
: `0.0.0-adg.${fingerprint}`,
|
|
49
51
|
description: metadata.description,
|
|
50
52
|
...componentManifest,
|
|
51
53
|
},
|
|
@@ -34,6 +34,12 @@ export function renderAgentReport(agents, verb) {
|
|
|
34
34
|
return out;
|
|
35
35
|
}
|
|
36
36
|
const PATH_MAX = 44;
|
|
37
|
+
function pluginLabel(plugin) {
|
|
38
|
+
if (plugin.definition?.kind === "default-dsl/v1" && plugin.resolvedRevision) {
|
|
39
|
+
return `${plugin.name}@0.0.0-git-${plugin.resolvedRevision.slice(0, 6)}`;
|
|
40
|
+
}
|
|
41
|
+
return `${plugin.name}@${plugin.version}`;
|
|
42
|
+
}
|
|
37
43
|
/** `adg plugins list` — aligned name/path/agents rows, with optional verbose contents. */
|
|
38
44
|
export function renderPluginList(plugins, pluginsDir, opts = {}) {
|
|
39
45
|
if (plugins.length === 0)
|
|
@@ -47,7 +53,7 @@ export function renderPluginList(plugins, pluginsDir, opts = {}) {
|
|
|
47
53
|
const agents = agentsForComponents(types).map((a) => a.displayName);
|
|
48
54
|
return {
|
|
49
55
|
p,
|
|
50
|
-
label:
|
|
56
|
+
label: pluginLabel(p),
|
|
51
57
|
path: abbrevHome(installedPluginDir(pluginsDir, p.name, p.origin)),
|
|
52
58
|
agents: agents.length > 0 ? agents.join(", ") : "—",
|
|
53
59
|
counts: exposed.map(([type, names]) => `${type}: ${names.length}`),
|