@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 +1 @@
1
- {"version":3,"file":"migrations.js","sourceRoot":"","sources":["../../../src/store/postgres/migrations.ts"],"names":[],"mappings":"AAwCA,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAClC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAClC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAElC,wCAAwC;AACxC,MAAM,CAAC,MAAM,sBAAsB,GAAG,gBAAgB,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAElD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,MAAkB;IACpD,MAAM,MAAM,CAAC,KAAK,CAAC,6BAA6B,EAAE,CAAC,kBAAkB,CAAC,CAAC,CAAC;IACxE,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,KAAK,CAAC;;;;;KAKlB,CAAC,CAAC;QAEH,MAAM,cAAc,GAAG,MAAM,gBAAgB,CAAC,MAAM,CAAC,CAAC;QAEtD,MAAM,KAAK,GAEP;YACF,CAAC,gBAAgB,EAAE,WAAW,CAAC;YAC/B,CAAC,gBAAgB,EAAE,WAAW,CAAC;YAC/B,CAAC,gBAAgB,EAAE,WAAW,CAAC;SAChC,CAAC;QAEF,KAAK,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,KAAK,EAAE,CAAC;YACvC,IAAI,cAAc,GAAG,OAAO,EAAE,CAAC;gBAC7B,MAAM,kBAAkB,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YACrD,CAAC;QACH,CAAC;IACH,CAAC;YAAS,CAAC;QACT,MAAM,MAAM,CAAC,KAAK,CAAC,+BAA+B,EAAE,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAC5E,CAAC;AACH,CAAC;AAED,iEAAiE;AACjE,MAAM,CAAC,KAAK,UAAU,gBAAgB,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KAAK,CAAC;;GAElB,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;GAWG;AACH,KAAK,UAAU,WAAW,CAAC,MAAkB;IAC3C,MAAM,MAAM,CAAC,KAAK,CAAC;;GAElB,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;GAUG;AACH,KAAK,UAAU,WAAW,CAAC,MAAkB;IAC3C,MAAM,MAAM,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;IACnE,MAAM,MAAM,CAAC,KAAK,CAAC,mDAAmD,CAAC,CAAC;AAC1E,CAAC"}
@@ -41,8 +41,10 @@ export declare const SCHEMA_VERSION_6 = 6;
41
41
  export declare const SCHEMA_VERSION_7 = 7;
42
42
  /** v8: the by-resource grant-teardown index (the C3 channel installer). */
43
43
  export declare const SCHEMA_VERSION_8 = 8;
44
+ /** v9: the rows of the removed Project kind deleted. */
45
+ export declare const SCHEMA_VERSION_9 = 9;
44
46
  /** Target version for new databases. */
45
- export declare const CURRENT_SCHEMA_VERSION = 8;
47
+ export declare const CURRENT_SCHEMA_VERSION = 9;
46
48
  /** Applies all pending migrations in order. */
47
49
  export declare function runMigrations(db: DatabaseSync): void;
48
50
  /** Current schema version; 0 when none has been recorded yet. */
@@ -1 +1 @@
1
- {"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../../src/store/sqlite/migrations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,gFAAgF;AAChF,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,2EAA2E;AAC3E,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC,wCAAwC;AACxC,eAAO,MAAM,sBAAsB,IAAmB,CAAC;AAEvD,+CAA+C;AAC/C,wBAAgB,aAAa,CAAC,EAAE,EAAE,YAAY,GAAG,IAAI,CA0BpD;AAED,iEAAiE;AACjE,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,YAAY,GAAG,MAAM,CAKzD"}
1
+ {"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../../src/store/sqlite/migrations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,gFAAgF;AAChF,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,2EAA2E;AAC3E,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,wDAAwD;AACxD,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC,wCAAwC;AACxC,eAAO,MAAM,sBAAsB,IAAmB,CAAC;AAEvD,+CAA+C;AAC/C,wBAAgB,aAAa,CAAC,EAAE,EAAE,YAAY,GAAG,IAAI,CA2BpD;AAED,iEAAiE;AACjE,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,YAAY,GAAG,MAAM,CAKzD"}
@@ -8,8 +8,10 @@ export const SCHEMA_VERSION_6 = 6;
8
8
  export const SCHEMA_VERSION_7 = 7;
9
9
  /** v8: the by-resource grant-teardown index (the C3 channel installer). */
