@lesliechan721/aw 0.1.0-beta.35 → 0.1.0-beta.36
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/src/commands/operation-plan.d.ts +19 -0
- package/dist/src/commands/operation-plan.js.map +1 -1
- package/dist/src/commands/rebuild-command.d.ts +1 -0
- package/dist/src/commands/rebuild-command.js +890 -8
- package/dist/src/commands/rebuild-command.js.map +1 -1
- package/dist/src/commands/rebuild-integration.d.ts +12 -0
- package/dist/src/commands/rebuild-integration.js +88 -2
- package/dist/src/commands/rebuild-integration.js.map +1 -1
- package/dist/src/commands/status-v6.js +109 -19
- package/dist/src/commands/status-v6.js.map +1 -1
- package/dist/src/commands/wizard.d.ts +5 -1
- package/dist/src/commands/wizard.js +4 -2
- package/dist/src/commands/wizard.js.map +1 -1
- package/dist/src/commands/write-commands.js +3 -0
- package/dist/src/commands/write-commands.js.map +1 -1
- package/dist/src/index.js +57 -4
- package/dist/src/index.js.map +1 -1
- package/dist/src/tui/components.d.ts +20 -1
- package/dist/src/tui/components.js +41 -20
- package/dist/src/tui/components.js.map +1 -1
- package/dist/src/tui/console-app-v4.js +1323 -1165
- package/dist/src/tui/console-app-v4.js.map +1 -1
- package/dist/src/tui/content-item-card.d.ts +13 -0
- package/dist/src/tui/content-item-card.js +51 -0
- package/dist/src/tui/content-item-card.js.map +1 -0
- package/dist/src/tui/controller-runtime.js +18 -2
- package/dist/src/tui/controller-runtime.js.map +1 -1
- package/dist/src/tui/controller.d.ts +3 -0
- package/dist/src/tui/controller.js +57 -8
- package/dist/src/tui/controller.js.map +1 -1
- package/dist/src/tui/dependency-graph-view.d.ts +39 -0
- package/dist/src/tui/dependency-graph-view.js +121 -0
- package/dist/src/tui/dependency-graph-view.js.map +1 -0
- package/dist/src/tui/dependency-graph.js +16 -19
- package/dist/src/tui/dependency-graph.js.map +1 -1
- package/dist/src/tui/entity-cards.d.ts +55 -0
- package/dist/src/tui/entity-cards.js +220 -0
- package/dist/src/tui/entity-cards.js.map +1 -0
- package/dist/src/tui/input-display.js +10 -1
- package/dist/src/tui/input-display.js.map +1 -1
- package/dist/src/tui/model.d.ts +2 -0
- package/dist/src/tui/model.js +10 -2
- package/dist/src/tui/model.js.map +1 -1
- package/dist/src/tui/operation-diagnostic-screens.d.ts +2 -18
- package/dist/src/tui/operation-diagnostic-screens.js +16 -69
- package/dist/src/tui/operation-diagnostic-screens.js.map +1 -1
- package/dist/src/tui/operation-review-planner.js +44 -3
- package/dist/src/tui/operation-review-planner.js.map +1 -1
- package/dist/src/tui/plugin-content.d.ts +8 -0
- package/dist/src/tui/plugin-content.js +409 -65
- package/dist/src/tui/plugin-content.js.map +1 -1
- package/dist/src/tui/plugin-detail.d.ts +52 -0
- package/dist/src/tui/plugin-detail.js +165 -0
- package/dist/src/tui/plugin-detail.js.map +1 -0
- package/dist/src/tui/query-header.d.ts +30 -0
- package/dist/src/tui/query-header.js +40 -0
- package/dist/src/tui/query-header.js.map +1 -0
- package/dist/src/tui/reader.d.ts +37 -0
- package/dist/src/tui/reader.js +47 -0
- package/dist/src/tui/reader.js.map +1 -0
- package/dist/src/tui/router.d.ts +10 -0
- package/dist/src/tui/router.js.map +1 -1
- package/dist/src/tui/screen-registry.d.ts +2 -0
- package/dist/src/tui/source-detail-card.d.ts +29 -0
- package/dist/src/tui/source-detail-card.js +45 -0
- package/dist/src/tui/source-detail-card.js.map +1 -0
- package/dist/src/tui/wizard.js +26 -4
- package/dist/src/tui/wizard.js.map +1 -1
- package/dist/src/utils/local-marketplace.d.ts +1 -0
- package/dist/src/utils/local-marketplace.js +22 -0
- package/dist/src/utils/local-marketplace.js.map +1 -1
- package/package.json +4 -4
|
@@ -26,6 +26,7 @@ export interface RebuildIntegration {
|
|
|
26
26
|
readOnlyInspectionPlan?: boolean;
|
|
27
27
|
readOnlyShallowInspectionPlan?: boolean;
|
|
28
28
|
includeNativeCleanupCandidate?: boolean;
|
|
29
|
+
removedPluginWhole?: boolean;
|
|
29
30
|
codexActivationCleanup?: Array<{
|
|
30
31
|
codexPluginId: string;
|
|
31
32
|
scope: Scope;
|
|
@@ -97,6 +98,17 @@ export declare function inspectCodexPluginRegistrationLive(options: {
|
|
|
97
98
|
scope?: 'user' | 'project' | 'both';
|
|
98
99
|
observationSession?: CodexNativeObservationSession;
|
|
99
100
|
}): Promise<CodexPluginRegistrationLiveInspection>;
|
|
101
|
+
export declare function removeCodexPluginActivation(options: {
|
|
102
|
+
configPath: string;
|
|
103
|
+
codexPluginId: string;
|
|
104
|
+
}): Promise<void>;
|
|
105
|
+
export declare function removeNamespacedMarketplacePluginProjection(options: {
|
|
106
|
+
rootDir: string;
|
|
107
|
+
sourceId: string;
|
|
108
|
+
sourceIdentity: string;
|
|
109
|
+
pluginName: string;
|
|
110
|
+
env: NodeJS.ProcessEnv;
|
|
111
|
+
}): Promise<void>;
|
|
100
112
|
/**
|
|
101
113
|
* Read-only shared-native inspection. Official Codex list evidence owns installation
|
|
102
114
|
* state. Filesystem validation is limited to the AW-owned marketplace source.
|
|
@@ -23,7 +23,7 @@ import { validateRuntimeSkillClosure } from '../utils/runtime-skill-closure.js';
|
|
|
23
23
|
import { findSensitiveTokenPath } from '../utils/sensitive-content.js';
|
|
24
24
|
import { atomicRemoveConfigFile, atomicReplaceConfigFile, withConfigFileMutation, } from '../utils/plugin-config.js';
|
|
25
25
|
import { readCatalogSourcesConfigSnapshot } from '../utils/catalog-sources.js';
|
|
26
|
-
import { getNamespacedMarketplaceName, MarketplaceRootValidationError, projectMarketplaceManifestForPlatform, readStrictNamespacedMarketplaceRoot, replayNamespacedCodexNativeRenderProjections, replayNamespacedCodexSkillOverlays, } from '../utils/local-marketplace.js';
|
|
26
|
+
import { assertSafeNamespacedMarketplacePluginRoot, getNamespacedMarketplaceName, MarketplaceRootValidationError, projectMarketplaceManifestForPlatform, readStrictNamespacedMarketplaceRoot, replayNamespacedCodexNativeRenderProjections, replayNamespacedCodexSkillOverlays, } from '../utils/local-marketplace.js';
|
|
27
27
|
import { commitMarketplaceGenerationBackup } from '../utils/orphan-marketplace-cleanup.js';
|
|
28
28
|
import { readClaudeSettings, writeClaudeSettings } from '../adapters/helpers.js';
|
|
29
29
|
import { analyzeCodexSurface } from '../utils/codex-surface-analysis.js';
|
|
@@ -2070,6 +2070,91 @@ export async function inspectCodexPluginRegistrationLive(options) {
|
|
|
2070
2070
|
await ownedSession?.dispose();
|
|
2071
2071
|
}
|
|
2072
2072
|
}
|
|
2073
|
+
export async function removeCodexPluginActivation(options) {
|
|
2074
|
+
await applyConditionalCodexConfigTransactionFile(options.configPath, (snapshot) => Object.hasOwn(snapshot.plugins, options.codexPluginId)
|
|
2075
|
+
? { removePluginActivations: [options.codexPluginId] }
|
|
2076
|
+
: null);
|
|
2077
|
+
}
|
|
2078
|
+
export async function removeNamespacedMarketplacePluginProjection(options) {
|
|
2079
|
+
if (!await isSafeCodexMarketplaceRoot({
|
|
2080
|
+
awHome: resolveAwHome(options.env),
|
|
2081
|
+
sourceId: options.sourceId,
|
|
2082
|
+
marketplaceRoot: options.rootDir,
|
|
2083
|
+
})) {
|
|
2084
|
+
throw new Error('marketplaceProjectionUnsafe: marketplace root is outside the canonical AW source path.');
|
|
2085
|
+
}
|
|
2086
|
+
const root = await readStrictNamespacedMarketplaceRoot({
|
|
2087
|
+
rootDir: options.rootDir,
|
|
2088
|
+
sourceId: options.sourceId,
|
|
2089
|
+
sourceIdentity: options.sourceIdentity,
|
|
2090
|
+
});
|
|
2091
|
+
if (!root)
|
|
2092
|
+
return;
|
|
2093
|
+
const pluginRoot = await assertSafeNamespacedMarketplacePluginRoot(options.rootDir, options.pluginName);
|
|
2094
|
+
const pluginStats = await fs.lstat(pluginRoot).catch((error) => {
|
|
2095
|
+
if (error.code === 'ENOENT')
|
|
2096
|
+
return null;
|
|
2097
|
+
throw error;
|
|
2098
|
+
});
|
|
2099
|
+
if (pluginStats && (!pluginStats.isDirectory() || pluginStats.isSymbolicLink())) {
|
|
2100
|
+
throw new Error('marketplaceProjectionUnsafe: plugin projection is not a regular directory.');
|
|
2101
|
+
}
|
|
2102
|
+
const manifests = [
|
|
2103
|
+
{ value: root.agentsManifest, path: path.join(options.rootDir, '.agents', 'plugins', 'marketplace.json') },
|
|
2104
|
+
...(root.claudeManifest
|
|
2105
|
+
? [{ value: root.claudeManifest, path: path.join(options.rootDir, '.claude-plugin', 'marketplace.json') }]
|
|
2106
|
+
: []),
|
|
2107
|
+
];
|
|
2108
|
+
const hasEntry = manifests.some(({ value }) => Array.isArray(value.plugins)
|
|
2109
|
+
&& value.plugins.some((entry) => entry !== null && typeof entry === 'object'
|
|
2110
|
+
&& entry.name === options.pluginName));
|
|
2111
|
+
let hasIdentityManifest = false;
|
|
2112
|
+
if (pluginStats) {
|
|
2113
|
+
for (const manifestName of ['.agents-plugin/plugin.json', '.codex-plugin/plugin.json']) {
|
|
2114
|
+
const manifestPath = path.join(pluginRoot, manifestName);
|
|
2115
|
+
const manifest = await fs.readJson(manifestPath).catch((error) => {
|
|
2116
|
+
if (error.code === 'ENOENT')
|
|
2117
|
+
return null;
|
|
2118
|
+
throw error;
|
|
2119
|
+
});
|
|
2120
|
+
if (manifest && manifest.name !== options.pluginName) {
|
|
2121
|
+
throw new Error('marketplaceProjectionIdentityMismatch: plugin projection has a foreign name.');
|
|
2122
|
+
}
|
|
2123
|
+
hasIdentityManifest ||= manifest?.name === options.pluginName;
|
|
2124
|
+
}
|
|
2125
|
+
if (!hasEntry && !hasIdentityManifest) {
|
|
2126
|
+
throw new Error('marketplaceProjectionIdentityUnavailable: plugin directory has no matching marketplace entry or plugin manifest.');
|
|
2127
|
+
}
|
|
2128
|
+
}
|
|
2129
|
+
if (pluginStats) {
|
|
2130
|
+
const inspectTree = async (directory) => {
|
|
2131
|
+
for (const entry of await fs.readdir(directory, { withFileTypes: true })) {
|
|
2132
|
+
if (entry.isSymbolicLink() || (!entry.isDirectory() && !entry.isFile())) {
|
|
2133
|
+
throw new Error('marketplaceProjectionUnsafe: plugin projection contains an unsafe node.');
|
|
2134
|
+
}
|
|
2135
|
+
if (entry.isDirectory())
|
|
2136
|
+
await inspectTree(path.join(directory, entry.name));
|
|
2137
|
+
}
|
|
2138
|
+
};
|
|
2139
|
+
await inspectTree(pluginRoot);
|
|
2140
|
+
await fs.remove(pluginRoot);
|
|
2141
|
+
}
|
|
2142
|
+
for (const manifest of manifests) {
|
|
2143
|
+
if (!Array.isArray(manifest.value.plugins)) {
|
|
2144
|
+
throw new Error('marketplaceProjectionInvalid: marketplace plugins are not an array.');
|
|
2145
|
+
}
|
|
2146
|
+
const plugins = manifest.value.plugins.filter((entry) => entry === null
|
|
2147
|
+
|| typeof entry !== 'object'
|
|
2148
|
+
|| entry.name !== options.pluginName);
|
|
2149
|
+
if (plugins.length !== manifest.value.plugins.length) {
|
|
2150
|
+
await atomicReplaceConfigFile({
|
|
2151
|
+
filePath: manifest.path,
|
|
2152
|
+
allowedRoot: options.rootDir,
|
|
2153
|
+
content: `${JSON.stringify({ ...manifest.value, plugins }, null, 2)}\n`,
|
|
2154
|
+
});
|
|
2155
|
+
}
|
|
2156
|
+
}
|
|
2157
|
+
}
|
|
2073
2158
|
/**
|
|
2074
2159
|
* Read-only shared-native inspection. Official Codex list evidence owns installation
|
|
2075
2160
|
* state. Filesystem validation is limited to the AW-owned marketplace source.
|
|
@@ -4286,7 +4371,8 @@ export function createRebuildIntegration(options) {
|
|
|
4286
4371
|
const nativeCleanupCandidate = input.platform === 'claude'
|
|
4287
4372
|
? input.includeNativeCleanupCandidate !== false
|
|
4288
4373
|
: input.platform === 'codex'
|
|
4289
|
-
&& nativeRequired
|
|
4374
|
+
&& (nativeRequired || (input.removedPluginWhole === true
|
|
4375
|
+
&& input.includeNativeCleanupCandidate === true))
|
|
4290
4376
|
&& (input.command === 'cleanup' || input.command === 'uninstall');
|
|
4291
4377
|
const nativePlugin = (nativeDesired || nativeCleanupCandidate)
|
|
4292
4378
|
? [{
|