@kelceyp/caw-server 1.0.105 → 1.0.108
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 +17 -17
- package/dist/main.js +302 -302
- package/dist/public_html/main.js +430 -430
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -9648,15 +9648,15 @@ var delete_def_default = Object.freeze({ create: create49 });
|
|
|
9648
9648
|
|
|
9649
9649
|
// src/commands/story/create.js
|
|
9650
9650
|
var create50 = ({ httpClient }) => {
|
|
9651
|
-
return createCommand("create").summary("Create a story").param((p) => p.name("sid").type("string").flag("sid", "s").required()).param((p) => p.name("name").type("string").flag("name").required()).param((p) => p.name("store").type("string").flag("store")).param((p) => p.name("state").type("string").flag("state")).param((p) => p.name("
|
|
9652
|
-
const { sid, name, store, state,
|
|
9651
|
+
return createCommand("create").summary("Create a story").param((p) => p.name("sid").type("string").flag("sid", "s").required()).param((p) => p.name("name").type("string").flag("name").required()).param((p) => p.name("store").type("string").flag("store")).param((p) => p.name("state").type("string").flag("state")).param((p) => p.name("track").type("string").flag("track")).run(async (ctx) => {
|
|
9652
|
+
const { sid, name, store, state, track } = ctx.params;
|
|
9653
9653
|
const args = { name };
|
|
9654
9654
|
if (store !== undefined)
|
|
9655
9655
|
args.store = store;
|
|
9656
9656
|
if (state !== undefined)
|
|
9657
9657
|
args.state = state;
|
|
9658
|
-
if (
|
|
9659
|
-
args.
|
|
9658
|
+
if (track !== undefined)
|
|
9659
|
+
args.track = track;
|
|
9660
9660
|
const result = await httpClient.post(`/cli/mcp-client/${sid}/dispatch`, {
|
|
9661
9661
|
cwd: process.cwd(),
|
|
9662
9662
|
tool: "create_story",
|
|
@@ -9764,16 +9764,16 @@ var create56 = ({ httpClient }) => {
|
|
|
9764
9764
|
};
|
|
9765
9765
|
var dec_jobs_default = Object.freeze({ create: create56 });
|
|
9766
9766
|
|
|
9767
|
-
// src/commands/
|
|
9767
|
+
// src/commands/track/list.js
|
|
9768
9768
|
var create57 = ({ httpClient }) => {
|
|
9769
|
-
return createCommand("list").summary("List all
|
|
9769
|
+
return createCommand("list").summary("List all tracks").param((p) => p.name("sid").type("string").flag("sid", "s").required()).param((p) => p.name("store").type("string").flag("store")).run(async (ctx) => {
|
|
9770
9770
|
const { sid, store } = ctx.params;
|
|
9771
9771
|
const args = {};
|
|
9772
9772
|
if (store !== undefined)
|
|
9773
9773
|
args.store = store;
|
|
9774
9774
|
const result = await httpClient.post(`/cli/mcp-client/${sid}/dispatch`, {
|
|
9775
9775
|
cwd: process.cwd(),
|
|
9776
|
-
tool: "
|
|
9776
|
+
tool: "list_tracks",
|
|
9777
9777
|
args
|
|
9778
9778
|
});
|
|
9779
9779
|
ctx.stdio.stdout.write(JSON.stringify(result, null, 2) + `
|
|
@@ -9782,9 +9782,9 @@ var create57 = ({ httpClient }) => {
|
|
|
9782
9782
|
};
|
|
9783
9783
|
var list_default3 = Object.freeze({ create: create57 });
|
|
9784
9784
|
|
|
9785
|
-
// src/commands/
|
|
9785
|
+
// src/commands/track/create.js
|
|
9786
9786
|
var create58 = ({ httpClient }) => {
|
|
9787
|
-
return createCommand("create").summary("Create a
|
|
9787
|
+
return createCommand("create").summary("Create a track").param((p) => p.name("sid").type("string").flag("sid", "s").required()).param((p) => p.name("name").type("string").flag("name").required()).param((p) => p.name("states").type("string").flag("states").required()).param((p) => p.name("store").type("string").flag("store")).run(async (ctx) => {
|
|
9788
9788
|
const { sid, name, states, store } = ctx.params;
|
|
9789
9789
|
const statesArray = states.split(",").map((s) => s.trim());
|
|
9790
9790
|
const args = { name, states: statesArray };
|
|
@@ -9792,7 +9792,7 @@ var create58 = ({ httpClient }) => {
|
|
|
9792
9792
|
args.store = store;
|
|
9793
9793
|
const result = await httpClient.post(`/cli/mcp-client/${sid}/dispatch`, {
|
|
9794
9794
|
cwd: process.cwd(),
|
|
9795
|
-
tool: "
|
|
9795
|
+
tool: "create_track",
|
|
9796
9796
|
args
|
|
9797
9797
|
});
|
|
9798
9798
|
ctx.stdio.stdout.write(JSON.stringify(result, null, 2) + `
|
|
@@ -9801,9 +9801,9 @@ var create58 = ({ httpClient }) => {
|
|
|
9801
9801
|
};
|
|
9802
9802
|
var create_default4 = Object.freeze({ create: create58 });
|
|
9803
9803
|
|
|
9804
|
-
// src/commands/
|
|
9804
|
+
// src/commands/track/update.js
|
|
9805
9805
|
var create59 = ({ httpClient }) => {
|
|
9806
|
-
return createCommand("update").summary("Update a
|
|
9806
|
+
return createCommand("update").summary("Update a track").param((p) => p.name("sid").type("string").flag("sid", "s").required()).param((p) => p.name("id").type("string").flag("id").required()).param((p) => p.name("name").type("string").flag("name")).param((p) => p.name("states").type("string").flag("states")).run(async (ctx) => {
|
|
9807
9807
|
const { sid, id, name, states } = ctx.params;
|
|
9808
9808
|
const args = { id };
|
|
9809
9809
|
if (name !== undefined)
|
|
@@ -9813,7 +9813,7 @@ var create59 = ({ httpClient }) => {
|
|
|
9813
9813
|
}
|
|
9814
9814
|
const result = await httpClient.post(`/cli/mcp-client/${sid}/dispatch`, {
|
|
9815
9815
|
cwd: process.cwd(),
|
|
9816
|
-
tool: "
|
|
9816
|
+
tool: "update_track",
|
|
9817
9817
|
args
|
|
9818
9818
|
});
|
|
9819
9819
|
ctx.stdio.stdout.write(JSON.stringify(result, null, 2) + `
|
|
@@ -9822,13 +9822,13 @@ var create59 = ({ httpClient }) => {
|
|
|
9822
9822
|
};
|
|
9823
9823
|
var update_default = Object.freeze({ create: create59 });
|
|
9824
9824
|
|
|
9825
|
-
// src/commands/
|
|
9825
|
+
// src/commands/track/delete.js
|
|
9826
9826
|
var create60 = ({ httpClient }) => {
|
|
9827
|
-
return createCommand("delete").summary("Delete a
|
|
9827
|
+
return createCommand("delete").summary("Delete a track").param((p) => p.name("sid").type("string").flag("sid", "s").required()).param((p) => p.name("id").type("string").flag("id").required()).run(async (ctx) => {
|
|
9828
9828
|
const { sid, id } = ctx.params;
|
|
9829
9829
|
const result = await httpClient.post(`/cli/mcp-client/${sid}/dispatch`, {
|
|
9830
9830
|
cwd: process.cwd(),
|
|
9831
|
-
tool: "
|
|
9831
|
+
tool: "delete_track",
|
|
9832
9832
|
args: { id }
|
|
9833
9833
|
});
|
|
9834
9834
|
ctx.stdio.stdout.write(JSON.stringify(result, null, 2) + `
|
|
@@ -10163,7 +10163,7 @@ var content_refs_default = Object.freeze({ create: create76 });
|
|
|
10163
10163
|
var CAW_URL = process.env.CAW_URL || "https://caw.localhost";
|
|
10164
10164
|
try {
|
|
10165
10165
|
const httpClient = http_client_default.create({ baseUrl: CAW_URL });
|
|
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("
|
|
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("track").summary("Track 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());
|
|
10167
10167
|
await app.run(process.argv.slice(2));
|
|
10168
10168
|
} catch (error) {
|
|
10169
10169
|
console.error(`Error: ${error.message}`);
|