10
10
  export const SCHEMA_VERSION_8 = 8;
11
+ /** v9: the rows of the removed Project kind deleted. */
12
+ export const SCHEMA_VERSION_9 = 9;
11
13
  /** Target version for new databases. */
12
- export const CURRENT_SCHEMA_VERSION = SCHEMA_VERSION_8;
14
+ export const CURRENT_SCHEMA_VERSION = SCHEMA_VERSION_9;
13
15
  /** Applies all pending migrations in order. */
14
16
  export function runMigrations(db) {
15
17
  db.exec(`
@@ -28,6 +30,7 @@ export function runMigrations(db) {
28
30
  [SCHEMA_VERSION_6, migrateToV6],
29
31
  [SCHEMA_VERSION_7, migrateToV7],
30
32
  [SCHEMA_VERSION_8, migrateToV8],
33
+ [SCHEMA_VERSION_9, migrateToV9],
31
34
  ];
32
35
  for (const [version, migrate] of chain) {
33
36
  if (currentVersion < version) {
@@ -288,4 +291,22 @@ function migrateToV8(db) {
288
291
  CREATE INDEX IF NOT EXISTS idx_oauth_grant_resource ON oauth_grant(resource_id, org_id);
289
292
  `);
290
293
  }
294
+ /**
295
+ * v9: the Project kind (kind 60, id prefix "prj") was removed from the
296
+ * contract, so a database seeded by an earlier release may hold rows no
297
+ * code can read, list or delete any more. Rows are deleted, not archived:
298
+ * the audit table is the version history of kinds the server serves, and
299
+ * bytes of a kind nothing will ever decode are not history. The kind
300
+ * column holds the enum NAME (proto-fields.ts apiResourceKindName), which
301
+ * is why the literal string works after the enum value is gone. The search
302
+ * index is not touched here: boot's RebuildIndex clears it and re-indexes
303
+ * only the registered kinds. Member rows the Project once listed are
304
+ * ordinary resources of their own kinds and stay.
305
+ */
306
+ function migrateToV9(db) {
307
+ db.exec(`
308
+ DELETE FROM resources WHERE kind = 'project';
309
+ DELETE FROM resource_audit WHERE kind = 'project';
310
+ `);
311
+ }
291
312
  //# sourceMappingURL=migrations.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"migrations.js","sourceRoot":"","sources":["../../../src/store/sqlite/migrations.ts"],"names":[],"mappings":"AAkCA,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAClC,MAAM,CAAC,MAAM,gBAAgB,GAA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AAsE;IACtE,kEAAkE;IAClE,KAAK,MAAM,KAAK,IAAI;QAClB,yEAAyE;QACzE,uFAAuF;KACxF,EAAE,CAAC;QACF,IAAI,CAAC;YACH,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC;QAAC,MAAM,CAAC;YACP,wEAAwE;QAC1E,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;;;;;;;GAUG;AACH,SAAS,WAAW,CAAC,EAAgB;IACnC,EAAE,CAAC,IAAI,CAAC;;GAEP,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;GAWG;AACH,SAAS,WAAW,CAAC,EAAgB;IACnC,EAAE,CAAC,IAAI,CAAC;;;GAGP,CAAC,CAAC;AACL,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stigmer/server",
3
- "version": "3.19.0",
3
+ "version": "3.20.0",
4
4
  "description": "The Stigmer OSS control plane as a composable library: composeServer, the extension registry and the driver seams a composition builds on. The self-contained deployable of the same server is @stigmer/server-slim.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -62,11 +62,11 @@
62
62
  "@connectrpc/connect-node": "^2.0.0",
63
63
  "@kubernetes/client-node": "2.0.0",
64
64
  "@opentelemetry/api": "^1.9.0",
65
- "@stigmer/outbound": "3.19.0",
66
- "@stigmer/plugin-package": "3.19.0",
67
- "@stigmer/protos": "3.19.0",
68
- "@stigmer/temporal-codecs": "3.19.0",
69
- "@stigmer/zip-structure": "3.19.0",
65
+ "@stigmer/outbound": "3.20.0",
66
+ "@stigmer/plugin-package": "3.20.0",
67
+ "@stigmer/protos": "3.20.0",
68
+ "@stigmer/temporal-codecs": "3.20.0",
69
+ "@stigmer/zip-structure": "3.20.0",
70
70
  "@temporalio/activity": "1.16.2",
