@stigmer/server 3.19.0 → 3.20.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.
Files changed (72) hide show
  1. package/dist/authorization/model/index.d.ts +1 -1
  2. package/dist/authorization/model/index.d.ts.map +1 -1
  3. package/dist/authorization/model/index.js +0 -2
  4. package/dist/authorization/model/index.js.map +1 -1
  5. package/dist/authorization/model/organization.d.ts.map +1 -1
  6. package/dist/authorization/model/organization.js +0 -1
  7. package/dist/authorization/model/organization.js.map +1 -1
  8. package/dist/boot/compose.d.ts.map +1 -1
  9. package/dist/boot/compose.js +2 -15
  10. package/dist/boot/compose.js.map +1 -1
  11. package/dist/boot/inprocess.d.ts +2 -13
  12. package/dist/boot/inprocess.d.ts.map +1 -1
  13. package/dist/boot/inprocess.js +6 -16
  14. package/dist/boot/inprocess.js.map +1 -1
  15. package/dist/domain/workflow/registry/data/task-kind-registry.json +0 -1
  16. package/dist/pipeline/interceptors/auth.d.ts +1 -1
  17. package/dist/pipeline/interceptors/auth.js +1 -1
  18. package/dist/query/search/registry.d.ts +3 -5
  19. package/dist/query/search/registry.d.ts.map +1 -1
  20. package/dist/query/search/registry.js +3 -7
  21. package/dist/query/search/registry.js.map +1 -1
  22. package/dist/store/postgres/migrations.d.ts +3 -1
  23. package/dist/store/postgres/migrations.d.ts.map +1 -1
  24. package/dist/store/postgres/migrations.js +19 -1
  25. package/dist/store/postgres/migrations.js.map +1 -1
  26. package/dist/store/sqlite/migrations.d.ts +3 -1
  27. package/dist/store/sqlite/migrations.d.ts.map +1 -1
  28. package/dist/store/sqlite/migrations.js +22 -1
  29. package/dist/store/sqlite/migrations.js.map +1 -1
  30. package/package.json +6 -6
  31. package/src/authorization/__tests__/derived-tuples.test.ts +1 -1
  32. package/src/authorization/__tests__/fixtures/fga/org-admin-owner-inheritance.fga.yaml +6 -6
  33. package/src/authorization/__tests__/wire-permissions.test.ts +0 -1
  34. package/src/authorization/model/__tests__/registry.test.ts +0 -9
  35. package/src/authorization/model/index.ts +1 -3
  36. package/src/authorization/model/organization.ts +0 -1
  37. package/src/boot/compose.ts +2 -15
  38. package/src/boot/inprocess.ts +8 -29
  39. package/src/domain/iampolicy/__tests__/role-lifecycle.test.ts +0 -1
  40. package/src/domain/workflow/registry/data/task-kind-registry.json +0 -1
  41. package/src/pipeline/__tests__/router-transport.test.ts +1 -1
  42. package/src/pipeline/interceptors/auth.ts +1 -1
  43. package/src/query/__tests__/query-services.test.ts +16 -18
  44. package/src/query/search/__tests__/criteria.test.ts +3 -6
  45. package/src/query/search/__tests__/query-store.test.ts +21 -21
  46. package/src/query/search/registry.ts +3 -7
  47. package/src/store/postgres/__tests__/migrations.test.ts +23 -4
  48. package/src/store/postgres/migrations.ts +20 -1
  49. package/src/store/sqlite/__tests__/migrations.test.ts +26 -2
  50. package/src/store/sqlite/migrations.ts +23 -1
  51. package/dist/authorization/model/project.d.ts +0 -2
  52. package/dist/authorization/model/project.d.ts.map +0 -1
  53. package/dist/authorization/model/project.js +0 -32
  54. package/dist/authorization/model/project.js.map +0 -1
  55. package/dist/domain/project/controller.d.ts +0 -48
  56. package/dist/domain/project/controller.d.ts.map +0 -1
  57. package/dist/domain/project/controller.js +0 -192
  58. package/dist/domain/project/controller.js.map +0 -1
  59. package/dist/domain/project/reconcile.d.ts +0 -77
  60. package/dist/domain/project/reconcile.d.ts.map +0 -1
  61. package/dist/domain/project/reconcile.js +0 -179
  62. package/dist/domain/project/reconcile.js.map +0 -1
  63. package/dist/domain/project/search-extractor.d.ts +0 -3
  64. package/dist/domain/project/search-extractor.d.ts.map +0 -1
  65. package/dist/domain/project/search-extractor.js +0 -43
  66. package/dist/domain/project/search-extractor.js.map +0 -1
  67. package/src/authorization/model/project.ts +0 -47
  68. package/src/domain/project/__tests__/project.composed.test.ts +0 -381
  69. package/src/domain/project/__tests__/reconcile.test.ts +0 -447
  70. package/src/domain/project/controller.ts +0 -387
  71. package/src/domain/project/reconcile.ts +0 -296
  72. package/src/domain/project/search-extractor.ts +0 -71
