@kelceyp/caw-server 1.0.98 → 1.0.100

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.js CHANGED
@@ -10135,11 +10135,35 @@ var create75 = ({ httpClient }) => {
10135
10135
  };
10136
10136
  var read_default2 = Object.freeze({ create: create75 });
10137
10137
 
10138
+ // src/commands/backfill/content-refs.js
10139
+ var create76 = ({ httpClient }) => {
10140
+ return createCommand("content-refs").summary("Backfill content reference fields on existing versions").param((p) => p.name("sid").type("string").flag("sid", "s").required()).param((p) => p.name("store").type("string").flag("store")).param((p) => p.name("confirm").type("boolean").flag("confirm")).param((p) => p.name("skipPopulated").type("boolean").flag("skip-populated")).param((p) => p.name("batchSize").type("number").flag("batch-size")).run(async (ctx) => {
10141
+ const { sid, store, confirm, skipPopulated, batchSize } = ctx.params;
10142
+ const args = {};
10143
+ if (store !== undefined)
10144
+ args.store = store;
10145
+ if (confirm !== undefined)
10146
+ args.confirm = confirm;
10147
+ if (skipPopulated !== undefined)
10148
+ args.skipPopulated = skipPopulated;
10149
+ if (batchSize !== undefined)
10150
+ args.batchSize = batchSize;
10151
+ const result = await httpClient.post(`/cli/mcp-client/${sid}/dispatch`, {
10152
+ cwd: process.cwd(),
10153
+ tool: "backfill_content_refs",
10154
+ args
10155
+ });
10156
+ ctx.stdio.stdout.write(JSON.stringify(result, null, 2) + `
10157
+ `);
10158
+ }).onError({ exitCode: 1 }).build();
10159
+ };
10160
+ var content_refs_default = Object.freeze({ create: create76 });
10161
+
10138
10162
  // src/cli-main.js
10139
10163
  var CAW_URL = process.env.CAW_URL || "https://caw.localhost";
