[nexus] fix(06): resolve verifier gaps — portability fallback, export readme, CLI company descriptions, server error msg
This commit is contained in:
parent
c5e38e5f5e
commit
6a21bf852f
4 changed files with 16 additions and 16 deletions
|
|
@ -83,7 +83,7 @@ const IMPORT_INCLUDE_OPTIONS: Array<{
|
|||
{ value: "projects", label: "Projects", hint: "projects and workspace metadata" },
|
||||
{ value: "issues", label: "Tasks", hint: "tasks and recurring routines" },
|
||||
{ value: "agents", label: "Agents", hint: "agent records and org structure" },
|
||||
{ value: "skills", label: "Skills", hint: "company skill packages and references" },
|
||||
{ value: "skills", label: "Skills", hint: `${VOCAB.company.toLowerCase()} skill packages and references` }, // [nexus]
|
||||
];
|
||||
|
||||
const IMPORT_PREVIEW_SAMPLE_LIMIT = 6;
|
||||
|
|
@ -1046,7 +1046,7 @@ export function registerCompanyCommands(program: Command): void {
|
|||
addCommonClientOptions(
|
||||
company
|
||||
.command("list")
|
||||
.description("List companies")
|
||||
.description(`List ${VOCAB.companies.toLowerCase()}`) // [nexus]
|
||||
.action(async (opts: CompanyCommandOptions) => {
|
||||
try {
|
||||
const ctx = resolveCommandContext(opts);
|
||||
|
|
@ -1081,8 +1081,8 @@ export function registerCompanyCommands(program: Command): void {
|
|||
addCommonClientOptions(
|
||||
company
|
||||
.command("get")
|
||||
.description("Get one company")
|
||||
.argument("<companyId>", "Company ID")
|
||||
.description(`Get one ${VOCAB.company.toLowerCase()}`) // [nexus]
|
||||
.argument("<companyId>", `${VOCAB.company} ID`) // [nexus]
|
||||
.action(async (companyId: string, opts: CompanyCommandOptions) => {
|
||||
try {
|
||||
const ctx = resolveCommandContext(opts);
|
||||
|
|
@ -1097,8 +1097,8 @@ export function registerCompanyCommands(program: Command): void {
|
|||
addCommonClientOptions(
|
||||
company
|
||||
.command("export")
|
||||
.description("Export a company into a portable markdown package")
|
||||
.argument("<companyId>", "Company ID")
|
||||
.description(`Export a ${VOCAB.company.toLowerCase()} into a portable markdown package`) // [nexus]
|
||||
.argument("<companyId>", `${VOCAB.company} ID`) // [nexus]
|
||||
.requiredOption("--out <path>", "Output directory")
|
||||
.option("--include <values>", "Comma-separated include set: company,agents,projects,issues,tasks,skills", "company,agents")
|
||||
.option("--skills <values>", "Comma-separated skill slugs/keys to export")
|
||||
|
|
@ -1373,8 +1373,8 @@ export function registerCompanyCommands(program: Command): void {
|
|||
addCommonClientOptions(
|
||||
company
|
||||
.command("delete")
|
||||
.description("Delete a company by ID or shortname/prefix (destructive)")
|
||||
.argument("<selector>", "Company ID or issue prefix (for example PAP)")
|
||||
.description(`Delete a ${VOCAB.company.toLowerCase()} by ID or shortname/prefix (destructive)`) // [nexus]
|
||||
.argument("<selector>", `${VOCAB.company} ID or issue prefix (for example PAP)`) // [nexus]
|
||||
.option(
|
||||
"--by <mode>",
|
||||
"Selector mode: auto | id | prefix",
|
||||
|
|
@ -1383,7 +1383,7 @@ export function registerCompanyCommands(program: Command): void {
|
|||
.option("--yes", "Required safety flag to confirm destructive action", false)
|
||||
.option(
|
||||
"--confirm <value>",
|
||||
"Required safety value: target company ID or shortname/prefix",
|
||||
`Required safety value: target ${VOCAB.company.toLowerCase()} ID or shortname/prefix`, // [nexus]
|
||||
)
|
||||
.action(async (selector: string, opts: CompanyDeleteOptions) => {
|
||||
try {
|
||||
|
|
@ -1425,7 +1425,7 @@ export function registerCompanyCommands(program: Command): void {
|
|||
} catch (error) {
|
||||
if (error instanceof ApiRequestError && error.status === 403 && error.message.includes("Board access required")) {
|
||||
throw new Error(
|
||||
"Board access is required to resolve companies across the instance. Use a company ID/prefix for your current company, or run with board authentication.",
|
||||
`${VOCAB.board} access is required to resolve ${VOCAB.companies.toLowerCase()} across the instance. Use a ${VOCAB.company.toLowerCase()} ID/prefix for your current ${VOCAB.company.toLowerCase()}, or run with ${VOCAB.board.toLowerCase()} authentication.`, // [nexus]
|
||||
);
|
||||
}
|
||||
throw error;
|
||||
|
|
|
|||
|
|
@ -757,7 +757,7 @@ function isMainModule(metaUrl: string): boolean {
|
|||
|
||||
if (isMainModule(import.meta.url)) {
|
||||
void startServer().catch((err) => {
|
||||
logger.error({ err }, "Paperclip server failed to start");
|
||||
logger.error({ err }, "Nexus server failed to start"); // [nexus]
|
||||
process.exit(1);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ export function generateReadme(
|
|||
// What's Inside table
|
||||
lines.push("## What's Inside");
|
||||
lines.push("");
|
||||
lines.push("> This is an [Agent Company](https://agentcompanies.io) package from [Paperclip](https://paperclip.ing)");
|
||||
lines.push("> This is an Agent Workspace package from Nexus"); // [nexus]
|
||||
lines.push("");
|
||||
|
||||
const counts: Array<[string, number]> = [];
|
||||
|
|
@ -157,15 +157,15 @@ export function generateReadme(
|
|||
lines.push("## Getting Started");
|
||||
lines.push("");
|
||||
lines.push("```bash");
|
||||
lines.push("pnpm paperclipai company import this-github-url-or-folder");
|
||||
lines.push("pnpm paperclipai company import this-github-url-or-folder"); // [nexus] CLI command unchanged (code-zone)
|
||||
lines.push("```");
|
||||
lines.push("");
|
||||
lines.push("See [Paperclip](https://paperclip.ing) for more information.");
|
||||
lines.push("See the Nexus documentation for more information."); // [nexus]
|
||||
lines.push("");
|
||||
|
||||
// Footer
|
||||
lines.push("---");
|
||||
lines.push(`Exported from [Paperclip](https://paperclip.ing) on ${new Date().toISOString().split("T")[0]}`);
|
||||
lines.push(`Exported from Nexus on ${new Date().toISOString().split("T")[0]}`); // [nexus]
|
||||
lines.push("");
|
||||
|
||||
return lines.join("\n");
|
||||
|
|
|
|||
|
|
@ -3726,7 +3726,7 @@ export function companyPortabilityService(db: Db, storage?: StorageService) {
|
|||
asString(input.target.newCompanyName) ??
|
||||
sourceManifest.company?.name ??
|
||||
sourceManifest.source?.companyName ??
|
||||
"Imported Company";
|
||||
"Imported Workspace"; // [nexus]
|
||||
const created = await companies.create({
|
||||
name: companyName,
|
||||
description: include.company ? (sourceManifest.company?.description ?? null) : null,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue