@lotics/cli 0.150.1 → 0.150.2
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/cli.js +56 -15
- package/package.json +1 -1
package/dist/src/cli.js
CHANGED
|
@@ -71401,6 +71401,24 @@ var subjectSchema = zod_default.discriminatedUnion("type", [
|
|
|
71401
71401
|
})
|
|
71402
71402
|
]);
|
|
71403
71403
|
var resourceTypeSchema = zod_default.enum(["table", "table_view", "app", "automation", "skill", "document_template", "instruction", "knowledge_doc"]);
|
|
71404
|
+
var accessPrincipalSchema = zod_default.discriminatedUnion("type", [
|
|
71405
|
+
zod_default.object({
|
|
71406
|
+
type: zod_default.literal("member").describe("Principal type: an individual member"),
|
|
71407
|
+
id: zod_default.string().describe("Member ID")
|
|
71408
|
+
}),
|
|
71409
|
+
zod_default.object({
|
|
71410
|
+
type: zod_default.literal("member_group").describe("Principal type: a member group"),
|
|
71411
|
+
id: zod_default.string().describe("Group ID")
|
|
71412
|
+
}),
|
|
71413
|
+
zod_default.object({
|
|
71414
|
+
type: zod_default.literal("organization").describe("Principal type: everyone in the organization"),
|
|
71415
|
+
id: zod_default.string().describe("Organization ID")
|
|
71416
|
+
})
|
|
71417
|
+
]);
|
|
71418
|
+
var resourceAccessSchema = zod_default.object({
|
|
71419
|
+
resource_id: zod_default.string().describe("ID of the resource these principals can reach"),
|
|
71420
|
+
principals: zod_default.array(accessPrincipalSchema).describe("Members, groups and the organization that have been granted access")
|
|
71421
|
+
});
|
|
71404
71422
|
var resourceRoleBindingSchema = zod_default.object({
|
|
71405
71423
|
id: zod_default.string().describe("Unique identifier for the role binding"),
|
|
71406
71424
|
principal: principalSchema.describe(
|
|
@@ -71553,12 +71571,14 @@ var documentTemplateSchema = zod_default.object({
|
|
|
71553
71571
|
id: zod_default.string().describe("Unique identifier for the document template"),
|
|
71554
71572
|
workspace_id: zod_default.string().describe("ID of the workspace this template belongs to"),
|
|
71555
71573
|
name: zod_default.string().describe("Display name of the template"),
|
|
71574
|
+
description: zod_default.string().describe("What the template produces, shown under its name in the library"),
|
|
71556
71575
|
type: documentTemplateTypeSchema,
|
|
71557
71576
|
template: zod_default.string().describe("Template content with variable placeholders (e.g., {{customer_name}})"),
|
|
71558
71577
|
format: zod_default.string().describe("Supported document formats.").optional(),
|
|
71559
71578
|
orientation: zod_default.enum(["portrait", "landscape"]).describe("Page orientation for PDF generation").optional(),
|
|
71560
71579
|
variables: zod_default.record(zod_default.string(), zod_default.unknown()).describe("Data to pass to the template."),
|
|
71561
71580
|
current_version: zod_default.number().describe("Current version number of the template"),
|
|
71581
|
+
owner_member_id: zod_default.string().nullable().optional().describe("Member who created the template, from the IAM registry. Absent on write responses."),
|
|
71562
71582
|
created_at: zod_default.string().describe("Timestamp when template was created"),
|
|
71563
71583
|
template_url: zod_default.string().nullable().describe("Signed URL to download the template file (pdf-form/excel only)")
|
|
71564
71584
|
});
|
|
@@ -71866,11 +71886,29 @@ var contractKnowledgeEntrySchema = zod_default.object({
|
|
|
71866
71886
|
"Display name \u2014 the runtime routing key an agent resolves the doc by; unique across the contract's knowledge"
|
|
71867
71887
|
),
|
|
71868
71888
|
description: zod_default.string().describe("Doc description (may be empty)"),
|
|
71869
|
-
// Optional so contracts published before
|
|
71870
|
-
//
|
|
71871
|
-
// deliberately, so install and upgrade have to carry it — otherwise
|
|
71872
|
-
// installed corpus lands
|
|
71873
|
-
|
|
71889
|
+
// Optional so contracts published before tagging still parse; absent means
|
|
71890
|
+
// untagged. A curated corpus is exactly the case where classification is
|
|
71891
|
+
// authored deliberately, so install and upgrade have to carry it — otherwise
|
|
71892
|
+
// every installed corpus lands unlabelled and the customer re-tags it by hand.
|
|
71893
|
+
//
|
|
71894
|
+
// ABSENT IS NOT EMPTY, and that distinction is load-bearing on the wire: a
|
|
71895
|
+
// contract that says nothing about tags must leave the customer's own labels
|
|
71896
|
+
// alone, or a routine content upgrade silently strips classification the
|
|
71897
|
+
// workspace added. Every reader below branches on `undefined`, never on length.
|
|
71898
|
+
tags: zod_default.array(zod_default.string()).optional().describe("Labels for the doc; omitted leaves existing labels alone"),
|
|
71899
|
+
/**
|
|
71900
|
+
* LEGACY, read-only, removed in a later release.
|
|
71901
|
+
*
|
|
71902
|
+
* Content packages published while knowledge docs had folders carry a `path`,
|
|
71903
|
+
* and those contracts are stored verbatim in the workspaces that installed
|
|
71904
|
+
* them. Dropping the field would make an installed contract fail to parse and
|
|
71905
|
+
* would discard what the publisher declared, so it is still accepted and
|
|
71906
|
+
* mapped to `tags` on install/upgrade (a path's segments were always labels;
|
|
71907
|
+
* the hierarchy merely insisted on an order for them). Nothing EMITS it any
|
|
71908
|
+
* more — `content_bundle` writes `tags` — so it disappears from a package the
|
|
71909
|
+
* first time it is re-published.
|
|
71910
|
+
*/
|
|
71911
|
+
path: zod_default.string().optional().describe("Deprecated: pre-tagging folder. Mapped to tags on install."),
|
|
71874
71912
|
content_ref: zod_default.string().min(1).describe("Path of the content file within the bundle \u2014 must be `knowledge/<alias>.md`"),
|
|
71875
71913
|
content_sha256: zod_default.string().describe("sha256 (64-char lowercase hex) of the content bytes \u2014 the modified-detection reference")
|
|
71876
71914
|
});
|
|
@@ -72832,6 +72870,18 @@ function appDirName(name2) {
|
|
|
72832
72870
|
const cleaned = name2.replace(/[/\\]+/g, "-").replace(/[<>:"|?*]/g, "").replace(/\s+/g, " ").trim().replace(/^[.\s-]+|[.\s-]+$/g, "");
|
|
72833
72871
|
return cleaned || "app";
|
|
72834
72872
|
}
|
|
72873
|
+
async function materializeScaffold(targetPath, files) {
|
|
72874
|
+
for (const file2 of files) {
|
|
72875
|
+
const fullPath = path9.join(targetPath, file2.path);
|
|
72876
|
+
fs8.mkdirSync(path9.dirname(fullPath), { recursive: true });
|
|
72877
|
+
fs8.writeFileSync(fullPath, file2.content);
|
|
72878
|
+
}
|
|
72879
|
+
console.error(`Scaffolded ${files.length} files into ${targetPath}`);
|
|
72880
|
+
writeAppDts(targetPath, {});
|
|
72881
|
+
console.error("Installing npm dependencies...");
|
|
72882
|
+
await runNpm(["install"], targetPath);
|
|
72883
|
+
writeAppDtsKitLinks(targetPath);
|
|
72884
|
+
}
|
|
72835
72885
|
async function appCreate(client, args) {
|
|
72836
72886
|
const targetPath = path9.resolve(args.targetPath ?? appDirName(args.name));
|
|
72837
72887
|
if (fs8.existsSync(targetPath)) {
|
|
@@ -72854,16 +72904,7 @@ async function appCreate(client, args) {
|
|
|
72854
72904
|
ui_version: `^${uiLatest}`,
|
|
72855
72905
|
sdk_version: `^${sdkLatest}`
|
|
72856
72906
|
});
|
|
72857
|
-
|
|
72858
|
-
const fullPath = path9.join(targetPath, file2.path);
|
|
72859
|
-
fs8.mkdirSync(path9.dirname(fullPath), { recursive: true });
|
|
72860
|
-
fs8.writeFileSync(fullPath, file2.content);
|
|
72861
|
-
}
|
|
72862
|
-
console.error(`Scaffolded ${files.length} files into ${targetPath}`);
|
|
72863
|
-
writeAppDts(targetPath, {});
|
|
72864
|
-
console.error("Installing npm dependencies...");
|
|
72865
|
-
await runNpm(["install"], targetPath);
|
|
72866
|
-
writeAppDtsKitLinks(targetPath);
|
|
72907
|
+
await materializeScaffold(targetPath, files);
|
|
72867
72908
|
console.error("Building initial version...");
|
|
72868
72909
|
await appDeploy(client, {
|
|
72869
72910
|
projectDir: targetPath,
|