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