@kelceyp/caw-server 1.0.245 → 1.0.249
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/README.md +9 -185
- package/dist/cli.js +79 -27
- package/dist/main.js +570 -644
- package/dist/public_html/main.js +583 -583
- package/dist/public_html/styles.css +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,198 +1,22 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @kelceyp/caw-server
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
You probably want **[`@kelceyp/caw`](https://www.npmjs.com/package/@kelceyp/caw)**, which installs, launches and manages this server for you.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
`@kelceyp/caw-server` is the backing server component of [CAW](https://www.npmjs.com/package/@kelceyp/caw): a REST API, an MCP server, the web UI static assets, and a SQLite-backed content store, packaged as one Node.js application.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Standalone install
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- **MCP Server** - HTTP MCP server for Claude Code integration
|
|
11
|
-
- **WebSocket Bridge** - Real-time communication with browser extension tabs
|
|
12
|
-
- **Core** - Business logic layer (services, stores, entities)
|
|
13
|
-
- **Static File Hosting** - Serves the web client
|
|
14
|
-
|
|
15
|
-
## Architecture
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
┌─────────────────────────────────────────┐
|
|
19
|
-
│ API Layer (REST/MCP) │ HTTP routes, MCP tools
|
|
20
|
-
│ (api/, mcp/) │ Auth via Bearer tokens
|
|
21
|
-
└─────────────────────────────────────────┘
|
|
22
|
-
↓
|
|
23
|
-
┌─────────────────────────────────────────┐
|
|
24
|
-
│ Server.js │ Express app setup
|
|
25
|
-
│ (main.js) │ Port management
|
|
26
|
-
└─────────────────────────────────────────┘
|
|
27
|
-
↓
|
|
28
|
-
┌─────────────────────────────────────────┐
|
|
29
|
-
│ Core Facade │ Token resolution
|
|
30
|
-
│ (core/Core.js) │ Service caching
|
|
31
|
-
│ │ Flat API
|
|
32
|
-
└─────────────────────────────────────────┘
|
|
33
|
-
↓
|
|
34
|
-
┌─────────────────────────────────────────┐
|
|
35
|
-
│ Services Layer │ Orchestration
|
|
36
|
-
│ (core/services/) │ Business workflows
|
|
37
|
-
│ │ Multi-store coordination
|
|
38
|
-
└─────────────────────────────────────────┘
|
|
39
|
-
↓
|
|
40
|
-
┌─────────────────────────────────────────┐
|
|
41
|
-
│ Stores Layer │ Data access
|
|
42
|
-
│ (core/stores/) │ Identity Map caching
|
|
43
|
-
│ │ CRUD operations
|
|
44
|
-
└─────────────────────────────────────────┘
|
|
45
|
-
↓
|
|
46
|
-
┌─────────────────────────────────────────┐
|
|
47
|
-
│ Database Layer │ SQLite
|
|
48
|
-
│ (db/) │ Kysely query builder
|
|
49
|
-
└─────────────────────────────────────────┘
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
## Directory Structure
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
server/
|
|
56
|
-
├── src/
|
|
57
|
-
│ ├── main.js # Entry point, server initialization
|
|
58
|
-
│ ├── Server.js # Express app factory
|
|
59
|
-
│ ├── api/ # REST API routes
|
|
60
|
-
│ │ ├── ProjectRoutes.js
|
|
61
|
-
│ │ ├── FolderRoutes.js
|
|
62
|
-
│ │ ├── DocumentRoutes.js
|
|
63
|
-
│ │ ├── TemplateRoutes.js
|
|
64
|
-
│ │ ├── FieldRoutes.js
|
|
65
|
-
│ │ ├── ExportRoutes.js
|
|
66
|
-
│ │ └── EventRoutes.js
|
|
67
|
-
│ ├── core/ # Business logic layer
|
|
68
|
-
│ │ ├── Core.js # Facade - token resolution, service caching
|
|
69
|
-
│ │ ├── entities/ # Domain objects (read-only)
|
|
70
|
-
│ │ ├── services/ # Orchestration layer
|
|
71
|
-
│ │ └── stores/ # Data access + caching
|
|
72
|
-
│ ├── db/ # Database layer
|
|
73
|
-
│ │ ├── Connection.js # Database connection factory
|
|
74
|
-
│ │ ├── schema.js # Table definitions
|
|
75
|
-
│ │ └── seed.js # Initial data seeding
|
|
76
|
-
│ ├── mcp/ # MCP server implementation
|
|
77
|
-
│ ├── wss/ # WebSocket server
|
|
78
|
-
│ ├── static/ # Static files for web client
|
|
79
|
-
│ └── common/ # Shared utilities
|
|
80
|
-
└── test/ # Test suites
|
|
81
|
-
├── unit/ # In-memory unit tests
|
|
82
|
-
├── integration/ # Real database integration tests
|
|
83
|
-
└── component/ # Black-box HTTP tests via subprocess
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
## Port Configuration
|
|
87
|
-
|
|
88
|
-
The server uses the `CAW_PORT` environment variable:
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
CAW_PORT=2229 caw-server # Default: 2229
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
## Building
|
|
95
|
-
|
|
96
|
-
```bash
|
|
97
|
-
# Build server only
|
|
98
|
-
bun run build
|
|
99
|
-
|
|
100
|
-
# Build client + server
|
|
101
|
-
bun run build:all
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
Output: `dist/main.js` (ES6 module for Node.js)
|
|
105
|
-
|
|
106
|
-
## Running
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
# Development (uses source files)
|
|
110
|
-
bun run dev
|
|
111
|
-
|
|
112
|
-
# Production (uses built files)
|
|
113
|
-
node dist/main.js
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
## Testing
|
|
117
|
-
|
|
118
|
-
```bash
|
|
119
|
-
# Run all tests
|
|
120
|
-
bun test
|
|
121
|
-
|
|
122
|
-
# Run specific test suite
|
|
123
|
-
bun test test/unit/
|
|
124
|
-
bun test test/integration/
|
|
125
|
-
bun test test/component/
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
Test types:
|
|
129
|
-
- **Unit** - In-memory tests (entities, utilities)
|
|
130
|
-
- **Integration** - Real database tests (stores, services)
|
|
131
|
-
- **Component** - Black-box HTTP tests (API routes, MCP tools)
|
|
132
|
-
|
|
133
|
-
## Tech Stack
|
|
134
|
-
|
|
135
|
-
- **Pure JavaScript** - ES6 modules, factory functions only
|
|
136
|
-
- **Express** - HTTP server framework
|
|
137
|
-
- **Kysely** - SQL query builder (type-safe)
|
|
138
|
-
- **better-sqlite3** - SQLite driver
|
|
139
|
-
- **ws** - WebSocket server
|
|
140
|
-
- **MCP SDK** - Model Context Protocol implementation
|
|
141
|
-
- **Bun** - Build tool (development and bundling)
|
|
142
|
-
|
|
143
|
-
## Distribution
|
|
144
|
-
|
|
145
|
-
Published to npm as `@kelceyp/caw-server`:
|
|
9
|
+
Most users should install the launcher instead — it handles lifecycle (start / stop / status / logs / upgrade), config, and integrations. If you have a specific reason to run the server directly:
|
|
146
10
|
|
|
147
11
|
```bash
|
|
148
|
-
# Global install
|
|
149
12
|
npm install -g @kelceyp/caw-server
|
|
150
|
-
|
|
151
|
-
# Run
|
|
152
13
|
caw-server
|
|
153
14
|
```
|
|
154
15
|
|
|
155
|
-
##
|
|
156
|
-
|
|
157
|
-
### Token-Based Authentication
|
|
158
|
-
|
|
159
|
-
All API and MCP requests use Bearer tokens:
|
|
160
|
-
|
|
161
|
-
```bash
|
|
162
|
-
Authorization: Bearer <project-token>
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
Core facade resolves tokens to project context and caches services per project.
|
|
166
|
-
|
|
167
|
-
### Multi-Store System
|
|
168
|
-
|
|
169
|
-
Projects use a hierarchical store structure:
|
|
170
|
-
- **DemuxStore** - Routes operations to child stores
|
|
171
|
-
- **LocalStore A** - Project-specific content
|
|
172
|
-
- **LocalStore B** - Shared content across projects
|
|
173
|
-
|
|
174
|
-
### Identity Map Caching
|
|
175
|
-
|
|
176
|
-
Stores cache entities to ensure single object instance per ID:
|
|
177
|
-
- Cache checked before database queries
|
|
178
|
-
- Mutations update cache after DB commit (via onSuccess callbacks)
|
|
179
|
-
- Referential equality guaranteed
|
|
180
|
-
|
|
181
|
-
### Field System
|
|
16
|
+
## Links
|
|
182
17
|
|
|
183
|
-
|
|
184
|
-
- In-memory only (not persisted)
|
|
185
|
-
- Store-level defaults
|
|
186
|
-
- Single-valued and multi-valued fields
|
|
187
|
-
- Accessed via FieldService
|
|
18
|
+
- [Report an Issue or request a Feature](https://github.com/kelceyp/caw-feedback/issues)
|
|
188
19
|
|
|
189
|
-
##
|
|
20
|
+
## License
|
|
190
21
|
|
|
191
|
-
|
|
192
|
-
- `/core/README.md` - Core architecture
|
|
193
|
-
- `/core/entities/README.md` - Domain entities
|
|
194
|
-
- `/core/services/README.md` - Service layer
|
|
195
|
-
- `/core/stores/README.md` - Data access layer
|
|
196
|
-
- `/api/README.md` - REST API routes
|
|
197
|
-
- `/db/README.md` - Database layer
|
|
198
|
-
- `/test/README.md` - Testing guide
|
|
22
|
+
Proprietary. All rights reserved.
|
package/dist/cli.js
CHANGED
|
@@ -10142,14 +10142,17 @@ var create73 = ({ httpClient }) => {
|
|
|
10142
10142
|
};
|
|
10143
10143
|
var cancel_resume_default = Object.freeze({ create: create73 });
|
|
10144
10144
|
|
|
10145
|
-
// src/commands/
|
|
10145
|
+
// src/commands/bundle/list.js
|
|
10146
10146
|
var create74 = ({ httpClient }) => {
|
|
10147
|
-
return createCommand("list").summary("List available
|
|
10148
|
-
const { sid } = ctx.params;
|
|
10147
|
+
return createCommand("list").summary("List available bundles").param((p) => p.name("sid").type("string").flag("sid", "s").required()).param((p) => p.name("store").type("string").flag("store")).run(async (ctx) => {
|
|
10148
|
+
const { sid, store } = ctx.params;
|
|
10149
|
+
const args = {};
|
|
10150
|
+
if (store !== undefined)
|
|
10151
|
+
args.store = store;
|
|
10149
10152
|
const result = await httpClient.post(`/cli/mcp-client/${sid}/dispatch`, {
|
|
10150
10153
|
cwd: process.cwd(),
|
|
10151
|
-
tool: "
|
|
10152
|
-
args
|
|
10154
|
+
tool: "list_bundles",
|
|
10155
|
+
args
|
|
10153
10156
|
});
|
|
10154
10157
|
ctx.stdio.stdout.write(JSON.stringify(result, null, 2) + `
|
|
10155
10158
|
`);
|
|
@@ -10157,16 +10160,32 @@ var create74 = ({ httpClient }) => {
|
|
|
10157
10160
|
};
|
|
10158
10161
|
var list_default5 = Object.freeze({ create: create74 });
|
|
10159
10162
|
|
|
10160
|
-
// src/commands/
|
|
10163
|
+
// src/commands/bundle/preview.js
|
|
10164
|
+
var splitIds = (value) => value.split(",").map((s) => s.trim()).filter((s) => s.length > 0);
|
|
10161
10165
|
var create75 = ({ httpClient }) => {
|
|
10162
|
-
return createCommand("preview").summary("Preview export").param((p) => p.name("sid").type("string").flag("sid", "s").required()).param((p) => p.name("store").type("string").flag("store")).run(async (ctx) => {
|
|
10163
|
-
const {
|
|
10164
|
-
|
|
10166
|
+
return createCommand("preview").summary("Preview a bundle export (dependency walk)").param((p) => p.name("sid").type("string").flag("sid", "s").required()).param((p) => p.name("store").type("string").flag("store")).param((p) => p.name("pickedDocIds").type("string").flag("pickedDocIds")).param((p) => p.name("pickedTemplateIds").type("string").flag("pickedTemplateIds")).param((p) => p.name("pickedTrackIds").type("string").flag("pickedTrackIds")).param((p) => p.name("pickedFolderIds").type("string").flag("pickedFolderIds")).run(async (ctx) => {
|
|
10167
|
+
const {
|
|
10168
|
+
sid,
|
|
10169
|
+
store,
|
|
10170
|
+
pickedDocIds,
|
|
10171
|
+
pickedTemplateIds,
|
|
10172
|
+
pickedTrackIds,
|
|
10173
|
+
pickedFolderIds
|
|
10174
|
+
} = ctx.params;
|
|
10175
|
+
const args = { commit: false };
|
|
10176
|
+
if (pickedDocIds !== undefined)
|
|
10177
|
+
args.pickedDocIds = splitIds(pickedDocIds);
|
|
10178
|
+
if (pickedTemplateIds !== undefined)
|
|
10179
|
+
args.pickedTemplateIds = splitIds(pickedTemplateIds);
|
|
10180
|
+
if (pickedTrackIds !== undefined)
|
|
10181
|
+
args.pickedTrackIds = splitIds(pickedTrackIds);
|
|
10182
|
+
if (pickedFolderIds !== undefined)
|
|
10183
|
+
args.pickedFolderIds = splitIds(pickedFolderIds);
|
|
10165
10184
|
if (store !== undefined)
|
|
10166
10185
|
args.store = store;
|
|
10167
10186
|
const result = await httpClient.post(`/cli/mcp-client/${sid}/dispatch`, {
|
|
10168
10187
|
cwd: process.cwd(),
|
|
10169
|
-
tool: "
|
|
10188
|
+
tool: "export_bundle",
|
|
10170
10189
|
args
|
|
10171
10190
|
});
|
|
10172
10191
|
ctx.stdio.stdout.write(JSON.stringify(result, null, 2) + `
|
|
@@ -10175,18 +10194,33 @@ var create75 = ({ httpClient }) => {
|
|
|
10175
10194
|
};
|
|
10176
10195
|
var preview_default = Object.freeze({ create: create75 });
|
|
10177
10196
|
|
|
10178
|
-
// src/commands/
|
|
10197
|
+
// src/commands/bundle/export.js
|
|
10198
|
+
var splitIds2 = (value) => value.split(",").map((s) => s.trim()).filter((s) => s.length > 0);
|
|
10179
10199
|
var create76 = ({ httpClient }) => {
|
|
10180
|
-
return createCommand("export").summary("Export
|
|
10181
|
-
const {
|
|
10182
|
-
|
|
10183
|
-
|
|
10184
|
-
|
|
10200
|
+
return createCommand("export").summary("Export a bundle (commit)").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("pickedDocIds").type("string").flag("pickedDocIds")).param((p) => p.name("pickedTemplateIds").type("string").flag("pickedTemplateIds")).param((p) => p.name("pickedTrackIds").type("string").flag("pickedTrackIds")).param((p) => p.name("pickedFolderIds").type("string").flag("pickedFolderIds")).run(async (ctx) => {
|
|
10201
|
+
const {
|
|
10202
|
+
sid,
|
|
10203
|
+
name,
|
|
10204
|
+
store,
|
|
10205
|
+
pickedDocIds,
|
|
10206
|
+
pickedTemplateIds,
|
|
10207
|
+
pickedTrackIds,
|
|
10208
|
+
pickedFolderIds
|
|
10209
|
+
} = ctx.params;
|
|
10210
|
+
const args = { commit: true, name };
|
|
10211
|
+
if (pickedDocIds !== undefined)
|
|
10212
|
+
args.pickedDocIds = splitIds2(pickedDocIds);
|
|
10213
|
+
if (pickedTemplateIds !== undefined)
|
|
10214
|
+
args.pickedTemplateIds = splitIds2(pickedTemplateIds);
|
|
10215
|
+
if (pickedTrackIds !== undefined)
|
|
10216
|
+
args.pickedTrackIds = splitIds2(pickedTrackIds);
|
|
10217
|
+
if (pickedFolderIds !== undefined)
|
|
10218
|
+
args.pickedFolderIds = splitIds2(pickedFolderIds);
|
|
10185
10219
|
if (store !== undefined)
|
|
10186
10220
|
args.store = store;
|
|
10187
10221
|
const result = await httpClient.post(`/cli/mcp-client/${sid}/dispatch`, {
|
|
10188
10222
|
cwd: process.cwd(),
|
|
10189
|
-
tool: "
|
|
10223
|
+
tool: "export_bundle",
|
|
10190
10224
|
args
|
|
10191
10225
|
});
|
|
10192
10226
|
ctx.stdio.stdout.write(JSON.stringify(result, null, 2) + `
|
|
@@ -10195,16 +10229,16 @@ var create76 = ({ httpClient }) => {
|
|
|
10195
10229
|
};
|
|
10196
10230
|
var export_default = Object.freeze({ create: create76 });
|
|
10197
10231
|
|
|
10198
|
-
// src/commands/
|
|
10232
|
+
// src/commands/bundle/import.js
|
|
10199
10233
|
var create77 = ({ httpClient }) => {
|
|
10200
|
-
return createCommand("import").summary("Import
|
|
10234
|
+
return createCommand("import").summary("Import a bundle (non-destructive)").param((p) => p.name("sid").type("string").flag("sid", "s").required()).param((p) => p.name("filename").type("string").flag("filename").required()).param((p) => p.name("store").type("string").flag("store")).run(async (ctx) => {
|
|
10201
10235
|
const { sid, filename, store } = ctx.params;
|
|
10202
10236
|
const args = { filename };
|
|
10203
10237
|
if (store !== undefined)
|
|
10204
10238
|
args.store = store;
|
|
10205
10239
|
const result = await httpClient.post(`/cli/mcp-client/${sid}/dispatch`, {
|
|
10206
10240
|
cwd: process.cwd(),
|
|
10207
|
-
tool: "
|
|
10241
|
+
tool: "import_bundle",
|
|
10208
10242
|
args
|
|
10209
10243
|
});
|
|
10210
10244
|
ctx.stdio.stdout.write(JSON.stringify(result, null, 2) + `
|
|
@@ -10213,8 +10247,26 @@ var create77 = ({ httpClient }) => {
|
|
|
10213
10247
|
};
|
|
10214
10248
|
var import_default = Object.freeze({ create: create77 });
|
|
10215
10249
|
|
|
10216
|
-
// src/commands/
|
|
10250
|
+
// src/commands/bundle/delete.js
|
|
10217
10251
|
var create78 = ({ httpClient }) => {
|
|
10252
|
+
return createCommand("delete").summary("Delete a bundle").param((p) => p.name("sid").type("string").flag("sid", "s").required()).param((p) => p.name("filename").type("string").flag("filename").required()).param((p) => p.name("store").type("string").flag("store")).run(async (ctx) => {
|
|
10253
|
+
const { sid, filename, store } = ctx.params;
|
|
10254
|
+
const args = { filename };
|
|
10255
|
+
if (store !== undefined)
|
|
10256
|
+
args.store = store;
|
|
10257
|
+
const result = await httpClient.post(`/cli/mcp-client/${sid}/dispatch`, {
|
|
10258
|
+
cwd: process.cwd(),
|
|
10259
|
+
tool: "delete_bundle",
|
|
10260
|
+
args
|
|
10261
|
+
});
|
|
10262
|
+
ctx.stdio.stdout.write(JSON.stringify(result, null, 2) + `
|
|
10263
|
+
`);
|
|
10264
|
+
}).onError({ exitCode: 1 }).build();
|
|
10265
|
+
};
|
|
10266
|
+
var delete_default6 = Object.freeze({ create: create78 });
|
|
10267
|
+
|
|
10268
|
+
// src/commands/asset/read.js
|
|
10269
|
+
var create79 = ({ httpClient }) => {
|
|
10218
10270
|
return createCommand("read").summary("Read an asset").param((p) => p.name("sid").type("string").flag("sid", "s").required()).param((p) => p.name("id").type("string").flag("id").required()).run(async (ctx) => {
|
|
10219
10271
|
const { sid, id } = ctx.params;
|
|
10220
10272
|
const result = await httpClient.post(`/cli/mcp-client/${sid}/dispatch`, {
|
|
@@ -10226,10 +10278,10 @@ var create78 = ({ httpClient }) => {
|
|
|
10226
10278
|
`);
|
|
10227
10279
|
}).onError({ exitCode: 1 }).build();
|
|
10228
10280
|
};
|
|
10229
|
-
var read_default2 = Object.freeze({ create:
|
|
10281
|
+
var read_default2 = Object.freeze({ create: create79 });
|
|
10230
10282
|
|
|
10231
10283
|
// src/commands/backfill/content-refs.js
|
|
10232
|
-
var
|
|
10284
|
+
var create80 = ({ httpClient }) => {
|
|
10233
10285
|
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) => {
|
|
10234
10286
|
const { sid, store, confirm, skipPopulated, batchSize } = ctx.params;
|
|
10235
10287
|
const args = {};
|
|
@@ -10250,10 +10302,10 @@ var create79 = ({ httpClient }) => {
|
|
|
10250
10302
|
`);
|
|
10251
10303
|
}).onError({ exitCode: 1 }).build();
|
|
10252
10304
|
};
|
|
10253
|
-
var content_refs_default = Object.freeze({ create:
|
|
10305
|
+
var content_refs_default = Object.freeze({ create: create80 });
|
|
10254
10306
|
|
|
10255
10307
|
// src/commands/embeddings/reindex.js
|
|
10256
|
-
var
|
|
10308
|
+
var create81 = ({ httpClient }) => {
|
|
10257
10309
|
return createCommand("reindex").summary("Trigger a full embedding reindex").param((p) => p.name("sid").type("string").flag("sid", "s").required()).run(async (ctx) => {
|
|
10258
10310
|
const { sid } = ctx.params;
|
|
10259
10311
|
const result = await httpClient.post(`/cli/mcp-client/${sid}/dispatch`, {
|
|
@@ -10265,13 +10317,13 @@ var create80 = ({ httpClient }) => {
|
|
|
10265
10317
|
`);
|
|
10266
10318
|
}).onError({ exitCode: 1 }).build();
|
|
10267
10319
|
};
|
|
10268
|
-
var reindex_default = Object.freeze({ create:
|
|
10320
|
+
var reindex_default = Object.freeze({ create: create81 });
|
|
10269
10321
|
|
|
10270
10322
|
// src/cli-main.js
|
|
10271
10323
|
var CAW_URL = process.env.CAW_URL || "http://localhost:2229";
|
|
10272
10324
|
try {
|
|
10273
10325
|
const httpClient = http_client_default.create({ baseUrl: CAW_URL });
|
|
10274
|
-
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(get_field_default.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(change_track_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 })).command(cancel_resume_default.create({ httpClient })).build()).group(createCommandGroup("
|
|
10326
|
+
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(get_field_default.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(change_track_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 })).command(cancel_resume_default.create({ httpClient })).build()).group(createCommandGroup("bundle").summary("Bundle operations").command(list_default5.create({ httpClient })).command(preview_default.create({ httpClient })).command(export_default.create({ httpClient })).command(import_default.create({ httpClient })).command(delete_default6.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()).group(createCommandGroup("embeddings").summary("Embedding operations").command(reindex_default.create({ httpClient })).build());
|
|
10275
10327
|
await app.run(process.argv.slice(2));
|
|
10276
10328
|
} catch (error) {
|
|
10277
10329
|
console.error(`Error: ${error.message}`);
|