71
71
  "@temporalio/client": "1.16.2",
72
72
  "@temporalio/common": "1.16.2",
@@ -189,7 +189,7 @@ describe("deriveTuples — the cloud driver's shapes, from the row", () => {
189
189
  });
190
190
 
191
191
  it("kinds with no visibility axis derive no viewer tuple at any level — their audience is the model's own line", () => {
192
- for (const type of ["artifact", "schedule", "project", "session"]) {
192
+ for (const type of ["artifact", "schedule", "session"]) {
193
193
  expect(
194
194
  derivedFor(type, {
195
195
  visibility: ApiResourceVisibility.visibility_org,
@@ -1,11 +1,11 @@
1
1
  # Pinned copy of stigmer-cloud backend/services/stigmer-server/fga/tests/org-admin-owner-inheritance.fga.yaml
2
- # at commit 2ec420161 (the OpenFGA store test the cloud runs against its live model).
2
+ # as changed by stigmer-cloud#757 (the OpenFGA store test the cloud runs against its live model).
3
3
  # The body below is byte-identical to the source; the cloud re-runs the LIVE
4
4
  # file against this evaluator at the re-pin, so a stale copy is caught there.
5
5
  # Store tests for org-admin owner inheritance (T08).
6
6
  #
7
7
  # Blueprint kinds — agent, agent_share, agent_channel, channel_app,
8
- # schedule, skill, workflow, project — compose org admins into `owner`:
8
+ # schedule, skill, workflow, plugin — compose org admins into `owner`:
9
9
  #
10
10
  # define owner: [identity_account] or admin from organization
11
11
  #
@@ -94,10 +94,10 @@ tuples:
94
94
  object: workflow:carols-flow
95
95
  - user: organization:acme
96
96
  relation: organization
97
- object: project:carols-project
97
+ object: plugin:carols-plugin
98
98
  - user: identity_account:carol
99
99
  relation: owner
100
- object: project:carols-project
100
+ object: plugin:carols-plugin
101
101
 
102
102
  # --- carol's personal resources (organization tuple present, so a
103
103
  # wrongly-added inheritance WOULD resolve — these must stay denied) ---
@@ -186,7 +186,7 @@ tests:
186
186
  can_delete: true
187
187
  can_grant_access: true
188
188
  - user: identity_account:ana
189
- object: project:carols-project
189
+ object: plugin:carols-plugin
190
190
  assertions:
191
191
  can_view: true
192
192
  can_edit: true
@@ -257,7 +257,7 @@ tests:
257
257
  can_edit: false
258
258
  can_delete: false
259
259
  - user: identity_account:zara
260
- object: project:carols-project
260
+ object: plugin:carols-plugin
261
261
  assertions:
262
262
  can_view: false
263
263
  can_edit: false
@@ -141,7 +141,6 @@ describe("every static (kind, permission) the served RPCs ask about is a declare
141
141
  "oauth_app",
142
142
  "organization",
143
143
  "plugin",
144
- "project",
145
144
  "schedule",
146
145
  "session",
147
146
  "skill",
@@ -35,7 +35,6 @@ const DECLARED_KINDS = [
35
35
  ApiResourceKind.api_key,
36
36
  ApiResourceKind.oauth_app,
37
37
  ApiResourceKind.organization,
38
- ApiResourceKind.project,
39
38
  ApiResourceKind.agent,
40
39
  ApiResourceKind.agent_channel,
41
40
  ApiResourceKind.agent_share,
@@ -99,7 +98,6 @@ const WIRE_PERMISSIONS_BY_TYPE: Readonly<
99
98
  "can_view",
100
99
  "can_edit",
101
100
  "can_delete",
102
- "can_create_project",
103
101
  "can_create_agent",
104
102
  "can_create_workflow",
105
103
  "can_create_session",
@@ -118,13 +116,6 @@ const WIRE_PERMISSIONS_BY_TYPE: Readonly<
118
116
  "can_view_billing",
119
117
  "can_manage_billing",
120
118
  ],
121
- project: [
122
- "can_view",
123
- "can_edit",
124
- "can_delete",
125
- "can_grant_access",
126
- "can_view_access",
127
- ],
128
119
  agent: [
129
120
  "can_view",
130
121
  "can_edit",
@@ -12,7 +12,7 @@
12
12
  * chain past the depth bound) and for the cloud's drift test, which
13
13
  * builds a model from the live `.fga` files and compares.
14
14
  *
15
- * Registered: every kind of the open-source tier — the twenty-four
15
+ * Registered: every kind of the open-source tier — the twenty-three
16
16
  * `kind_meta.tier: open_source` members — and nothing else. The four
17
17
  * files `fga.mod` lists that have no declaration here (`platform`,
18
18
  * `identity_provider`, `platform_client`, `invitation`) are kinds this
@@ -39,7 +39,6 @@ import { memoryDeclaration } from "./memory.js";
39
39
  import { oauthAppDeclaration } from "./oauth_app.js";
40
40
  import { organizationDeclaration } from "./organization.js";
41
41
  import { pluginDeclaration } from "./plugin.js";
42
- import { projectDeclaration } from "./project.js";
43
42
  import type { KindDeclaration } from "./rewrite.js";
44
43
  import { scheduleDeclaration } from "./schedule.js";
45
44
  import { sessionDeclaration } from "./session.js";
@@ -79,7 +78,6 @@ export const builtInModel: Model = newModel([
79
78
  apiKeyDeclaration,
80
79
  oauthAppDeclaration,
81
80
  organizationDeclaration,
82
- projectDeclaration,
83
81
  agentDeclaration,
84
82
  agentChannelDeclaration,
85
83
  agentShareDeclaration,
@@ -33,7 +33,6 @@ export const organizationDeclaration = declareKind({
33
33
  ["can_delete", computed("owner")],
34
34
  ["can_manage_members", computed("admin")],
35
35
  ["can_assign_roles", computed("owner")],
36
- ["can_create_project", computed("admin")],
37
36
  ["can_create_agent", computed("admin")],
38
37
  ["can_create_workflow", computed("admin")],
39
38
  ["can_create_session", union(computed("member"), computed("guest"))],
@@ -112,7 +112,6 @@ import { registerOrganizationServices } from "../domain/organization/controller.
112
112
  import { registerMcpServerServices } from "../domain/mcpserver/controller.js";
113
113
  import { registerPlatformServices } from "../domain/platform/controller.js";
114
114
  import { SERVER_VERSION } from "../domain/platform/version.js";
115
- import { registerProjectServices } from "../domain/project/controller.js";
116
115
  import { registerSessionServices } from "../domain/session/controller.js";
117
116
  import { registerPluginServices } from "../domain/plugin/controller.js";
118
117
  import { PLUGIN_ARTIFACT_KEY_PREFIX } from "../domain/plugin/constants.js";
@@ -1494,22 +1493,10 @@ export async function composeServer(
1494
1493
  logger,
1495
1494
  authorizer,
1496
1495
  });
1497
- // Project registers after all four reconciled kinds (agent, workflow,
1498
- // mcpserver, skill) — the last Class A domain. The lazy deleter
1499
- // provider replaces Go's SetReconciliationService late-bind
1500
- // (server.go 478 registration + 635–648 injection): orphan deletes
1501
- // route through the in-process command clients' FULL pipelines.
1502
- registerProjectServices(router, {
1503
- store,
1504
- logger,
1505
- authorizer,
1506
- authorizationLifecycle,
1507
- orphanDeleter: () => requireInProcess().projectOrphanDeleter,
1508
- });
1509
1496
  // The two CQRS query services register between the domains and the
1510
1497
  // github/platform tail, mirroring Go's registration order
1511
- // (server.go: project 478 → organization 487 → search 493 →
1512
- // activity 513 → github 524 → platform 530).
1498
+ // (server.go: organization 487 → search 493 → activity 513 →
1499
+ // github 524 → platform 530).
1513
1500
  registerSearchServices(router, { handler: searchHandler, logger });
1514
1501
  registerActivityServices(router, { handler: activityHandler, logger });
1515
1502
  // GitHub broker: config-only, no store (Go server.go 524–528).
@@ -74,7 +74,6 @@ import type { PluginMaterializer } from "../domain/plugin/materialize/ports.js";
74
74
  import { UpdateVisibilityInputSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/io_pb";
75
75
  import type { ApiResourceVisibility } from "@stigmer/protos/ai/stigmer/commons/apiresource/enum_pb";
76
76
  import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
77
- import type { OrphanDeleter } from "../domain/project/reconcile.js";
78
77
  import type { ExecutionStatusWriter } from "../temporal/agentexecution/activities.js";
79
78
  import type { ScheduleExecutionCreator } from "../temporal/schedule/run-starter.js";
80
79
  import { buildInterceptorChain } from "../pipeline/chain.js";
@@ -126,15 +125,6 @@ export interface InProcessClients {
126
125
  readonly workflowExecutionContextCreator: WorkflowExecutionContextCreator;
127
126
  readonly workflowExecutionApprovalForwarder: AgentExecutionApprovalForwarder;
128
127
  readonly workflowExecutionFileDecisionForwarder: AgentExecutionFileDecisionForwarder;
129
- /**
130
- * The project reconciler's orphan-delete edge (server.go 635-648: Go's
131
- * DownstreamClients + ResourceDeleterAdapter). Go retains the four full
132
- * CRUD client interfaces; the reconciler uses ONLY Delete, so this
133
- * surface exposes only the delete routing — every orphan delete runs the
134
- * owning domain's FULL pipeline (referential blocks included) through
135
- * the same interceptor chain as an external delete.
136
- */
137
- readonly projectOrphanDeleter: OrphanDeleter;
138
128
  /**
139
129
  * The schedule clock's fire edge (server.go 581: the RunStarter's
140
130
  * in-process agentexecution client): every fire — cron tick or manual
@@ -153,7 +143,7 @@ export interface InProcessClients {
153
143
  * broadcast) and carry the internal caller class this transport's
154
144
  * position 1 stamps. The worker builds no identity of its own: server
155
145
  * code acting on its own behalf rides this lane, where the class is
156
- * minted — exactly like the schedule clock and the reconciler above.
146
+ * minted — exactly like the schedule clock above.
157
147
  */
158
148
  readonly executionStatusWriter: ExecutionStatusWriter;
159
149
  /**
@@ -163,8 +153,7 @@ export interface InProcessClients {
163
153
  * delete) AS THE INSTALLING CALLER (the asCaller call options), so a
164
154
  * materialised skill is attributed to the user who installed it and
165
155
  * carries the plugin's reserved labels by the in-process origin the
166
- * guards pass structurally. The delete routing is the reconciler's
167
- * switch, shared.
156
+ * guards pass structurally.
168
157
  */
169
158
  readonly pluginMaterializer: PluginMaterializer;
170
159
  }
@@ -391,15 +380,6 @@ export function createInProcessClients(
391
380
  executionStatusWriter: {
392
381
  updateStatus: (input) => agentExecutionCommand.updateStatus(input),
393
382
  },
394
- // The project reconciler's delete routing — Go's
395
- // ResourceDeleterAdapter.Delete switch (execution_engine.go:75-92).
396
- // The unsupported-kind default is defense-in-depth kept for Go parity:
397
- // the reconciler's slug resolver rejects unsupported kinds before any
398
- // delete is attempted, in both editions. Log-only surface: reconcile
399
- // failures never reach the wire.
400
- projectOrphanDeleter: {
401
- delete: (kind, resourceId) => deleteByKind(kind, resourceId),
402
- },
403
383
  pluginMaterializer: {
404
384
  pushSkill: (request, caller) =>
405
385
  skillCommand.push(request, asCaller(caller)),
@@ -417,13 +397,12 @@ export function createInProcessClients(
417
397
  };
418
398
 
419
399
  /**
420
- * Delete routing for the four reconciled kinds — Go's
421
- * ResourceDeleterAdapter.Delete switch (execution_engine.go:75-92),
422
- * shared by the project reconciler (internal class, no caller) and the
423
- * plugin controller (as the installing caller). Every orphan or member
424
- * delete runs the owning domain's FULL pipeline. The unsupported-kind
425
- * default is defense-in-depth: both callers refuse unsupported kinds
426
- * before any delete is attempted.
400
+ * Delete routing for the four member kinds a plugin materialises, used
401
+ * by the plugin controller as the installing caller. Every member delete
402
+ * runs the owning domain's FULL pipeline (referential blocks included)
403
+ * through the same interceptor chain as an external delete. The
404
+ * unsupported-kind default is defense-in-depth: the plugin's member
405
+ * reader refuses unsupported kinds before any delete is attempted.
427
406
  */
428
407
  async function deleteByKind(
429
408
  kind: ApiResourceKind,
@@ -208,7 +208,6 @@ describe("onResourceCreated: the creator owns the organization", () => {
208
208
  ApiResourceKind.workflow,
209
209
  ApiResourceKind.session,
210
210
  ApiResourceKind.identity_account,
211
- ApiResourceKind.project,
212
211
  ])(
213
212
  "writes nothing for kind %s even under DIRECT attribution — a per-resource owner row is the grant the scope keeps Enterprise",
214
213
  async (kind) => {
@@ -1518,7 +1518,6 @@
1518
1518
  "schedule",
1519
1519
  "memory",
1520
1520
  "plugin",
1521
- "project",
1522
1521
  "plan",
1523
1522
  "subscription",
1524
1523
  "license"
@@ -2,7 +2,7 @@
2
2
  * Spike SP-B (D2 spike register): `createRouterTransport` traverses the
3
3
  * FULL interceptor chain on in-process calls.
4
4
  *
5
- * Why this matters: Go serves internal calls (project reconcile deletes,
5
+ * Why this matters: Go serves internal calls (plugin member deletes,
6
6
  * cascades, schedule RunStarter creates) through the same *grpc.Server over
7
7
  * an in-memory bufconn precisely so validation parity holds — an internal
8
8
  * call is validated exactly like an external one. The TS equivalent is
@@ -346,7 +346,7 @@ export function encodeInProcessCaller(caller: CallerIdentity): string {
346
346
  * while transport-trust arms (the reserved-label guard) still see
347
347
  * the server-composed origin.
348
348
  * - MINTED: no propagated identity — the daemon-origin default (the
349
- * schedule clock, the project reconciler): the internal caller class
349
+ * schedule clock): the internal caller class
350
350
  * carrying the operator's identity fields, so audit stamps on
351
351
  * daemon writes stay byte-identical to the pre-R5 posture. The
352
352
  * Authorize step treats the internal class as the in-process
@@ -5,8 +5,7 @@
5
5
  * historically returned UNIMPLEMENTED for activity), synchronous
6
6
  * index-on-write feeds search over the wire, the protovalidate
7
7
  * interceptor answers the two InvalidArgument arms, and BOOT-TIME
8
- * RebuildIndex makes pre-existing rows — including a project row on an
9
- * adopted database, whose domain is not yet ported (#16) — searchable
8
+ * RebuildIndex makes pre-existing rows on an adopted database searchable
10
9
  * with zero pipeline writes (DD-D/DD-F).
11
10
  */
12
11
  import { mkdtempSync, rmSync } from "node:fs";
@@ -21,11 +20,11 @@ import { createGrpcTransport } from "@connectrpc/connect-node";
21
20
  import { afterAll, beforeAll, describe, expect, it } from "vitest";
22
21
 
23
22
  import { ActivityQueryController } from "@stigmer/protos/ai/stigmer/activity/v1/query_pb";
23
+ import { SkillSchema } from "@stigmer/protos/ai/stigmer/agentic/skill/v1/api_pb";
24
24
  import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
25
25
  import { SearchService } from "@stigmer/protos/ai/stigmer/search/v1/query_pb";
26
26
  import { OrganizationSchema } from "@stigmer/protos/ai/stigmer/tenancy/organization/v1/api_pb";
27
27
  import { OrganizationCommandController } from "@stigmer/protos/ai/stigmer/tenancy/organization/v1/command_pb";
28
- import { ProjectSchema } from "@stigmer/protos/ai/stigmer/tenancy/project/v1/api_pb";
29
28
 
30
29
  import { loadConfig } from "../../boot/config.js";
31
30
  import { composeServer } from "../../boot/compose.js";
@@ -146,9 +145,8 @@ describe("boot-time RebuildIndex (DD-D/DD-F)", () => {
146
145
  dir = mkdtempSync(path.join(tmpdir(), "query-rebuild-test-"));
147
146
  // Pre-seed the database DIRECTLY — resource rows only, no index
148
147
  // writes — the adopted-database shape: rows exist, the FTS index
149
- // knows nothing about them. The project row's domain is not even
150
- // ported yet (#16 in flight); only the boot rebuild through the
151
- // 13-kind registry can make it searchable.
148
+ // knows nothing about them. Only the boot rebuild through the
149
+ // registry can make such a row searchable.
152
150
  const dbPath = path.join(dir, "stigmer.db");
153
151
  const seedStore = SqliteStore.open(dbPath);
154
152
  await seedStore.saveResource(
@@ -163,17 +161,17 @@ describe("boot-time RebuildIndex (DD-D/DD-F)", () => {
163
161
  }),
164
162
  );
165
163
  await seedStore.saveResource(
166
- ApiResourceKind.project,
167
- "prj_adopted",
168
- ProjectSchema,
169
- create(ProjectSchema, {
164
+ ApiResourceKind.skill,
165
+ "skl_adopted",
166
+ SkillSchema,
167
+ create(SkillSchema, {
170
168
  metadata: {
171
- id: "prj_adopted",
172
- name: "adopted-project",
173
- slug: "adopted-project",
169
+ id: "skl_adopted",
170
+ name: "adopted-skill",
171
+ slug: "adopted-skill",
174
172
  org: "preboot",
175
173
  },
176
- spec: { description: "a project from the Go era" },
174
+ spec: { description: "a skill from the Go era" },
177
175
  status: {
178
176
  audit: { specAudit: { createdAt: { seconds: 1_700_000_000n } } },
179
177
  },
@@ -201,11 +199,11 @@ describe("boot-time RebuildIndex (DD-D/DD-F)", () => {
201
199
  });
202
200
  expect(orgs.entries.map((entry) => entry.id)).toContain("preboot");
203
201
 
204
- const projects = await search.search({
205
- kinds: [ApiResourceKind.project],
202
+ const skills = await search.search({
203
+ kinds: [ApiResourceKind.skill],
206
204
  org: "preboot",
207
205
  });
208
- expect(projects.entries.map((entry) => entry.id)).toEqual(["prj_adopted"]);
209
- expect(projects.entries[0]?.description).toBe("a project from the Go era");
206
+ expect(skills.entries.map((entry) => entry.id)).toEqual(["skl_adopted"]);
207
+ expect(skills.entries[0]?.description).toBe("a skill from the Go era");
210
208
  });
211
209
  });
@@ -3,7 +3,7 @@
3
3
  * normalization (trimming, clamps), the 500-char boundary, the three-mode
4
4
  * contract, and the #440 arm — named-but-unsearchable kinds yield an EMPTY
5
5
  * effective set, never a discover fallback. The kind_meta derivation is
6
- * pinned here too: 13 searchable kinds, project included (DD-D).
6
+ * pinned here too: the 13 searchable kinds.
7
7
  */
8
8
  import { describe, expect, it } from "vitest";
9
9
 
@@ -42,18 +42,15 @@ function criteria(overrides?: {
42
42
  }
43
43
 
44
44
  describe("searchIndexedKinds derivation (kind_meta)", () => {
45
- it("derives exactly the 14 searchable kinds, project and plugin included", () => {
45
+ it("derives exactly the 13 searchable kinds, plugin included", () => {
46
46
  // Go's SearchableKinds map, pinned by its invariant test against the
47
- // same kind_meta derivation. project rides #14 (DD-D) although its
48
- // domain ports with #16 — RebuildIndex on an adopted Go database
49
- // must be able to re-index existing project rows.
47
+ // same kind_meta derivation.
50
48
  expect([...searchIndexedKinds()].sort((a, b) => a - b)).toEqual(
51
49
  [
52
50
  ApiResourceKind.agent,
53
51
  ApiResourceKind.skill,
54
52
  ApiResourceKind.mcp_server,
55
53
  ApiResourceKind.workflow,
56
- ApiResourceKind.project,
57
54
  ApiResourceKind.environment,
58
55
  ApiResourceKind.session,
59
56
  ApiResourceKind.agent_execution,
@@ -6,7 +6,7 @@
6
6
  * #439 newly-searchable-kind arm), plus the scope-filter matrix
7
7
  * (org strict / crossOrgPublic / excludePublic) and RebuildIndex —
8
8
  * including the DD-D proof: rebuilding over an ADOPTED Go-created
9
- * database re-indexes its project rows. The escaping and
9
+ * database re-indexes the rows it already holds. The escaping and
10
10
  * score-normalization tables moved with their code into the sqlite
11
11
  * driver (DD-009 seam redraw): see store/sqlite/__tests__/fts5.test.ts.
12
12
  * These tests still run the REAL driver through tempStore — the
@@ -18,9 +18,9 @@ import { afterEach, beforeEach, describe, expect, it } from "vitest";
18
18
  import { AgentSchema } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/api_pb";
19
19
  import { AgentExecutionSchema } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/api_pb";
20
20
  import { SessionSchema } from "@stigmer/protos/ai/stigmer/agentic/session/v1/api_pb";
21
+ import { SkillSchema } from "@stigmer/protos/ai/stigmer/agentic/skill/v1/api_pb";
21
22
  import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
22
23
  import { ApiResourceVisibility } from "@stigmer/protos/ai/stigmer/commons/apiresource/enum_pb";
23
- import { ProjectSchema } from "@stigmer/protos/ai/stigmer/tenancy/project/v1/api_pb";
24
24
 
25
25
  import type { DescMessage, MessageShape } from "@bufbuild/protobuf";
26
26
 
@@ -426,33 +426,33 @@ describe("rebuildIndex", () => {
426
426
  expect(after.results[0]?.id).toBe("ses-1");
427
427
  });
428
428
 
429
- it("re-indexes project rows on an ADOPTED Go-created database (DD-D)", async () => {
429
+ it("re-indexes existing rows on an ADOPTED Go-created database (DD-D)", async () => {
430
430
  // The committed Go-v6 fixture, opened through the driver (migrates
431
- // v6→v7 — real adoption), then given a project row the way a Go
431
+ // v6→current — real adoption), then given a skill row the way a Go
432
432
  // server would have written one: raw resource bytes.
433
433
  const fixture = materializeGoFixture();
434
434
  const adopted = SqliteStore.open(fixture.dbPath);
435
435
  try {
436
- const project = create(ProjectSchema, {
436
+ const skill = create(SkillSchema, {
437
437
  metadata: {
438
- id: "prj_1",
438
+ id: "skl_1",
439
439
  name: "billing",
440
440
  slug: "billing",
441
441
  org: "acme",
442
442
  },
443
- spec: { description: "the billing project" },
443
+ spec: { description: "the billing skill" },
444
444
  status: {
445
445
  audit: { specAudit: { createdAt: { seconds: 1_700_000_000n } } },
446
446
  },
447
447
  });
448
448
  await adopted.saveResource(
449
- ApiResourceKind.project,
450
- "prj_1",
451
- ProjectSchema,
452
- project,
449
+ ApiResourceKind.skill,
450
+ "skl_1",
451
+ SkillSchema,
452
+ skill,
453
453
  );
454
- // Boot state: the TS server wipes and rebuilds — a 12-kind registry
455
- // would erase this row from search forever.
454
+ // Boot state: the TS server wipes and rebuilds — a registry without
455
+ // the kind would erase this row from search forever.
456
456
  const adoptedQueryStore = new SqliteSearchQueryStore(
457
457
  adopted,
458
458
  registry,
@@ -461,21 +461,21 @@ describe("rebuildIndex", () => {
461
461
  await adoptedQueryStore.rebuildIndex();
462
462
 
463
463
  const result = await adoptedQueryStore.search(
464
- criteria({ kinds: [ApiResourceKind.project], org: "acme" }),
464
+ criteria({ kinds: [ApiResourceKind.skill], org: "acme" }),
465
465
  );
466
466
  expect(result.totalCount).toBe(1);
467
- expect(result.results[0]?.id).toBe("prj_1");
468
- expect(result.results[0]?.description).toBe("the billing project");
467
+ expect(result.results[0]?.id).toBe("skl_1");
468
+ expect(result.results[0]?.description).toBe("the billing skill");
469
469
 
470
470
  // toBinary sanity: the row loaded back is byte-equal to what a Go
471
471
  // server holds (protobuf wire format is shared).
472
472
  const raw = await adopted.getResource(
473
- ApiResourceKind.project,
474
- "prj_1",
475
- ProjectSchema,
473
+ ApiResourceKind.skill,
474
+ "skl_1",
475
+ SkillSchema,
476
476
  );
477
- expect(toBinary(ProjectSchema, raw)).toEqual(
478
- toBinary(ProjectSchema, project),
477
+ expect(toBinary(SkillSchema, raw)).toEqual(
478
+ toBinary(SkillSchema, skill),
479
479
  );
480
480
  } finally {
481
481
  await adopted.close();