@@ -1,71 +0,0 @@
1
- /**
2
- * Project search extractor — ports pkg/query/search/extractor/
3
- * project_extractor.go (both sides; the search summary is
4
- * spec.description).
5
- *
6
- * Written by #14 (sp.search-and-activity) under ratified DD-D: boot
7
- * RebuildIndex re-indexes every registered kind from the resources table,
8
- * and an adopted Go database may already hold projects — without the
9
- * query side those rows would silently vanish from search. #16
10
- * (sp.project) merged first with the index-only half of this file and
11
- * wired it into the domain's write pipelines (IndexSearch/
12
- * DeleteSearchIndex steps); the #14 merge reconciled to this
13
- * full-contract version per the coordination note both PRs carried —
14
- * getSearchIndexEntry is byte-identical to #16's, so the domain's write
15
- * path is unchanged.
16
- */
17
- import type { Message } from "@bufbuild/protobuf";
18
-
19
- import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
20
- import { ApiResourceVisibility } from "@stigmer/protos/ai/stigmer/commons/apiresource/enum_pb";
21
- import type { SearchResult } from "@stigmer/protos/ai/stigmer/search/v1/io_pb";
22
- import { ProjectSchema } from "@stigmer/protos/ai/stigmer/tenancy/project/v1/api_pb";
23
- import type { Project } from "@stigmer/protos/ai/stigmer/tenancy/project/v1/api_pb";
24
-
25
- import type { SearchIndexEntry } from "../../store/interface.js";
26
- import { buildSearchResult } from "../../query/search/extractor.js";
27
- import type { SearchableExtractor } from "../../query/search/extractor.js";
28
-
29
- export const projectSearchExtractor: SearchableExtractor = {
30
- kind: ApiResourceKind.project,
31
- schema: ProjectSchema,
32
-
33
- getSearchSummary(resource: Message): string {
34
- // Go ProjectExtractor.GetSearchSummary: spec.description.
35
- const project = resource as unknown as Project;
36
- return project.spec?.description ?? "";
37
- },
38
-
39
- toSearchResult(resource: Message, score: number): SearchResult | undefined {
40
- const project = resource as unknown as Project;
41
- return buildSearchResult({
42
- kind: ApiResourceKind.project,
43
- metadata: project.metadata,
44
- summary: project.spec?.description ?? "",
45
- score,
46
- createdAt: project.status?.audit?.specAudit?.createdAt,
47
- updatedAt: project.status?.audit?.specAudit?.updatedAt,
48
- });
49
- },
50
-
51
- getSearchIndexEntry(resource: Message): SearchIndexEntry | undefined {
52
- const project = resource as unknown as Project;
53
- const metadata = project.metadata;
54
- if (metadata === undefined) {
55
- return undefined;
56
- }
57
- return {
58
- name: metadata.name,
59
- description: project.spec?.description ?? "",
60
- // Tags join space-separated — the index entry carries one tags
61
- // string (Go extractor.JoinTags).
62
- tags: metadata.tags.join(" "),
63
- org: metadata.org,
64
- // The enum NAME string, exactly Go's visibility.String().
65
- visibility: ApiResourceVisibility[metadata.visibility] ?? "",
66
- createdAt: Number(
67
- project.status?.audit?.specAudit?.createdAt?.seconds ?? 0n,
68
- ),
69
- };
70
- },
71
- };