@stigmer/server 3.27.2 β†’ 3.28.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 (227) hide show
  1. package/README.md +2 -0
  2. package/dist/authorization/authorizer.d.ts +3 -3
  3. package/dist/authorization/authorizer.js +3 -3
  4. package/dist/authorization/derived-tuples.js +6 -1
  5. package/dist/authorization/derived-tuples.js.map +1 -1
  6. package/dist/authorization/evaluator.d.ts +9 -10
  7. package/dist/authorization/evaluator.d.ts.map +1 -1
  8. package/dist/authorization/evaluator.js.map +1 -1
  9. package/dist/authorization/list-read-scope.d.ts.map +1 -1
  10. package/dist/authorization/list-read-scope.js +29 -18
  11. package/dist/authorization/list-read-scope.js.map +1 -1
  12. package/dist/authorization/model/bindings.d.ts +41 -0
  13. package/dist/authorization/model/bindings.d.ts.map +1 -0
  14. package/dist/authorization/model/bindings.js +89 -0
  15. package/dist/authorization/model/bindings.js.map +1 -0
  16. package/dist/authorization/model/data/authorization-model.json +3114 -0
  17. package/dist/authorization/model/default-of.d.ts +2 -2
  18. package/dist/authorization/model/execution-viewer.d.ts +3 -0
  19. package/dist/authorization/model/execution-viewer.d.ts.map +1 -0
  20. package/dist/authorization/model/execution-viewer.js +50 -0
  21. package/dist/authorization/model/execution-viewer.js.map +1 -0
  22. package/dist/authorization/model/index.d.ts +33 -21
  23. package/dist/authorization/model/index.d.ts.map +1 -1
  24. package/dist/authorization/model/index.js +74 -52
  25. package/dist/authorization/model/index.js.map +1 -1
  26. package/dist/authorization/model/openfga-json.d.ts +18 -0
  27. package/dist/authorization/model/openfga-json.d.ts.map +1 -0
  28. package/dist/authorization/model/openfga-json.js +266 -0
  29. package/dist/authorization/model/openfga-json.js.map +1 -0
  30. package/dist/authorization/model/rewrite.d.ts +39 -67
  31. package/dist/authorization/model/rewrite.d.ts.map +1 -1
  32. package/dist/authorization/model/rewrite.js +1 -117
  33. package/dist/authorization/model/rewrite.js.map +1 -1
  34. package/dist/authorization/strict-json.d.ts +20 -0
  35. package/dist/authorization/strict-json.d.ts.map +1 -0
  36. package/dist/authorization/strict-json.js +45 -0
  37. package/dist/authorization/strict-json.js.map +1 -0
  38. package/dist/boot/compose.d.ts.map +1 -1
  39. package/dist/boot/compose.js +9 -7
  40. package/dist/boot/compose.js.map +1 -1
  41. package/dist/domain/workflowexecution/list-index.d.ts +1 -1
  42. package/dist/extensions/list-read-scope.d.ts +18 -2
  43. package/dist/extensions/list-read-scope.d.ts.map +1 -1
  44. package/dist/extensions/list-read-scope.js +20 -1
  45. package/dist/extensions/list-read-scope.js.map +1 -1
  46. package/dist/index.d.ts +7 -8
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/index.js +15 -5
  49. package/dist/index.js.map +1 -1
  50. package/package.json +7 -6
  51. package/src/authorization/README.md +41 -34
  52. package/src/authorization/__tests__/authorizer.test.ts +5 -14
  53. package/src/authorization/__tests__/derived-tuples.test.ts +29 -27
  54. package/src/authorization/__tests__/evaluator.test.ts +53 -160
  55. package/src/authorization/__tests__/facts.test.ts +5 -11
  56. package/src/authorization/__tests__/list-read-scope.measure.test.ts +12 -20
  57. package/src/authorization/__tests__/list-read-scope.test.ts +15 -14
  58. package/src/authorization/__tests__/organization-directory.test.ts +2 -2
  59. package/src/authorization/__tests__/store-test-kit.ts +246 -0
  60. package/src/authorization/__tests__/store-tests.test.ts +91 -223
  61. package/src/authorization/__tests__/support.ts +30 -2
  62. package/src/authorization/__tests__/throwaway-model.ts +75 -0
  63. package/src/authorization/__tests__/wire-permissions.test.ts +141 -107
  64. package/src/authorization/authorizer.ts +3 -3
  65. package/src/authorization/derived-tuples.ts +7 -2
  66. package/src/authorization/evaluator.ts +8 -10
  67. package/src/authorization/list-read-scope.ts +37 -22
  68. package/src/authorization/model/__tests__/openfga-json.test.ts +353 -0
  69. package/src/authorization/model/__tests__/registry.test.ts +102 -276
  70. package/src/authorization/model/bindings.ts +131 -0
  71. package/src/authorization/model/data/authorization-model.json +3114 -0
  72. package/src/authorization/model/default-of.ts +2 -2
  73. package/src/authorization/model/execution-viewer.ts +56 -0
  74. package/src/authorization/model/index.ts +81 -72
  75. package/src/authorization/model/openfga-json.ts +310 -0
  76. package/src/authorization/model/rewrite.ts +39 -188
  77. package/src/authorization/strict-json.ts +52 -0
  78. package/src/boot/compose.ts +9 -7
  79. package/src/extensions/__tests__/built-in-authorization-composed.test.ts +3 -6
  80. package/src/extensions/list-read-scope.ts +30 -3
  81. package/src/index.ts +15 -44
  82. package/dist/authorization/model/agent.d.ts +0 -2
  83. package/dist/authorization/model/agent.d.ts.map +0 -1
  84. package/dist/authorization/model/agent.js +0 -43
  85. package/dist/authorization/model/agent.js.map +0 -1
  86. package/dist/authorization/model/agent_channel.d.ts +0 -2
  87. package/dist/authorization/model/agent_channel.d.ts.map +0 -1
  88. package/dist/authorization/model/agent_channel.js +0 -39
  89. package/dist/authorization/model/agent_channel.js.map +0 -1
  90. package/dist/authorization/model/agent_execution.d.ts +0 -2
  91. package/dist/authorization/model/agent_execution.d.ts.map +0 -1
  92. package/dist/authorization/model/agent_execution.js +0 -25
  93. package/dist/authorization/model/agent_execution.js.map +0 -1
  94. package/dist/authorization/model/agent_instance.d.ts +0 -2
  95. package/dist/authorization/model/agent_instance.d.ts.map +0 -1
  96. package/dist/authorization/model/agent_instance.js +0 -48
  97. package/dist/authorization/model/agent_instance.js.map +0 -1
  98. package/dist/authorization/model/agent_share.d.ts +0 -2
  99. package/dist/authorization/model/agent_share.d.ts.map +0 -1
  100. package/dist/authorization/model/agent_share.js +0 -29
  101. package/dist/authorization/model/agent_share.js.map +0 -1
  102. package/dist/authorization/model/api_key.d.ts +0 -2
  103. package/dist/authorization/model/api_key.d.ts.map +0 -1
  104. package/dist/authorization/model/api_key.js +0 -27
  105. package/dist/authorization/model/api_key.js.map +0 -1
  106. package/dist/authorization/model/artifact.d.ts +0 -2
  107. package/dist/authorization/model/artifact.d.ts.map +0 -1
  108. package/dist/authorization/model/artifact.js +0 -27
  109. package/dist/authorization/model/artifact.js.map +0 -1
  110. package/dist/authorization/model/channel_app.d.ts +0 -2
  111. package/dist/authorization/model/channel_app.d.ts.map +0 -1
  112. package/dist/authorization/model/channel_app.js +0 -28
  113. package/dist/authorization/model/channel_app.js.map +0 -1
  114. package/dist/authorization/model/environment.d.ts +0 -2
  115. package/dist/authorization/model/environment.d.ts.map +0 -1
  116. package/dist/authorization/model/environment.js +0 -33
  117. package/dist/authorization/model/environment.js.map +0 -1
  118. package/dist/authorization/model/execution_context.d.ts +0 -2
  119. package/dist/authorization/model/execution_context.d.ts.map +0 -1
  120. package/dist/authorization/model/execution_context.js +0 -19
  121. package/dist/authorization/model/execution_context.js.map +0 -1
  122. package/dist/authorization/model/iam_policy.d.ts +0 -2
  123. package/dist/authorization/model/iam_policy.d.ts.map +0 -1
  124. package/dist/authorization/model/iam_policy.js +0 -31
  125. package/dist/authorization/model/iam_policy.js.map +0 -1
  126. package/dist/authorization/model/identity_account.d.ts +0 -2
  127. package/dist/authorization/model/identity_account.d.ts.map +0 -1
  128. package/dist/authorization/model/identity_account.js +0 -25
  129. package/dist/authorization/model/identity_account.js.map +0 -1
  130. package/dist/authorization/model/mcp_server.d.ts +0 -2
  131. package/dist/authorization/model/mcp_server.d.ts.map +0 -1
  132. package/dist/authorization/model/mcp_server.js +0 -38
  133. package/dist/authorization/model/mcp_server.js.map +0 -1
  134. package/dist/authorization/model/memory.d.ts +0 -2
  135. package/dist/authorization/model/memory.d.ts.map +0 -1
  136. package/dist/authorization/model/memory.js +0 -26
  137. package/dist/authorization/model/memory.js.map +0 -1
  138. package/dist/authorization/model/oauth_app.d.ts +0 -2
  139. package/dist/authorization/model/oauth_app.d.ts.map +0 -1
  140. package/dist/authorization/model/oauth_app.js +0 -31
  141. package/dist/authorization/model/oauth_app.js.map +0 -1
  142. package/dist/authorization/model/organization.d.ts +0 -2
  143. package/dist/authorization/model/organization.d.ts.map +0 -1
  144. package/dist/authorization/model/organization.js +0 -58
  145. package/dist/authorization/model/organization.js.map +0 -1
  146. package/dist/authorization/model/platform_client.d.ts +0 -2
  147. package/dist/authorization/model/platform_client.d.ts.map +0 -1
  148. package/dist/authorization/model/platform_client.js +0 -31
  149. package/dist/authorization/model/platform_client.js.map +0 -1
  150. package/dist/authorization/model/plugin.d.ts +0 -2
  151. package/dist/authorization/model/plugin.d.ts.map +0 -1
  152. package/dist/authorization/model/plugin.js +0 -45
  153. package/dist/authorization/model/plugin.js.map +0 -1
  154. package/dist/authorization/model/schedule.d.ts +0 -2
  155. package/dist/authorization/model/schedule.d.ts.map +0 -1
  156. package/dist/authorization/model/schedule.js +0 -34
  157. package/dist/authorization/model/schedule.js.map +0 -1
  158. package/dist/authorization/model/session.d.ts +0 -2
  159. package/dist/authorization/model/session.d.ts.map +0 -1
  160. package/dist/authorization/model/session.js +0 -38
  161. package/dist/authorization/model/session.js.map +0 -1
  162. package/dist/authorization/model/skill.d.ts +0 -2
  163. package/dist/authorization/model/skill.d.ts.map +0 -1
  164. package/dist/authorization/model/skill.js +0 -39
  165. package/dist/authorization/model/skill.js.map +0 -1
  166. package/dist/authorization/model/workflow.d.ts +0 -2
  167. package/dist/authorization/model/workflow.d.ts.map +0 -1
  168. package/dist/authorization/model/workflow.js +0 -39
  169. package/dist/authorization/model/workflow.js.map +0 -1
  170. package/dist/authorization/model/workflow_execution.d.ts +0 -2
  171. package/dist/authorization/model/workflow_execution.d.ts.map +0 -1
  172. package/dist/authorization/model/workflow_execution.js +0 -33
  173. package/dist/authorization/model/workflow_execution.js.map +0 -1
  174. package/dist/authorization/model/workflow_instance.d.ts +0 -2
  175. package/dist/authorization/model/workflow_instance.d.ts.map +0 -1
  176. package/dist/authorization/model/workflow_instance.js +0 -96
  177. package/dist/authorization/model/workflow_instance.js.map +0 -1
  178. package/dist/authorization/store-test-kit.d.ts +0 -62
  179. package/dist/authorization/store-test-kit.d.ts.map +0 -1
  180. package/dist/authorization/store-test-kit.js +0 -265
  181. package/dist/authorization/store-test-kit.js.map +0 -1
  182. package/src/authorization/__tests__/enterprise-model.ts +0 -59
  183. package/src/authorization/__tests__/fixtures/fga/agent-channel-owner.fga.yaml +0 -112
  184. package/src/authorization/__tests__/fixtures/fga/agent-instance-creation.fga.yaml +0 -177
  185. package/src/authorization/__tests__/fixtures/fga/agent-share-owner.fga.yaml +0 -109
  186. package/src/authorization/__tests__/fixtures/fga/artifact-org-and-owner.fga.yaml +0 -128
  187. package/src/authorization/__tests__/fixtures/fga/blueprint-private-visibility.fga.yaml +0 -318
  188. package/src/authorization/__tests__/fixtures/fga/channel-app-owner.fga.yaml +0 -125
  189. package/src/authorization/__tests__/fixtures/fga/channel-participation.fga.yaml +0 -201
  190. package/src/authorization/__tests__/fixtures/fga/channel-session-visibility.fga.yaml +0 -187
  191. package/src/authorization/__tests__/fixtures/fga/default-instance-inheritance.fga.yaml +0 -214
  192. package/src/authorization/__tests__/fixtures/fga/mcp-server-authoring.fga.yaml +0 -129
  193. package/src/authorization/__tests__/fixtures/fga/memory-subject-only.fga.yaml +0 -72
  194. package/src/authorization/__tests__/fixtures/fga/org-admin-owner-inheritance.fga.yaml +0 -308
  195. package/src/authorization/__tests__/fixtures/fga/org-shared-environment.fga.yaml +0 -144
  196. package/src/authorization/__tests__/fixtures/fga/platform-visibility.fga.yaml +0 -199
  197. package/src/authorization/__tests__/fixtures/fga/provider-standing-viewer.fga.yaml +0 -40
  198. package/src/authorization/__tests__/fixtures/fga/reserved-label-writer.fga.yaml +0 -41
  199. package/src/authorization/__tests__/fixtures/fga/schedule-owner.fga.yaml +0 -113
  200. package/src/authorization/__tests__/fixtures/fga/schedule-session-visibility.fga.yaml +0 -214
  201. package/src/authorization/__tests__/fixtures/fga/session-personal-resource.fga.yaml +0 -117
  202. package/src/authorization/__tests__/fixtures/fga/workflow-execution-sharing.fga.yaml +0 -190
  203. package/src/authorization/model/agent.ts +0 -64
  204. package/src/authorization/model/agent_channel.ts +0 -57
  205. package/src/authorization/model/agent_execution.ts +0 -33
  206. package/src/authorization/model/agent_instance.ts +0 -66
  207. package/src/authorization/model/agent_share.ts +0 -40
  208. package/src/authorization/model/api_key.ts +0 -28
  209. package/src/authorization/model/artifact.ts +0 -38
  210. package/src/authorization/model/channel_app.ts +0 -39
  211. package/src/authorization/model/environment.ts +0 -48
  212. package/src/authorization/model/execution_context.ts +0 -20
  213. package/src/authorization/model/iam_policy.ts +0 -42
  214. package/src/authorization/model/identity_account.ts +0 -26
  215. package/src/authorization/model/mcp_server.ts +0 -59
  216. package/src/authorization/model/memory.ts +0 -27
  217. package/src/authorization/model/oauth_app.ts +0 -43
  218. package/src/authorization/model/organization.ts +0 -59
  219. package/src/authorization/model/platform_client.ts +0 -43
  220. package/src/authorization/model/plugin.ts +0 -66
  221. package/src/authorization/model/schedule.ts +0 -49
  222. package/src/authorization/model/session.ts +0 -50
  223. package/src/authorization/model/skill.ts +0 -60
  224. package/src/authorization/model/workflow.ts +0 -60
  225. package/src/authorization/model/workflow_execution.ts +0 -46
  226. package/src/authorization/model/workflow_instance.ts +0 -125
  227. package/src/authorization/store-test-kit.ts +0 -395
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent_execution.js","sourceRoot":"","sources":["../../../src/authorization/model/agent_execution.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAC;AACnG,OAAO,EAAE,eAAe,EAAE,MAAM,qFAAqF,CAAC;AAEtH,OAAO,EACL,QAAQ,EACR,WAAW,EACX,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,KAAK,GACN,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,yBAAyB,GAAG,WAAW,CAAC;IACnD,IAAI,EAAE,eAAe,CAAC,eAAe;IACrC,MAAM,EAAE,oBAAoB;IAC5B,MAAM,EAAE,uCAAuC;IAC/C,SAAS,EAAE;QACT,CAAC,SAAS,EAAE,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;QACxC,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QACnC,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;QAC/D,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC;QACpE,CAAC,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;KAChC;CACF,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const agentInstanceDeclaration: import("./rewrite.js").KindDeclaration;
2
- //# sourceMappingURL=agent_instance.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent_instance.d.ts","sourceRoot":"","sources":["../../../src/authorization/model/agent_instance.ts"],"names":[],"mappings":"AA0BA,eAAO,MAAM,wBAAwB,wCAuCnC,CAAC"}
@@ -1,48 +0,0 @@
1
- /**
2
- * Transcript of fga/model/agentic/agent_instance.fga β€” a person's
3
- * configuration of an agent: owner-only in every write (no admin arm,
4
- * unlike the blueprint), readable through its own visibility axis or, for
5
- * the system-managed default instance, through the blueprint's whole
6
- * viewer set (`viewer from default_of`; default-of.ts). `agent` is the
7
- * parent link written on every instance for tracking and walked by
8
- * nothing; `default_of` is the derived link written on the default
9
- * instance alone. `team#member` on `viewer` is the Enterprise team grant,
10
- * which no open-source tuple ever names.
11
- */
12
- import { AgentSchema } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/api_pb";
13
- import { AgentInstanceSchema } from "@stigmer/protos/ai/stigmer/agentic/agentinstance/v1/api_pb";
14
- import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
15
- import { defaultOfBlueprint } from "./default-of.js";
16
- import { computed, declareKind, direct, from, objectOf, union, usersetOf, } from "./rewrite.js";
17
- export const agentInstanceDeclaration = declareKind({
18
- kind: ApiResourceKind.agent_instance,
19
- schema: AgentInstanceSchema,
20
- source: "fga/model/agentic/agent_instance.fga",
21
- relations: [
22
- ["organization", direct(objectOf("organization"))],
23
- ["agent", direct(objectOf("agent"))],
24
- ["default_of", direct(objectOf("agent"))],
25
- ["owner", direct(objectOf("identity_account"))],
26
- [
27
- "viewer",
28
- union(direct(objectOf("identity_account"), usersetOf("organization", "member"), usersetOf("organization", "viewer"), usersetOf("team", "member")), computed("owner"), from("viewer", "default_of")),
29
- ],
30
- ["can_view", computed("viewer")],
31
- ["can_execute", computed("can_view")],
32
- ["can_edit", computed("owner")],
33
- ["can_delete", computed("owner")],
34
- ["can_grant_access", computed("owner")],
35
- ["can_view_access", computed("viewer")],
36
- ],
37
- derived: [
38
- [
39
- "default_of",
40
- defaultOfBlueprint({
41
- kind: ApiResourceKind.agent,
42
- schema: AgentSchema,
43
- defaultInstanceIdOf: (agent) => agent.status?.defaultInstanceId ?? "",
44
- }),
45
- ],
46
- ],
47
- });
48
- //# sourceMappingURL=agent_instance.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent_instance.js","sourceRoot":"","sources":["../../../src/authorization/model/agent_instance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,oDAAoD,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,4DAA4D,CAAC;AACjG,OAAO,EAAE,eAAe,EAAE,MAAM,qFAAqF,CAAC;AAEtH,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EACL,QAAQ,EACR,WAAW,EACX,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,SAAS,GACV,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,wBAAwB,GAAG,WAAW,CAAC;IAClD,IAAI,EAAE,eAAe,CAAC,cAAc;IACpC,MAAM,EAAE,mBAAmB;IAC3B,MAAM,EAAE,sCAAsC;IAC9C,SAAS,EAAE;QACT,CAAC,cAAc,EAAE,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC;QAClD,CAAC,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;QACpC,CAAC,YAAY,EAAE,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;QACzC,CAAC,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,CAAC;QAC/C;YACE,QAAQ;YACR,KAAK,CACH,MAAM,CACJ,QAAQ,CAAC,kBAAkB,CAAC,EAC5B,SAAS,CAAC,cAAc,EAAE,QAAQ,CAAC,EACnC,SAAS,CAAC,cAAc,EAAE,QAAQ,CAAC,EACnC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAC5B,EACD,QAAQ,CAAC,OAAO,CAAC,EACjB,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,CAC7B;SACF;QACD,CAAC,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAChC,CAAC,aAAa,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;QACrC,CAAC,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC/B,CAAC,YAAY,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC,kBAAkB,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACvC,CAAC,iBAAiB,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;KACxC;IACD,OAAO,EAAE;QACP;YACE,YAAY;YACZ,kBAAkB,CAAC;gBACjB,IAAI,EAAE,eAAe,CAAC,KAAK;gBAC3B,MAAM,EAAE,WAAW;gBACnB,mBAAmB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,iBAAiB,IAAI,EAAE;aACtE,CAAC;SACH;KACF;CACF,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const agentShareDeclaration: import("./rewrite.js").KindDeclaration;
2
- //# sourceMappingURL=agent_share.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent_share.d.ts","sourceRoot":"","sources":["../../../src/authorization/model/agent_share.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,qBAAqB,wCAoBhC,CAAC"}
@@ -1,29 +0,0 @@
1
- /**
2
- * Transcript of fga/model/agentic/agent_share.fga β€” a share link's
3
- * configuration row, admin-owned; its anonymous visitors are the cloud's
4
- * `guest` credential on the organization, a class no open-source lane
5
- * mints, so on this edition a share is visible to its owners and explicit
6
- * grantees only.
7
- */
8
- import { AgentShareSchema } from "@stigmer/protos/ai/stigmer/agentic/agentshare/v1/api_pb";
9
- import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
10
- import { computed, declareKind, direct, from, objectOf, union, } from "./rewrite.js";
11
- export const agentShareDeclaration = declareKind({
12
- kind: ApiResourceKind.agent_share,
13
- schema: AgentShareSchema,
14
- source: "fga/model/agentic/agent_share.fga",
15
- relations: [
16
- ["organization", direct(objectOf("organization"))],
17
- [
18
- "owner",
19
- union(direct(objectOf("identity_account")), from("admin", "organization")),
20
- ],
21
- ["viewer", union(direct(objectOf("identity_account")), computed("owner"))],
22
- ["can_view", computed("viewer")],
23
- ["can_edit", computed("owner")],
24
- ["can_delete", computed("owner")],
25
- ["can_grant_access", computed("owner")],
26
- ["can_view_access", computed("viewer")],
27
- ],
28
- });
29
- //# sourceMappingURL=agent_share.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent_share.js","sourceRoot":"","sources":["../../../src/authorization/model/agent_share.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,yDAAyD,CAAC;AAC3F,OAAO,EAAE,eAAe,EAAE,MAAM,qFAAqF,CAAC;AAEtH,OAAO,EACL,QAAQ,EACR,WAAW,EACX,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,KAAK,GACN,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,qBAAqB,GAAG,WAAW,CAAC;IAC/C,IAAI,EAAE,eAAe,CAAC,WAAW;IACjC,MAAM,EAAE,gBAAgB;IACxB,MAAM,EAAE,mCAAmC;IAC3C,SAAS,EAAE;QACT,CAAC,cAAc,EAAE,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC;QAClD;YACE,OAAO;YACP,KAAK,CACH,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,EACpC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAC9B;SACF;QACD,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;QAC1E,CAAC,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAChC,CAAC,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC/B,CAAC,YAAY,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC,kBAAkB,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACvC,CAAC,iBAAiB,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;KACxC;CACF,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const apiKeyDeclaration: import("./rewrite.js").KindDeclaration;
2
- //# sourceMappingURL=api_key.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api_key.d.ts","sourceRoot":"","sources":["../../../src/authorization/model/api_key.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,iBAAiB,wCAe5B,CAAC"}
@@ -1,27 +0,0 @@
1
- /**
2
- * Transcript of fga/model/iam/api_key.fga β€” a credential, owner-only in
3
- * every verb: no organization link (`kind_meta` scope OWNER_ONLY) and no
4
- * admin arm, so the key a person minted is theirs to view, rotate, revoke
5
- * and use, and nobody else's. `can_rotate`, `can_revoke` and `can_use` are
6
- * the file's own verbs; the wire vocabulary names only the first three.
7
- */
8
- import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
9
- import { ApiKeySchema } from "@stigmer/protos/ai/stigmer/iam/apikey/v1/api_pb";
10
- import { computed, declareKind, direct, objectOf } from "./rewrite.js";
11
- export const apiKeyDeclaration = declareKind({
12
- kind: ApiResourceKind.api_key,
13
- schema: ApiKeySchema,
14
- source: "fga/model/iam/api_key.fga",
15
- relations: [
16
- ["owner", direct(objectOf("identity_account"))],
17
- ["can_view", computed("owner")],
18
- ["can_edit", computed("owner")],
19
- ["can_delete", computed("owner")],
20
- ["can_rotate", computed("owner")],
21
- ["can_revoke", computed("owner")],
22
- ["can_use", computed("owner")],
23
- ["can_grant_access", computed("owner")],
24
- ["can_view_access", computed("owner")],
25
- ],
26
- });
27
- //# sourceMappingURL=api_key.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api_key.js","sourceRoot":"","sources":["../../../src/authorization/model/api_key.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,qFAAqF,CAAC;AACtH,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAE/E,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEvE,MAAM,CAAC,MAAM,iBAAiB,GAAG,WAAW,CAAC;IAC3C,IAAI,EAAE,eAAe,CAAC,OAAO;IAC7B,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,2BAA2B;IACnC,SAAS,EAAE;QACT,CAAC,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,CAAC;QAC/C,CAAC,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC/B,CAAC,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC/B,CAAC,YAAY,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC,YAAY,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC,YAAY,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC9B,CAAC,kBAAkB,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACvC,CAAC,iBAAiB,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;KACvC;CACF,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const artifactDeclaration: import("./rewrite.js").KindDeclaration;
2
- //# sourceMappingURL=artifact.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"artifact.d.ts","sourceRoot":"","sources":["../../../src/authorization/model/artifact.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,mBAAmB,wCAiB9B,CAAC"}
@@ -1,27 +0,0 @@
1
- /**
2
- * Transcript of fga/model/agentic/artifact.fga β€” an organization's shared
3
- * output: read by its creator and by every organization viewer (`viewer
4
- * from organization`, no visibility tuple involved β€” the kind has no
5
- * visibility axis), edited by the organization's admins alone (the
6
- * creator does NOT edit through `owner`), and with no `can_delete` line
7
- * at all. The wire annotates only `can_view` and `can_edit` on it.
8
- */
9
- import { ArtifactSchema } from "@stigmer/protos/ai/stigmer/agentic/artifact/v1/api_pb";
10
- import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
11
- import { computed, declareKind, direct, from, objectOf, union, } from "./rewrite.js";
12
- export const artifactDeclaration = declareKind({
13
- kind: ApiResourceKind.artifact,
14
- schema: ArtifactSchema,
15
- source: "fga/model/agentic/artifact.fga",
16
- relations: [
17
- ["organization", direct(objectOf("organization"))],
18
- ["owner", direct(objectOf("identity_account"))],
19
- [
20
- "viewer",
21
- union(direct(objectOf("identity_account")), from("viewer", "organization")),
22
- ],
23
- ["can_view", union(computed("owner"), computed("viewer"))],
24
- ["can_edit", from("admin", "organization")],
25
- ],
26
- });
27
- //# sourceMappingURL=artifact.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"artifact.js","sourceRoot":"","sources":["../../../src/authorization/model/artifact.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,uDAAuD,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,MAAM,qFAAqF,CAAC;AAEtH,OAAO,EACL,QAAQ,EACR,WAAW,EACX,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,KAAK,GACN,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,mBAAmB,GAAG,WAAW,CAAC;IAC7C,IAAI,EAAE,eAAe,CAAC,QAAQ;IAC9B,MAAM,EAAE,cAAc;IACtB,MAAM,EAAE,gCAAgC;IACxC,SAAS,EAAE;QACT,CAAC,cAAc,EAAE,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC;QAClD,CAAC,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,CAAC;QAC/C;YACE,QAAQ;YACR,KAAK,CACH,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,EACpC,IAAI,CAAC,QAAQ,EAAE,cAAc,CAAC,CAC/B;SACF;QACD,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC1D,CAAC,UAAU,EAAE,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;KAC5C;CACF,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const channelAppDeclaration: import("./rewrite.js").KindDeclaration;
2
- //# sourceMappingURL=channel_app.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"channel_app.d.ts","sourceRoot":"","sources":["../../../src/authorization/model/channel_app.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,qBAAqB,wCAoBhC,CAAC"}
@@ -1,28 +0,0 @@
1
- /**
2
- * Transcript of fga/model/agentic/channel_app.fga β€” a messaging-platform
3
- * app registration, admin-owned, viewable by its owners and explicit
4
- * grantees: the same shape as agent_share, kept as its own file so the
5
- * drift compare reads this file's lines.
6
- */
7
- import { ChannelAppSchema } from "@stigmer/protos/ai/stigmer/agentic/channelapp/v1/api_pb";
8
- import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
9
- import { computed, declareKind, direct, from, objectOf, union, } from "./rewrite.js";
10
- export const channelAppDeclaration = declareKind({
11
- kind: ApiResourceKind.channel_app,
12
- schema: ChannelAppSchema,
13
- source: "fga/model/agentic/channel_app.fga",
14
- relations: [
15
- ["organization", direct(objectOf("organization"))],
16
- [
17
- "owner",
18
- union(direct(objectOf("identity_account")), from("admin", "organization")),
19
- ],
20
- ["viewer", union(direct(objectOf("identity_account")), computed("owner"))],
21
- ["can_view", computed("viewer")],
22
- ["can_edit", computed("owner")],
23
- ["can_delete", computed("owner")],
24
- ["can_grant_access", computed("owner")],
25
- ["can_view_access", computed("viewer")],
26
- ],
27
- });
28
- //# sourceMappingURL=channel_app.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"channel_app.js","sourceRoot":"","sources":["../../../src/authorization/model/channel_app.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,yDAAyD,CAAC;AAC3F,OAAO,EAAE,eAAe,EAAE,MAAM,qFAAqF,CAAC;AAEtH,OAAO,EACL,QAAQ,EACR,WAAW,EACX,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,KAAK,GACN,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,qBAAqB,GAAG,WAAW,CAAC;IAC/C,IAAI,EAAE,eAAe,CAAC,WAAW;IACjC,MAAM,EAAE,gBAAgB;IACxB,MAAM,EAAE,mCAAmC;IAC3C,SAAS,EAAE;QACT,CAAC,cAAc,EAAE,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC;QAClD;YACE,OAAO;YACP,KAAK,CACH,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,EACpC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAC9B;SACF;QACD,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;QAC1E,CAAC,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAChC,CAAC,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC/B,CAAC,YAAY,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC,kBAAkB,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACvC,CAAC,iBAAiB,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;KACxC;CACF,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const environmentDeclaration: import("./rewrite.js").KindDeclaration;
2
- //# sourceMappingURL=environment.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../../src/authorization/model/environment.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,sBAAsB,wCA0BjC,CAAC"}
@@ -1,33 +0,0 @@
1
- /**
2
- * Transcript of fga/model/agentic/environment.fga β€” a member's credential
3
- * store: owner-only writes (no admin arm), an org-visibility axis capped
4
- * at the organization (`kind_meta` supports_org only β€” no public
5
- * wildcard on the viewer line, and the evaluator would ignore one), and
6
- * `can_read_secrets: creator`, the one verb that stays with the person
7
- * who typed the values whatever the visibility, standing on the creator
8
- * tuple `kind_meta` flags with requires_creator_tuple.
9
- */
10
- import { EnvironmentSchema } from "@stigmer/protos/ai/stigmer/agentic/environment/v1/api_pb";
11
- import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
12
- import { computed, declareKind, direct, objectOf, union, usersetOf, } from "./rewrite.js";
13
- export const environmentDeclaration = declareKind({
14
- kind: ApiResourceKind.environment,
15
- schema: EnvironmentSchema,
16
- source: "fga/model/agentic/environment.fga",
17
- relations: [
18
- ["organization", direct(objectOf("organization"))],
19
- ["creator", direct(objectOf("identity_account"))],
20
- ["owner", direct(objectOf("identity_account"))],
21
- [
22
- "viewer",
23
- union(direct(objectOf("identity_account"), usersetOf("organization", "member"), usersetOf("organization", "viewer")), computed("owner")),
24
- ],
25
- ["can_view", computed("viewer")],
26
- ["can_edit", computed("owner")],
27
- ["can_delete", computed("owner")],
28
- ["can_read_secrets", computed("creator")],
29
- ["can_grant_access", computed("owner")],
30
- ["can_view_access", computed("viewer")],
31
- ],
32
- });
33
- //# sourceMappingURL=environment.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"environment.js","sourceRoot":"","sources":["../../../src/authorization/model/environment.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,0DAA0D,CAAC;AAC7F,OAAO,EAAE,eAAe,EAAE,MAAM,qFAAqF,CAAC;AAEtH,OAAO,EACL,QAAQ,EACR,WAAW,EACX,MAAM,EACN,QAAQ,EACR,KAAK,EACL,SAAS,GACV,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,sBAAsB,GAAG,WAAW,CAAC;IAChD,IAAI,EAAE,eAAe,CAAC,WAAW;IACjC,MAAM,EAAE,iBAAiB;IACzB,MAAM,EAAE,mCAAmC;IAC3C,SAAS,EAAE;QACT,CAAC,cAAc,EAAE,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC;QAClD,CAAC,SAAS,EAAE,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,CAAC;QACjD,CAAC,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,CAAC;QAC/C;YACE,QAAQ;YACR,KAAK,CACH,MAAM,CACJ,QAAQ,CAAC,kBAAkB,CAAC,EAC5B,SAAS,CAAC,cAAc,EAAE,QAAQ,CAAC,EACnC,SAAS,CAAC,cAAc,EAAE,QAAQ,CAAC,CACpC,EACD,QAAQ,CAAC,OAAO,CAAC,CAClB;SACF;QACD,CAAC,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAChC,CAAC,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC/B,CAAC,YAAY,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC,kBAAkB,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;QACzC,CAAC,kBAAkB,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACvC,CAAC,iBAAiB,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;KACxC;CACF,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const executionContextDeclaration: import("./rewrite.js").KindDeclaration;
2
- //# sourceMappingURL=execution_context.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"execution_context.d.ts","sourceRoot":"","sources":["../../../src/authorization/model/execution_context.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,2BAA2B,wCAStC,CAAC"}
@@ -1,19 +0,0 @@
1
- /**
2
- * Transcript of fga/model/agentic/execution_context.fga β€” a run's working
3
- * state, owner-only and unscoped (`kind_meta` OWNER_ONLY): two verbs,
4
- * both `owner`, and no access list to grant on.
5
- */
6
- import { ExecutionContextSchema } from "@stigmer/protos/ai/stigmer/agentic/executioncontext/v1/api_pb";
7
- import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
8
- import { computed, declareKind, direct, objectOf } from "./rewrite.js";
9
- export const executionContextDeclaration = declareKind({
10
- kind: ApiResourceKind.execution_context,
11
- schema: ExecutionContextSchema,
12
- source: "fga/model/agentic/execution_context.fga",
13
- relations: [
14
- ["owner", direct(objectOf("identity_account"))],
15
- ["can_view", computed("owner")],
16
- ["can_edit", computed("owner")],
17
- ],
18
- });
19
- //# sourceMappingURL=execution_context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"execution_context.js","sourceRoot":"","sources":["../../../src/authorization/model/execution_context.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,sBAAsB,EAAE,MAAM,+DAA+D,CAAC;AACvG,OAAO,EAAE,eAAe,EAAE,MAAM,qFAAqF,CAAC;AAEtH,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEvE,MAAM,CAAC,MAAM,2BAA2B,GAAG,WAAW,CAAC;IACrD,IAAI,EAAE,eAAe,CAAC,iBAAiB;IACvC,MAAM,EAAE,sBAAsB;IAC9B,MAAM,EAAE,yCAAyC;IACjD,SAAS,EAAE;QACT,CAAC,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,CAAC;QAC/C,CAAC,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC/B,CAAC,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;KAChC;CACF,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const iamPolicyDeclaration: import("./rewrite.js").KindDeclaration;
2
- //# sourceMappingURL=iam_policy.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"iam_policy.d.ts","sourceRoot":"","sources":["../../../src/authorization/model/iam_policy.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,oBAAoB,wCAoB/B,CAAC"}
@@ -1,31 +0,0 @@
1
- /**
2
- * Transcript of fga/model/iam/iam_policy.fga β€” the access-list row as an
3
- * object of the model: its organization's admins own and view it. Declared
4
- * for completeness of the transcript set (the drift compare reads every
5
- * open-source file); no wire check targets it β€” the IamPolicy RPCs
6
- * authorize against the policy's RESOURCE (`can_grant_access` on the
7
- * organization; `get` loads the row and asks about what it names), and the
8
- * tuple lifecycle writes nothing for it.
9
- */
10
- import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
11
- import { IamPolicySchema } from "@stigmer/protos/ai/stigmer/iam/iampolicy/v1/api_pb";
12
- import { computed, declareKind, direct, from, objectOf, union, } from "./rewrite.js";
13
- export const iamPolicyDeclaration = declareKind({
14
- kind: ApiResourceKind.iam_policy,
15
- schema: IamPolicySchema,
16
- source: "fga/model/iam/iam_policy.fga",
17
- relations: [
18
- ["organization", direct(objectOf("organization"))],
19
- [
20
- "owner",
21
- union(direct(objectOf("identity_account")), from("admin", "organization")),
22
- ],
23
- ["viewer", from("admin", "organization")],
24
- ["can_view", computed("viewer")],
25
- ["can_edit", computed("owner")],
26
- ["can_delete", computed("owner")],
27
- ["can_grant_access", computed("owner")],
28
- ["can_view_access", computed("viewer")],
29
- ],
30
- });
31
- //# sourceMappingURL=iam_policy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"iam_policy.js","sourceRoot":"","sources":["../../../src/authorization/model/iam_policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,qFAAqF,CAAC;AACtH,OAAO,EAAE,eAAe,EAAE,MAAM,oDAAoD,CAAC;AAErF,OAAO,EACL,QAAQ,EACR,WAAW,EACX,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,KAAK,GACN,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAW,CAAC;IAC9C,IAAI,EAAE,eAAe,CAAC,UAAU;IAChC,MAAM,EAAE,eAAe;IACvB,MAAM,EAAE,8BAA8B;IACtC,SAAS,EAAE;QACT,CAAC,cAAc,EAAE,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC;QAClD;YACE,OAAO;YACP,KAAK,CACH,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,EACpC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAC9B;SACF;QACD,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QACzC,CAAC,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAChC,CAAC,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC/B,CAAC,YAAY,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC,kBAAkB,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACvC,CAAC,iBAAiB,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;KACxC;CACF,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const identityAccountDeclaration: import("./rewrite.js").KindDeclaration;
2
- //# sourceMappingURL=identity_account.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"identity_account.d.ts","sourceRoot":"","sources":["../../../src/authorization/model/identity_account.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,0BAA0B,wCAYrC,CAAC"}
@@ -1,25 +0,0 @@
1
- /**
2
- * Transcript of fga/model/iam/identity_account.fga β€” a person's own
3
- * record: every verb is `owner`, and the owner is the account itself
4
- * (`kind_meta` attribution SELF, so the derivation writes
5
- * `identity_account:<id>#owner@identity_account:<id>`). No organization
6
- * link and no admin arm: an admin manages members through IamPolicy rows
7
- * on the organization, never through the account row.
8
- */
9
- import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
10
- import { IdentityAccountSchema } from "@stigmer/protos/ai/stigmer/iam/identityaccount/v1/api_pb";
11
- import { computed, declareKind, direct, objectOf } from "./rewrite.js";
12
- export const identityAccountDeclaration = declareKind({
13
- kind: ApiResourceKind.identity_account,
14
- schema: IdentityAccountSchema,
15
- source: "fga/model/iam/identity_account.fga",
16
- relations: [
17
- ["owner", direct(objectOf("identity_account"))],
18
- ["can_view", computed("owner")],
19
- ["can_edit", computed("owner")],
20
- ["can_delete", computed("owner")],
21
- ["can_grant_access", computed("owner")],
22
- ["can_view_access", computed("owner")],
23
- ],
24
- });
25
- //# sourceMappingURL=identity_account.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"identity_account.js","sourceRoot":"","sources":["../../../src/authorization/model/identity_account.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,qFAAqF,CAAC;AACtH,OAAO,EAAE,qBAAqB,EAAE,MAAM,0DAA0D,CAAC;AAEjG,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEvE,MAAM,CAAC,MAAM,0BAA0B,GAAG,WAAW,CAAC;IACpD,IAAI,EAAE,eAAe,CAAC,gBAAgB;IACtC,MAAM,EAAE,qBAAqB;IAC7B,MAAM,EAAE,oCAAoC;IAC5C,SAAS,EAAE;QACT,CAAC,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,CAAC;QAC/C,CAAC,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC/B,CAAC,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC/B,CAAC,YAAY,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC,kBAAkB,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACvC,CAAC,iBAAiB,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;KACvC;CACF,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const mcpServerDeclaration: import("./rewrite.js").KindDeclaration;
2
- //# sourceMappingURL=mcp_server.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mcp_server.d.ts","sourceRoot":"","sources":["../../../src/authorization/model/mcp_server.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,oBAAoB,wCAuC/B,CAAC"}
@@ -1,38 +0,0 @@
1
- /**
2
- * Transcript of fga/model/agentic/mcp_server.fga β€” a blueprint with three
3
- * read-side verbs: `can_use`, `can_clone` and `can_connect` (the OAuth
4
- * connect lane's gate), all `viewer`. `team#member` on `viewer` is the
5
- * Enterprise team grant, which no open-source tuple ever names.
6
- */
7
- import { McpServerSchema } from "@stigmer/protos/ai/stigmer/agentic/mcpserver/v1/api_pb";
8
- import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
9
- import { computed, declareKind, direct, from, objectOf, union, usersetOf, } from "./rewrite.js";
10
- export const mcpServerDeclaration = declareKind({
11
- kind: ApiResourceKind.mcp_server,
12
- schema: McpServerSchema,
13
- source: "fga/model/agentic/mcp_server.fga",
14
- relations: [
15
- ["organization", direct(objectOf("organization"))],
16
- [
17
- "owner",
18
- union(direct(objectOf("identity_account")), from("admin", "organization")),
19
- ],
20
- [
21
- "platform_viewer",
22
- direct(usersetOf("identity_provider", "platform_user")),
23
- ],
24
- [
25
- "viewer",
26
- union(direct(objectOf("identity_account"), usersetOf("organization", "member"), usersetOf("organization", "viewer"), usersetOf("team", "member")), computed("owner"), computed("platform_viewer")),
27
- ],
28
- ["can_view", computed("viewer")],
29
- ["can_edit", computed("owner")],
30
- ["can_delete", computed("owner")],
31
- ["can_use", computed("viewer")],
32
- ["can_clone", computed("viewer")],
33
- ["can_connect", computed("viewer")],
34
- ["can_grant_access", computed("owner")],
35
- ["can_view_access", computed("viewer")],
36
- ],
37
- });
38
- //# sourceMappingURL=mcp_server.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mcp_server.js","sourceRoot":"","sources":["../../../src/authorization/model/mcp_server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,wDAAwD,CAAC;AACzF,OAAO,EAAE,eAAe,EAAE,MAAM,qFAAqF,CAAC;AAEtH,OAAO,EACL,QAAQ,EACR,WAAW,EACX,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,SAAS,GACV,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAW,CAAC;IAC9C,IAAI,EAAE,eAAe,CAAC,UAAU;IAChC,MAAM,EAAE,eAAe;IACvB,MAAM,EAAE,kCAAkC;IAC1C,SAAS,EAAE;QACT,CAAC,cAAc,EAAE,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC;QAClD;YACE,OAAO;YACP,KAAK,CACH,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,EACpC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAC9B;SACF;QACD;YACE,iBAAiB;YACjB,MAAM,CAAC,SAAS,CAAC,mBAAmB,EAAE,eAAe,CAAC,CAAC;SACxD;QACD;YACE,QAAQ;YACR,KAAK,CACH,MAAM,CACJ,QAAQ,CAAC,kBAAkB,CAAC,EAC5B,SAAS,CAAC,cAAc,EAAE,QAAQ,CAAC,EACnC,SAAS,CAAC,cAAc,EAAE,QAAQ,CAAC,EACnC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAC5B,EACD,QAAQ,CAAC,OAAO,CAAC,EACjB,QAAQ,CAAC,iBAAiB,CAAC,CAC5B;SACF;QACD,CAAC,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAChC,CAAC,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC/B,CAAC,YAAY,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC,SAAS,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAC/B,CAAC,WAAW,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACjC,CAAC,aAAa,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACnC,CAAC,kBAAkB,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACvC,CAAC,iBAAiB,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;KACxC;CACF,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const memoryDeclaration: import("./rewrite.js").KindDeclaration;
2
- //# sourceMappingURL=memory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../../src/authorization/model/memory.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,iBAAiB,wCAW5B,CAAC"}
@@ -1,26 +0,0 @@
1
- /**
2
- * Transcript of fga/model/agentic/memory.fga β€” subject-only: the person a
3
- * memory is ABOUT is its one principal (no owner, no creator, no
4
- * visibility, nothing grantable; `kind_meta` attribution NONE with
5
- * `subject` as an additional parent on `spec.subject_identity_account_id`).
6
- * Organization admins govern the organization's memory switch and never
7
- * read content, in the contract's own words. A row whose subject field is
8
- * empty derives no principal at all β€” the derivation's rule for an
9
- * absent parent β€” and is then nobody's under this evaluator.
10
- */
11
- import { MemorySchema } from "@stigmer/protos/ai/stigmer/agentic/memory/v1/api_pb";
12
- import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
13
- import { computed, declareKind, direct, objectOf } from "./rewrite.js";
14
- export const memoryDeclaration = declareKind({
15
- kind: ApiResourceKind.memory,
16
- schema: MemorySchema,
17
- source: "fga/model/agentic/memory.fga",
18
- relations: [
19
- ["organization", direct(objectOf("organization"))],
20
- ["subject", direct(objectOf("identity_account"))],
21
- ["can_view", computed("subject")],
22
- ["can_edit", computed("subject")],
23
- ["can_delete", computed("subject")],
24
- ],
25
- });
26
- //# sourceMappingURL=memory.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"memory.js","sourceRoot":"","sources":["../../../src/authorization/model/memory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,qFAAqF,CAAC;AAEtH,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEvE,MAAM,CAAC,MAAM,iBAAiB,GAAG,WAAW,CAAC;IAC3C,IAAI,EAAE,eAAe,CAAC,MAAM;IAC5B,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,8BAA8B;IACtC,SAAS,EAAE;QACT,CAAC,cAAc,EAAE,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC;QAClD,CAAC,SAAS,EAAE,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,CAAC;QACjD,CAAC,UAAU,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;QACjC,CAAC,UAAU,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;QACjC,CAAC,YAAY,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;KACpC;CACF,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const oauthAppDeclaration: import("./rewrite.js").KindDeclaration;
2
- //# sourceMappingURL=oauth_app.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"oauth_app.d.ts","sourceRoot":"","sources":["../../../src/authorization/model/oauth_app.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,mBAAmB,wCAqB9B,CAAC"}
@@ -1,31 +0,0 @@
1
- /**
2
- * Transcript of fga/model/iam/oauth_app.fga β€” an organization-scoped kind
3
- * whose `owner` has NO admin arm while its `viewer` does (platform_client
4
- * shares the shape, for the same reason): the file's
5
- * "administrative visibility" for the organization's admins over a
6
- * registration that holds vendor client credentials, with change and
7
- * deletion the creator's (or an explicit grant's) alone, and no public
8
- * level at all.
9
- */
10
- import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
11
- import { OAuthAppSchema } from "@stigmer/protos/ai/stigmer/iam/oauthapp/v1/api_pb";
12
- import { computed, declareKind, direct, from, objectOf, union, } from "./rewrite.js";
13
- export const oauthAppDeclaration = declareKind({
14
- kind: ApiResourceKind.oauth_app,
15
- schema: OAuthAppSchema,
16
- source: "fga/model/iam/oauth_app.fga",
17
- relations: [
18
- ["organization", direct(objectOf("organization"))],
19
- ["owner", direct(objectOf("identity_account"))],
20
- [
21
- "viewer",
22
- union(direct(objectOf("identity_account")), computed("owner"), from("admin", "organization")),
23
- ],
24
- ["can_view", computed("viewer")],
25
- ["can_edit", computed("owner")],
26
- ["can_delete", computed("owner")],
27
- ["can_grant_access", computed("owner")],
28
- ["can_view_access", computed("viewer")],
29
- ],
30
- });
31
- //# sourceMappingURL=oauth_app.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"oauth_app.js","sourceRoot":"","sources":["../../../src/authorization/model/oauth_app.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,qFAAqF,CAAC;AACtH,OAAO,EAAE,cAAc,EAAE,MAAM,mDAAmD,CAAC;AAEnF,OAAO,EACL,QAAQ,EACR,WAAW,EACX,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,KAAK,GACN,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,mBAAmB,GAAG,WAAW,CAAC;IAC7C,IAAI,EAAE,eAAe,CAAC,SAAS;IAC/B,MAAM,EAAE,cAAc;IACtB,MAAM,EAAE,6BAA6B;IACrC,SAAS,EAAE;QACT,CAAC,cAAc,EAAE,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC;QAClD,CAAC,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,CAAC;QAC/C;YACE,QAAQ;YACR,KAAK,CACH,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,EACpC,QAAQ,CAAC,OAAO,CAAC,EACjB,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAC9B;SACF;QACD,CAAC,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAChC,CAAC,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC/B,CAAC,YAAY,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC,kBAAkB,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACvC,CAAC,iBAAiB,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;KACxC;CACF,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const organizationDeclaration: import("./rewrite.js").KindDeclaration;
2
- //# sourceMappingURL=organization.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"organization.d.ts","sourceRoot":"","sources":["../../../src/authorization/model/organization.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,uBAAuB,wCAoClC,CAAC"}
@@ -1,58 +0,0 @@
1
- /**
2
- * Transcript of fga/model/tenancy/organization.fga β€” the root of the
3
- * model: no parent, the four roles as a ladder (`owner βŠ‚ admin βŠ‚ member
4
- * βŠ‚ viewer`, each `[identity_account] or <the rung above>`), and every
5
- * `can_create_*` an organization gates.
6
- *
7
- * In open source the `[identity_account]` tuples of this type ARE the
8
- * IamPolicy rows: 2b's role lifecycle writes the creator's `owner` row and
9
- * the grant path writes every other role, so the tuple source reads them
10
- * from the IamPolicyStore and the derivation writes no owner tuple for
11
- * this kind (derived-tuples.ts). `guest` is the cloud's anonymous
12
- * share-link visitor; no open-source lane mints one (claim check C5), so
13
- * the relation resolves to nothing and `can_create_session: member or
14
- * guest` is `member` here β€” the transcript still carries the line.
15
- * `can_create_team` is carried the same way: open source serves no Team
16
- * kind, so nothing here asks it.
17
- */
18
- import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
19
- import { OrganizationSchema } from "@stigmer/protos/ai/stigmer/tenancy/organization/v1/api_pb";
20
- import { computed, declareKind, direct, objectOf, union } from "./rewrite.js";
21
- export const organizationDeclaration = declareKind({
22
- kind: ApiResourceKind.organization,
23
- schema: OrganizationSchema,
24
- source: "fga/model/tenancy/organization.fga",
25
- relations: [
26
- ["owner", direct(objectOf("identity_account"))],
27
- ["admin", union(direct(objectOf("identity_account")), computed("owner"))],
28
- ["member", union(direct(objectOf("identity_account")), computed("admin"))],
29
- ["viewer", union(direct(objectOf("identity_account")), computed("member"))],
30
- ["guest", direct(objectOf("identity_account"))],
31
- ["can_view", computed("viewer")],
32
- ["can_edit", computed("admin")],
33
- ["can_delete", computed("owner")],
34
- ["can_manage_members", computed("admin")],
35
- ["can_assign_roles", computed("owner")],
36
- ["can_create_agent", computed("admin")],
37
- ["can_create_workflow", computed("admin")],
38
- ["can_create_session", union(computed("member"), computed("guest"))],
39
- ["can_create_environment", computed("member")],
40
- ["can_create_skill", computed("admin")],
41
- ["can_create_plugin", computed("admin")],
42
- ["can_create_mcp_server", computed("admin")],
43
- ["can_create_idp", computed("admin")],
44
- ["can_create_identity_account", computed("admin")],
45
- ["can_create_oauth_app", computed("admin")],
46
- ["can_create_platform_client", computed("admin")],
47
- ["can_create_channel_app", computed("admin")],
48
- ["can_create_execution_in", union(computed("member"), computed("guest"))],
49
- ["can_create_agent_share", computed("admin")],
50
- ["can_create_agent_instance", computed("member")],
51
- ["can_create_team", computed("admin")],
52
- ["can_grant_access", computed("admin")],
53
- ["can_view_access", computed("viewer")],
54
- ["can_view_billing", computed("viewer")],
55
- ["can_manage_billing", computed("admin")],
56
- ],
57
- });
58
- //# sourceMappingURL=organization.js.map