@@ -115,6 +115,13 @@ describe("plugins marketplace entries", () => {
115115 } ,
116116 savedAt : "2026-06-23T01:02:03.000Z" ,
117117 } ,
118+ trust : {
119+ mode : "signed" ,
120+ signedBy : "acme-root-2026" ,
121+ signatureCount : 1 ,
122+ threshold : 1 ,
123+ verifiedAt : "2026-06-23T01:02:03.000Z" ,
124+ } ,
118125 error : "hosted catalog feed offline mode" ,
119126 } ) ;
120127
@@ -129,6 +136,13 @@ describe("plugins marketplace entries", () => {
129136 expect . objectContaining ( {
130137 source : "hosted-snapshot" ,
131138 entryCount : 1 ,
139+ trust : {
140+ mode : "signed" ,
141+ signedBy : "acme-root-2026" ,
142+ signatureCount : 1 ,
143+ threshold : 1 ,
144+ verifiedAt : "2026-06-23T01:02:03.000Z" ,
145+ } ,
132146 entries : [
133147 expect . objectContaining ( {
134148 id : "acme-calendar" ,
@@ -213,6 +227,53 @@ describe("plugins marketplace entries", () => {
213227 expect ( mocks . defaultRuntime . exit ) . not . toHaveBeenCalled ( ) ;
214228 } ) ;
215229
230+ it ( "prints bounded signed feed trust state in text output" , async ( ) => {
231+ mocks . getRuntimeConfig . mockReturnValue ( { } ) ;
232+ mocks . loadConfiguredHostedOfficialExternalPluginCatalogEntries . mockResolvedValue ( {
233+ source : "hosted-snapshot" ,
234+ entries : [ ] ,
235+ feed : {
236+ schemaVersion : 1 ,
237+ id : "acme-marketplace" ,
238+ generatedAt : "2026-06-23T00:00:00.000Z" ,
239+ sequence : 7 ,
240+ entries : [ ] ,
241+ } ,
242+ metadata : {
243+ url : "https://packages.acme.example/openclaw/feed" ,
244+ status : 200 ,
245+ checksum : "feed-sha" ,
246+ } ,
247+ snapshot : {
248+ body : "{}" ,
249+ metadata : {
250+ url : "https://packages.acme.example/openclaw/feed" ,
251+ status : 200 ,
252+ checksum : "feed-sha" ,
253+ } ,
254+ savedAt : "2026-06-23T01:02:03.000Z" ,
255+ } ,
256+ trust : {
257+ mode : "signed" ,
258+ signedBy : "acme-root-2026" ,
259+ signatureCount : 1 ,
260+ threshold : 1 ,
261+ verifiedAt : "2026-06-23T01:02:03.000Z" ,
262+ } ,
263+ error : "hosted catalog feed offline mode" ,
264+ } ) ;
265+
266+ const { runPluginMarketplaceEntriesCommand } = await import ( "./plugins-cli.runtime.js" ) ;
267+ await runPluginMarketplaceEntriesCommand ( { offline : true } ) ;
268+
269+ const output = mocks . defaultRuntime . log . mock . calls . map ( ( [ value ] ) => String ( value ) ) . join ( "\n" ) ;
270+ expect ( output ) . toContain ( "Trust:" ) ;
271+ expect ( output ) . toContain ( "signed by acme-root-2026 (1/1)" ) ;
272+ expect ( output ) . toContain ( "2026-06-23T01:02:03.000Z" ) ;
273+ expect ( output ) . not . toContain ( "publicKey" ) ;
274+ expect ( output ) . not . toContain ( "signature:" ) ;
275+ } ) ;
276+
216277 it ( "emits bounded diagnostics for feed entry listing" , async ( ) => {
217278 const timelinePath = await createTimelinePath ( ) ;
218279 vi . stubEnv ( "OPENCLAW_DIAGNOSTICS" , "1" ) ;
@@ -247,6 +308,13 @@ describe("plugins marketplace entries", () => {
247308 } ,
248309 savedAt : "2026-06-23T01:02:03.000Z" ,
249310 } ,
311+ trust : {
312+ mode : "signed" ,
313+ signedBy : "acme-root-2026" ,
314+ signatureCount : 1 ,
315+ threshold : 1 ,
316+ verifiedAt : "2026-06-23T01:02:03.000Z" ,
317+ } ,
250318 error : "hosted catalog feed offline mode" ,
251319 } ) ;
252320
@@ -263,6 +331,10 @@ describe("plugins marketplace entries", () => {
263331 feedIdPresent : true ,
264332 feedProfileProvided : true ,
265333 feedSequence : 7 ,
334+ feedTrustMode : "signed" ,
335+ feedTrustSignatureCount : 1 ,
336+ feedTrustThreshold : 1 ,
337+ feedTrustVerified : true ,
266338 offline : true ,
267339 payloadChecksumPresent : true ,
268340 snapshotUsed : true ,
@@ -271,6 +343,7 @@ describe("plugins marketplace entries", () => {
271343 expect ( JSON . stringify ( event ) ) . not . toContain ( "packages.acme.example" ) ;
272344 expect ( JSON . stringify ( event ) ) . not . toContain ( "acme-marketplace" ) ;
273345 expect ( JSON . stringify ( event ) ) . not . toContain ( "feed-sha" ) ;
346+ expect ( JSON . stringify ( event ) ) . not . toContain ( "acme-root-2026" ) ;
274347 expect ( JSON . stringify ( event ) ) . not . toContain ( "secret" ) ;
275348 expect ( JSON . stringify ( event ) ) . not . toContain ( "token=leak" ) ;
276349 } ) ;
0 commit comments