@ebitex/content-mcp 0.5.205 → 0.5.206
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/errors.d.ts +5 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +18 -1
- package/dist/errors.js.map +1 -1
- package/dist/resources/helpCorpus.generated.js +2 -2
- package/dist/resources/helpCorpus.generated.js.map +1 -1
- package/dist/session.d.ts +10 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +2 -0
- package/dist/session.js.map +1 -1
- package/dist/tools/catalog.d.ts +7 -0
- package/dist/tools/catalog.d.ts.map +1 -1
- package/dist/tools/catalog.js +10 -0
- package/dist/tools/catalog.js.map +1 -1
- package/dist/tools/register.d.ts.map +1 -1
- package/dist/tools/register.js +28 -3
- package/dist/tools/register.js.map +1 -1
- package/dist/tools/whoami.d.ts +6 -1
- package/dist/tools/whoami.d.ts.map +1 -1
- package/dist/tools/whoami.js +4 -1
- package/dist/tools/whoami.js.map +1 -1
- package/package.json +1 -1
package/dist/errors.d.ts
CHANGED
|
@@ -51,4 +51,9 @@ export declare function toContentApiError(response: Response): Promise<ContentAp
|
|
|
51
51
|
* here would remove exactly the field the next call has to set.
|
|
52
52
|
*/
|
|
53
53
|
export declare function describe(status: number, code: string | null, body: unknown, requestId?: string | null): string;
|
|
54
|
+
/**
|
|
55
|
+
* The one sentence an agent can relay to its user. The key's scopes are not the problem here — the
|
|
56
|
+
* role the key runs as is — and the fix is in the key's settings, not in anything the agent can do.
|
|
57
|
+
*/
|
|
58
|
+
export declare function permissionHint(permission: string): string;
|
|
54
59
|
//# sourceMappingURL=errors.d.ts.map
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,wEAAwE;AACxE,qBAAa,eAAgB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;CAQjH;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,eAAe,CAAC,CAkBpF;AAaD;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,GAAE,MAAM,GAAG,IAAW,GAAG,MAAM,CASpH;AASD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAKzD"}
|
package/dist/errors.js
CHANGED
|
@@ -85,12 +85,29 @@ function readRequestId(response, body) {
|
|
|
85
85
|
*/
|
|
86
86
|
export function describe(status, code, body, requestId = null) {
|
|
87
87
|
const statusLine = code ? `HTTP ${status} ${code}` : `HTTP ${status}`;
|
|
88
|
-
const
|
|
88
|
+
const withId = requestId ? `${statusLine}\nRequest id: ${requestId}` : statusLine;
|
|
89
|
+
const missing = missingPermission(status, body);
|
|
90
|
+
const heading = missing ? `${withId}\n${permissionHint(missing)}` : withId;
|
|
89
91
|
if (body === undefined || body === null || body === '')
|
|
90
92
|
return heading;
|
|
91
93
|
const rendered = typeof body === 'string' ? body : safeStringify(body);
|
|
92
94
|
return `${heading}\n${rendered}`;
|
|
93
95
|
}
|
|
96
|
+
/** The permission a `403 permission_denied` names, or null for any other response. */
|
|
97
|
+
function missingPermission(status, body) {
|
|
98
|
+
if (status !== 403 || !body || typeof body !== 'object')
|
|
99
|
+
return null;
|
|
100
|
+
const { error, permission } = body;
|
|
101
|
+
return error === 'permission_denied' && typeof permission === 'string' && permission ? permission : null;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* The one sentence an agent can relay to its user. The key's scopes are not the problem here — the
|
|
105
|
+
* role the key runs as is — and the fix is in the key's settings, not in anything the agent can do.
|
|
106
|
+
*/
|
|
107
|
+
export function permissionHint(permission) {
|
|
108
|
+
return (`Missing permission: ${permission}. The role this key runs as does not hold it, so the key's ` +
|
|
109
|
+
`scopes are not the problem. Ask the user to run the key as a role that has ${permission}.`);
|
|
110
|
+
}
|
|
94
111
|
function safeStringify(value) {
|
|
95
112
|
try {
|
|
96
113
|
return JSON.stringify(value, null, 2);
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,wEAAwE;AACxE,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAC/B,MAAM,CAAQ;IACvB,oGAAoG;IAC3F,IAAI,CAAe;IAC5B,8FAA8F;IACrF,IAAI,CAAS;IACtB;;;OAGG;IACM,SAAS,CAAe;IAEjC,YAAY,MAAc,EAAE,IAAmB,EAAE,IAAa,EAAE,OAAe,EAAE,YAA2B,IAAI;QAC9G,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAA;QAC7B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;CACF;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,QAAkB;IACxD,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAA;IAElD,IAAI,IAAI,GAAY,IAAI,CAAA;IACxB,IAAI,IAAI,GAAkB,IAAI,CAAA;IAC9B,IAAI,IAAI,EAAE,CAAC;QACT,IAAI,CAAC;YACH,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;YACvB,IAAI,IAAI,IAAI,OAAO,IAAI,KA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AA;AAClC,CAAC;AAED,sFAAsF;AACtF,SAAS,iBAAiB,CAAC,MAAc,EAAE,IAAa;IACtD,IAAI,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAA;IACpE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,IAAiD,CAAA;IAC/E,OAAO,KAAK,KAAK,mBAAmB,IAAI,OAAO,UAAU,KAAK,QAAQ,IAAI,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAA;AAC1G,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,UAAkB;IAC/C,OAAO,CACL,uBAAuB,UAAU,6DAA6D;QAC9F,8EAA8E,UAAU,GAAG,CAC5F,CAAA;AACH,CAAC;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;IACvC,CAAC;IAAC,MAAM,CAAC;QACP,gGAAgG;QAChG,0FAA0F;QAC1F,eAAe;QACf,OAAO,MAAM,CAAC,KAAK,CAAC,CAAA;IACtB,CAAC;AACH,CAAC"}
|
|
@@ -6,7 +6,7 @@ export const HELP_TOPICS = [
|
|
|
6
6
|
{
|
|
7
7
|
"slug": "agent-authoring",
|
|
8
8
|
"title": "Building a content model through the API",
|
|
9
|
-
"body": "# Building a content model through the API\n\nThe rest of this help corpus describes Content as you drive it in Composer — tabs, panels, buttons.\nThe concepts all transfer; the steps do not. This page is the same model described in terms of the\nAPI, for a script or an agent working through the Content Management API rather than the interface.\n\nRead this first if you are about to create anything. Everything here is about *what the pieces are*;\nthe exact shape of each request is answered live by the API itself, and you should never guess it.\n\n## The one rule that saves the most time\n\n**Ask the server what things look like; do not assume.**\n\n`GET /field-types` returns every field type this platform has, each with its **own JSON Schema for\nits settings**. That schema is generated from the field type's own definition, so it is never out of\ndate — Composer's Contract builder renders its settings form from exactly this, rather than\nhard-coding a form per type. Use it the same way.\n\n`GET /contracts` and `GET /templates` tell you what this environment already has. Check before\ncreating: a duplicate is much harder to undo than it is to avoid.\n\nWhen a write is refused, the refusal names the failing field and says what is wrong with it. That\nmessage is the fastest route to a correct request. Read it and correct the one thing it names,\nrather than rewriting the payload.\n\n## The pieces, and what each one is for\n\nContent separates four concerns that many systems collapse into one. The separation is the reason\nthe same content can be rendered several ways, and reused in places its author never anticipated.\n\n### Contract — what content *is*\n\nA Contract is a type. It has a name, an external id, and a list of **fields**. Each field names a\nfield type (short text, rich text, number, date, blob, reference, component, presentation, category,\nlink, and so on) and carries that type's own settings.\n\nContracts support **inheritance**. A Contract may name a parent, and it then has the parent's fields\nplus its own. A Contract may be **abstract**, meaning nothing is ever an instance of it directly —\nit exists to be inherited from, and to be named where several concrete types should be accepted.\n\nContracts describe content and nothing about how it looks. No colours, no layout, no \"variant\".\n\n### Component — an instance of a Contract\n\nA Component is a piece of content: a Contract, plus a **document** holding a value for each field.\nIt has its own name and external id and lives in a folder.\n\nThe document's shape follows the Contract's fields exactly. What a field's value looks like depends\non its type *and* on its modifiers, below.\n\n### Template — how content is *rendered*\n\nA Template names which Contracts it can render, and has its own **settings Contract**: an ordinary\nContract describing the presentational choices that template offers — a variant, an alignment, how\nmany columns.\n\nThis is why Contracts stay free of presentation. \"A statement, centred, with a ghost button\" is one\nTemplate's settings over a plain statement Contract, not three fields on the Contract itself.\n\n### Presentation — a Template bound to content\n\nA **presentation value** is where the two meet: it names a Template, binds a Component (or holds an\ninline document), and carries settings and contextual values for this one use.\n\nA page is usually a Component whose fields hold presentation values — a hero, then some sections —\nand each of those points at content that may be used elsewhere, rendered differently.\n\n### Adapter — a reusable mapping between Contracts\n\nSometimes a Template needs a `card` and what you have is a `blog-page`. An Adapter is a named,\nreusable mapping from one Contract to another: one rule per output field, plus a small set of logic\nnodes for lists, conditions and type dispatch.\n\nAn Adapter is applied by the server — at preview, at publish, and at delivery — so the mapping is\ndefined once and behaves identically everywhere.\n\n### Experience — where content lives on the web\n\nThe Experience tree is the site's address space. A **site** is a root; **nodes** under it are pages,\neach with a slug. A node's path is its ancestors' slugs plus its own.\n\nA node's **payload** says what it renders — usually a presentation value, sometimes a redirect,\nsometimes nothing at all (a node with no payload is pure structure, giving its children a path\nsegment without being a page itself).\n\nCreating a node and setting its payload are **two separate calls**. That is not an oversight: a\nnode's identity and location change for different reasons than its content does.\n\n## The five modifiers\n\nAny field can carry any combination of these. They compose, and each one changes the shape of the\nvalue stored in the document — which is the part worth understanding before writing one.\n\n| Modifier | What it means | Effect on the value |\n|---|---|---|\n| Mandatory | A value is required | Validation refuses an empty one |\n| Enumerable | Many rather than one | The value becomes a list |\n| Localizable | Translatable per locale | The value becomes `{ default, translations }` |\n| Personalizable | Varies by audience | The value becomes `{ default, variants }` |\n| Contextual | Overridable per use | The value may be supplied where the Component is *used*, not only where it is defined |\n\nCardinality is Enumerable's job, never the field type's. There is no \"list of text\" field type;\nthere is a text field that is enumerable.\n\n**Contextual** is the one worth dwelling on, because it has no counterpart in most systems. A\ncontextual field's value can be set on the Component (a default) *and* overridden by whoever binds\nthat Component somewhere — a heading that reads one way on the home page and another on a listing,\nfrom one Component with one document. Those overrides are the `contextualValues` that travel with a\nreference or a presentation value.\n\n## An order of operations that works\n\nDependencies run one way, so build in this order and nothing is ever waiting on something that does\nnot exist yet.\n\n1. **Describe.** `GET /field-types`, `/contracts`, `/templates`. Learn what exists before adding to\n it.\n2. **Contracts.** Parents before children, since a child names its parent.\n3. **Templates.** After the Contracts they render, since a Template names them.\n4. **Components.** After their Contract, and after any Contract they reference.\n5. **A site**, if the environment has none. Then **nodes** under it, parents before children.\n6. **Node payloads.** After both the node and the Component it binds.\n7. **Publish.** Plan first, read the blockers, then publish.\n\nTwo ordering facts that are easy to get wrong: a Component referencing another Component needs that\none to exist first, and publishing follows the dependency closure automatically — so publishing a\npage will normally publish the content it binds, and the plan is where you see exactly what that\nmeans before it happens.\n\n## Publishing\n\nPublishing is two calls, and collapsing them would hide the thing that matters.\n\n**Plan** resolves the full dependency closure of what you asked to publish and reports every\n**blocker** — an unresolvable reference, a workflow state that forbids publishing, a document that\nfails validation. **Execute** publishes what the plan named.\n\nBoth are jobs: each returns an operation id, and you poll it. A real closure is too large to finish\ninside an HTTP request, which is why.\n\nRead the plan. It is the only place the system tells you what is about to change beyond what you\nexplicitly named.\n\n## Where writes land\n\nA management key is bound to exactly one organization and one **authoring environment**, and it acts\nas one **role**. It cannot reach another environment, and it is subject to the same branch access\nrules and workflow gating a person with that role is.\n\nThat binding is the real safety boundary, so it is worth confirming rather than assuming: ask the\nAPI who the key is before writing anything. If the answer is not the environment you expected, stop\n— nothing else about the request will tell you.\n\nThen ask where the environment sits (`GET /topology`, or the `content_topology` tool). It names this\nenvironment's direct neighbours, and each one tells you something about your own work:\n\n- **Publishes to.** Where a publish from here lands. If one of these is a live website, a publish\n changes that website. With two or more, a publish has to say which one.\n- **Inherits from.** Content synced from this parent is read-only here. A refusal saying content is\n inherited means the change has to be made in the parent instead.\n- **Inherited by.** These environments receive this one's library the next time they sync, so a\n change here spreads there.\n- **Promoted from.** Someone promoting from one of these can overwrite what you write here.\n- **Promotes to.** Where this content goes when someone promotes it. You cannot promote yourself.\n\nNothing in the answer says which environment is production. Judge that from the names, and ask the\nperson you are working for when it is not obvious.\n\n## What an empty answer means\n\nThe binding governs **reads** exactly as it governs writes, and that changes how an empty result\nshould be read. `GET /contracts` returning nothing means *this environment has no Contracts*. It does\nnot mean the organization has none, and it certainly does not mean the account has no content.\n\nThe difference matters because acting on the wrong reading is expensive in one direction: concluding\n\"nothing exists\" and creating a model that already exists elsewhere produces duplicates, which are\nmuch harder to undo than to avoid. The safe habit is to confirm the scope before concluding anything\nfrom an empty list — `GET /whoami`, or the `content_whoami` tool, which needs no permissions at all\nprecisely so that a key holding almost nothing can still ask.\n\nA `404` on a single-entity read is the same fact in another shape: not found *here*. The entity may\nexist in another environment, and this key cannot see it.\n\n## Things that commonly go wrong\n\n- **Guessing a field type's settings** instead of reading its schema. Every field type declares its\n own; there is nothing to guess.\n- **Creating a duplicate** because an external id was not checked first. External ids are how a\n model refers to itself across environments; a duplicate is a lasting problem.\n- **Putting presentation on a Contract.** If you are adding a field called `variant`, `align`,\n `theme` or `columns` to a Contract, it almost certainly belongs in a Template's settings.\n- **Forgetting a node's payload.** A node created and never given one is a real, published,\n completely blank page.\n- **Treating a publish plan as a formality.** It is where blockers appear, and they do not appear\n anywhere else until something is already wrong.\n\n## Related\n\n- [Contracts](contracts.md) — the type system in depth\n- [Templates](templates.md) — presentation\n- [Components](components.md) — authoring content\n- [Content Adapters](content-adapters.md) — mappings\n- [Composer](content-composer.md) — the Experience tree\n- [Publishing](publishing.md) — the publish pipeline\n- [Management keys](management-keys.md) — minting and scoping a key\n"
|
|
9
|
+
"body": "# Building a content model through the API\n\nThe rest of this help corpus describes Content as you drive it in Composer — tabs, panels, buttons.\nThe concepts all transfer; the steps do not. This page is the same model described in terms of the\nAPI, for a script or an agent working through the Content Management API rather than the interface.\n\nRead this first if you are about to create anything. Everything here is about *what the pieces are*;\nthe exact shape of each request is answered live by the API itself, and you should never guess it.\n\n## The one rule that saves the most time\n\n**Ask the server what things look like; do not assume.**\n\n`GET /field-types` returns every field type this platform has, each with its **own JSON Schema for\nits settings**. That schema is generated from the field type's own definition, so it is never out of\ndate — Composer's Contract builder renders its settings form from exactly this, rather than\nhard-coding a form per type. Use it the same way.\n\n`GET /contracts` and `GET /templates` tell you what this environment already has. Check before\ncreating: a duplicate is much harder to undo than it is to avoid.\n\nWhen a write is refused, the refusal names the failing field and says what is wrong with it. That\nmessage is the fastest route to a correct request. Read it and correct the one thing it names,\nrather than rewriting the payload.\n\n## The pieces, and what each one is for\n\nContent separates four concerns that many systems collapse into one. The separation is the reason\nthe same content can be rendered several ways, and reused in places its author never anticipated.\n\n### Contract — what content *is*\n\nA Contract is a type. It has a name, an external id, and a list of **fields**. Each field names a\nfield type (short text, rich text, number, date, blob, reference, component, presentation, category,\nlink, and so on) and carries that type's own settings.\n\nContracts support **inheritance**. A Contract may name a parent, and it then has the parent's fields\nplus its own. A Contract may be **abstract**, meaning nothing is ever an instance of it directly —\nit exists to be inherited from, and to be named where several concrete types should be accepted.\n\nContracts describe content and nothing about how it looks. No colours, no layout, no \"variant\".\n\n### Component — an instance of a Contract\n\nA Component is a piece of content: a Contract, plus a **document** holding a value for each field.\nIt has its own name and external id and lives in a folder.\n\nThe document's shape follows the Contract's fields exactly. What a field's value looks like depends\non its type *and* on its modifiers, below.\n\n### Template — how content is *rendered*\n\nA Template names which Contracts it can render, and has its own **settings Contract**: an ordinary\nContract describing the presentational choices that template offers — a variant, an alignment, how\nmany columns.\n\nThis is why Contracts stay free of presentation. \"A statement, centred, with a ghost button\" is one\nTemplate's settings over a plain statement Contract, not three fields on the Contract itself.\n\n### Presentation — a Template bound to content\n\nA **presentation value** is where the two meet: it names a Template, binds a Component (or holds an\ninline document), and carries settings and contextual values for this one use.\n\nA page is usually a Component whose fields hold presentation values — a hero, then some sections —\nand each of those points at content that may be used elsewhere, rendered differently.\n\n### Adapter — a reusable mapping between Contracts\n\nSometimes a Template needs a `card` and what you have is a `blog-page`. An Adapter is a named,\nreusable mapping from one Contract to another: one rule per output field, plus a small set of logic\nnodes for lists, conditions and type dispatch.\n\nAn Adapter is applied by the server — at preview, at publish, and at delivery — so the mapping is\ndefined once and behaves identically everywhere.\n\n### Experience — where content lives on the web\n\nThe Experience tree is the site's address space. A **site** is a root; **nodes** under it are pages,\neach with a slug. A node's path is its ancestors' slugs plus its own.\n\nA node's **payload** says what it renders — usually a presentation value, sometimes a redirect,\nsometimes nothing at all (a node with no payload is pure structure, giving its children a path\nsegment without being a page itself).\n\nCreating a node and setting its payload are **two separate calls**. That is not an oversight: a\nnode's identity and location change for different reasons than its content does.\n\n## The five modifiers\n\nAny field can carry any combination of these. They compose, and each one changes the shape of the\nvalue stored in the document — which is the part worth understanding before writing one.\n\n| Modifier | What it means | Effect on the value |\n|---|---|---|\n| Mandatory | A value is required | Validation refuses an empty one |\n| Enumerable | Many rather than one | The value becomes a list |\n| Localizable | Translatable per locale | The value becomes `{ default, translations }` |\n| Personalizable | Varies by audience | The value becomes `{ default, variants }` |\n| Contextual | Overridable per use | The value may be supplied where the Component is *used*, not only where it is defined |\n\nCardinality is Enumerable's job, never the field type's. There is no \"list of text\" field type;\nthere is a text field that is enumerable.\n\n**Contextual** is the one worth dwelling on, because it has no counterpart in most systems. A\ncontextual field's value can be set on the Component (a default) *and* overridden by whoever binds\nthat Component somewhere — a heading that reads one way on the home page and another on a listing,\nfrom one Component with one document. Those overrides are the `contextualValues` that travel with a\nreference or a presentation value.\n\n## An order of operations that works\n\nDependencies run one way, so build in this order and nothing is ever waiting on something that does\nnot exist yet.\n\n1. **Describe.** `GET /field-types`, `/contracts`, `/templates`. Learn what exists before adding to\n it.\n2. **Contracts.** Parents before children, since a child names its parent.\n3. **Templates.** After the Contracts they render, since a Template names them.\n4. **Components.** After their Contract, and after any Contract they reference.\n5. **A site**, if the environment has none. Then **nodes** under it, parents before children.\n6. **Node payloads.** After both the node and the Component it binds.\n7. **Publish.** Plan first, read the blockers, then publish.\n\nTwo ordering facts that are easy to get wrong: a Component referencing another Component needs that\none to exist first, and publishing follows the dependency closure automatically — so publishing a\npage will normally publish the content it binds, and the plan is where you see exactly what that\nmeans before it happens.\n\n## Publishing\n\nPublishing is two calls, and collapsing them would hide the thing that matters.\n\n**Plan** resolves the full dependency closure of what you asked to publish and reports every\n**blocker** — an unresolvable reference, a workflow state that forbids publishing, a document that\nfails validation. **Execute** publishes what the plan named.\n\nBoth are jobs: each returns an operation id, and you poll it. A real closure is too large to finish\ninside an HTTP request, which is why.\n\nRead the plan. It is the only place the system tells you what is about to change beyond what you\nexplicitly named.\n\n## Where writes land\n\nA management key is bound to exactly one organization and one **authoring environment**, and it acts\nas one **role**. It cannot reach another environment, and it is subject to the same branch access\nrules and workflow gating a person with that role is.\n\nThat binding is the real safety boundary, so it is worth confirming rather than assuming: ask the\nAPI who the key is before writing anything. If the answer is not the environment you expected, stop\n— nothing else about the request will tell you.\n\nThen ask where the environment sits (`GET /topology`, or the `content_topology` tool). It names this\nenvironment's direct neighbours, and each one tells you something about your own work:\n\n- **Publishes to.** Where a publish from here lands. If one of these is a live website, a publish\n changes that website. With two or more, a publish has to say which one.\n- **Inherits from.** Content synced from this parent is read-only here. A refusal saying content is\n inherited means the change has to be made in the parent instead.\n- **Inherited by.** These environments receive this one's library the next time they sync, so a\n change here spreads there.\n- **Promoted from.** Someone promoting from one of these can overwrite what you write here.\n- **Promotes to.** Where this content goes when someone promotes it. You cannot promote yourself.\n\nNothing in the answer says which environment is production. Judge that from the names, and ask the\nperson you are working for when it is not obvious.\n\n## What an empty answer means\n\nThe binding governs **reads** exactly as it governs writes, and that changes how an empty result\nshould be read. `GET /contracts` returning nothing means *this environment has no Contracts*. It does\nnot mean the organization has none, and it certainly does not mean the account has no content.\n\nThe difference matters because acting on the wrong reading is expensive in one direction: concluding\n\"nothing exists\" and creating a model that already exists elsewhere produces duplicates, which are\nmuch harder to undo than to avoid. The safe habit is to confirm the scope before concluding anything\nfrom an empty list — `GET /whoami`, or the `content_whoami` tool, which needs no permissions at all\nprecisely so that a key holding almost nothing can still ask.\n\nA `404` on a single-entity read is the same fact in another shape: not found *here*. The entity may\nexist in another environment, and this key cannot see it.\n\n## When a write is refused for a permission\n\nA key has two limits, and they are different. Its **scopes** say which kinds of call it may make at\nall (`read`, `authoring`, `publish`). The **role it runs as** says what that role may do, and a few\nkinds need a permission on top of the `authoring` scope:\n\n| To write or delete | The role needs |\n|---|---|\n| a Contract | `content.contracts.manage` |\n| a Template | `content.templates.manage` |\n\nThe Member role does not hold either. The `ContentSchemaAdmin` role holds both, as does Owner, but\nOwner grants far more than an agent needs; prefer `ContentSchemaAdmin` or a custom role with just\nthese. Any role in the organization can be chosen as a key's \"run as\" role.\n\nA refusal for this reason is `403 permission_denied`, and it names the permission. The MCP server\nsays so plainly and, when it already knows the role lacks the permission, declines the call without\nsending it. `content_whoami` lists the kinds withheld for this role, each with the permission it\nneeds. When you see this, tell the person which permission is missing; changing the role is theirs\nto do, in the key's settings, and not something to work around.\n\n## Things that commonly go wrong\n\n- **Guessing a field type's settings** instead of reading its schema. Every field type declares its\n own; there is nothing to guess.\n- **Creating a duplicate** because an external id was not checked first. External ids are how a\n model refers to itself across environments; a duplicate is a lasting problem.\n- **Putting presentation on a Contract.** If you are adding a field called `variant`, `align`,\n `theme` or `columns` to a Contract, it almost certainly belongs in a Template's settings.\n- **Forgetting a node's payload.** A node created and never given one is a real, published,\n completely blank page.\n- **Treating a publish plan as a formality.** It is where blockers appear, and they do not appear\n anywhere else until something is already wrong.\n\n## Related\n\n- [Contracts](contracts.md) — the type system in depth\n- [Templates](templates.md) — presentation\n- [Components](components.md) — authoring content\n- [Content Adapters](content-adapters.md) — mappings\n- [Composer](content-composer.md) — the Experience tree\n- [Publishing](publishing.md) — the publish pipeline\n- [Management keys](management-keys.md) — minting and scoping a key\n"
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
"slug": "blog-series",
|
|
@@ -71,7 +71,7 @@ export const HELP_TOPICS = [
|
|
|
71
71
|
{
|
|
72
72
|
"slug": "contracts",
|
|
73
73
|
"title": "Modeling content with Contracts",
|
|
74
|
-
"body": "# Modeling content with Contracts\n\nContracts define the field structure your content adheres to — think of a\nContract as a blueprint (for example \"Article\" or \"Author\") that every\nComponent built from it must follow. You need to belong to an organization to\nuse it — see [Creating an organization and inviting\nteammates](../hub/organizations.md) if you haven't set one up yet.\n\n## The Contracts list\n\n**Modeling > Contracts** lists every Contract with its name, its id (smaller, underneath), whether it is\nconcrete or abstract, which Contract it extends, how many fields it has, what it is used as, and when it\nlast changed.\n\n**What a Contract is used for is worked out from how it is used, never set by hand.** The row of buttons above\nthe list filters by it, with a count on each, and a Contract can sit in several at once:\n\n- **Components** — Components have been created from it.\n- **Experiences** — a Component of this Contract is the content of a page in your Experience tree.\n- **Templates** — it is a Template's own settings Contract. (A Contract a Template merely *supports* is an\n ordinary content Contract, so it shows under Components, not here.)\n- **Base** — it is abstract, or other Contracts extend it.\n- **Not used yet** — nothing references it. This is the clean-up list.\n\nThe **Used as** column spells it out, for example *Components 17 · Experiences 4*. Search matches a name or an\nid, and **Kind** and **Source** narrow further (a Contract can come from a provider, or be inherited from\nanother environment; both are read-only here and say so).\n\nEach row's **⋯** menu offers **Open** (or **View**, for one you can't edit), **Where used** and **Delete…**.\nDelete is switched off while anything uses the Contract, and says how many places do. Tick several rows to\ndelete them together; it tells you how many of the selection it can actually delete.\n\n## Creating a Contract\n\n1. From the Contracts list, select **New Contract**.\n2. Switch to the **General** tab. Enter a **Name** — everything else below\n fills in from it, so filling it in first saves retyping. **Id** — a\n short, URL-safe identifier made of lowercase letters, numbers, and\n hyphens — fills in from Name automatically; you can still edit it by\n hand before saving.\n3. Turn on **Abstract** if this Contract exists only to be extended by\n other Contracts, or to constrain what a field is allowed to point at —\n an abstract Contract can't be used to create content directly.\n4. Optionally choose a **Parent Contract**. Every field the parent\n declares is inherited automatically and shown read-only under\n \"Inherited fields\" on the **Fields** tab — you can't redefine or hide an\n inherited field, only add new ones of your own.\n5. Switch to the **Fields** tab (the default tab). The fields are a list on the left and the\n selected field's settings are on the right. Select **Add field** and choose a type from the\n searchable list (each type says what it is for); the new field opens for you to name. Then fill in\n its Name and Id, change its type with **Change…**, and turn its modifiers on or off (see below).\n Repeat for every field the Contract needs; drag a row by its handle to reorder it (or, from the\n keyboard, use the **Move up** and **Move down** buttons on the field, or focus the handle, press\n Space to pick it up, use the arrow keys to move it, and Space again to drop it), or select\n **Delete field** to remove one. Fields inherited from a parent are collected under their own\n heading, collapsed; select one to see its settings, read-only. A row with an unresolved error shows\n a warning mark, and a failed save selects the first field that needs attention — or, for an error on\n the General tab (Name, Id, Parent Contract), switches you back to that tab.\n6. A bar at the bottom counts your **unsaved changes** (select it to see each one in words: \"Added the\n field Heading\", \"Turned on Mandatory for Body\") and says how saving will land. A change that would\n make existing Components fail validation shows **Breaking change** *before* you save; saving it\n asks you to confirm and names each reason, because it creates a new *version* (see \"Versions\"\n below). **Discard** puts every edit back. Select **Save changes** (or **Create Contract** for a new\n one) — the bar is visible from every tab.\n\n### Asking the assistant to draft one\n\nIf your organization has the assistant turned on, you can describe a Contract instead of building it field\nby field. On the New Contract form, open the assistant (the magenta ebitex-mark icon in the header, beside\n**?**) and ask — for example, \"Create me a Contract for a CTA Banner\". It proposes a Contract as a\n**Suggested** card listing the name and each field with its type. Nothing is saved until you select\n**Accept**, which fills in the form and saves it the same way **Create Contract** does; **Dismiss** discards\nit. Either way you can keep editing afterwards. See [Getting help](../general/getting-help.md).\n\n## Field types and modifiers\n\nEvery field has a **Field type** (Short Text, Number, Boolean, Date, Link,\nComponent, Blob, Presentation, Rich Text, or Category — Long Text, URL,\nReference, Nested, and Experience Reference are deprecated and no longer\noffered for new fields, though any field already using one keeps working\nunchanged; see \"Component fields\" below) plus up to five\nindependent modifiers, each shown as a toggle whose label changes with\nits state:\n\n- **Mandatory / Optional** — required, or not. For a Contextual field,\n this only applies where the field is actually used, not on the\n Component itself (see \"Contextual fields\" in\n [Authoring Components](components.md)).\n- **Multiple / Single** — a list of values instead of one.\n- **Localized / Same in every locale** — a default value plus per-locale\n overrides.\n- **Contextual / On the Component** — the value lives where the field is\n *used*, not on the Component that declares it — useful for something\n like a \"theme\" that should vary by where content is placed, not by the\n content itself.\n- **Personalized / Same for every audience** — audience-conditioned\n variant alternatives — see\n [Personalizing content by audience](content-personalization.md).\n\nSome field types add an extra toggle of their own alongside these five —\nfor example, Short Text, Long Text, and Rich Text all show an **Allow\ntoken injection** toggle, since it's specific to text-bearing fields\nrather than something every field type needs.\n\nEach field type has its own extra settings, shown once you pick a type —\nfor example, Short Text and Long Text share an optional pattern plus\nlength limits, all grouped together under **Validation** (a label you\nselect to expand, staying expanded automatically whenever something\ninside still needs your attention), Component lets you restrict which\nContracts are allowed (and, optionally, which of the two modes below), and\nBlob lets you restrict file types and maximum size.\n\n### Date fields\n\nA **Date** field has one extra setting, **Include time** — off shows and\nedits just a calendar date; on adds a time of day too. Either way, the\ndate/time you enter is shown in your own local time zone, and switching\nthis setting on or off later is a normal (additive) change, not something\nthat requires a new version.\n\n### Restricting a field to a fixed list of values\n\nShort Text, Long Text, Number, and Date fields can be restricted to a\nfixed set of **Allowed values** in their settings — useful for something\nlike a status field that should only ever be \"Draft,\" \"In review,\" or\n\"Published,\" rather than any free-text string. Leave it empty to allow\nany value.\n\nHow the field is edited then depends on whether it also allows multiple\nvalues and how many options you listed: a small list of single-value\noptions shows as buttons to pick one of; a longer list shows as a\ndropdown; combined with **Multiple**, a small list shows as checkboxes and\na longer one as a searchable picker. Narrowing this list later (removing a\nvalue that was previously allowed) is a breaking change, since an\nexisting Component might already hold it; adding a new value is additive.\n\n### Picking options from another system\n\nInstead of typing a fixed list of Allowed values, a Short Text field can\nname a **Choice source** — an activated plugin that supplies the option\nlist live, kept automatically in sync with whatever it's connected to.\nThe first one, **ebitex Forms**, lists your organization's own published\nForms, so you can pick a form by name rather than typing its id — useful\nfor a field like \"which form should appear on this page.\" A field can use\neither Allowed values or a Choice source, never both.\n\nOnce a Choice source plugin is activated (in your organization's Settings)\nand picked in a field's settings, editing a Component with that field\nlooks exactly like a normal fixed-list field: buttons, a dropdown,\ncheckboxes, or a searchable picker, depending on how many options there\nare. If the source is temporarily unavailable — a misconfigured\nconnection, for example — you'll see a short message explaining that, and\nthe field falls back to a plain text box so you can still see and edit\nwhatever value is already saved; nothing else on the page is blocked from\nsaving while that happens.\n\n### Giving a field a default value\n\nMost field types — anything other than Component, Presentation, Rich\nText, and Category, which all point at other content rather than holding\na plain value — can be given a **Default value** in their expanded row.\nOnce set, every brand-new Component created from this Contract starts\nwith that value already filled in, instead of empty; editing or clearing\nthe default afterward never changes a Component that already exists. For a\nContextual field, its default becomes the Component's own fallback value —\nused whenever a specific placement doesn't override it.\n\n## Component fields\n\nA **Component** field holds a reference to another Component, an inline\n(embedded) value, or either — decided by whoever is *filling in* the field,\nnot fixed when you design the Contract:\n\n- **Linked** — points at another Component elsewhere in your organization;\n the two stay separate, and deleting a Component that's linked elsewhere\n is blocked until the link is removed first. Covers both picking an\n existing Component and creating a brand-new one to link to.\n- **Inline** — embeds another Component's content directly inside; there's\n no separate entity to manage, it's just part of the same document. Best\n for content that only ever makes sense as part of its parent (for\n example, an article's author details).\n\nIf you want to guarantee only one of these for a given field — say, a\n\"related articles\" field that should always link to a reusable Component,\nnever an inline one-off — the field's settings offer **Allowed value\nmodes**, a checklist of the two options above (at least one must stay\nchecked). Leaving both checked (the default) lets whoever fills in the\nfield choose either way each time. Either way, **allowedContractIds** lets\nyou restrict which Contracts are allowed — leave it empty to allow any\nContract (including descendants of one you do list).\n\nExisting Contracts may still have the older, separate **Reference** and\n**Nested** field types — a Reference field is equivalent to a Component\nfield restricted to Linked only, and a Nested field to one restricted to\nInline only. They keep working exactly as before; a new field just uses\nComponent instead.\n\n## Giving a Contract a title field\n\nContent built from a Contract needs a human label — the name shown in a site's\nnavigation menu, in a breadcrumb trail, and beside each item in a listing.\n**Title field** on the **General** tab is where you choose which field that\nlabel comes from.\n\nIt is a picker, not something you type. Choose a field; if the field you chose\nholds a nested block, a second dropdown appears so you can choose the field\ninside it — up to four levels deep. Only fields a title can actually come from\nare offered: text fields as the final choice, and nested blocks as the steps in\nbetween.\n\n**Set it once, on the most general Contract that has the field.** The choice is\ninherited, so if your \"Web page\" Contract declares its `title` field, every\nContract that extends it — Article, Landing page, and so on — uses the same one\nwith nothing more to set up. A Contract that needs a different field can choose\nits own, which takes over. When a Contract inherits its title field, the picker\nshows it read-only and names the Contract it came from, with **Override** to\nchoose a different one and **Clear** to remove it.\n\nA few notes on what to expect:\n\n- **It applies from the next publish.** Choosing a title field doesn't change\n anything already published — each Component picks it up when it is next\n published.\n- **Editing the title text is a Component publish.** Change the wording and\n republish that Component, and its label updates everywhere it appears. You do\n not need to republish the pages that use it.\n- **If it can't be resolved, the page's own name is used instead** — its\n internal name from Composer. That happens when no Contract in the chain\n declares a title field, when the field named no longer exists, or when the\n content isn't published. Nothing breaks; you just see the internal name, which\n is a good hint that the title field needs attention.\n- **A localizable title field is worth choosing.** One value covers every\n locale, and each visitor sees theirs.\n\nIf the same piece of content appears in more than one place and should be named\ndifferently at each, make the title field **contextual** — then each page that\nuses it supplies its own wording. Bear in mind that a contextual title belongs to\nthe page, so changing it means republishing that page rather than the content.\n\n## Editing fields as a tree\n\nSome content refers to more of the same kind of content: a dog has a sire and a\ndam who are dogs too, a product is built from parts that are products, a person\nreports to a person. Building that with one picker per field means creating the\nfurthest ancestor first and working back towards the one you actually wanted.\n\n**Editing layout**, pinned under the fields on the **Fields** tab, changes that. Choose\n**Edit as a tree** and the Component editor draws those fields as one tree, where you fill in any\nslot directly. It only changes how the fields are edited. The fields, their validation and what is\npublished are exactly as before, and it creates no new Contract version, so a change to just the\nlayout is saved without a version bump. A preview beside the settings draws the chart or outline you\nhave chosen, using your own field names, and the fields in the tree carry an **In tree** chip.\nRenaming a field in the tree updates the layout, and removing it, or changing it to a type a tree\ncan't use, takes it out of the layout.\n\nTo set it up:\n\n1. Give the Contract the fields that point at itself: two or more single-value\n Component fields (a sire and a dam), or one list field (parts). Each should\n allow the Contract, or a Contract that extends it.\n2. On **Fields**, select **Editing layout**, then choose **Edit as a tree**.\n3. Tick the fields that make up the tree and choose how many generations (or\n levels) to show.\n4. Choose whether the same Component may appear more than once.\n\n**Repeats.** *Allow across branches* lets one Component sit in several places, as\nin line-breeding or a part used in two assemblies. *Never* means each Component\nmay appear once in the whole tree, which suits an org chart or a taxonomy. If\nyou switch to *Never* on content that already repeats, the repeats are kept and\nnothing is rewritten; only a new repeat is refused. Either way, something can\nnever contain itself.\n\n**Inheritance.** Like the title field, the choice is inherited. Set it once on the\ngeneral Contract (a \"Pedigree dog\") and every Contract that extends it, such as\n\"Dog\" and \"Bitch\", edits as a tree. A Contract can choose its own, or choose\n*Ordinary fields (do not inherit the tree)* to opt out.\n\nIf the fields you tick no longer exist or no longer fit, the editor simply shows\nthe ordinary fields, so a Contract is never left uneditable.\n\n## Links to your site\n\nA Component has no page of its own, so nothing in Content takes you from a\nComponent to the page on your site that shows it. **External links** on the\n**General** tab adds that. Each link is a button in the Component editor that\nopens the page for the Component you are looking at, for example a dog's\nprintable pedigree or a blog post on the live site.\n\nTo add one:\n\n1. On **General**, under **External links**, choose **Declare links**.\n2. Give the link a **Label**, the words on the button.\n3. Write the **URL template**. It starts with `{origin}`, `https://` or\n `http://`, and can use the Component's own details:\n - `{id}` and `{externalId}`: the Component's id and external id.\n - `{field:name}`: the value of one of its fields. A field inside an inline\n value is written with dots, such as `{field:owner.name}`.\n - `{key:sire}`: the **key** of the record a reference field points at, for\n a page that is addressed by that key. A litter can link to a pedigree\n page with `{origin}/pedigree?sire={key:sire}&dam={key:dam}`. A reference\n with nothing chosen, or a value written in by hand rather than chosen\n from the records, leaves its place empty, so a litter with an outside dam\n still links; the link is switched off only when none of the `{key:}`\n fields has a value.\n - `{origin}`: the address of the **Site** you choose, always followed by a\n `/`. It is how one Contract can point at the right host in every\n environment.\n4. Choose the **Site** (when you used `{origin}`) and whether the link is\n **Enabled** always or **Once published**.\n\nA live example under the form shows the link built from one of this Contract's\nown Components, so you can see it before you save. You can add up to five links.\n\n**What authors see.** A link that works opens in a new tab. A link that cannot\nwork is greyed and says why beside it: *Publish this Component first* for a\ndraft, *Needs a value for \"name\"* when a field it uses is empty, or that the Site\nhas no host yet. A Component with unpublished changes still has a live page, so\nits link works and says it shows the published version.\n\n**Safe by design.** A value from a field can never change where a link points:\nvalues are encoded into one part of the address, and the template's scheme and\nhost cannot use fields at all.\n\n**Nothing else changes.** Links are only shown in the editor. They create no new\nContract version, change no Component and appear in nothing your site receives.\nLike the tree, they are inherited: a Contract can declare its own, or choose\n*No links (do not inherit)*.\n\n## Versions\n\nEvery save is classified automatically:\n\n- **Additive** changes (adding an optional field, loosening a limit, …)\n update the Contract's current version in place.\n- **Breaking** changes (removing a field, adding a *mandatory* field,\n tightening a limit, …) create a new version, leaving the old one intact\n so Components already pinned to it keep working.\n\nThe **History** tab on a Contract's page lists every version and\nwhat fields it resolved to. Existing Components aren't forced to update\nwhen a Contract changes — see \"The upgrade badge\" in\n[Authoring Components](components.md) for how that friction is surfaced\nand resolved.\n"
|
|
74
|
+
"body": "# Modeling content with Contracts\n\nContracts define the field structure your content adheres to — think of a\nContract as a blueprint (for example \"Article\" or \"Author\") that every\nComponent built from it must follow. You need to belong to an organization to\nuse it — see [Creating an organization and inviting\nteammates](../hub/organizations.md) if you haven't set one up yet.\n\n## The Contracts list\n\n**Modeling > Contracts** lists every Contract with its name, its id (smaller, underneath), whether it is\nconcrete or abstract, which Contract it extends, how many fields it has, what it is used as, and when it\nlast changed.\n\n**What a Contract is used for is worked out from how it is used, never set by hand.** The row of buttons above\nthe list filters by it, with a count on each, and a Contract can sit in several at once:\n\n- **Components** — Components have been created from it.\n- **Experiences** — a Component of this Contract is the content of a page in your Experience tree.\n- **Templates** — it is a Template's own settings Contract. (A Contract a Template merely *supports* is an\n ordinary content Contract, so it shows under Components, not here.)\n- **Base** — it is abstract, or other Contracts extend it.\n- **Not used yet** — nothing references it. This is the clean-up list.\n\nThe **Used as** column spells it out, for example *Components 17 · Experiences 4*. Search matches a name or an\nid, and **Kind** and **Source** narrow further (a Contract can come from a provider, or be inherited from\nanother environment; both are read-only here and say so).\n\nEach row's **⋯** menu offers **Open** (or **View**, for one you can't edit), **Where used** and **Delete…**.\nDelete is switched off while anything uses the Contract, and says how many places do. Tick several rows to\ndelete them together; it tells you how many of the selection it can actually delete.\n\n## Creating a Contract\n\n1. From the Contracts list, select **New Contract**.\n2. Switch to the **General** tab. Enter a **Name** — everything else below\n fills in from it, so filling it in first saves retyping. **Id** — a\n short, URL-safe identifier made of lowercase letters, numbers, and\n hyphens — fills in from Name automatically; you can still edit it by\n hand before saving.\n3. Turn on **Abstract** if this Contract exists only to be extended by\n other Contracts, or to constrain what a field is allowed to point at —\n an abstract Contract can't be used to create content directly.\n4. Optionally choose a **Parent Contract**. Every field the parent\n declares is inherited automatically and shown read-only under\n \"Inherited fields\" on the **Fields** tab — you can't redefine or hide an\n inherited field, only add new ones of your own.\n5. Switch to the **Fields** tab (the default tab). The fields are a list on the left and the\n selected field's settings are on the right. Select **Add field** and choose a type from the\n searchable list (each type says what it is for); the new field opens for you to name. Then fill in\n its Name and Id, change its type with **Change…**, and turn its modifiers on or off (see below).\n Repeat for every field the Contract needs; drag a row by its handle to reorder it (or, from the\n keyboard, use the **Move up** and **Move down** buttons on the field, or focus the handle, press\n Space to pick it up, use the arrow keys to move it, and Space again to drop it), or select\n **Delete field** to remove one. Fields inherited from a parent are collected under their own\n heading, collapsed; select one to see its settings, read-only. A row with an unresolved error shows\n a warning mark, and a failed save selects the first field that needs attention — or, for an error on\n the General tab (Name, Id, Parent Contract), switches you back to that tab.\n6. A bar at the bottom counts your **unsaved changes** (select it to see each one in words: \"Added the\n field Heading\", \"Turned on Mandatory for Body\") and says how saving will land. A change that would\n make existing Components fail validation shows **Breaking change** *before* you save; saving it\n asks you to confirm and names each reason, because it creates a new *version* (see \"Versions\"\n below). **Discard** puts every edit back. Select **Save changes** (or **Create Contract** for a new\n one) — the bar is visible from every tab.\n\n### Asking the assistant to draft one\n\nIf your organization has the assistant turned on, you can describe a Contract instead of building it field\nby field. On the New Contract form, open the assistant (the magenta ebitex-mark icon in the header, beside\n**?**) and ask — for example, \"Create me a Contract for a CTA Banner\". It proposes a Contract as a\n**Suggested** card listing the name and each field with its type. Nothing is saved until you select\n**Accept**, which fills in the form and saves it the same way **Create Contract** does; **Dismiss** discards\nit. Either way you can keep editing afterwards. See [Getting help](../general/getting-help.md).\n\n## Field types and modifiers\n\nEvery field has a **Field type** (Text, Number, Boolean, Date, Link,\nComponent, Blob, Presentation, Rich Text, or Category — Short Text, Long Text,\nURL, Reference, Nested, and Experience Reference are deprecated and no longer\noffered for new fields, though any field already using one keeps working\nunchanged; see \"Text fields\" and \"Component fields\" below) plus up to five\nindependent modifiers, each shown as a toggle whose label changes with\nits state:\n\n- **Mandatory / Optional** — required, or not. For a Contextual field,\n this only applies where the field is actually used, not on the\n Component itself (see \"Contextual fields\" in\n [Authoring Components](components.md)).\n- **Multiple / Single** — a list of values instead of one.\n- **Localized / Same in every locale** — a default value plus per-locale\n overrides.\n- **Contextual / On the Component** — the value lives where the field is\n *used*, not on the Component that declares it — useful for something\n like a \"theme\" that should vary by where content is placed, not by the\n content itself.\n- **Personalized / Same for every audience** — audience-conditioned\n variant alternatives — see\n [Personalizing content by audience](content-personalization.md).\n\nSome field types add an extra toggle of their own alongside these five —\nfor example, Text and Rich Text both show an **Allow\ntoken injection** toggle, since it's specific to text-bearing fields\nrather than something every field type needs.\n\nEach field type has its own extra settings, shown once you pick a type —\nfor example, Text has an optional pattern plus\nlength limits, all grouped together under **Validation** (a label you\nselect to expand, staying expanded automatically whenever something\ninside still needs your attention), Component lets you restrict which\nContracts are allowed (and, optionally, which of the two modes below), and\nBlob lets you restrict file types and maximum size.\n\n### Date fields\n\nA **Date** field has one extra setting, **Include time** — off shows and\nedits just a calendar date; on adds a time of day too. Either way, the\ndate/time you enter is shown in your own local time zone, and switching\nthis setting on or off later is a normal (additive) change, not something\nthat requires a new version.\n\n### Text fields\n\n**Text** is the one plain-text type. Turn on **Multiple lines** in its\nsettings and the editor becomes a larger box that keeps line breaks;\nleave it off for a single line such as a title. Either way the stored\nvalue is the same plain string, so switching the setting later never\nchanges or loses anything already written.\n\n**Short Text** and **Long Text** are the two types Text replaces. A field\nthat already uses one keeps working, but a new field cannot take it. To\nmove an existing field over, open it and choose **Convert to Text**: its\nsettings carry over unchanged (a Long Text field also becomes **Multiple\nlines**), every value already written is kept as it is, and the change\ndoes not by itself create a new Contract version.\n\n### Restricting a field to a fixed list of values\n\nText, Number, and Date fields can be restricted to a\nfixed set of **Allowed values** in their settings — useful for something\nlike a status field that should only ever be \"Draft,\" \"In review,\" or\n\"Published,\" rather than any free-text string. Leave it empty to allow\nany value.\n\nHow the field is edited then depends on whether it also allows multiple\nvalues and how many options you listed: a small list of single-value\noptions shows as buttons to pick one of; a longer list shows as a\ndropdown; combined with **Multiple**, a small list shows as checkboxes and\na longer one as a searchable picker. Narrowing this list later (removing a\nvalue that was previously allowed) is a breaking change, since an\nexisting Component might already hold it; adding a new value is additive.\n\n### Picking options from another system\n\nInstead of typing a fixed list of Allowed values, a Text field can\nname a **Choice source** — an activated plugin that supplies the option\nlist live, kept automatically in sync with whatever it's connected to.\nThe first one, **ebitex Forms**, lists your organization's own published\nForms, so you can pick a form by name rather than typing its id — useful\nfor a field like \"which form should appear on this page.\" A field can use\neither Allowed values or a Choice source, never both.\n\nOnce a Choice source plugin is activated (in your organization's Settings)\nand picked in a field's settings, editing a Component with that field\nlooks exactly like a normal fixed-list field: buttons, a dropdown,\ncheckboxes, or a searchable picker, depending on how many options there\nare. If the source is temporarily unavailable — a misconfigured\nconnection, for example — you'll see a short message explaining that, and\nthe field falls back to a plain text box so you can still see and edit\nwhatever value is already saved; nothing else on the page is blocked from\nsaving while that happens.\n\n### Giving a field a default value\n\nMost field types — anything other than Component, Presentation, Rich\nText, and Category, which all point at other content rather than holding\na plain value — can be given a **Default value** in their expanded row.\nOnce set, every brand-new Component created from this Contract starts\nwith that value already filled in, instead of empty; editing or clearing\nthe default afterward never changes a Component that already exists. For a\nContextual field, its default becomes the Component's own fallback value —\nused whenever a specific placement doesn't override it.\n\n## Component fields\n\nA **Component** field holds a reference to another Component, an inline\n(embedded) value, or either — decided by whoever is *filling in* the field,\nnot fixed when you design the Contract:\n\n- **Linked** — points at another Component elsewhere in your organization;\n the two stay separate, and deleting a Component that's linked elsewhere\n is blocked until the link is removed first. Covers both picking an\n existing Component and creating a brand-new one to link to.\n- **Inline** — embeds another Component's content directly inside; there's\n no separate entity to manage, it's just part of the same document. Best\n for content that only ever makes sense as part of its parent (for\n example, an article's author details).\n\nIf you want to guarantee only one of these for a given field — say, a\n\"related articles\" field that should always link to a reusable Component,\nnever an inline one-off — the field's settings offer **Allowed value\nmodes**, a checklist of the two options above (at least one must stay\nchecked). Leaving both checked (the default) lets whoever fills in the\nfield choose either way each time. Either way, **allowedContractIds** lets\nyou restrict which Contracts are allowed — leave it empty to allow any\nContract (including descendants of one you do list).\n\nExisting Contracts may still have the older, separate **Reference** and\n**Nested** field types — a Reference field is equivalent to a Component\nfield restricted to Linked only, and a Nested field to one restricted to\nInline only. They keep working exactly as before; a new field just uses\nComponent instead.\n\n## Giving a Contract a title field\n\nContent built from a Contract needs a human label — the name shown in a site's\nnavigation menu, in a breadcrumb trail, and beside each item in a listing.\n**Title field** on the **General** tab is where you choose which field that\nlabel comes from.\n\nIt is a picker, not something you type. Choose a field; if the field you chose\nholds a nested block, a second dropdown appears so you can choose the field\ninside it — up to four levels deep. Only fields a title can actually come from\nare offered: text fields as the final choice, and nested blocks as the steps in\nbetween.\n\n**Set it once, on the most general Contract that has the field.** The choice is\ninherited, so if your \"Web page\" Contract declares its `title` field, every\nContract that extends it — Article, Landing page, and so on — uses the same one\nwith nothing more to set up. A Contract that needs a different field can choose\nits own, which takes over. When a Contract inherits its title field, the picker\nshows it read-only and names the Contract it came from, with **Override** to\nchoose a different one and **Clear** to remove it.\n\nA few notes on what to expect:\n\n- **It applies from the next publish.** Choosing a title field doesn't change\n anything already published — each Component picks it up when it is next\n published.\n- **Editing the title text is a Component publish.** Change the wording and\n republish that Component, and its label updates everywhere it appears. You do\n not need to republish the pages that use it.\n- **If it can't be resolved, the page's own name is used instead** — its\n internal name from Composer. That happens when no Contract in the chain\n declares a title field, when the field named no longer exists, or when the\n content isn't published. Nothing breaks; you just see the internal name, which\n is a good hint that the title field needs attention.\n- **A localizable title field is worth choosing.** One value covers every\n locale, and each visitor sees theirs.\n\nIf the same piece of content appears in more than one place and should be named\ndifferently at each, make the title field **contextual** — then each page that\nuses it supplies its own wording. Bear in mind that a contextual title belongs to\nthe page, so changing it means republishing that page rather than the content.\n\n## Editing fields as a tree\n\nSome content refers to more of the same kind of content: a dog has a sire and a\ndam who are dogs too, a product is built from parts that are products, a person\nreports to a person. Building that with one picker per field means creating the\nfurthest ancestor first and working back towards the one you actually wanted.\n\n**Editing layout**, pinned under the fields on the **Fields** tab, changes that. Choose\n**Edit as a tree** and the Component editor draws those fields as one tree, where you fill in any\nslot directly. It only changes how the fields are edited. The fields, their validation and what is\npublished are exactly as before, and it creates no new Contract version, so a change to just the\nlayout is saved without a version bump. A preview beside the settings draws the chart or outline you\nhave chosen, using your own field names, and the fields in the tree carry an **In tree** chip.\nRenaming a field in the tree updates the layout, and removing it, or changing it to a type a tree\ncan't use, takes it out of the layout.\n\nTo set it up:\n\n1. Give the Contract the fields that point at itself: two or more single-value\n Component fields (a sire and a dam), or one list field (parts). Each should\n allow the Contract, or a Contract that extends it.\n2. On **Fields**, select **Editing layout**, then choose **Edit as a tree**.\n3. Tick the fields that make up the tree and choose how many generations (or\n levels) to show.\n4. Choose whether the same Component may appear more than once.\n\n**Repeats.** *Allow across branches* lets one Component sit in several places, as\nin line-breeding or a part used in two assemblies. *Never* means each Component\nmay appear once in the whole tree, which suits an org chart or a taxonomy. If\nyou switch to *Never* on content that already repeats, the repeats are kept and\nnothing is rewritten; only a new repeat is refused. Either way, something can\nnever contain itself.\n\n**Inheritance.** Like the title field, the choice is inherited. Set it once on the\ngeneral Contract (a \"Pedigree dog\") and every Contract that extends it, such as\n\"Dog\" and \"Bitch\", edits as a tree. A Contract can choose its own, or choose\n*Ordinary fields (do not inherit the tree)* to opt out.\n\nIf the fields you tick no longer exist or no longer fit, the editor simply shows\nthe ordinary fields, so a Contract is never left uneditable.\n\n## Links to your site\n\nA Component has no page of its own, so nothing in Content takes you from a\nComponent to the page on your site that shows it. **External links** on the\n**General** tab adds that. Each link is a button in the Component editor that\nopens the page for the Component you are looking at, for example a dog's\nprintable pedigree or a blog post on the live site.\n\nTo add one:\n\n1. On **General**, under **External links**, choose **Declare links**.\n2. Give the link a **Label**, the words on the button.\n3. Write the **URL template**. It starts with `{origin}`, `https://` or\n `http://`, and can use the Component's own details:\n - `{id}` and `{externalId}`: the Component's id and external id.\n - `{field:name}`: the value of one of its fields. A field inside an inline\n value is written with dots, such as `{field:owner.name}`.\n - `{key:sire}`: the **key** of the record a reference field points at, for\n a page that is addressed by that key. A litter can link to a pedigree\n page with `{origin}/pedigree?sire={key:sire}&dam={key:dam}`. A reference\n with nothing chosen, or a value written in by hand rather than chosen\n from the records, leaves its place empty, so a litter with an outside dam\n still links; the link is switched off only when none of the `{key:}`\n fields has a value.\n - `{origin}`: the address of the **Site** you choose, always followed by a\n `/`. It is how one Contract can point at the right host in every\n environment.\n4. Choose the **Site** (when you used `{origin}`) and whether the link is\n **Enabled** always or **Once published**.\n\nA live example under the form shows the link built from one of this Contract's\nown Components, so you can see it before you save. You can add up to five links.\n\n**What authors see.** A link that works opens in a new tab. A link that cannot\nwork is greyed and says why beside it: *Publish this Component first* for a\ndraft, *Needs a value for \"name\"* when a field it uses is empty, or that the Site\nhas no host yet. A Component with unpublished changes still has a live page, so\nits link works and says it shows the published version.\n\n**Safe by design.** A value from a field can never change where a link points:\nvalues are encoded into one part of the address, and the template's scheme and\nhost cannot use fields at all.\n\n**Nothing else changes.** Links are only shown in the editor. They create no new\nContract version, change no Component and appear in nothing your site receives.\nLike the tree, they are inherited: a Contract can declare its own, or choose\n*No links (do not inherit)*.\n\n## Versions\n\nEvery save is classified automatically:\n\n- **Additive** changes (adding an optional field, loosening a limit, …)\n update the Contract's current version in place.\n- **Breaking** changes (removing a field, adding a *mandatory* field,\n tightening a limit, …) create a new version, leaving the old one intact\n so Components already pinned to it keep working.\n\nThe **History** tab on a Contract's page lists every version and\nwhat fields it resolved to. Existing Components aren't forced to update\nwhen a Contract changes — see \"The upgrade badge\" in\n[Authoring Components](components.md) for how that friction is surfaced\nand resolved.\n"
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
77
|
"slug": "deployment-keys",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpCorpus.generated.js","sourceRoot":"","sources":["../../src/resources/helpCorpus.generated.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,EAAE;AACF,kGAAkG;AAClG,oGAAoG;AAIpG,MAAM,CAAC,MAAM,WAAW,GAAgB;IACtC;QACE,MAAM,EAAE,iBAAiB;QACzB,OAAO,EAAE,0CAA0C;QACnD,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"helpCorpus.generated.js","sourceRoot":"","sources":["../../src/resources/helpCorpus.generated.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,EAAE;AACF,kGAAkG;AAClG,oGAAoG;AAIpG,MAAM,CAAC,MAAM,WAAW,GAAgB;IACtC;QACE,MAAM,EAAE,iBAAiB;QACzB,OAAO,EAAE,0CAA0C;QACnD,MAAM,EAAE,gyYAAgyY;KACzyY;IACD;QACE,MAAM,EAAE,aAAa;QACrB,OAAO,EAAE,aAAa;QACtB,MAAM,EAAE,wnGAAwnG;KACjoG;IACD;QACE,MAAM,EAAE,YAAY;QACpB,OAAO,EAAE,sBAAsB;QAC/B,MAAM,EAAE,qwyBAAqwyB;KAC9wyB;IACD;QACE,MAAM,EAAE,kBAAkB;QAC1B,OAAO,EAAE,kCAAkC;QAC3C,MAAM,EAAE,06nBAA06nB;KACn7nB;IACD;QACE,MAAM,EAAE,mBAAmB;QAC3B,OAAO,EAAE,0BAA0B;QACnC,MAAM,EAAE,0iNAA0iN;KACnjN;IACD;QACE,MAAM,EAAE,kBAAkB;QAC1B,OAAO,EAAE,gCAAgC;QACzC,MAAM,EAAE,2zqBAA2zqB;KACp0qB;IACD;QACE,MAAM,EAAE,sBAAsB;QAC9B,OAAO,EAAE,sBAAsB;QAC/B,MAAM,EAAE,o1qBAAo1qB;KAC71qB;IACD;QACE,MAAM,EAAE,eAAe;QACvB,OAAO,EAAE,qCAAqC;QAC9C,MAAM,EAAE,q3FAAq3F;KAC93F;IACD;QACE,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oBAAoB;QAC7B,MAAM,EAAE,i4YAAi4Y;KAC14Y;IACD;QACE,MAAM,EAAE,mBAAmB;QAC3B,OAAO,EAAE,+BAA+B;QACxC,MAAM,EAAE,g2EAAg2E;KACz2E;IACD;QACE,MAAM,EAAE,OAAO;QACf,OAAO,EAAE,OAAO;QAChB,MAAM,EAAE,i7FAAi7F;KAC17F;IACD;QACE,MAAM,EAAE,WAAW;QACnB,OAAO,EAAE,mCAAmC;QAC5C,MAAM,EAAE,g8KAAg8K;KACz8K;IACD;QACE,MAAM,EAAE,kBAAkB;QAC1B,OAAO,EAAE,kBAAkB;QAC3B,MAAM,EAAE,yvJAAyvJ;KAClwJ;CACF,CAAA"}
|
package/dist/session.d.ts
CHANGED
|
@@ -27,12 +27,22 @@ export type WhoAmI = {
|
|
|
27
27
|
roleName: string | null;
|
|
28
28
|
keyName: string | null;
|
|
29
29
|
scopes: string[];
|
|
30
|
+
/**
|
|
31
|
+
* What the acting role may do, as opposed to what the key's scopes allow. Absent from an API that
|
|
32
|
+
* predates it, which is why every reader treats a missing list as "not told" rather than "none".
|
|
33
|
+
*/
|
|
34
|
+
permissions?: string[];
|
|
30
35
|
};
|
|
31
36
|
export type Session = {
|
|
32
37
|
who: WhoAmI;
|
|
33
38
|
/** True when the operator forced read-only regardless of what the key could do. */
|
|
34
39
|
readOnlyRequested: boolean;
|
|
35
40
|
has(scope: string): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* True only when the API reported the role's permissions and this one is not among them. An API
|
|
43
|
+
* that reported none cannot say, so the request is sent and the server decides.
|
|
44
|
+
*/
|
|
45
|
+
lacksPermission(permission: string): boolean;
|
|
36
46
|
/** One line naming where a write just landed, appended to every write result. */
|
|
37
47
|
contextLine(): string;
|
|
38
48
|
};
|
package/dist/session.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aA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ACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,OAAO,GAAG;IACpB,GAAG,EAAE,MAAM,CAAA;IACX,mFAAmF;IACnF,iBAAiB,EAAE,OAAO,CAAA;IAC1B,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAA;IAC3B;;;OAGG;IACH,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAA;IAC5C,iFAAiF;IACjF,WAAW,IAAI,MAAM,CAAA;CACtB,CAAA;AAED,qBAAa,YAAa,SAAQ,KAAK;CAAG;AAE1C,wBAAsB,cAAc,CAClC,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE;IAAE,iBAAiB,EAAE,OAAO,CAAA;CAAE,GACtC,OAAO,CAAC,OAAO,CAAC,CAqBlB"}
|
package/dist/session.js
CHANGED
|
@@ -29,12 +29,14 @@ export async function resolveSession(client, options) {
|
|
|
29
29
|
throw new StartupError(startupMessage(error, client.baseUrl));
|
|
30
30
|
}
|
|
31
31
|
const scopes = new Set(who.scopes ?? []);
|
|
32
|
+
const permissions = Array.isArray(who.permissions) ? new Set(who.permissions) : null;
|
|
32
33
|
return {
|
|
33
34
|
who,
|
|
34
35
|
readOnlyRequested: options.readOnlyRequested,
|
|
35
36
|
// A forced read-only session reports every write scope as absent, so tool registration —
|
|
36
37
|
// which asks this and nothing else — needs no second concept of "but the operator said no".
|
|
37
38
|
has: (scope) => (options.readOnlyRequested && isWriteScope(scope) ? false : scopes.has(scope)),
|
|
39
|
+
lacksPermission: (permission) => permissions !== null && !permissions.has(permission),
|
|
38
40
|
contextLine: () => `[${who.organizationName ?? who.organizationId} · ${who.environmentName ?? who.environmentId} · as ${who.roleName ?? 'unknown role'}]`,
|
|
39
41
|
};
|
|
40
42
|
}
|
package/dist/session.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAC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AAC;QACzB,OAAO,CACL,GAAG,OAAO,gFAAgF;YAC1F,2FAA2F;YAC3F,8EAA8E,CAC/E,CAAA;IACH,CAAC;IAED,+FAA+F;IAC/F,+EAA+E;IAC/E,OAAO,iDAAiD,KAAK,CAAC,OAAO,EAAE,CAAA;AACzE,CAAC"}
|
package/dist/tools/catalog.d.ts
CHANGED
|
@@ -43,6 +43,13 @@ export type ToolDescriptor = {
|
|
|
43
43
|
/** Present only for `content_write` — see {@link CONTENT_WRITE_IMMEDIATE_KINDS}. */
|
|
44
44
|
immediateKinds?: readonly EntityKind[];
|
|
45
45
|
};
|
|
46
|
+
/**
|
|
47
|
+
* The permission the acting role must hold, beside the key's scope, to write or delete a kind. A
|
|
48
|
+
* scope is the key's ceiling and a permission is the role's, so a key holding `authoring` can still
|
|
49
|
+
* be refused: a Contract needs `content.contracts.manage`, which Member does not hold. Held in step
|
|
50
|
+
* with the server's `ManagementToolCatalog.KindPermissions` by the same fixture as the tools.
|
|
51
|
+
*/
|
|
52
|
+
export declare const KIND_PERMISSIONS: Readonly<Partial<Record<EntityKind, string>>>;
|
|
46
53
|
export declare const TOOL_CATALOG: readonly ToolDescriptor[];
|
|
47
54
|
/** Whether `session` may see the named tool, per the catalogue's `requiredScope`. */
|
|
48
55
|
export declare function sessionCanUse(session: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/tools/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAA;AAG9D;;;;;;;;;;;;GAYG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,EAAG,GAAY,CAAA;AAEzC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,6BAA6B,+CAAgD,CAAA;AAE1F,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,O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,MAAM,GAAG,OAAO,CAGjG"}
|
package/dist/tools/catalog.js
CHANGED
|
@@ -35,6 +35,16 @@ export const AUTHENTICATED = '*';
|
|
|
35
35
|
* and held in parity by `tool-catalogue.json`.
|
|
36
36
|
*/
|
|
37
37
|
export const CONTENT_WRITE_IMMEDIATE_KINDS = ['component', 'node', 'nodePayload'];
|
|
38
|
+
/**
|
|
39
|
+
* The permission the acting role must hold, beside the key's scope, to write or delete a kind. A
|
|
40
|
+
* scope is the key's ceiling and a permission is the role's, so a key holding `authoring` can still
|
|
41
|
+
* be refused: a Contract needs `content.contracts.manage`, which Member does not hold. Held in step
|
|
42
|
+
* with the server's `ManagementToolCatalog.KindPermissions` by the same fixture as the tools.
|
|
43
|
+
*/
|
|
44
|
+
export const KIND_PERMISSIONS = {
|
|
45
|
+
contract: 'content.contracts.manage',
|
|
46
|
+
template: 'content.templates.manage',
|
|
47
|
+
};
|
|
38
48
|
export const TOOL_CATALOG = [
|
|
39
49
|
{ name: 'content_whoami', requiredScope: AUTHENTICATED, readOnly: true },
|
|
40
50
|
{ name: 'content_describe', requiredScope: SCOPE_READ, readOnly: true },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/tools/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAmB,MAAM,cAAc,CAAA;AAC9D,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE1E;;;;;;;;;;;;GAYG;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,GAAY,CAAA;AAEzC;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,aAAa,CAAU,CAAA;AAY1F,MAAM,CAAC,MAAM,YAAY,GAA8B;IACrD,EAAE,IAAI,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,QAA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,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAExE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAIjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAM5C;;;;;;;;;;;;;;GAcG;AAEH,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,aAAa,CAAA;IACrB,OAAO,EAAE,OAAO,CAAA;IAChB,kGAAkG;IAClG,MAAM,EAAE,aAAa,GAAG,IAAI,CAAA;IAC5B;;;;;;;;OAQG;IACH,aAAa,EAAE,MAAM,CAAA;CACtB,CAAA;
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/tools/register.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAExE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAIjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAM5C;;;;;;;;;;;;;;GAcG;AAEH,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,aAAa,CAAA;IACrB,OAAO,EAAE,OAAO,CAAA;IAChB,kGAAkG;IAClG,MAAM,EAAE,aAAa,GAAG,IAAI,CAAA;IAC5B;;;;;;;;OAQG;IACH,aAAa,EAAE,MAAM,CAAA;CACtB,CAAA;AAwBD,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,GAAG,IAAI,CAof3E"}
|
package/dist/tools/register.js
CHANGED
|
@@ -1,12 +1,31 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { query } from '../client.js';
|
|
3
|
-
import { ContentApiError } from '../errors.js';
|
|
3
|
+
import { ContentApiError, permissionHint } from '../errors.js';
|
|
4
4
|
import { routesFor, withId, WRITABLE_KINDS } from '../routes.js';
|
|
5
|
-
import { AUTHENTICATED, sessionCanUse, TOOL_CATALOG } from './catalog.js';
|
|
5
|
+
import { AUTHENTICATED, KIND_PERMISSIONS, sessionCanUse, TOOL_CATALOG } from './catalog.js';
|
|
6
6
|
import { decodeCursor, nextSearchCursor } from './cursor.js';
|
|
7
7
|
import { fail, guard, ok } from './result.js';
|
|
8
8
|
import { describeSession } from './whoami.js';
|
|
9
9
|
const KIND = z.enum(WRITABLE_KINDS);
|
|
10
|
+
/**
|
|
11
|
+
* Why a write or delete of this kind would be refused for the acting role, or null to send it.
|
|
12
|
+
*
|
|
13
|
+
* Refused here rather than sent: the role is known from `/whoami`, so the request can only come back
|
|
14
|
+
* `403`, and an agent that is told the permission and the remedy up front does not spend a turn
|
|
15
|
+
* learning it. The tool itself stays registered, because the key's other kinds are unaffected.
|
|
16
|
+
*/
|
|
17
|
+
function refusedForPermission(session, kind) {
|
|
18
|
+
const permission = KIND_PERMISSIONS[kind];
|
|
19
|
+
if (!permission || !session.lacksPermission(permission))
|
|
20
|
+
return null;
|
|
21
|
+
return `Not sent. ${permissionHint(permission)}`;
|
|
22
|
+
}
|
|
23
|
+
/** The kinds this role cannot write, for `content_whoami`, each with the permission it lacks. */
|
|
24
|
+
function withheldKinds(session) {
|
|
25
|
+
return Object.entries(KIND_PERMISSIONS)
|
|
26
|
+
.filter(([, permission]) => permission && session.lacksPermission(permission))
|
|
27
|
+
.map(([kind, requires]) => ({ kind, requires: requires }));
|
|
28
|
+
}
|
|
10
29
|
export function registerTools(server, context) {
|
|
11
30
|
const { client, session, target, serverVersion } = context;
|
|
12
31
|
// Everything below is gated on a scope, and an absent tool is the point: an agent that cannot see
|
|
@@ -43,7 +62,7 @@ export function registerTools(server, context) {
|
|
|
43
62
|
// openWorldHint is false here and true on every other tool: this one reaches no external
|
|
44
63
|
// system at all, answering from the credential resolved when the server started.
|
|
45
64
|
annotations: { readOnlyHint: true, openWorldHint: false },
|
|
46
|
-
}, async () => ok(describeSession(session, withheld, serverVersion)));
|
|
65
|
+
}, async () => ok(describeSession(session, withheld, serverVersion, withheldKinds(session))));
|
|
47
66
|
if (canRead) {
|
|
48
67
|
server.registerTool('content_describe', {
|
|
49
68
|
title: 'Describe what can exist here',
|
|
@@ -204,6 +223,9 @@ export function registerTools(server, context) {
|
|
|
204
223
|
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true },
|
|
205
224
|
}, async ({ kind, id, payload }) => guard(async () => {
|
|
206
225
|
const routes = routesFor(kind);
|
|
226
|
+
const refused = refusedForPermission(session, kind);
|
|
227
|
+
if (refused)
|
|
228
|
+
return fail(refused);
|
|
207
229
|
if (!id) {
|
|
208
230
|
if (!routes.create) {
|
|
209
231
|
return fail(`${routes.label} cannot be created on its own; it is written by updating its owner.`);
|
|
@@ -235,6 +257,9 @@ export function registerTools(server, context) {
|
|
|
235
257
|
if (!confirm)
|
|
236
258
|
return fail('Not deleted. Pass confirm: true to delete this permanently.');
|
|
237
259
|
const routes = routesFor(kind);
|
|
260
|
+
const refused = refusedForPermission(session, kind);
|
|
261
|
+
if (refused)
|
|
262
|
+
return fail(refused);
|
|
238
263
|
if (!routes.remove)
|
|
239
264
|
return fail(`${routes.label} cannot be deleted through this API.`);
|
|
240
265
|
await client.request('DELETE', withId(routes.remove, id));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.js","sourceRoot":"","sources":["../../src/tools/register.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAEhE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AACzE,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC5D,OAAO,EAAE,IAA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AiC,CAAC,CAAC,MAAM,CACrE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CACjD,CAAA;IAED,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAA;AACnG,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,SAAS,aAAa,CAAC,IAA6B;IAClD,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,EAAE,EAAE,IAAI,CAAC,EAAE;QACX,aAAa,EAAE,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,iBAAiB;QAC3D,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,IAAI;KAC9B,CAAA;AACH,CAAC"}
|
package/dist/tools/whoami.d.ts
CHANGED
|
@@ -16,6 +16,11 @@ export type WithheldTool = {
|
|
|
16
16
|
tool: string;
|
|
17
17
|
requires: string;
|
|
18
18
|
};
|
|
19
|
+
/** One entity kind the acting role may not write, and the permission that would allow it. */
|
|
20
|
+
export type WithheldKind = {
|
|
21
|
+
kind: string;
|
|
22
|
+
requires: string;
|
|
23
|
+
};
|
|
19
24
|
/**
|
|
20
25
|
* The one genuinely new fact this tool reports.
|
|
21
26
|
*
|
|
@@ -27,5 +32,5 @@ export type WithheldTool = {
|
|
|
27
32
|
* state, and it goes stale the first time a tool moves scope — a failure this codebase has had twice
|
|
28
33
|
* elsewhere, both times in the *reader* rather than the writer.
|
|
29
34
|
*/
|
|
30
|
-
export declare function describeSession(session: Session, withheld: readonly WithheldTool[], serverVersion: string): Record<string, unknown>;
|
|
35
|
+
export declare function describeSession(session: Session, withheld: readonly WithheldTool[], serverVersion: string, withheldKinds?: readonly WithheldKind[]): Record<string, unknown>;
|
|
31
36
|
//# sourceMappingURL=whoami.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"whoami.d.ts","sourceRoot":"","sources":["../../src/tools/whoami.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAE5C;;;;;;;;;;;GAWG;AAEH,4EAA4E;AAC5E,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,SAAS,YAAY,EAAE,EACjC,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"whoami.d.ts","sourceRoot":"","sources":["../../src/tools/whoami.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAE5C;;;;;;;;;;;GAWG;AAEH,4EAA4E;AAC5E,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,6FAA6F;AAC7F,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,SAAS,YAAY,EAAE,EACjC,aAAa,EAAE,MAAM,EACrB,aAAa,GAAE,SAAS,YAAY,EAAO,GAC1C,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA0BzB"}
|
package/dist/tools/whoami.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* state, and it goes stale the first time a tool moves scope — a failure this codebase has had twice
|
|
10
10
|
* elsewhere, both times in the *reader* rather than the writer.
|
|
11
11
|
*/
|
|
12
|
-
export function describeSession(session, withheld, serverVersion) {
|
|
12
|
+
export function describeSession(session, withheld, serverVersion, withheldKinds = []) {
|
|
13
13
|
const { who } = session;
|
|
14
14
|
return {
|
|
15
15
|
organization: { id: who.organizationId, name: who.organizationName, slug: who.organizationSlug },
|
|
@@ -24,6 +24,9 @@ export function describeSession(session, withheld, serverVersion) {
|
|
|
24
24
|
readOnlyForced: session.readOnlyRequested,
|
|
25
25
|
serverVersion,
|
|
26
26
|
withheld,
|
|
27
|
+
// Kinds `content_write`/`content_delete` will refuse for this role, with the permission each
|
|
28
|
+
// needs. Separate from `withheld`: those tools stay available, since the key's other kinds work.
|
|
29
|
+
withheldKinds,
|
|
27
30
|
// The sentence an agent needs *before* it misreads its first empty result. An empty list from
|
|
28
31
|
// this server is always scoped, and saying so is cheaper than the duplicates an agent creates
|
|
29
32
|
// after concluding that nothing exists.
|
package/dist/tools/whoami.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"whoami.js","sourceRoot":"","sources":["../../src/tools/whoami.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"whoami.js","sourceRoot":"","sources":["../../src/tools/whoami.ts"],"names":[],"mappings":"AA2BA;;;;;;;;;;GAUG;AACH,MAAM,UAAU,eAAe,CAC7B,OAAgB,EAChB,QAAiC,EACjC,aAAqB,EACrB,gBAAyC,EAAE;IAE3C,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAA;IAEvB,OAAO;QACL,YAAY,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,cAAc,EAAE,IAAI,EAAE,GAAG,CAAC,gBAAgB,EAAE,IAAI,EAAE,GAAG,CAAC,gBAAgB,EAAE;QAChG,WAAW,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,aAAa,EAAE,IAAI,EAAE,GAAG,CAAC,eAAe,EAAE;QACjE,QAAQ,EAAE,EAAE,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE;QAC1D,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,+FAA+F;QAC/F,yFAAyF;QACzF,gGAAgG;QAChG,gGAAgG;QAChG,4CAA4C;QAC5C,cAAc,EAAE,OAAO,CAAC,iBAAiB;QACzC,aAAa;QACb,QAAQ;QACR,6FAA6F;QAC7F,iGAAiG;QACjG,aAAa;QACb,8FAA8F;QAC9F,8FAA8F;QAC9F,wCAAwC;QACxC,IAAI,EACF,4FAA4F;YAC5F,uDAAuD;KAC1D,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ebitex/content-mcp",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.206",
|
|
4
4
|
"description": "An MCP server for ebitex Content: build and publish a content model from an AI agent.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://developers.ebitex.io/getting-started/content-as-code/",
|