@simetrajs/designer 0.3.0-next.6 → 0.3.0-next.7
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/dist/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as version } from "./package-
|
|
2
|
+
import { t as version } from "./package-quL25n7v.js";
|
|
3
3
|
import { n as TOOL_NAMES } from "./types-CMcZhIci.js";
|
|
4
4
|
import { defineCommand, runCommand, runMain, showUsage } from "citty";
|
|
5
5
|
// src/main.ts
|
|
@@ -11,7 +11,7 @@ const main = defineCommand({
|
|
|
11
11
|
},
|
|
12
12
|
subCommands: {
|
|
13
13
|
...Object.fromEntries(TOOL_NAMES.map((name) => [name, () => import("./command-BfioPN5J.js").then((m) => m.commandByName(name))])),
|
|
14
|
-
mcp: () => import("./mcp-
|
|
14
|
+
mcp: () => import("./mcp-D_q-szXk.js").then((m) => m.default),
|
|
15
15
|
init: () => import("./init-BS7fCOls.js").then((m) => m.default)
|
|
16
16
|
}
|
|
17
17
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { d as parseDataLaunch, f as databaseResource, i as structureOf, l as checkEnvName, n as TOOLS, o as formatDiagnostics, r as presentation, t as invoke, u as dataResource } from "./invoke-Dkbpi4Fq.js";
|
|
3
3
|
import { a as dataWriteHint, l as readOnlyHint, n as trimSlash, o as databaseWriteHint, p as UsageError, r as ALLOW_RIGHTS_WRITE_FLAG } from "./default-dir-DerxTbci.js";
|
|
4
|
-
import { t as version } from "./package-
|
|
4
|
+
import { t as version } from "./package-quL25n7v.js";
|
|
5
5
|
import { t as mcpArgs } from "./mcp-args-D63akJ97.js";
|
|
6
6
|
import { defineCommand } from "citty";
|
|
7
7
|
import { z } from "zod";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simetrajs/designer",
|
|
3
|
-
"version": "0.3.0-next.
|
|
3
|
+
"version": "0.3.0-next.7",
|
|
4
4
|
"description": "Simetra developer tools: command line and MCP server over the metadata compiler",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"simetra",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"pg-connection-string": "2.14.1",
|
|
38
38
|
"smol-toml": "1.9.1",
|
|
39
39
|
"zod": "^4.6.7",
|
|
40
|
-
"simetra": "0.3.0-next.
|
|
40
|
+
"simetra": "0.3.0-next.7"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@arethetypeswrong/cli": "0.18.5",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "6b120c1da2e623d3a4250e4e29c35ebe21ef7467",
|
|
61
61
|
"scripts": {
|
|
62
62
|
"build": "tsc --noEmit",
|
|
63
63
|
"build:package": "tsdown",
|
|
@@ -129,8 +129,45 @@ with a trigger on the target table, see "Carrier copies").
|
|
|
129
129
|
reference becomes a composite foreign key within the scope.
|
|
130
130
|
- **`rightsContainer`** — the catalog is a rights container: roles can be
|
|
131
131
|
assigned on its rows. `"rightsContainer": true`
|
|
132
|
-
- **`containerBinding`** — the
|
|
133
|
-
`"containerBinding": "<attribute>"
|
|
132
|
+
- **`containerBinding`** — the `Ref` attribute that binds a row to its
|
|
133
|
+
container. `"containerBinding": "<attribute>"`; the path form
|
|
134
|
+
`["<ref attribute>", "<attribute>"]` is a schema error (it stays valid for
|
|
135
|
+
`ownership` and `access`). The target is a `rightsContainer` catalog (a
|
|
136
|
+
direct binding) or an object with its own `containerBinding` (a chain, of
|
|
137
|
+
any length: comment → task → project, where only the project is a container). The container of a row is the first
|
|
138
|
+
`rightsContainer` the chain reaches, so a container never continues the
|
|
139
|
+
chain. A hierarchy (a kind whose rows point at a parent row of the same
|
|
140
|
+
kind) is not a chain: bind every node directly to its container, never
|
|
141
|
+
through the parent attribute, because a binding to the kind itself is a
|
|
142
|
+
cycle. Any cycle in the kind graph, including a
|
|
143
|
+
reference to itself and two containers bound to each other, is
|
|
144
|
+
`rights.container-binding-cycle` on every kind of the cycle; a target that
|
|
145
|
+
is neither a container nor bound is `rights.container-target`.
|
|
146
|
+
|
|
147
|
+
A chained row carries a platform-owned copy of its binding, a standard
|
|
148
|
+
column named from the binding attribute and the end column of the direct
|
|
149
|
+
binding (`rights.carrier-column-taken` on a clash). The platform writes it;
|
|
150
|
+
a value in a request is ignored. A read policy compares only that column, so
|
|
151
|
+
the cost of a read does not grow with the chain. A container role reads the
|
|
152
|
+
chained row when the grant covers its kind.
|
|
153
|
+
|
|
154
|
+
**Rebinding.** Changing the binding attribute of a row whose kind has chained
|
|
155
|
+
descendants moves all of them to another container. The platform does not
|
|
156
|
+
check a right for this yet: rebinding a row runs the whole copy cascade with
|
|
157
|
+
no rights check beyond the right to update the row itself. The target rule
|
|
158
|
+
is that the actor also needs `update` at extent `any` on every descendant
|
|
159
|
+
kind, in the container before and after.
|
|
160
|
+
|
|
161
|
+
**Limits.** Reading costs the same at any depth. Writing pays: a rebind
|
|
162
|
+
rewrites the copies of all descendants on every level below, in the same
|
|
163
|
+
transaction, one `UPDATE` per level through the foreign key index. Measured
|
|
164
|
+
on one developer machine (16 cores, Postgres 17 on the local stack, light
|
|
165
|
+
load), one task moved between two projects, 5 replies per
|
|
166
|
+
comment: 10 comments (60 copies) 6.5 ms median, 100 comments (600 copies)
|
|
167
|
+
47 ms, 1 000 comments (6 000 copies) 489 ms (p90 528 ms), roughly 80 µs per
|
|
168
|
+
rewritten row. Keep the number of descendants of one row that can be
|
|
169
|
+
rebound in a single command in the low thousands, and give a deep or wide
|
|
170
|
+
subtree its own container instead of rebinding it.
|
|
134
171
|
- **`access`** — the project access dimensions that narrow the rows, each with
|
|
135
172
|
its carrier to the dimension's value catalog.
|
|
136
173
|
`"access": [{ "attribute": "<attribute>", "dimension": "<dimension>" }]` or
|
|
@@ -209,7 +246,11 @@ the role's key in an adopted assignment table of the same level).
|
|
|
209
246
|
objects of that scope kind, only `read` on unscoped ones. The scope kind
|
|
210
247
|
needs a membership.
|
|
211
248
|
- `{ "container": <ref> }` — per row of a `rightsContainer` catalog: objects
|
|
212
|
-
whose `containerBinding`
|
|
249
|
+
whose `containerBinding` chain ends in it. Any such assignment also gives
|
|
250
|
+
implicit `read` of the container's own row, even for a role with no grants.
|
|
251
|
+
It covers that row only: not its tabular sections, no write, no
|
|
252
|
+
change-channel subscription, and a `rights_require` check without a target
|
|
253
|
+
row does not take it.
|
|
213
254
|
- `"everyUser"` — every valid user without an assignment: unscoped objects,
|
|
214
255
|
`own` or a dimension extent only, no `fullAccess`, no source keys.
|
|
215
256
|
|