@@ -47,29 +47,28 @@ test "e2e order-ticket: register, protocol, hash, mount, query, unmount" {
4747 // --- Step 1: Init ---
4848 try std .testing .expectEqual (@as (c_int , 0 ), catalogue .boj_catalogue_init ());
4949
50- // --- Step 2: Register 4 cartridges with status=ready ---
50+ // --- Step 2: Register core cartridges with status=ready ---
5151 // database-mcp domain=database(3)
5252 // fleet-mcp domain=fleet_dom(12)
5353 // nesy-mcp domain=nesy_dom(13)
54- // agent-mcp domain=cloud(1)
55- const idx_database = registerReady ("database-mcp" , 3 );
56- const idx_fleet = registerReady ("fleet-mcp" , 12 );
57- const idx_nesy = registerReady ("nesy-mcp" , 13 );
58- const idx_agent = registerReady ("agent-mcp" , 1 );
59-
60- try std .testing .expectEqual (@as (usize , 4 ), catalogue .boj_catalogue_count ());
61- try std .testing .expectEqual (@as (usize , 4 ), catalogue .boj_catalogue_count_ready ());
54+ // agent-mcp domain=agent(14)
55+ // lsp-mcp domain=lsp(15)
56+ // dap-mcp domain=dap(16)
57+ // bsp-mcp domain=bsp(17)
58+ _ = registerReady ("database-mcp" , 3 );
59+ _ = registerReady ("fleet-mcp" , 12 );
60+ _ = registerReady ("nesy-mcp" , 13 );
61+ _ = registerReady ("agent-mcp" , 14 );
62+ _ = registerReady ("lsp-mcp" , 15 );
63+ _ = registerReady ("dap-mcp" , 16 );
64+ _ = registerReady ("bsp-mcp" , 17 );
65+
66+ try std .testing .expectEqual (@as (usize , 7 ), catalogue .boj_catalogue_count ());
67+ try std .testing .expectEqual (@as (usize , 7 ), catalogue .boj_catalogue_count_ready ());
6268
6369 // --- Step 3: Add protocols matching V adapter builtins ---
64- // database-mcp: mcp(1)
65- // fleet-mcp: mcp(1), fleet(7)
66- // nesy-mcp: mcp(1), nesy(5)
67- // agent-mcp: mcp(1), agentic(6)
68- //
6970 // boj_catalogue_add_protocol applies to the *last* registered cartridge,
7071 // so we re-register in order and add protocols right after each.
71- // Since we already registered above, we re-init and redo to keep the
72- // add_protocol calls adjacent to registration.
7372 catalogue .boj_catalogue_deinit ();
7473 try std .testing .expectEqual (@as (c_int , 0 ), catalogue .boj_catalogue_init ());
7574
@@ -110,26 +109,31 @@ test "e2e order-ticket: register, protocol, hash, mount, query, unmount" {
110109 const name = "agent-mcp" ;
111110 const ver = "1.0.0" ;
112111 try std .testing .expectEqual (@as (c_int , 0 ), catalogue .boj_catalogue_register (
113- name .ptr , name .len , ver .ptr , ver .len , 1 , 0 , 1 ,
112+ name .ptr , name .len , ver .ptr , ver .len , 1 , 0 , 14 ,
114113 ));
115114 try std .testing .expectEqual (@as (c_int , 0 ), catalogue .boj_catalogue_add_protocol (1 )); // mcp
116115 try std .testing .expectEqual (@as (c_int , 0 ), catalogue .boj_catalogue_add_protocol (6 )); // agentic
117116 }
118117
119- try std .testing .expectEqual (@as (usize , 4 ), catalogue .boj_catalogue_count ());
120- try std .testing .expectEqual (@as (usize , 4 ), catalogue .boj_catalogue_count_ready ());
118+ // lsp-mcp
119+ {
120+ const name = "lsp-mcp" ;
121+ const ver = "1.0.0" ;
122+ try std .testing .expectEqual (@as (c_int , 0 ), catalogue .boj_catalogue_register (
123+ name .ptr , name .len , ver .ptr , ver .len , 1 , 0 , 15 ,
124+ ));
125+ try std .testing .expectEqual (@as (c_int , 0 ), catalogue .boj_catalogue_add_protocol (2 )); // lsp
126+ }
127+
128+ try std .testing .expectEqual (@as (usize , 5 ), catalogue .boj_catalogue_count ());
129+ try std .testing .expectEqual (@as (usize , 5 ), catalogue .boj_catalogue_count_ready ());
121130
122131 // Indices after fresh registration sequence:
123132 const db_idx : usize = 0 ; // database-mcp
124133 const fl_idx : usize = 1 ; // fleet-mcp
125134 const ne_idx : usize = 2 ; // nesy-mcp
126135 const ag_idx : usize = 3 ; // agent-mcp
127-
128- // Suppress unused variable warnings from the first registration pass.
129- _ = idx_database ;
130- _ = idx_fleet ;
131- _ = idx_nesy ;
132- _ = idx_agent ;
136+ const ls_idx : usize = 4 ; // lsp-mcp
133137
134138 // --- Step 4: Set hash attestation on database-mcp ---
135139 const fake_hash = "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2" ;
@@ -144,40 +148,44 @@ test "e2e order-ticket: register, protocol, hash, mount, query, unmount" {
144148 try std .testing .expectEqual (fake_hash .len , hash_len );
145149 try std .testing .expectEqualSlices (u8 , fake_hash , hash_buf [0.. hash_len ]);
146150
147- // --- Step 5: Mount 3 cartridges (simulate an order) ---
148- // Mount database-mcp, fleet-mcp, nesy-mcp (leave agent-mcp unmounted).
151+ // --- Step 5: Mount 4 cartridges (simulate an order) ---
152+ // Mount database-mcp, fleet-mcp, nesy-mcp, lsp-mcp (leave agent-mcp unmounted).
149153 try std .testing .expectEqual (@as (c_int , 0 ), catalogue .boj_catalogue_mount (db_idx ));
150154 try std .testing .expectEqual (@as (c_int , 0 ), catalogue .boj_catalogue_mount (fl_idx ));
151155 try std .testing .expectEqual (@as (c_int , 0 ), catalogue .boj_catalogue_mount (ne_idx ));
156+ try std .testing .expectEqual (@as (c_int , 0 ), catalogue .boj_catalogue_mount (ls_idx ));
152157
153- // --- Step 6: Verify mounted count is 3 ---
154- try std .testing .expectEqual (@as (usize , 3 ), catalogue .boj_catalogue_count_mounted ());
158+ // --- Step 6: Verify mounted count is 4 ---
159+ try std .testing .expectEqual (@as (usize , 4 ), catalogue .boj_catalogue_count_mounted ());
155160
156161 // --- Step 7: Verify each mounted cartridge via is_mounted ---
157162 try std .testing .expectEqual (@as (c_int , 1 ), catalogue .boj_catalogue_is_mounted (db_idx ));
158163 try std .testing .expectEqual (@as (c_int , 1 ), catalogue .boj_catalogue_is_mounted (fl_idx ));
159164 try std .testing .expectEqual (@as (c_int , 1 ), catalogue .boj_catalogue_is_mounted (ne_idx ));
165+ try std .testing .expectEqual (@as (c_int , 1 ), catalogue .boj_catalogue_is_mounted (ls_idx ));
160166 try std .testing .expectEqual (@as (c_int , 0 ), catalogue .boj_catalogue_is_mounted (ag_idx )); // not mounted
161167
162168 // --- Step 8: Query catalogue to verify counts ---
163- try std .testing .expectEqual (@as (usize , 4 ), catalogue .boj_catalogue_count ());
164- try std .testing .expectEqual (@as (usize , 4 ), catalogue .boj_catalogue_count_ready ());
165- try std .testing .expectEqual (@as (usize , 3 ), catalogue .boj_catalogue_count_mounted ());
169+ try std .testing .expectEqual (@as (usize , 5 ), catalogue .boj_catalogue_count ());
170+ try std .testing .expectEqual (@as (usize , 5 ), catalogue .boj_catalogue_count_ready ());
171+ try std .testing .expectEqual (@as (usize , 4 ), catalogue .boj_catalogue_count_mounted ());
166172
167173 // Verify statuses by index.
168174 try std .testing .expectEqual (@as (c_int , 1 ), catalogue .boj_catalogue_status (db_idx )); // ready
169175 try std .testing .expectEqual (@as (c_int , 1 ), catalogue .boj_catalogue_status (fl_idx )); // ready
170176 try std .testing .expectEqual (@as (c_int , 1 ), catalogue .boj_catalogue_status (ne_idx )); // ready
171177 try std .testing .expectEqual (@as (c_int , 1 ), catalogue .boj_catalogue_status (ag_idx )); // ready
178+ try std .testing .expectEqual (@as (c_int , 1 ), catalogue .boj_catalogue_status (ls_idx )); // ready
172179
173180 // --- Step 9: Unmount one cartridge ---
174181 try std .testing .expectEqual (@as (c_int , 0 ), catalogue .boj_catalogue_unmount (fl_idx ));
175182
176- // --- Step 10: Verify mounted count drops to 2 ---
177- try std .testing .expectEqual (@as (usize , 2 ), catalogue .boj_catalogue_count_mounted ());
183+ // --- Step 10: Verify mounted count drops to 3 ---
184+ try std .testing .expectEqual (@as (usize , 3 ), catalogue .boj_catalogue_count_mounted ());
178185 try std .testing .expectEqual (@as (c_int , 0 ), catalogue .boj_catalogue_is_mounted (fl_idx ));
179186 try std .testing .expectEqual (@as (c_int , 1 ), catalogue .boj_catalogue_is_mounted (db_idx )); // still up
180187 try std .testing .expectEqual (@as (c_int , 1 ), catalogue .boj_catalogue_is_mounted (ne_idx )); // still up
188+ try std .testing .expectEqual (@as (c_int , 1 ), catalogue .boj_catalogue_is_mounted (ls_idx )); // still up
181189
182190 // --- Step 11: Deinit ---
183191 catalogue .boj_catalogue_deinit ();
0 commit comments