Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integration/extension_push_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Deno.test("extension push with invalid manifest (no models or workflows) gives c
assertEquals(code === 0, false);
assertStringIncludes(
stderr,
"at least one model, workflow, vault, driver, or datastore",
"at least one model, workflow, vault, driver, datastore, or report",
);
} finally {
await Deno.remove(tmpDir, { recursive: true });
Expand Down
1 change: 1 addition & 0 deletions src/cli/commands/extension_pull.ts
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,7 @@ export async function installExtension(
absoluteVaultsDir,
absoluteDriversDir,
absoluteDatastoresDir,
absoluteReportsDir,
);

// Update upstream_extensions.json
Expand Down
7 changes: 4 additions & 3 deletions src/cli/commands/extension_push.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ export const extensionPushCommand = new Command()
...vaultEntryPoints,
...driverEntryPoints,
...datastoreEntryPoints,
...reportEntryPoints,
];
let hasBare = false;
for (const ep of allEntryPoints) {
Expand Down Expand Up @@ -325,7 +326,7 @@ export const extensionPushCommand = new Command()
reportsDir,
);
ctx.logger
.debug`Extracted content metadata: ${contentMetadata.models.length} models, ${contentMetadata.workflows.length} workflows, ${contentMetadata.vaults.length} vaults, ${contentMetadata.drivers.length} drivers, ${contentMetadata.datastores.length} datastores`;
.debug`Extracted content metadata: ${contentMetadata.models.length} models, ${contentMetadata.workflows.length} workflows, ${contentMetadata.vaults.length} vaults, ${contentMetadata.drivers.length} drivers, ${contentMetadata.datastores.length} datastores, ${contentMetadata.reports.length} reports`;
} catch {
ctx.logger.debug`Content metadata extraction failed, skipping`;
}
Expand All @@ -346,7 +347,7 @@ export const extensionPushCommand = new Command()
);
throw new UserError(
"Extension content uses collectives that don't match the extension package. " +
"All model types, vault types, workflow names, driver types, and datastore types must use the same collective as the extension.",
"All model types, vault types, workflow names, driver types, datastore types, and report names must use the same collective as the extension.",
);
}
}
Expand Down Expand Up @@ -577,7 +578,7 @@ export const extensionPushCommand = new Command()
for (const entryPoint of reportEntryPoints) {
const entryName = relative(reportsDir, entryPoint).replace(/\.ts$/, "");
try {
const js = await bundleExtension(entryPoint, denoPath);
const js = await bundleExtension(entryPoint, denoPath, bundleOptions);
reportBundles.set(entryName, js);
ctx.logger.debug`Bundled report ${entryName} (${js.length} bytes)`;
} catch (error) {
Expand Down
3 changes: 2 additions & 1 deletion src/cli/commands/extension_search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const extensionSearchCommand = new Command()
.option("--label <label:string>", "Filter by label", { collect: true })
.option(
"--content-type <contentType:string>",
"Filter by content type (models, workflows, vaults, datastores, drivers)",
"Filter by content type (models, workflows, vaults, datastores, drivers, reports)",
{ collect: true },
)
.option(
Expand Down Expand Up @@ -113,6 +113,7 @@ export const extensionSearchCommand = new Command()
"vaults",
"datastores",
"drivers",
"reports",
];
for (const ct of options.contentType ?? []) {
if (!validContentTypes.includes(ct)) {
Expand Down
4 changes: 2 additions & 2 deletions src/domain/extensions/extension_collective_validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ export interface CollectiveValidationResult {
}

/**
* Validates that all content items (models, vaults, workflows, drivers, datastores) in an extension
* Validates that all content items (models, vaults, workflows, drivers, datastores, reports) in an extension
* use the same collective as the extension package itself.
*
* For example, if the extension is `@stack72/my-extension`, all model types,
* vault types, workflow names, driver types, and datastore types must start with `@stack72/`.
* vault types, workflow names, driver types, datastore types, and report names must start with `@stack72/`.
*/
export function validateContentCollectives(
extensionName: string,
Expand Down
2 changes: 1 addition & 1 deletion src/domain/extensions/extension_manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const ExtensionManifestSchemaV1 = z.object({
(data.reports && data.reports.length > 0),
{
message:
"Extension must include at least one model, workflow, vault, driver, or datastore",
"Extension must include at least one model, workflow, vault, driver, datastore, or report",
},
);

Expand Down
2 changes: 1 addition & 1 deletion src/domain/extensions/extension_manifest_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ version: "2026.02.26.1"
const error = assertThrows(() => parseExtensionManifest(yaml));
assertStringIncludes(
(error as Error).message,
"at least one model, workflow, vault, driver, or datastore",
"at least one model, workflow, vault, driver, datastore, or report",
);
});

Expand Down
Loading