@autoposting.ai/cli 0.4.0 → 0.4.1

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/cli.cjs CHANGED
@@ -79,7 +79,7 @@ var VERSION, AutopostingError, AuthenticationError, ScopeError, NotFoundError, V
79
79
  var init_dist = __esm({
80
80
  "../sdk/dist/index.mjs"() {
81
81
  "use strict";
82
- VERSION = "0.4.0";
82
+ VERSION = "0.4.1";
83
83
  AutopostingError = class extends Error {
84
84
  status;
85
85
  code;
@@ -1166,9 +1166,10 @@ var init_tools = __esm({
1166
1166
  inputSchema: {
1167
1167
  type: "object",
1168
1168
  properties: {
1169
- name: { type: "string", description: "Knowledge base name" }
1169
+ name: { type: "string", minLength: 4, maxLength: 20, description: "Knowledge base name" },
1170
+ description: { type: "string", minLength: 20, maxLength: 500, description: "Knowledge base description" }
1170
1171
  },
1171
- required: ["name"],
1172
+ required: ["name", "description"],
1172
1173
  additionalProperties: false
1173
1174
  }
1174
1175
  },
@@ -1838,7 +1839,7 @@ async function dispatchToolCall(name, args, client) {
1838
1839
  return ok(result);
1839
1840
  }
1840
1841
  case "create-kb": {
1841
- const result = await client.kb.create({ name: args.name });
1842
+ const result = await client.kb.create({ name: args.name, description: args.description });
1842
1843
  return ok(result);
1843
1844
  }
1844
1845
  case "delete-kb": {
@@ -4113,14 +4114,14 @@ function createKbCommand() {
4113
4114
  process.exit(resolveExitCode6(err));
4114
4115
  }
4115
4116
  });
4116
- kb.command("create").description("Create a new knowledge base").requiredOption("--name <name>", "Knowledge base name").action(async (opts, cmd) => {
4117
+ kb.command("create").description("Create a new knowledge base").requiredOption("--name <name>", "Knowledge base name").requiredOption("--description <description>", "Knowledge base description (20\u2013500 characters)").action(async (opts, cmd) => {
4117
4118
  const globals = cmd.optsWithGlobals();
4118
4119
  const printer = createPrinter(globals);
4119
4120
  const spinner = printer.spinner("Creating knowledge base\u2026");
4120
4121
  try {
4121
4122
  const cred = resolveAuth({ apiKey: globals.apiKey });
4122
4123
  const client = new Autoposting({ apiKey: cred.apiKey });
4123
- const result = await client.kb.create({ name: opts.name });
4124
+ const result = await client.kb.create({ name: opts.name, description: opts.description });
4124
4125
  spinner.stop();
4125
4126
  printer.log(result);
4126
4127
  } catch (err) {