@lesliechan721/aw 0.1.0-beta.4 → 0.1.0-beta.6
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/dist/authoring/scripts/lib/plugin-version-check.d.mts +14 -0
- package/dist/authoring/scripts/lib/plugin-version-check.mjs +10 -224
- package/dist/authoring/scripts/lib/plugin-version-check.mjs.map +1 -1
- package/dist/authoring/scripts/remove-plugin.d.mts +2 -0
- package/dist/authoring/scripts/remove-plugin.mjs +366 -0
- package/dist/authoring/scripts/remove-plugin.mjs.map +1 -0
- package/dist/authoring/scripts/validate-plugin.mjs +9 -46
- package/dist/authoring/scripts/validate-plugin.mjs.map +1 -1
- package/dist/scripts/bundle-plugins.d.ts +0 -2
- package/dist/scripts/bundle-plugins.js +4 -2
- package/dist/scripts/bundle-plugins.js.map +1 -1
- package/dist/scripts/plugin-staging.d.ts +1 -16
- package/dist/scripts/plugin-staging.js +8 -115
- package/dist/scripts/plugin-staging.js.map +1 -1
- package/dist/src/authoring/workspace-commands.d.ts +9 -1
- package/dist/src/authoring/workspace-commands.js +24 -16
- package/dist/src/authoring/workspace-commands.js.map +1 -1
- package/dist/src/commands/catalog-publication-inspection.d.ts +106 -0
- package/dist/src/commands/catalog-publication-inspection.js +444 -0
- package/dist/src/commands/catalog-publication-inspection.js.map +1 -0
- package/dist/src/commands/catalog-publish.d.ts +18 -2
- package/dist/src/commands/catalog-publish.js +261 -316
- package/dist/src/commands/catalog-publish.js.map +1 -1
- package/dist/src/commands/catalog-status.d.ts +60 -0
- package/dist/src/commands/catalog-status.js +251 -0
- package/dist/src/commands/catalog-status.js.map +1 -0
- package/dist/src/commands/plugin-capabilities.d.ts +22 -0
- package/dist/src/commands/plugin-capabilities.js +143 -0
- package/dist/src/commands/plugin-capabilities.js.map +1 -0
- package/dist/src/commands/rebuild-command.d.ts +2 -0
- package/dist/src/commands/rebuild-command.js +37 -6
- package/dist/src/commands/rebuild-command.js.map +1 -1
- package/dist/src/commands/rebuild-integration.d.ts +1 -0
- package/dist/src/commands/rebuild-integration.js +55 -57
- package/dist/src/commands/rebuild-integration.js.map +1 -1
- package/dist/src/commands/status-v4.d.ts +21 -0
- package/dist/src/commands/status-v4.js +63 -2
- package/dist/src/commands/status-v4.js.map +1 -1
- package/dist/src/index.js +79 -18
- package/dist/src/index.js.map +1 -1
- package/dist/src/tui/components.d.ts +70 -0
- package/dist/src/tui/components.js +149 -6
- package/dist/src/tui/components.js.map +1 -1
- package/dist/src/tui/console-app-v4.js +1660 -628
- package/dist/src/tui/console-app-v4.js.map +1 -1
- package/dist/src/tui/controller-runtime.d.ts +5 -1
- package/dist/src/tui/controller-runtime.js +184 -33
- package/dist/src/tui/controller-runtime.js.map +1 -1
- package/dist/src/tui/controller.d.ts +35 -2
- package/dist/src/tui/controller.js +300 -39
- package/dist/src/tui/controller.js.map +1 -1
- package/dist/src/tui/diagnostics.d.ts +31 -0
- package/dist/src/tui/diagnostics.js +71 -0
- package/dist/src/tui/diagnostics.js.map +1 -0
- package/dist/src/tui/index.d.ts +5 -3
- package/dist/src/tui/index.js +3 -1
- package/dist/src/tui/index.js.map +1 -1
- package/dist/src/tui/model.d.ts +33 -4
- package/dist/src/tui/model.js +252 -17
- package/dist/src/tui/model.js.map +1 -1
- package/dist/src/tui/router.d.ts +15 -9
- package/dist/src/tui/router.js +35 -0
- package/dist/src/tui/router.js.map +1 -1
- package/dist/src/tui/theme.d.ts +18 -10
- package/dist/src/tui/theme.js +18 -10
- package/dist/src/tui/theme.js.map +1 -1
- package/dist/src/tui/viewport.d.ts +20 -0
- package/dist/src/tui/viewport.js +29 -0
- package/dist/src/tui/viewport.js.map +1 -0
- package/dist/src/utils/catalog-runtime-projection.d.ts +1 -7
- package/dist/src/utils/catalog-runtime-projection.js +2 -62
- package/dist/src/utils/catalog-runtime-projection.js.map +1 -1
- package/dist/src/utils/catalog-source-cache.d.ts +12 -11
- package/dist/src/utils/catalog-source-cache.js +20 -0
- package/dist/src/utils/catalog-source-cache.js.map +1 -1
- package/dist/src/utils/dynamic-skill-tree.js +1 -1
- package/dist/src/utils/dynamic-skill-tree.js.map +1 -1
- package/dist/src/utils/git-catalog-provider.js +1 -1
- package/dist/src/utils/git-catalog-provider.js.map +1 -1
- package/dist/src/utils/manifest.d.ts +0 -1
- package/dist/src/utils/manifest.js +0 -1
- package/dist/src/utils/manifest.js.map +1 -1
- package/dist/src/utils/plugin-config.js +28 -30
- package/dist/src/utils/plugin-config.js.map +1 -1
- package/dist/src/utils/skill-validation.d.ts +1 -1
- package/dist/src/utils/skill-validation.js +1 -1
- package/dist/src/utils/skill-validation.js.map +1 -1
- package/dist/src/utils/state-paths.d.ts +1 -0
- package/dist/src/utils/state-paths.js +5 -0
- package/dist/src/utils/state-paths.js.map +1 -1
- package/package.json +3 -4
- package/dist/src/utils/plugin-authoring-capabilities.d.ts +0 -23
- package/dist/src/utils/plugin-authoring-capabilities.js +0 -37
- package/dist/src/utils/plugin-authoring-capabilities.js.map +0 -1
- package/dist/src/utils/plugin-authoring-capabilities.json +0 -92
- package/dist/src/utils/skill-frontmatter-capabilities.d.ts +0 -201
- package/dist/src/utils/skill-frontmatter-capabilities.js +0 -5
- package/dist/src/utils/skill-frontmatter-capabilities.js.map +0 -1
- package/dist/src/utils/skill-frontmatter-capabilities.json +0 -200
|
@@ -1536,11 +1536,13 @@ async function inspectCodexNativeResidue(options) {
|
|
|
1536
1536
|
const labels = [];
|
|
1537
1537
|
const foreignLabels = [];
|
|
1538
1538
|
const versions = new Set();
|
|
1539
|
+
const installedVersions = new Set();
|
|
1540
|
+
const cacheVersions = new Set();
|
|
1539
1541
|
const configEntry = config.snapshot.plugins[pluginId];
|
|
1540
1542
|
if (configEntry) {
|
|
1541
1543
|
(canonicalMarketplace ? labels : foreignLabels).push(`${configPath}#plugins.${pluginId}`);
|
|
1542
1544
|
}
|
|
1543
|
-
const inspectManifest = async (manifestPath, directoryVersion) => {
|
|
1545
|
+
const inspectManifest = async (manifestPath, kind, directoryVersion) => {
|
|
1544
1546
|
const stats = await lstatCodexResidueIfPresent(manifestPath);
|
|
1545
1547
|
if (!stats)
|
|
1546
1548
|
return;
|
|
@@ -1560,6 +1562,7 @@ async function inspectCodexNativeResidue(options) {
|
|
|
1560
1562
|
}
|
|
1561
1563
|
labels.push(manifestPath);
|
|
1562
1564
|
versions.add(version);
|
|
1565
|
+
(kind === 'installed' ? installedVersions : cacheVersions).add(version);
|
|
1563
1566
|
};
|
|
1564
1567
|
for (const entry of await readdirCodexResidueIfPresent(cacheRoot)) {
|
|
1565
1568
|
if (!entry.isDirectory() || entry.isSymbolicLink()) {
|
|
@@ -1579,23 +1582,31 @@ async function inspectCodexNativeResidue(options) {
|
|
|
1579
1582
|
if (existing.length === 0)
|
|
1580
1583
|
foreignLabels.push(versionRoot);
|
|
1581
1584
|
for (const candidate of existing)
|
|
1582
|
-
await inspectManifest(candidate, entry.name);
|
|
1585
|
+
await inspectManifest(candidate, 'cache', entry.name);
|
|
1583
1586
|
}
|
|
1584
1587
|
const installedStats = await lstatCodexResidueIfPresent(installedRoot);
|
|
1585
1588
|
if (installedStats && (!installedStats.isDirectory() || installedStats.isSymbolicLink())) {
|
|
1586
1589
|
foreignLabels.push(installedRoot);
|
|
1587
1590
|
}
|
|
1588
1591
|
else if (installedStats) {
|
|
1589
|
-
await inspectManifest(installedManifest);
|
|
1592
|
+
await inspectManifest(installedManifest, 'installed');
|
|
1590
1593
|
}
|
|
1591
1594
|
return foreignLabels.length > 0
|
|
1592
1595
|
? {
|
|
1593
1596
|
state: 'foreign', labels: [...labels, ...foreignLabels], versions: [...versions],
|
|
1597
|
+
installedVersions: [...installedVersions], cacheVersions: [...cacheVersions],
|
|
1594
1598
|
enabled: configEntry?.enabled === true,
|
|
1595
1599
|
}
|
|
1596
1600
|
: labels.length > 0
|
|
1597
|
-
? {
|
|
1598
|
-
|
|
1601
|
+
? {
|
|
1602
|
+
state: 'present', labels, versions: [...versions],
|
|
1603
|
+
installedVersions: [...installedVersions], cacheVersions: [...cacheVersions],
|
|
1604
|
+
enabled: configEntry?.enabled === true,
|
|
1605
|
+
}
|
|
1606
|
+
: {
|
|
1607
|
+
state: 'absent', labels: [], versions: [],
|
|
1608
|
+
installedVersions: [], cacheVersions: [], enabled: false,
|
|
1609
|
+
};
|
|
1599
1610
|
}
|
|
1600
1611
|
export async function discoverCodexNativeResidueNames(options) {
|
|
1601
1612
|
const marketplaceName = options.marketplaceName ?? MARKETPLACE_NAME;
|
|
@@ -2259,41 +2270,6 @@ function createClaudeMarketplaceComponent(options) {
|
|
|
2259
2270
|
},
|
|
2260
2271
|
};
|
|
2261
2272
|
}
|
|
2262
|
-
function createNativeVersionComponent(options) {
|
|
2263
|
-
return {
|
|
2264
|
-
kind: 'shared-config',
|
|
2265
|
-
identity: ownerIdentity(options.pluginName, internalArtifactKey('native-version', options.pluginVersion), options.platform, options.scope),
|
|
2266
|
-
label: `${options.pluginName}@${options.marketplaceName ?? MARKETPLACE_NAME}#version=${options.pluginVersion}`,
|
|
2267
|
-
inspect: async () => {
|
|
2268
|
-
let versions;
|
|
2269
|
-
if (options.platform === 'codex') {
|
|
2270
|
-
const residue = await inspectCodexNativeResidue({
|
|
2271
|
-
pluginName: options.pluginName,
|
|
2272
|
-
cwd: options.cwd,
|
|
2273
|
-
env: options.env,
|
|
2274
|
-
marketplaceName: options.marketplaceName,
|
|
2275
|
-
marketplaceRoot: options.marketplaceRoot,
|
|
2276
|
-
});
|
|
2277
|
-
versions = residue.enabled && residue.state === 'present' ? residue.versions : [];
|
|
2278
|
-
}
|
|
2279
|
-
else {
|
|
2280
|
-
const state = await readClaudeNativeState({
|
|
2281
|
-
pluginName: options.pluginName,
|
|
2282
|
-
scope: options.scope,
|
|
2283
|
-
cwd: options.cwd,
|
|
2284
|
-
env: options.env,
|
|
2285
|
-
marketplaceName: options.marketplaceName,
|
|
2286
|
-
marketplaceRoot: options.marketplaceRoot,
|
|
2287
|
-
});
|
|
2288
|
-
versions = state.pluginEnabled && state.pluginState === 'present'
|
|
2289
|
-
? state.pluginVersions
|
|
2290
|
-
: [];
|
|
2291
|
-
}
|
|
2292
|
-
return versions.includes(options.pluginVersion) ? 'present' : 'absent';
|
|
2293
|
-
},
|
|
2294
|
-
remove: async () => undefined,
|
|
2295
|
-
};
|
|
2296
|
-
}
|
|
2297
2273
|
async function mirrorCatalog(catalog, env, target) {
|
|
2298
2274
|
if (!target?.sourceId || !target.marketplaceRoot) {
|
|
2299
2275
|
const rootDir = resolveAwHome(env);
|
|
@@ -2996,24 +2972,10 @@ export function createRebuildIntegration(options) {
|
|
|
2996
2972
|
desired: marketplaceDesired,
|
|
2997
2973
|
})]
|
|
2998
2974
|
: [];
|
|
2999
|
-
const nativeVersion = nativeRequired
|
|
3000
|
-
&& input.command !== 'cleanup'
|
|
3001
|
-
&& input.command !== 'uninstall'
|
|
3002
|
-
? [createNativeVersionComponent({
|
|
3003
|
-
pluginName: input.plugin.manifest.name,
|
|
3004
|
-
pluginVersion: input.plugin.manifest.version,
|
|
3005
|
-
platform: input.platform,
|
|
3006
|
-
scope: input.scope,
|
|
3007
|
-
cwd: input.cwd,
|
|
3008
|
-
env: options.context.env,
|
|
3009
|
-
marketplaceName: input.marketplaceName,
|
|
3010
|
-
marketplaceRoot: input.marketplaceRoot,
|
|
3011
|
-
})]
|
|
3012
|
-
: [];
|
|
3013
2975
|
if (nativeRequired
|
|
3014
2976
|
&& input.command !== 'cleanup'
|
|
3015
2977
|
&& input.command !== 'uninstall')
|
|
3016
|
-
desiredComponents.push(...nativePlugin, ...marketplace
|
|
2978
|
+
desiredComponents.push(...nativePlugin, ...marketplace);
|
|
3017
2979
|
const allComponents = dedupeComponents([
|
|
3018
2980
|
...desiredComponents,
|
|
3019
2981
|
...optionalComponents,
|
|
@@ -3024,7 +2986,6 @@ export function createRebuildIntegration(options) {
|
|
|
3024
2986
|
...(input.platform === 'claude' ? sharedComponents : []),
|
|
3025
2987
|
...nativePlugin,
|
|
3026
2988
|
...marketplace,
|
|
3027
|
-
...nativeVersion,
|
|
3028
2989
|
]);
|
|
3029
2990
|
bindNamespacedOwnerIdentity(allComponents, input);
|
|
3030
2991
|
const desiredKeys = new Set(desiredComponents.map(componentIdentityKey));
|
|
@@ -3087,7 +3048,44 @@ export async function inspectRebuildTarget(options) {
|
|
|
3087
3048
|
nativeProbe: integration.driver.probeNativeHealth ?? integration.driver.probeNative,
|
|
3088
3049
|
verifyHealth: true,
|
|
3089
3050
|
});
|
|
3090
|
-
|
|
3051
|
+
if (!target.requiresNative)
|
|
3052
|
+
return { target, inspection };
|
|
3053
|
+
if (target.identity.platform === 'codex') {
|
|
3054
|
+
const residue = await inspectCodexNativeResidue({
|
|
3055
|
+
pluginName: target.identity.pluginName,
|
|
3056
|
+
cwd: target.identity.cwd,
|
|
3057
|
+
env: options.context.env,
|
|
3058
|
+
marketplaceName: target.identity.marketplaceName,
|
|
3059
|
+
marketplaceRoot: target.identity.marketplaceRoot,
|
|
3060
|
+
});
|
|
3061
|
+
if (residue.state !== 'present' || !residue.enabled)
|
|
3062
|
+
return { target, inspection };
|
|
3063
|
+
const installed = [...new Set(residue.installedVersions)];
|
|
3064
|
+
if (installed.length > 0) {
|
|
3065
|
+
return installed.length === 1
|
|
3066
|
+
? { target, inspection, installedVersion: installed[0] }
|
|
3067
|
+
: { target, inspection };
|
|
3068
|
+
}
|
|
3069
|
+
const cached = [...new Set(residue.cacheVersions)];
|
|
3070
|
+
return cached.length === 1
|
|
3071
|
+
? { target, inspection, installedVersion: cached[0] }
|
|
3072
|
+
: { target, inspection };
|
|
3073
|
+
}
|
|
3074
|
+
const native = await readClaudeNativeState({
|
|
3075
|
+
pluginName: target.identity.pluginName,
|
|
3076
|
+
scope: target.identity.scope,
|
|
3077
|
+
cwd: target.identity.cwd,
|
|
3078
|
+
env: options.context.env,
|
|
3079
|
+
marketplaceName: target.identity.marketplaceName,
|
|
3080
|
+
marketplaceRoot: target.identity.marketplaceRoot,
|
|
3081
|
+
});
|
|
3082
|
+
const versions = [...new Set(native.pluginVersions)];
|
|
3083
|
+
return native.marketplaceState === 'canonical'
|
|
3084
|
+
&& native.pluginState === 'present'
|
|
3085
|
+
&& native.pluginEnabled
|
|
3086
|
+
&& versions.length === 1
|
|
3087
|
+
? { target, inspection, installedVersion: versions[0] }
|
|
3088
|
+
: { target, inspection };
|
|
3091
3089
|
}
|
|
3092
3090
|
async function discoverOwnerNamesInTextRoot(root, platform, scope) {
|
|
3093
3091
|
if (!await fs.pathExists(root))
|