10140
10164
  try {
10141
10165
  const httpClient = http_client_default.create({ baseUrl: CAW_URL });
10142
- const app = create().name("caw").version("0.0.1").command(connect_default.create({ httpClient })).command(disconnect_default.create({ httpClient })).group(createCommandGroup("doc").summary("Document operations").command(read_default.create({ httpClient })).command(create_default.create({ httpClient })).command(save_default.create({ httpClient })).command(publish_default.create({ httpClient })).command(read_by_path_default.create({ httpClient })).command(update_path_default.create({ httpClient })).command(versions_default.create({ httpClient })).command(read_version_default.create({ httpClient })).command(discard_default.create({ httpClient })).command(delete_default.create({ httpClient })).command(read_lines_default.create({ httpClient })).command(read_head_default.create({ httpClient })).command(read_tail_default.create({ httpClient })).command(read_from_line_default.create({ httpClient })).command(read_to_line_default.create({ httpClient })).command(read_between_markers_default.create({ httpClient })).command(read_section_default.create({ httpClient })).command(headings_default.create({ httpClient })).command(checklist_default.create({ httpClient })).command(stats_default.create({ httpClient })).command(frontmatter_default.create({ httpClient })).command(edit_default.create({ httpClient })).command(batch_edit_default.create({ httpClient })).command(check_item_default.create({ httpClient })).command(toggle_item_default.create({ httpClient })).command(batch_check_items_default.create({ httpClient })).command(set_edit_state_default.create({ httpClient })).command(clear_edit_state_default.create({ httpClient })).command(get_edit_state_default.create({ httpClient })).command(check_includes_default.create({ httpClient })).command(update_includes_default.create({ httpClient })).build()).group(createCommandGroup("folder").summary("Folder operations").command(list_default.create({ httpClient })).command(create_default2.create({ httpClient })).command(get_default.create({ httpClient })).command(get_by_path_default.create({ httpClient })).command(rename_default.create({ httpClient })).command(move_default.create({ httpClient })).command(delete_default2.create({ httpClient })).build()).group(createCommandGroup("field").summary("Field operations").command(get_default2.create({ httpClient })).command(set_default.create({ httpClient })).command(delete_default3.create({ httpClient })).command(create_def_default.create({ httpClient })).command(list_defs_default.create({ httpClient })).command(get_type_fields_default.create({ httpClient })).command(delete_def_default.create({ httpClient })).build()).group(createCommandGroup("story").summary("Story operations").command(create_default3.create({ httpClient })).command(list_default2.create({ httpClient })).command(get_default3.create({ httpClient })).command(update_state_default.create({ httpClient })).command(delete_default4.create({ httpClient })).command(inc_jobs_default.create({ httpClient })).command(dec_jobs_default.create({ httpClient })).build()).group(createCommandGroup("workflow").summary("Workflow operations").command(list_default3.create({ httpClient })).command(create_default4.create({ httpClient })).command(update_default.create({ httpClient })).command(delete_default5.create({ httpClient })).build()).group(createCommandGroup("template").summary("Template operations").command(create_default5.create({ httpClient })).command(render_default.create({ httpClient })).command(params_default.create({ httpClient })).command(list_by_type_default.create({ httpClient })).build()).group(createCommandGroup("job").summary("Job operations").command(list_default4.create({ httpClient })).command(get_default4.create({ httpClient })).command(create_default6.create({ httpClient })).command(continue_default.create({ httpClient })).command(output_default.create({ httpClient })).command(prompt_default.create({ httpClient })).build()).group(createCommandGroup("export").summary("Export operations").command(list_default5.create({ httpClient })).command(preview_default.create({ httpClient })).command(export_default.create({ httpClient })).command(import_default.create({ httpClient })).build()).group(createCommandGroup("asset").summary("Asset operations").command(read_default2.create({ httpClient })).build());
10166
+ const app = create().name("caw").version("0.0.1").command(connect_default.create({ httpClient })).command(disconnect_default.create({ httpClient })).group(createCommandGroup("doc").summary("Document operations").command(read_default.create({ httpClient })).command(create_default.create({ httpClient })).command(save_default.create({ httpClient })).command(publish_default.create({ httpClient })).command(read_by_path_default.create({ httpClient })).command(update_path_default.create({ httpClient })).command(versions_default.create({ httpClient })).command(read_version_default.create({ httpClient })).command(discard_default.create({ httpClient })).command(delete_default.create({ httpClient })).command(read_lines_default.create({ httpClient })).command(read_head_default.create({ httpClient })).command(read_tail_default.create({ httpClient })).command(read_from_line_default.create({ httpClient })).command(read_to_line_default.create({ httpClient })).command(read_between_markers_default.create({ httpClient })).command(read_section_default.create({ httpClient })).command(headings_default.create({ httpClient })).command(checklist_default.create({ httpClient })).command(stats_default.create({ httpClient })).command(frontmatter_default.create({ httpClient })).command(edit_default.create({ httpClient })).command(batch_edit_default.create({ httpClient })).command(check_item_default.create({ httpClient })).command(toggle_item_default.create({ httpClient })).command(batch_check_items_default.create({ httpClient })).command(set_edit_state_default.create({ httpClient })).command(clear_edit_state_default.create({ httpClient })).command(get_edit_state_default.create({ httpClient })).command(check_includes_default.create({ httpClient })).command(update_includes_default.create({ httpClient })).build()).group(createCommandGroup("folder").summary("Folder operations").command(list_default.create({ httpClient })).command(create_default2.create({ httpClient })).command(get_default.create({ httpClient })).command(get_by_path_default.create({ httpClient })).command(rename_default.create({ httpClient })).command(move_default.create({ httpClient })).command(delete_default2.create({ httpClient })).build()).group(createCommandGroup("field").summary("Field operations").command(get_default2.create({ httpClient })).command(set_default.create({ httpClient })).command(delete_default3.create({ httpClient })).command(create_def_default.create({ httpClient })).command(list_defs_default.create({ httpClient })).command(get_type_fields_default.create({ httpClient })).command(delete_def_default.create({ httpClient })).build()).group(createCommandGroup("story").summary("Story operations").command(create_default3.create({ httpClient })).command(list_default2.create({ httpClient })).command(get_default3.create({ httpClient })).command(update_state_default.create({ httpClient })).command(delete_default4.create({ httpClient })).command(inc_jobs_default.create({ httpClient })).command(dec_jobs_default.create({ httpClient })).build()).group(createCommandGroup("workflow").summary("Workflow operations").command(list_default3.create({ httpClient })).command(create_default4.create({ httpClient })).command(update_default.create({ httpClient })).command(delete_default5.create({ httpClient })).build()).group(createCommandGroup("template").summary("Template operations").command(create_default5.create({ httpClient })).command(render_default.create({ httpClient })).command(params_default.create({ httpClient })).command(list_by_type_default.create({ httpClient })).build()).group(createCommandGroup("job").summary("Job operations").command(list_default4.create({ httpClient })).command(get_default4.create({ httpClient })).command(create_default6.create({ httpClient })).command(continue_default.create({ httpClient })).command(output_default.create({ httpClient })).command(prompt_default.create({ httpClient })).build()).group(createCommandGroup("export").summary("Export operations").command(list_default5.create({ httpClient })).command(preview_default.create({ httpClient })).command(export_default.create({ httpClient })).command(import_default.create({ httpClient })).build()).group(createCommandGroup("asset").summary("Asset operations").command(read_default2.create({ httpClient })).build()).group(createCommandGroup("backfill").summary("Backfill operations").command(content_refs_default.create({ httpClient })).build());
10143
10167
  await app.run(process.argv.slice(2));
10144
10168
  } catch (error) {
10145
10169
  console.error(`Error: ${error.message}`);