@stigmer/server 3.27.1 → 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.
- package/README.md +2 -0
- package/dist/authorization/authorizer.d.ts +7 -5
- package/dist/authorization/authorizer.d.ts.map +1 -1
- package/dist/authorization/authorizer.js +7 -5
- package/dist/authorization/authorizer.js.map +1 -1
- package/dist/authorization/derived-tuples.d.ts +3 -1
- package/dist/authorization/derived-tuples.d.ts.map +1 -1
- package/dist/authorization/derived-tuples.js +52 -2
- package/dist/authorization/derived-tuples.js.map +1 -1
- package/dist/authorization/evaluator.d.ts +9 -10
- package/dist/authorization/evaluator.d.ts.map +1 -1
- package/dist/authorization/evaluator.js.map +1 -1
- package/dist/authorization/list-read-scope.d.ts.map +1 -1
- package/dist/authorization/list-read-scope.js +29 -18
- package/dist/authorization/list-read-scope.js.map +1 -1
- package/dist/authorization/model/bindings.d.ts +41 -0
- package/dist/authorization/model/bindings.d.ts.map +1 -0
- package/dist/authorization/model/bindings.js +89 -0
- package/dist/authorization/model/bindings.js.map +1 -0
- package/dist/authorization/model/data/authorization-model.json +3114 -0
- package/dist/authorization/model/default-of.d.ts +2 -2
- package/dist/authorization/model/execution-viewer.d.ts +3 -0
- package/dist/authorization/model/execution-viewer.d.ts.map +1 -0
- package/dist/authorization/model/execution-viewer.js +50 -0
- package/dist/authorization/model/execution-viewer.js.map +1 -0
- package/dist/authorization/model/index.d.ts +33 -21
- package/dist/authorization/model/index.d.ts.map +1 -1
- package/dist/authorization/model/index.js +74 -52
- package/dist/authorization/model/index.js.map +1 -1
- package/dist/authorization/model/openfga-json.d.ts +18 -0
- package/dist/authorization/model/openfga-json.d.ts.map +1 -0
- package/dist/authorization/model/openfga-json.js +266 -0
- package/dist/authorization/model/openfga-json.js.map +1 -0
- package/dist/authorization/model/rewrite.d.ts +39 -67
- package/dist/authorization/model/rewrite.d.ts.map +1 -1
- package/dist/authorization/model/rewrite.js +1 -117
- package/dist/authorization/model/rewrite.js.map +1 -1
- package/dist/authorization/strict-json.d.ts +20 -0
- package/dist/authorization/strict-json.d.ts.map +1 -0
- package/dist/authorization/strict-json.js +45 -0
- package/dist/authorization/strict-json.js.map +1 -0
- package/dist/boot/compose.d.ts.map +1 -1
- package/dist/boot/compose.js +9 -7
- package/dist/boot/compose.js.map +1 -1
- package/dist/boot/list-indexes.d.ts.map +1 -1
- package/dist/boot/list-indexes.js +6 -0
- package/dist/boot/list-indexes.js.map +1 -1
- package/dist/domain/iampolicy/list-index.d.ts +2 -0
- package/dist/domain/iampolicy/list-index.d.ts.map +1 -0
- package/dist/domain/iampolicy/list-index.js +32 -0
- package/dist/domain/iampolicy/list-index.js.map +1 -0
- package/dist/domain/iampolicy/resource-store.d.ts.map +1 -1
- package/dist/domain/iampolicy/resource-store.js +24 -11
- package/dist/domain/iampolicy/resource-store.js.map +1 -1
- package/dist/domain/workflowexecution/list-index.d.ts +1 -1
- package/dist/extensions/list-read-scope.d.ts +20 -3
- package/dist/extensions/list-read-scope.d.ts.map +1 -1
- package/dist/extensions/list-read-scope.js +22 -2
- package/dist/extensions/list-read-scope.js.map +1 -1
- package/dist/index.d.ts +8 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -5
- package/dist/index.js.map +1 -1
- package/package.json +7 -6
- package/src/authorization/README.md +48 -39
- package/src/authorization/__tests__/authorizer.test.ts +5 -14
- package/src/authorization/__tests__/derived-tuples.test.ts +192 -17
- package/src/authorization/__tests__/evaluator.test.ts +53 -160
- package/src/authorization/__tests__/facts.test.ts +5 -11
- package/src/authorization/__tests__/list-read-scope.measure.test.ts +424 -62
- package/src/authorization/__tests__/list-read-scope.test.ts +15 -14
- package/src/authorization/__tests__/organization-directory.test.ts +2 -2
- package/src/authorization/__tests__/store-test-kit.ts +246 -0
- package/src/authorization/__tests__/store-tests.test.ts +91 -223
- package/src/authorization/__tests__/support.ts +30 -2
- package/src/authorization/__tests__/throwaway-model.ts +75 -0
- package/src/authorization/__tests__/wire-permissions.test.ts +141 -107
- package/src/authorization/authorizer.ts +7 -5
- package/src/authorization/derived-tuples.ts +105 -16
- package/src/authorization/evaluator.ts +8 -10
- package/src/authorization/list-read-scope.ts +37 -22
- package/src/authorization/model/__tests__/openfga-json.test.ts +353 -0
- package/src/authorization/model/__tests__/registry.test.ts +102 -276
- package/src/authorization/model/bindings.ts +131 -0
- package/src/authorization/model/data/authorization-model.json +3114 -0
- package/src/authorization/model/default-of.ts +2 -2
- package/src/authorization/model/execution-viewer.ts +56 -0
- package/src/authorization/model/index.ts +81 -72
- package/src/authorization/model/openfga-json.ts +310 -0
- package/src/authorization/model/rewrite.ts +39 -188
- package/src/authorization/strict-json.ts +52 -0
- package/src/boot/__tests__/list-indexes.test.ts +4 -0
- package/src/boot/compose.ts +9 -7
- package/src/boot/list-indexes.ts +6 -0
- package/src/domain/iampolicy/__tests__/resource-store.test.ts +65 -5
- package/src/domain/iampolicy/list-index.ts +33 -0
- package/src/domain/iampolicy/resource-store.ts +24 -11
- package/src/extensions/__tests__/built-in-authorization-composed.test.ts +3 -6
- package/src/extensions/list-read-scope.ts +32 -4
- package/src/index.ts +20 -44
- package/dist/authorization/model/agent.d.ts +0 -2
- package/dist/authorization/model/agent.d.ts.map +0 -1
- package/dist/authorization/model/agent.js +0 -43
- package/dist/authorization/model/agent.js.map +0 -1
- package/dist/authorization/model/agent_channel.d.ts +0 -2
- package/dist/authorization/model/agent_channel.d.ts.map +0 -1
- package/dist/authorization/model/agent_channel.js +0 -39
- package/dist/authorization/model/agent_channel.js.map +0 -1
- package/dist/authorization/model/agent_execution.d.ts +0 -2
- package/dist/authorization/model/agent_execution.d.ts.map +0 -1
- package/dist/authorization/model/agent_execution.js +0 -25
- package/dist/authorization/model/agent_execution.js.map +0 -1
- package/dist/authorization/model/agent_instance.d.ts +0 -2
- package/dist/authorization/model/agent_instance.d.ts.map +0 -1
- package/dist/authorization/model/agent_instance.js +0 -48
- package/dist/authorization/model/agent_instance.js.map +0 -1
- package/dist/authorization/model/agent_share.d.ts +0 -2
- package/dist/authorization/model/agent_share.d.ts.map +0 -1
- package/dist/authorization/model/agent_share.js +0 -29
- package/dist/authorization/model/agent_share.js.map +0 -1
- package/dist/authorization/model/api_key.d.ts +0 -2
- package/dist/authorization/model/api_key.d.ts.map +0 -1
- package/dist/authorization/model/api_key.js +0 -27
- package/dist/authorization/model/api_key.js.map +0 -1
- package/dist/authorization/model/artifact.d.ts +0 -2
- package/dist/authorization/model/artifact.d.ts.map +0 -1
- package/dist/authorization/model/artifact.js +0 -27
- package/dist/authorization/model/artifact.js.map +0 -1
- package/dist/authorization/model/channel_app.d.ts +0 -2
- package/dist/authorization/model/channel_app.d.ts.map +0 -1
- package/dist/authorization/model/channel_app.js +0 -28
- package/dist/authorization/model/channel_app.js.map +0 -1
- package/dist/authorization/model/environment.d.ts +0 -2
- package/dist/authorization/model/environment.d.ts.map +0 -1
- package/dist/authorization/model/environment.js +0 -33
- package/dist/authorization/model/environment.js.map +0 -1
- package/dist/authorization/model/execution_context.d.ts +0 -2
- package/dist/authorization/model/execution_context.d.ts.map +0 -1
- package/dist/authorization/model/execution_context.js +0 -19
- package/dist/authorization/model/execution_context.js.map +0 -1
- package/dist/authorization/model/iam_policy.d.ts +0 -2
- package/dist/authorization/model/iam_policy.d.ts.map +0 -1
- package/dist/authorization/model/iam_policy.js +0 -31
- package/dist/authorization/model/iam_policy.js.map +0 -1
- package/dist/authorization/model/identity_account.d.ts +0 -2
- package/dist/authorization/model/identity_account.d.ts.map +0 -1
- package/dist/authorization/model/identity_account.js +0 -25
- package/dist/authorization/model/identity_account.js.map +0 -1
- package/dist/authorization/model/mcp_server.d.ts +0 -2
- package/dist/authorization/model/mcp_server.d.ts.map +0 -1
- package/dist/authorization/model/mcp_server.js +0 -38
- package/dist/authorization/model/mcp_server.js.map +0 -1
- package/dist/authorization/model/memory.d.ts +0 -2
- package/dist/authorization/model/memory.d.ts.map +0 -1
- package/dist/authorization/model/memory.js +0 -26
- package/dist/authorization/model/memory.js.map +0 -1
- package/dist/authorization/model/oauth_app.d.ts +0 -2
- package/dist/authorization/model/oauth_app.d.ts.map +0 -1
- package/dist/authorization/model/oauth_app.js +0 -31
- package/dist/authorization/model/oauth_app.js.map +0 -1
- package/dist/authorization/model/organization.d.ts +0 -2
- package/dist/authorization/model/organization.d.ts.map +0 -1
- package/dist/authorization/model/organization.js +0 -58
- package/dist/authorization/model/organization.js.map +0 -1
- package/dist/authorization/model/platform_client.d.ts +0 -2
- package/dist/authorization/model/platform_client.d.ts.map +0 -1
- package/dist/authorization/model/platform_client.js +0 -31
- package/dist/authorization/model/platform_client.js.map +0 -1
- package/dist/authorization/model/plugin.d.ts +0 -2
- package/dist/authorization/model/plugin.d.ts.map +0 -1
- package/dist/authorization/model/plugin.js +0 -45
- package/dist/authorization/model/plugin.js.map +0 -1
- package/dist/authorization/model/schedule.d.ts +0 -2
- package/dist/authorization/model/schedule.d.ts.map +0 -1
- package/dist/authorization/model/schedule.js +0 -34
- package/dist/authorization/model/schedule.js.map +0 -1
- package/dist/authorization/model/session.d.ts +0 -2
- package/dist/authorization/model/session.d.ts.map +0 -1
- package/dist/authorization/model/session.js +0 -38
- package/dist/authorization/model/session.js.map +0 -1
- package/dist/authorization/model/skill.d.ts +0 -2
- package/dist/authorization/model/skill.d.ts.map +0 -1
- package/dist/authorization/model/skill.js +0 -39
- package/dist/authorization/model/skill.js.map +0 -1
- package/dist/authorization/model/workflow.d.ts +0 -2
- package/dist/authorization/model/workflow.d.ts.map +0 -1
- package/dist/authorization/model/workflow.js +0 -39
- package/dist/authorization/model/workflow.js.map +0 -1
- package/dist/authorization/model/workflow_execution.d.ts +0 -2
- package/dist/authorization/model/workflow_execution.d.ts.map +0 -1
- package/dist/authorization/model/workflow_execution.js +0 -33
- package/dist/authorization/model/workflow_execution.js.map +0 -1
- package/dist/authorization/model/workflow_instance.d.ts +0 -2
- package/dist/authorization/model/workflow_instance.d.ts.map +0 -1
- package/dist/authorization/model/workflow_instance.js +0 -96
- package/dist/authorization/model/workflow_instance.js.map +0 -1
- package/dist/authorization/store-test-kit.d.ts +0 -62
- package/dist/authorization/store-test-kit.d.ts.map +0 -1
- package/dist/authorization/store-test-kit.js +0 -265
- package/dist/authorization/store-test-kit.js.map +0 -1
- package/src/authorization/__tests__/fixtures/fga/agent-channel-owner.fga.yaml +0 -112
- package/src/authorization/__tests__/fixtures/fga/agent-instance-creation.fga.yaml +0 -177
- package/src/authorization/__tests__/fixtures/fga/agent-share-owner.fga.yaml +0 -109
- package/src/authorization/__tests__/fixtures/fga/artifact-org-and-owner.fga.yaml +0 -128
- package/src/authorization/__tests__/fixtures/fga/blueprint-private-visibility.fga.yaml +0 -318
- package/src/authorization/__tests__/fixtures/fga/channel-app-owner.fga.yaml +0 -125
- package/src/authorization/__tests__/fixtures/fga/channel-participation.fga.yaml +0 -201
- package/src/authorization/__tests__/fixtures/fga/channel-session-visibility.fga.yaml +0 -187
- package/src/authorization/__tests__/fixtures/fga/default-instance-inheritance.fga.yaml +0 -214
- package/src/authorization/__tests__/fixtures/fga/mcp-server-authoring.fga.yaml +0 -129
- package/src/authorization/__tests__/fixtures/fga/memory-subject-only.fga.yaml +0 -72
- package/src/authorization/__tests__/fixtures/fga/org-admin-owner-inheritance.fga.yaml +0 -308
- package/src/authorization/__tests__/fixtures/fga/org-shared-environment.fga.yaml +0 -144
- package/src/authorization/__tests__/fixtures/fga/platform-visibility.fga.yaml +0 -199
- package/src/authorization/__tests__/fixtures/fga/provider-standing-viewer.fga.yaml +0 -40
- package/src/authorization/__tests__/fixtures/fga/reserved-label-writer.fga.yaml +0 -41
- package/src/authorization/__tests__/fixtures/fga/schedule-owner.fga.yaml +0 -113
- package/src/authorization/__tests__/fixtures/fga/schedule-session-visibility.fga.yaml +0 -214
- package/src/authorization/__tests__/fixtures/fga/session-personal-resource.fga.yaml +0 -117
- package/src/authorization/__tests__/fixtures/fga/workflow-execution-sharing.fga.yaml +0 -190
- package/src/authorization/model/agent.ts +0 -64
- package/src/authorization/model/agent_channel.ts +0 -57
- package/src/authorization/model/agent_execution.ts +0 -33
- package/src/authorization/model/agent_instance.ts +0 -66
- package/src/authorization/model/agent_share.ts +0 -40
- package/src/authorization/model/api_key.ts +0 -28
- package/src/authorization/model/artifact.ts +0 -38
- package/src/authorization/model/channel_app.ts +0 -39
- package/src/authorization/model/environment.ts +0 -48
- package/src/authorization/model/execution_context.ts +0 -20
- package/src/authorization/model/iam_policy.ts +0 -42
- package/src/authorization/model/identity_account.ts +0 -26
- package/src/authorization/model/mcp_server.ts +0 -59
- package/src/authorization/model/memory.ts +0 -27
- package/src/authorization/model/oauth_app.ts +0 -43
- package/src/authorization/model/organization.ts +0 -59
- package/src/authorization/model/platform_client.ts +0 -43
- package/src/authorization/model/plugin.ts +0 -66
- package/src/authorization/model/schedule.ts +0 -49
- package/src/authorization/model/session.ts +0 -50
- package/src/authorization/model/skill.ts +0 -60
- package/src/authorization/model/workflow.ts +0 -60
- package/src/authorization/model/workflow_execution.ts +0 -46
- package/src/authorization/model/workflow_instance.ts +0 -125
- package/src/authorization/store-test-kit.ts +0 -395
|
@@ -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 +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 +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 +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 +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 +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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"organization.js","sourceRoot":"","sources":["../../../src/authorization/model/organization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,qFAAqF,CAAC;AACtH,OAAO,EAAE,kBAAkB,EAAE,MAAM,2DAA2D,CAAC;AAE/F,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE9E,MAAM,CAAC,MAAM,uBAAuB,GAAG,WAAW,CAAC;IACjD,IAAI,EAAE,eAAe,CAAC,YAAY;IAClC,MAAM,EAAE,kBAAkB;IAC1B,MAAM,EAAE,oCAAoC;IAC5C,SAAS,EAAE;QACT,CAAC,OAAO,EAAE,MAAM,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AO,CAAC,CAAC;QAC5C,CAAC,gBAAgB,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACrC,CAAC,6BAA6B,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QAClD,CAAC,sBAAsB,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC3C,CAAC,4BAA4B,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACjD,CAAC,wBAAwB,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC7C,CAAC,yBAAyB,EAAE,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;QACzE,CAAC,wBAAwB,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC7C,CAAC,2BAA2B,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACjD,CAAC,iBAAiB,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACtC,CAAC,kBAAkB,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACvC,CAAC,iBAAiB,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACvC,CAAC,kBAAkB,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACxC,CAAC,oBAAoB,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;KAC1C;CACF,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform_client.d.ts","sourceRoot":"","sources":["../../../src/authorization/model/platform_client.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,yBAAyB,wCAqBpC,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Transcript of fga/model/iam/platform_client.fga — relation for relation
|
|
3
|
-
* the oauth_app shape: organization-scoped, an `owner` with no admin arm
|
|
4
|
-
* and a `viewer` that has one. A platform client holds credential material,
|
|
5
|
-
* so the model is restricted: its creator (the owner) edits, deletes,
|
|
6
|
-
* rotates and grants; the organization's admins may view it; ordinary
|
|
7
|
-
* members have no access at all, which is why listByOrg narrows through
|
|
8
|
-
* the list read scope. There is no public level.
|
|
9
|
-
*/
|
|
10
|
-
import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
11
|
-
import { PlatformClientSchema } from "@stigmer/protos/ai/stigmer/iam/platformclient/v1/api_pb";
|
|
12
|
-
import { computed, declareKind, direct, from, objectOf, union, } from "./rewrite.js";
|
|
13
|
-
export const platformClientDeclaration = declareKind({
|
|
14
|
-
kind: ApiResourceKind.platform_client,
|
|
15
|
-
schema: PlatformClientSchema,
|
|
16
|
-
source: "fga/model/iam/platform_client.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=platform_client.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform_client.js","sourceRoot":"","sources":["../../../src/authorization/model/platform_client.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,qFAAqF,CAAC;AACtH,OAAO,EAAE,oBAAoB,EAAE,MAAM,yDAAyD,CAAC;AAE/F,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,mCAAmC;IAC3C,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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/authorization/model/plugin.ts"],"names":[],"mappings":"AA4BA,eAAO,MAAM,iBAAiB,wCAqC5B,CAAC"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Transcript of fga/model/agentic/plugin.fga — the unit of install, shaped
|
|
3
|
-
* exactly like a skill: an organization-owned blueprint whose owner is the
|
|
4
|
-
* installer (and, through the organization, its admins), whose viewers are
|
|
5
|
-
* the org's members and viewers and the platform viewer. Its verbs are the blueprint set: `can_view`, `can_edit`
|
|
6
|
-
* (visibility), `can_delete` (uninstall), `can_grant_access`,
|
|
7
|
-
* `can_view_access`; `can_use` is carried as the model's word for
|
|
8
|
-
* "install from" though no wire permission names it yet. `team#member` on
|
|
9
|
-
* `viewer` is the Enterprise team grant, which no open-source tuple ever
|
|
10
|
-
* names.
|
|
11
|
-
*
|
|
12
|
-
* The members a plugin materialises are NOT reached through this type:
|
|
13
|
-
* each is an ordinary skill, MCP server, agent or workflow with its own
|
|
14
|
-
* tuples, written by its own chain as the installing caller.
|
|
15
|
-
*/
|
|
16
|
-
import { PluginSchema } from "@stigmer/protos/ai/stigmer/agentic/plugin/v1/api_pb";
|
|
17
|
-
import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
18
|
-
import { computed, declareKind, direct, from, objectOf, union, usersetOf, } from "./rewrite.js";
|
|
19
|
-
export const pluginDeclaration = declareKind({
|
|
20
|
-
kind: ApiResourceKind.plugin,
|
|
21
|
-
schema: PluginSchema,
|
|
22
|
-
source: "fga/model/agentic/plugin.fga",
|
|
23
|
-
relations: [
|
|
24
|
-
["organization", direct(objectOf("organization"))],
|
|
25
|
-
[
|
|
26
|
-
"owner",
|
|
27
|
-
union(direct(objectOf("identity_account")), from("admin", "organization")),
|
|
28
|
-
],
|
|
29
|
-
[
|
|
30
|
-
"platform_viewer",
|
|
31
|
-
direct(usersetOf("identity_provider", "platform_user")),
|
|
32
|
-
],
|
|
33
|
-
[
|
|
34
|
-
"viewer",
|
|
35
|
-
union(direct(objectOf("identity_account"), usersetOf("organization", "member"), usersetOf("organization", "viewer"), usersetOf("team", "member")), computed("owner"), computed("platform_viewer")),
|
|
36
|
-
],
|
|
37
|
-
["can_view", computed("viewer")],
|
|
38
|
-
["can_edit", computed("owner")],
|
|
39
|
-
["can_delete", computed("owner")],
|
|
40
|
-
["can_use", computed("viewer")],
|
|
41
|
-
["can_grant_access", computed("owner")],
|
|
42
|
-
["can_view_access", computed("viewer")],
|
|
43
|
-
],
|
|
44
|
-
});
|
|
45
|
-
//# sourceMappingURL=plugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|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CAAC,SAAS,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAC/B,CAAC,kBAAkB,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACvC,CAAC,iBAAiB,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;KACxC;CACF,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schedule.d.ts","sourceRoot":"","sources":["../../../src/authorization/model/schedule.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,mBAAmB,wCA0B9B,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Transcript of fga/model/agentic/schedule.fga — a scheduled run's
|
|
3
|
-
* definition, admin-owned like a blueprint and viewable by its owners and
|
|
4
|
-
* explicit grantees. The sessions its fires create name it back through
|
|
5
|
-
* `session#schedule`, a link the cloud writes and this edition does not
|
|
6
|
-
* (session.ts); the schedule's own relations are unaffected. An explicit
|
|
7
|
-
* grant may name an Enterprise team (`team#member`), which no open-source
|
|
8
|
-
* tuple ever does.
|
|
9
|
-
*/
|
|
10
|
-
import { ScheduleSchema } from "@stigmer/protos/ai/stigmer/agentic/schedule/v1/api_pb";
|
|
11
|
-
import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
12
|
-
import { computed, declareKind, direct, from, objectOf, union, usersetOf, } from "./rewrite.js";
|
|
13
|
-
export const scheduleDeclaration = declareKind({
|
|
14
|
-
kind: ApiResourceKind.schedule,
|
|
15
|
-
schema: ScheduleSchema,
|
|
16
|
-
source: "fga/model/agentic/schedule.fga",
|
|
17
|
-
relations: [
|
|
18
|
-
["organization", direct(objectOf("organization"))],
|
|
19
|
-
[
|
|
20
|
-
"owner",
|
|
21
|
-
union(direct(objectOf("identity_account")), from("admin", "organization")),
|
|
22
|
-
],
|
|
23
|
-
[
|
|
24
|
-
"viewer",
|
|
25
|
-
union(direct(objectOf("identity_account"), usersetOf("team", "member")), computed("owner")),
|
|
26
|
-
],
|
|
27
|
-
["can_view", computed("viewer")],
|
|
28
|
-
["can_edit", computed("owner")],
|
|
29
|
-
["can_delete", computed("owner")],
|
|
30
|
-
["can_grant_access", computed("owner")],
|
|
31
|
-
["can_view_access", computed("viewer")],
|
|
32
|
-
],
|
|
33
|
-
});
|
|
34
|
-
//# sourceMappingURL=schedule.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schedule.js","sourceRoot":"","sources":["../../../src/authorization/model/schedule.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;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,EACL,SAAS,GACV,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;YACE,OAAO;YACP,KAAK,CACH,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,EACpC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAC9B;SACF;QACD;YACE,QAAQ;YACR,KAAK,CACH,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,EACjE,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,OAAO,CAAC,CAAC;QACvC,CAAC,iBAAiB,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;KACxC;CACF,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/authorization/model/session.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,kBAAkB,wCAyB7B,CAAC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Transcript of fga/model/agentic/session.fga — a personal resource: the
|
|
3
|
-
* owner and explicit grantees, and NO admin arm anywhere ("private
|
|
4
|
-
* conversations that admins have no business accessing", the file's own
|
|
5
|
-
* words). Three parent links beside the organization: `agent_instance`,
|
|
6
|
-
* `channel` and `schedule`. None is a `kind_meta` fact — the cloud's
|
|
7
|
-
* channel and schedule lanes write them — so on this edition the
|
|
8
|
-
* derivation produces no such tuple and `viewer from channel` / `viewer
|
|
9
|
-
* from schedule` resolve to nobody; the lines stand in the transcript
|
|
10
|
-
* because they are the model's, and a scheduled run reaches its creator
|
|
11
|
-
* through the fire caller's stamp on the session instead.
|
|
12
|
-
*/
|
|
13
|
-
import { SessionSchema } from "@stigmer/protos/ai/stigmer/agentic/session/v1/api_pb";
|
|
14
|
-
import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
15
|
-
import { computed, declareKind, direct, from, objectOf, union, } from "./rewrite.js";
|
|
16
|
-
export const sessionDeclaration = declareKind({
|
|
17
|
-
kind: ApiResourceKind.session,
|
|
18
|
-
schema: SessionSchema,
|
|
19
|
-
source: "fga/model/agentic/session.fga",
|
|
20
|
-
relations: [
|
|
21
|
-
["organization", direct(objectOf("organization"))],
|
|
22
|
-
["agent_instance", direct(objectOf("agent_instance"))],
|
|
23
|
-
["channel", direct(objectOf("agent_channel"))],
|
|
24
|
-
["schedule", direct(objectOf("schedule"))],
|
|
25
|
-
["owner", direct(objectOf("identity_account"))],
|
|
26
|
-
["viewer", union(direct(objectOf("identity_account")), computed("owner"))],
|
|
27
|
-
[
|
|
28
|
-
"can_view",
|
|
29
|
-
union(computed("viewer"), from("viewer", "channel"), from("viewer", "schedule")),
|
|
30
|
-
],
|
|
31
|
-
["can_edit", computed("owner")],
|
|
32
|
-
["can_delete", computed("owner")],
|
|
33
|
-
["can_create_execution_in", computed("viewer")],
|
|
34
|
-
["can_grant_access", computed("owner")],
|
|
35
|
-
["can_view_access", computed("viewer")],
|
|
36
|
-
],
|
|
37
|
-
});
|
|
38
|
-
//# sourceMappingURL=session.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/authorization/model/session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,sDAAsD,CAAC;AACrF,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,kBAAkB,GAAG,WAAW,CAAC;IAC5C,IAAI,EAAE,eAAe,CAAC,OAAO;IAC7B,MAAM,EAAE,aAAa;IACrB,MAAM,EAAE,+BAA+B;IACvC,SAAS,EAAE;QACT,CAAC,cAAc,EAAE,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC;QAClD,CAAC,gBAAgB,EAAE,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAC;QACtD,CAAC,SAAS,EAAE,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC;QAC9C,CAAC,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;QAC1C,CAAC,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,CAAC;QAC/C,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;QAC1E;YACE,UAAU;YACV,KAAK,CACH,QAAQ,CAAC,QAAQ,CAAC,EAClB,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,EACzB,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,CAC3B;SACF;QACD,CAAC,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC/B,CAAC,YAAY,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC,yBAAyB,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAC/C,CAAC,kBAAkB,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACvC,CAAC,iBAAiB,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;KACxC;CACF,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skill.d.ts","sourceRoot":"","sources":["../../../src/authorization/model/skill.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,gBAAgB,wCAsC3B,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Transcript of fga/model/agentic/skill.fga — a blueprint whose verbs are
|
|
3
|
-
* `can_use` and `can_clone` rather than `can_execute`. Only `can_view`,
|
|
4
|
-
* `can_edit`, `can_delete`, `can_grant_access` and `can_view_access` are
|
|
5
|
-
* in the wire's IamPermission vocabulary; the others are the model's and
|
|
6
|
-
* are carried so the transcript is the file. `team#member` on `viewer` is
|
|
7
|
-
* the Enterprise team grant, which no open-source tuple ever names.
|
|
8
|
-
*/
|
|
9
|
-
import { SkillSchema } from "@stigmer/protos/ai/stigmer/agentic/skill/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, usersetOf, } from "./rewrite.js";
|
|
12
|
-
export const skillDeclaration = declareKind({
|
|
13
|
-
kind: ApiResourceKind.skill,
|
|
14
|
-
schema: SkillSchema,
|
|
15
|
-
source: "fga/model/agentic/skill.fga",
|
|
16
|
-
relations: [
|
|
17
|
-
["organization", direct(objectOf("organization"))],
|
|
18
|
-
[
|
|
19
|
-
"owner",
|
|
20
|
-
union(direct(objectOf("identity_account")), from("admin", "organization")),
|
|
21
|
-
],
|
|
22
|
-
[
|
|
23
|
-
"platform_viewer",
|
|
24
|
-
direct(usersetOf("identity_provider", "platform_user")),
|
|
25
|
-
],
|
|
26
|
-
[
|
|
27
|
-
"viewer",
|
|
28
|
-
union(direct(objectOf("identity_account"), usersetOf("organization", "member"), usersetOf("organization", "viewer"), usersetOf("team", "member")), computed("owner"), computed("platform_viewer")),
|
|
29
|
-
],
|
|
30
|
-
["can_view", computed("viewer")],
|
|
31
|
-
["can_edit", computed("owner")],
|
|
32
|
-
["can_delete", computed("owner")],
|
|
33
|
-
["can_use", computed("viewer")],
|
|
34
|
-
["can_clone", computed("viewer")],
|
|
35
|
-
["can_grant_access", computed("owner")],
|
|
36
|
-
["can_view_access", computed("viewer")],
|
|
37
|
-
],
|
|
38
|
-
});
|
|
39
|
-
//# sourceMappingURL=skill.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skill.js","sourceRoot":"","sources":["../../../src/authorization/model/skill.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,oDAAoD,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,qFAAqF,CAAC;AAEtH,OAAO,EACL,QAAQ,EACR,WAAW,EACX,MAAM,EACN,IAAI,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,0 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../../src/authorization/model/workflow.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,mBAAmB,wCAsC9B,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Transcript of fga/model/agentic/workflow.fga — the agent's shape
|
|
3
|
-
* without `can_create_instance` (a workflow instance is created through
|
|
4
|
-
* the workflow-instance lane, gated by the organization). Kept as its own
|
|
5
|
-
* transcript, not a shared "blueprint" helper, so the file-by-file drift
|
|
6
|
-
* compare sees exactly this file's lines. `team#member` on `viewer` is the
|
|
7
|
-
* Enterprise team grant, which no open-source tuple ever names.
|
|
8
|
-
*/
|
|
9
|
-
import { WorkflowSchema } from "@stigmer/protos/ai/stigmer/agentic/workflow/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, usersetOf, } from "./rewrite.js";
|
|
12
|
-
export const workflowDeclaration = declareKind({
|
|
13
|
-
kind: ApiResourceKind.workflow,
|
|
14
|
-
schema: WorkflowSchema,
|
|
15
|
-
source: "fga/model/agentic/workflow.fga",
|
|
16
|
-
relations: [
|
|
17
|
-
["organization", direct(objectOf("organization"))],
|
|
18
|
-
[
|
|
19
|
-
"owner",
|
|
20
|
-
union(direct(objectOf("identity_account")), from("admin", "organization")),
|
|
21
|
-
],
|
|
22
|
-
[
|
|
23
|
-
"platform_viewer",
|
|
24
|
-
direct(usersetOf("identity_provider", "platform_user")),
|
|
25
|
-
],
|
|
26
|
-
[
|
|
27
|
-
"viewer",
|
|
28
|
-
union(direct(objectOf("identity_account"), usersetOf("organization", "member"), usersetOf("organization", "viewer"), usersetOf("team", "member")), computed("owner"), computed("platform_viewer")),
|
|
29
|
-
],
|
|
30
|
-
["can_view", computed("viewer")],
|
|
31
|
-
["can_edit", computed("owner")],
|
|
32
|
-
["can_delete", computed("owner")],
|
|
33
|
-
["can_execute", computed("viewer")],
|
|
34
|
-
["can_clone", computed("viewer")],
|
|
35
|
-
["can_grant_access", computed("owner")],
|
|
36
|
-
["can_view_access", computed("viewer")],
|
|
37
|
-
],
|
|
38
|
-
});
|
|
39
|
-
//# sourceMappingURL=workflow.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.js","sourceRoot":"","sources":["../../../src/authorization/model/workflow.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,EACL,SAAS,GACV,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;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,Q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