@softize/opus 25.6.0 → 25.7.0

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.
@@ -27,6 +27,9 @@ export type { DocEntry, DocGroup, DocSection } from "./types.ts";
27
27
 
28
28
  // — Conceituais (Começar/Framework/Design/Introdução) —
29
29
  import gettingStartedMd from "./content/getting-started.md?raw";
30
+ import overviewMd from "./content/overview.md?raw";
31
+ import installationMd from "./content/installation.md?raw";
32
+ import documentationPortalMd from "./content/documentation-portal.md?raw";
30
33
  import upgradingMd from "./content/upgrading.md?raw";
31
34
  import cycleMd from "./content/cycle.md?raw";
32
35
  import authMd from "./content/auth.md?raw";
@@ -149,8 +152,8 @@ export const iconScope: Record<string, unknown> = Object.fromEntries(
149
152
  );
150
153
 
151
154
  /** Página conceitual (Começar/Framework/Design/Intro): markdown direto (o H1/lead moram no md). */
152
- const doc = (content: string) => (): React.ReactElement => (
153
- <DocMarkdown content={content} scope={iconScope} />
155
+ const doc = (content: string, codeCollapsible = true) => (): React.ReactElement => (
156
+ <DocMarkdown content={content} scope={iconScope} codeCollapsible={codeCollapsible} />
154
157
  );
155
158
 
156
159
  /**
@@ -217,127 +220,206 @@ function UiRedirect(): React.ReactElement {
217
220
  );
218
221
  }
219
222
 
220
- /** As seções da doc do SDK (surface `/docs` do site). "Começar" fica na RAIZ (seção sem
221
- * label); depois o Protocolo (núcleo invariante) e os Recursos (peças opt-in). */
223
+ /** O percurso documental do SDK agrupa páginas pelo trabalho de quem consulta. */
222
224
  export const PROTOCOL_SECTIONS: DocSection[] = [
223
225
  {
224
- // Sem label → páginas soltas no topo do menu (sem cabeçalho de seção).
225
- label: "",
226
+ label: "Introdução",
226
227
  groups: [
227
228
  {
228
229
  pages: [
229
230
  {
230
- slug: "getting-started",
231
- title: "Primeiros passos",
232
- render: doc(gettingStartedMd),
231
+ slug: "overview",
232
+ title: "Visão geral",
233
+ searchText: overviewMd,
234
+ render: doc(overviewMd, false),
233
235
  },
234
- { slug: "cycle", title: "Evolução contínua", render: doc(cycleMd) },
235
236
  {
236
- slug: "upgrading",
237
- title: "Atualizar o Opus",
238
- render: doc(upgradingMd),
237
+ slug: "installation",
238
+ title: "Instalação",
239
+ searchText: installationMd,
240
+ render: doc(installationMd, false),
241
+ },
242
+ {
243
+ slug: "getting-started",
244
+ title: "Primeiros passos",
245
+ searchText: gettingStartedMd,
246
+ render: doc(gettingStartedMd, false),
239
247
  },
240
248
  ],
241
249
  },
242
250
  ],
243
251
  },
244
252
  {
245
- // O núcleo invariante do protocolo — uma página por recurso. Opus é protocolo + peças
246
- // opcionais entregues como SDK (não Framework: a inversão de controle é do app).
247
- label: "Protocolo",
253
+ label: "Conceitos fundamentais",
248
254
  groups: [
249
255
  {
250
256
  pages: [
251
257
  {
252
258
  slug: "actions",
253
- title: "Actions & contratos",
259
+ title: "Actions e contratos",
260
+ searchText: actionsMd,
254
261
  render: doc(actionsMd),
255
262
  },
256
263
  {
257
264
  slug: "runtime",
258
- title: "Runtime & adapters",
265
+ title: "Runtime e adapters",
266
+ searchText: runtimeMd,
259
267
  render: doc(runtimeMd),
260
268
  },
261
- { slug: "data", title: "Camada de dados", render: doc(dataMd) },
269
+ {
270
+ slug: "data",
271
+ title: "Camada de dados",
272
+ searchText: dataMd,
273
+ render: doc(dataMd),
274
+ },
262
275
  {
263
276
  slug: "data-products",
264
277
  title: "Produtos de Dados",
278
+ searchText: dataProductsMd,
265
279
  render: doc(dataProductsMd),
266
280
  },
267
- {
268
- slug: "testing",
269
- title: "Testes de action",
270
- render: doc(testingMd),
271
- },
272
- { slug: "cli", title: "CLI opus", render: doc(cliMd) },
273
281
  ],
274
282
  },
275
283
  ],
276
284
  },
277
285
  {
278
- // As peças OPT-IN que você liga (adapter + driver). A UI também é recurso do SDK, mas
279
- // com catálogo próprio — a entrada 'ui' redireciona pra superfície /ui.
280
- label: "Recursos",
286
+ label: "Integrações",
281
287
  groups: [
282
288
  {
283
289
  pages: [
284
290
  {
285
291
  slug: "auth",
286
292
  title: "Autenticação",
287
- badge: "auth",
293
+ searchText: authMd,
288
294
  render: doc(authMd),
289
295
  },
290
296
  {
291
- slug: "audit",
292
- title: "Auditoria",
293
- badge: "audit",
294
- render: doc(auditMd),
297
+ slug: "ai",
298
+ title: "IA generativa",
299
+ searchText: aiMd,
300
+ render: doc(aiMd),
301
+ },
302
+ {
303
+ slug: "mcp",
304
+ title: "MCP",
305
+ searchText: mcpMd,
306
+ render: doc(mcpMd),
295
307
  },
308
+ { slug: "ui", title: "Interface com Opus ↗", render: () => <UiRedirect /> },
309
+ {
310
+ slug: "documentation-portal",
311
+ title: "Publicação de documentação",
312
+ searchText: documentationPortalMd,
313
+ render: doc(documentationPortalMd, false),
314
+ },
315
+ ],
316
+ },
317
+ ],
318
+ },
319
+ {
320
+ label: "Automação",
321
+ groups: [
322
+ {
323
+ pages: [
296
324
  {
297
325
  slug: "events",
298
326
  title: "Eventos",
299
- badge: "events",
327
+ searchText: eventsMd,
300
328
  render: doc(eventsMd),
301
329
  },
302
- { slug: "log", title: "Log", badge: "log", render: doc(logMd) },
303
- {
304
- slug: "observability",
305
- title: "Observabilidade",
306
- badge: "observability",
307
- render: doc(observabilityMd),
308
- },
309
330
  {
310
331
  slug: "queue",
311
332
  title: "Filas",
312
- badge: "queue",
333
+ searchText: queueMd,
313
334
  render: doc(queueMd),
314
335
  },
315
336
  {
316
337
  slug: "executions",
317
- title: "Acompanhamento de execuções",
318
- badge: "executions",
338
+ title: "Execuções",
339
+ searchText: executionsMd,
319
340
  render: doc(executionsMd),
320
341
  },
321
342
  {
322
343
  slug: "scheduler",
323
344
  title: "Agendador",
324
- badge: "scheduler",
345
+ searchText: schedulerMd,
325
346
  render: doc(schedulerMd),
326
347
  },
348
+ ],
349
+ },
350
+ ],
351
+ },
352
+ {
353
+ label: "Operação",
354
+ groups: [
355
+ {
356
+ pages: [
357
+ {
358
+ slug: "audit",
359
+ title: "Auditoria",
360
+ searchText: auditMd,
361
+ render: doc(auditMd),
362
+ },
363
+ {
364
+ slug: "observability",
365
+ title: "Observabilidade",
366
+ searchText: observabilityMd,
367
+ render: doc(observabilityMd),
368
+ },
369
+ {
370
+ slug: "log",
371
+ title: "Log",
372
+ searchText: logMd,
373
+ render: doc(logMd),
374
+ },
327
375
  {
328
376
  slug: "storage",
329
377
  title: "Armazenamento",
330
- badge: "storage",
378
+ searchText: storageMd,
331
379
  render: doc(storageMd),
332
380
  },
381
+ ],
382
+ },
383
+ ],
384
+ },
385
+ {
386
+ label: "Testes e evolução",
387
+ groups: [
388
+ {
389
+ pages: [
333
390
  {
334
- slug: "ai",
335
- title: "IA generativa",
336
- badge: "ai",
337
- render: doc(aiMd),
391
+ slug: "testing",
392
+ title: "Testes de actions",
393
+ searchText: testingMd,
394
+ render: doc(testingMd),
395
+ },
396
+ {
397
+ slug: "upgrading",
398
+ title: "Atualização do Opus",
399
+ searchText: upgradingMd,
400
+ render: doc(upgradingMd),
401
+ },
402
+ {
403
+ slug: "cycle",
404
+ title: "Evolução contínua",
405
+ searchText: cycleMd,
406
+ render: doc(cycleMd),
407
+ },
408
+ ],
409
+ },
410
+ ],
411
+ },
412
+ {
413
+ label: "Referência",
414
+ groups: [
415
+ {
416
+ pages: [
417
+ {
418
+ slug: "cli",
419
+ title: "CLI",
420
+ searchText: cliMd,
421
+ render: doc(cliMd),
338
422
  },
339
- { slug: "mcp", title: "MCP", badge: "mcp", render: doc(mcpMd) },
340
- { slug: "ui", title: "UI ↗", render: () => <UiRedirect /> },
341
423
  ],
342
424
  },
343
425
  ],
@@ -348,8 +430,7 @@ export const PROTOCOL_SECTIONS: DocSection[] = [
348
430
  * patterns. Mesma família das seções de protocolo — superfície própria só pelo volume. */
349
431
  export const UI_SECTIONS: DocSection[] = [
350
432
  {
351
- // Raiz (sem label): o "getting started" da UI.
352
- label: "",
433
+ label: "Introdução",
353
434
  groups: [
354
435
  {
355
436
  pages: [
@@ -798,16 +879,20 @@ export const UI_SECTIONS: DocSection[] = [
798
879
  ];
799
880
 
800
881
  /** O catálogo INTEIRO (compat): Maestro (lente) e `/__docs` mostram tudo numa nav só —
801
- * inclusive o changelog, que no SITE é página do menu superior (fora destas seções);
882
+ * inclusive o changelog, que no site é um destino global fora dos capítulos;
802
883
  * o site divide em duas superfícies de navegação do mesmo SDK (PROTOCOL_SECTIONS em /docs,
803
- * UI_SECTIONS em /ui). */
884
+ * UI_SECTIONS em /ui). Mantém Primeiros passos como a página inicial histórica. */
804
885
  export const DOC_SECTIONS: DocSection[] = [
805
886
  {
806
887
  ...PROTOCOL_SECTIONS[0]!,
888
+ label: "",
807
889
  groups: [
808
890
  {
809
891
  pages: [
810
- ...PROTOCOL_SECTIONS[0]!.groups[0]!.pages,
892
+ ...["getting-started", "cycle", "upgrading"].map((slug) =>
893
+ PROTOCOL_SECTIONS.flatMap((section) => section.groups.flatMap((group) => group.pages))
894
+ .find((page) => page.slug === slug)!,
895
+ ),
811
896
  {
812
897
  slug: "changelog",
813
898
  title: "Changelog",
@@ -815,16 +900,21 @@ export const DOC_SECTIONS: DocSection[] = [
815
900
  },
816
901
  ],
817
902
  },
903
+ {
904
+ label: "Introdução ao SDK",
905
+ pages: PROTOCOL_SECTIONS[0]!.groups[0]!.pages.filter((page) => page.slug !== "getting-started"),
906
+ },
818
907
  ],
819
908
  },
820
909
  // A união (/__docs, lente do Maestro) mostra tudo numa nav só e NÃO tem a superfície /ui
821
910
  // à parte — então tira a entrada-redirect 'ui' (o catálogo já entra via UI_SECTIONS).
822
911
  ...PROTOCOL_SECTIONS.slice(1).map((s) => ({
823
912
  ...s,
913
+ label: s.label === "Testes e evolução" ? "Testes" : s.label,
824
914
  groups: s.groups.map((g) => ({
825
915
  ...g,
826
- pages: g.pages.filter((p) => p.slug !== "ui"),
916
+ pages: g.pages.filter((p) => !["ui", "cycle", "upgrading"].includes(p.slug)),
827
917
  })),
828
918
  })),
829
- ...UI_SECTIONS,
919
+ ...UI_SECTIONS.map((section, index) => index === 0 ? { ...section, label: "Introdução à UI" } : section),
830
920
  ];
@@ -3,6 +3,8 @@ import type * as React from 'react'
3
3
  export interface DocEntry {
4
4
  slug: string
5
5
  title: string
6
+ /** Rótulo curto para o menu; preserva o título completo na leitura e na busca. */
7
+ navigationTitle?: string
6
8
  /** Tag técnica opcional exibida na navegação ao lado do título. */
7
9
  badge?: string
8
10
  /** Texto adicional consultado pela busca. Não é apresentado na navegação. */