@ebitex/content-mcp 0.4.97 → 0.5.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -47,12 +47,13 @@ which role it acts as. Read it once; if it is not what you expected, stop.
47
47
 
48
48
  ## The tools
49
49
 
50
- Nine, shaped around what an agent does rather than around REST routes.
50
+ Ten, shaped around what an agent does rather than around REST routes.
51
51
 
52
52
  | | |
53
53
  |---|---|
54
+ | `content_whoami` | Where this key is scoped: organization, environment, role, scopes, this server's version, and which tools were withheld and why. Needs no scope, so a key that can do almost nothing can still ask why |
54
55
  | `content_describe` | What can exist here: every field type with its **own settings schema**, plus this environment's Contracts and Templates |
55
- | `content_find` | Locate entities by kind, search or external id |
56
+ | `content_find` | Locate entities by kind, search or external id, with one paging contract across both listings |
56
57
  | `content_get` | Read one entity in full |
57
58
  | `content_write` | Create or update one entity |
58
59
  | `content_delete` | Delete one, behind an explicit confirmation |
@@ -62,7 +63,13 @@ Nine, shaped around what an agent does rather than around REST routes.
62
63
  | `content_topology` | Where this environment sits: the delivery environments a publish lands in, and its promotion and inheritance neighbours. One hop only |
63
64
 
64
65
  Which of them appear depends on your key's scopes: a read-scoped key gets a server with no write
65
- tools at all, rather than tools that always fail.
66
+ tools at all, rather than tools that always fail. `content_whoami` is the exception and always
67
+ appears — it reports which tools were withheld and what each would need, so an absent tool is
68
+ explained rather than merely missing.
69
+
70
+ Every result also names the organization and environment it was answered in, and an empty one says so
71
+ explicitly. A key reads and writes exactly one authoring environment, so "no Contracts" always means
72
+ "none here" — an agent that reads it as "none anywhere" creates duplicates.
66
73
 
67
74
  ## Why it cannot drift
68
75
 
@@ -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## 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## 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",
@@ -36,7 +36,7 @@ export const HELP_TOPICS = [
36
36
  {
37
37
  "slug": "content-environments",
38
38
  "title": "Content environments",
39
- "body": "# Content environments\n\nBy default, your organization has one authoring space and one place published content goes live —\nyou'll never need this page if that's all you use. If you want separate spaces to draft in (a\nStaging environment you can experiment in before anything reaches Production, say), this is where\nthat's configured.\n\n## What's an environment?\n\nThere are two kinds:\n\n- **Authoring environments** are separate drafting spaces. Contracts, Templates, folders,\n Components, the Experience tree, and Audiences are all specific to whichever authoring\n environment you're currently working in — content in one is completely invisible from another,\n as if they were separate organizations.\n- **Delivery environments** are separate published targets — what the Content Delivery API actually\n serves to the outside world, and what a delivery key reads from.\n\nEvery organization starts with one of each, marked **Default**. The default is where publishing,\nnew delivery keys, and the environment switcher land when nothing more specific is chosen — you can\nchange which environment holds that role at any time (see **Managing environments** below).\n\n## Switching environments\n\nIf more than one authoring environment exists, a switcher appears in the header next to your\naccount. Pick one to start working there — every page reloads to show that environment's own\ncontent. Your choice is remembered per-organization, so it's still selected next time you sign in.\n\n## Managing environments\n\nOpen **Environments** under **Settings** in the app navigation (requires the \"Manage Environments\"\npermission — ask an Owner or administrator if it's not available to you).\n\n- **Create** a new authoring or delivery environment, give it a name. Your plan may limit how many\n environments you can have in total. A newly created environment is added to the end of its\n list.\n- **Reorder** the authoring or delivery list to whatever arrangement makes sense to your team —\n drag a row to where you want it, or use the ▲/▼ buttons on each row. While dragging, the row\n shows as a placeholder that moves to preview exactly where it'll land if you release. This sets\n the order these lists and the environment switcher use, and where a not-yet-arranged box is\n placed on the topology canvas below; once you've dragged a box on the canvas, the canvas keeps\n where you put it. (A list with only one environment has nothing to reorder against, so dragging\n is unavailable there.)\n- **Rename** any environment at any time — nothing else changes.\n- **Set as default**: on any non-default environment's row, this moves the Default badge to it and\n clears it from wherever it was. Publishing, new delivery keys, and the environment switcher's own\n default all follow immediately.\n- **Delete** any environment except the last remaining one of its kind. This is permanent and\n immediate: everything authored (or, for a delivery environment, everything published) there is\n gone, with no recovery. You'll be asked to type the environment's name to confirm. If the\n environment currently publishes to a delivery target, promotes into another environment, or is\n itself a promotion target, the confirmation names those connections — deleting still removes them\n along with everything else. The current default can't be deleted directly while another\n environment of its kind exists — set a different one as default first, then delete it.\n- **Refresh from…**: replace this environment's content wholesale from another authoring\n environment — the routine \"copy Production down into Staging\" move. See\n [environment-refresh.md](environment-refresh.md) for the full workflow, including how to rescue\n work that would otherwise be lost.\n\n### The topology canvas\n\nOne canvas shows every way your environments connect to each other. Each environment is a box with\nfour small circles — **connectors** — one on each side. Each connection is a labelled line drawn\nbetween two boxes, and every line points the same way: **content can move along the arrow**.\n\nThere are three kinds, and the legend under the canvas names all three:\n\n- **publishes to** — an authoring environment publishes to a delivery environment.\n- **promotes into** — an authoring environment can promote content into another authoring\n environment.\n- **inherited by** — an authoring environment's library is available, read-only, in another one.\n The arrow runs from the parent to the child, the same direction the content travels.\n\nAll three are routing, not content. Changing one redirects where the next publish, promote or sync\nlands; it does not move anything by itself.\n\n**Drawing a connection.** Select a connector on the environment you want to connect *from*, then a\nconnector on the one you want to connect *to*. It works the same with a mouse (click one then the\nother, or drag between them) and with the keyboard alone (<kbd>Tab</kbd> to a connector,\n<kbd>Enter</kbd>, <kbd>Tab</kbd> to another, <kbd>Enter</kbd>). <kbd>Escape</kbd> cancels at any\npoint.\n\n**The connectors you choose are the ones the line uses**, and they stay that way — moving a box\nre-routes the line between the same two connectors rather than picking different ones. Pick whichever\nsides make your topology read best; if you want a line to come in from below, connect to the bottom\nconnector and that is where it will arrive, for everyone, after every reload.\n\nConnecting two *authoring* environments is the one case the canvas can't work out on its own, since\nthere are two relationships it could mean, so it asks: **Promote {A} into {B}** or **{B} inherits\nfrom {A}**. Everything else is decided by what you connected.\n\n**A delivery environment only receives.** Its box is marked *Receives only*, and its connectors\ncan't start a connection at all — there's nothing to click or drag from. That's not a rule you'll\ndiscover by being told off after the fact; the canvas simply can't draw the line.\n\n**When something isn't allowed**, a short message appears where you dropped the connection and\nnothing is saved:\n\n- *That would create a cycle in the promotion pipeline* / *…an inheritance cycle* — content can't\n flow in a circle, directly or through a chain of other environments.\n- *Already connected* — that exact connection is already there.\n\n**A delivery environment can be published from only one authoring environment at a time.** Connect\none that's already claimed and you'll be asked to confirm reassigning it, naming the environment\nthat holds it now; confirming removes the other mapping. An authoring environment can promote into\nany number of others, and any number can promote into the same target — promotion has no such\nexclusivity. Each environment has at most one parent, so drawing an inheritance line into one that\nalready has a parent asks you to confirm replacing it — naming the parent it has **right now**,\nwhich is not always the one your page was showing if a colleague changed it while you had this open.\n\n**Removing a connection.** Select the **×** on the line's label, or **Remove** on the matching row\nin the Connections list below. Publishing and promotion lines go immediately — they're routing, and\nremoving one destroys nothing.\n\n**Removing a publishing line does not take your live site down.** Anything already published stays\npublished and keeps being served exactly as before: a published page is a finished copy held by the\ndelivery environment, not a view onto the authoring one. What stops is publishing itself — until you\ndraw the line again, you can't publish anything new to that environment or unpublish anything from\nit, and you'll be told so if you try. A delivery box in that state says *Still serving content\npublished from …* so it's clear the site is up even though nothing is connected to it.\n\nRemoving an inheritance line asks first, and explains that the content already inherited simply\nbecomes ordinary local content the child can edit: nothing is deleted.\n\n**Arranging the canvas.** Drag any box to where you want it. The arrangement is saved for your whole\norganization, so everyone sees the topology laid out the way you left it. Pan by dragging the\nbackground, zoom with the scroll wheel or the +/− buttons, and use the ⤢ button to fill the screen\n(<kbd>Escape</kbd> leaves full screen). An environment nobody has arranged yet is placed\nautomatically — authoring on the left, delivery on the right, in list order.\n\n**The Connections list** below the canvas says the same thing in words — *Live publishes to\nProduction* — grouped by the environment each connection starts from, with its own Remove on every\nrow. Use whichever you prefer; they're the same connections and the same actions.\n\nWithout the \"Manage Environments\" permission the canvas is read-only: you can pan, zoom, go full\nscreen and read the Connections list, but nothing offers to change anything.\n\n## Promoting content\n\nPromoting copies a Component or Experience node — and everything it needs (its Contract, Template,\nany Audiences its variants reference, referenced Components, ancestor folders) — from the\nenvironment you're in into another one, ready to be worked on or published there. This is different\nfrom publishing: promoting moves *draft* content between authoring spaces; publishing takes draft\ncontent live to visitors.\n\nSelect **Promote…** on a Component or Experience node — a target is already picked for you (the\nfirst one configured, changeable from the dropdown if more than one exists), so you'll usually go\nstraight to reviewing the plan below rather than choosing first. If your current environment has no\npromotion target configured at all, **Promote…** is disabled with an explanation — set one up under\n[Managing environments](#managing-environments) first. Once a target is resolved, you'll see\neverything about to move, each marked:\n\n- **New** — doesn't exist in the target yet.\n- **Update** — already exists there, unchanged since it was last promoted; safe to overwrite.\n- **Diverged** — already exists there, but has been edited directly in the target (or promoted from\n somewhere else) since the last time this same source promoted it. You'll need to explicitly\n confirm overwriting it — nothing diverged is ever silently replaced. Whatever was there before\n stays recoverable in its own version history.\n\nContracts, Templates, Audiences, and ancestor folders/nodes always move along with the item you're\npromoting — there's no separate choice for those. Referenced Components can be unchecked\nindividually if you don't want them to move yet; a skipped reference is simply left as-is in the\ntarget, pointing at whatever (if anything) is already there. If the item you're skipping doesn't\nexist in the target at all yet, a note appears explaining that this leaves a dangling reference\nthere until it's promoted — see [Unresolved references](#unresolved-references-component-sync)\nbelow for how to find and fix one later.\n\nPromoting requires the same **Publish** permission the item's own branch requires; promoting a\nContract, Template, or Audience along with it additionally requires the permission to manage that\nkind of thing directly.\n\n### Promoting a Contract, Template, or Audience on its own\n\nA schema-only change — a field added to a Contract, an adjusted Template, a fixed Audience\ncondition — can be promoted by itself, without touching any Component that happens to use it.\nSelect **Promote…** directly from the Contract builder, the Template builder, or next to an\nAudience on the Audiences settings page. The same **New**/**Update**/**Diverged** states and\noverwrite confirmation apply; a Template's own settings Contract and a provider-contributed\nContract can't be promoted this way (promote the Template instead, or refresh/manage the provider\nregistration). This needs the permission to manage that kind of thing directly — there's no\n**Publish** branch involved, since Contracts/Templates/Audiences aren't organized into branches.\n\n## Unresolved references (Component Sync)\n\nSkipping a referenced Component during promotion (above) — or publishing a Component whose\nreference was already skipped in an earlier promotion — leaves that reference pointing at\nsomething that doesn't exist in this environment. This is allowed on purpose: it never blocks a\npromotion or a publish, and delivery itself handles it gracefully (the missing reference is simply\nomitted from what's served). But nothing else ever tells you it happened unless you go looking, so\n**Component Sync**, under **Settings** in the app navigation, lists every one currently in your\nenvironment: which Component or Experience node has the broken reference, which field it's in, and\n— where this environment has a direct upstream promotion source that still has the missing item —\nwhich environment that is.\n\nYou'll also see it called out in two other places, right where it matters: opening a Component\nwhose reference is broken shows an **Unresolved** badge in place of the usual resolved name, with a\nlink straight to its Component Sync entry; and publishing a closure that contains one shows a\nnon-blocking banner naming the affected item (publishing still proceeds — this is a heads-up, not a\nnew restriction).\n\n**To fix one:** promote the missing item forward from the environment Component Sync names — but\nthat step alone isn't enough on its own, because promoting the missing item doesn't touch the\nComponent that references it. Once the missing item exists here, **re-promote the referencing\nComponent too** (from wherever you originally promoted it), so its reference is re-checked against\nwhat's now available. After that second promotion, the entry disappears from Component Sync, the\nbadge on the Component resolves back to a normal name, and any publish banner clears.\n\n## Sharing content across environments (inheritance)\n\nPromoting is a deliberate, one-time push — good for moving a specific change from Staging to\nProduction. If instead you have content a *whole family* of environments should all draw from —\nshared design-system blocks, legal boilerplate, a common set of media Contracts — set up\ninheritance instead: link a \"Shared\" environment as the **parent** of each sibling that should\nreceive its content, and every relevant item in Shared shows up as a read-only copy in each child,\nkept up to date with a button press rather than a promotion per environment per change.\n\n**To link a parent:** draw an inheritance line on the topology canvas, from the parent to the\nchild, and choose **{child} inherits from {parent}** when the canvas asks which relationship you\nmeant. Removing that line unlinks them. The child's row also shows its current parent, as text —\nthe canvas is where you change it, so the two can never disagree. An environment can have at most\none parent, and a chain is fine (Shared → Region → Brand), but a loop is rejected.\n\n**To bring the parent's content in:** select **Sync now** on the child's row. This copies the\nparent's Contracts, Templates, Audiences, taxonomy, folders, and Components into the child,\nmarked as inherited. Running it again later picks up anything the parent has changed since —\nnew items appear, changed ones update, and anything the parent no longer has disappears from the\nchild too (unless something local in the child still depends on it, in which case the sync stops\nand tells you what's blocking it, so you can resolve that first). Nothing is ever half-applied — a\nsync either finishes completely or leaves the child exactly as it was.\n\n**Inherited items are read-only** in the child — you'll see an \"Inherited\" label on them, and any\nattempt to edit, rename, move, or delete one is refused with an explanation pointing you back to\nthe parent (or the Environments page, to unlink). You can still **publish** or **promote** an\ninherited Component from the child normally — it publishes as the child's own copy, just like\nanything else there.\n\n**Unlinking** a parent (or switching to a different one) doesn't delete anything — the child's\ncopies simply become ordinary local content you can edit freely from then on. If you relink the\nsame parent later and it now has a different version of something the child already has, syncing\nwill flag it and ask you to confirm before overwriting — your child's edit is version-recorded\nfirst, so nothing is lost even then.\n\nDeleting a parent environment automatically unlinks every child that pointed to it, the same way —\ntheir copies stay in place and become editable, nothing is deleted along with the parent.\n\n## How this affects everything else\n\nIf you never create a second environment, nothing here changes anything: the switcher never\nappears, publishing and delivery keys keep using your one delivery environment automatically, and\nthere's no promotion to do. See [publishing.md](publishing.md) for the publish lifecycle,\n[content-personalization.md](content-personalization.md) for Audiences (which, like everything else\nyou author, belong to one environment), and [content-providers.md](content-providers.md) for\ncopying a registered content provider between environments.\n"
39
+ "body": "# Content environments\n\nBy default, your organization has one authoring space and one place published content goes live —\nyou'll never need this page if that's all you use. If you want separate spaces to draft in (a\nStaging environment you can experiment in before anything reaches Production, say), this is where\nthat's configured.\n\n## What's an environment?\n\nThere are two kinds:\n\n- **Authoring environments** are separate drafting spaces. Contracts, Templates, folders,\n Components, the Experience tree, and Audiences are all specific to whichever authoring\n environment you're currently working in — content in one is completely invisible from another,\n as if they were separate organizations.\n- **Delivery environments** are separate published targets — what the Content Delivery API actually\n serves to the outside world, and what a delivery key reads from.\n\nEvery organization starts with one of each, marked **Default**. The default is where publishing,\nnew delivery keys, and the environment switcher land when nothing more specific is chosen — you can\nchange which environment holds that role at any time (see **Managing environments** below).\n\n## Switching environments\n\nIf more than one authoring environment exists, a switcher appears in the header next to your\naccount. Pick one to start working there — every page reloads to show that environment's own\ncontent. Your choice is remembered per-organization, so it's still selected next time you sign in.\n\n## Managing environments\n\nOpen **Environments** under **Settings** in the app navigation (requires the \"Manage Environments\"\npermission — ask an Owner or administrator if it's not available to you).\n\n- **Create** a new authoring or delivery environment, give it a name. Your plan may limit how many\n environments you can have in total. A newly created environment is added to the end of its\n list.\n- **Reorder** the authoring or delivery list to whatever arrangement makes sense to your team —\n drag a row to where you want it, or use the ▲/▼ buttons on each row. While dragging, the row\n shows as a placeholder that moves to preview exactly where it'll land if you release. This sets\n the order these lists and the environment switcher use, and where a not-yet-arranged box is\n placed on the topology canvas below; once you've dragged a box on the canvas, the canvas keeps\n where you put it. (A list with only one environment has nothing to reorder against, so dragging\n is unavailable there.)\n- **Rename** any environment at any time — nothing else changes.\n- **Set as default**: on any non-default environment's row, this moves the Default badge to it and\n clears it from wherever it was. Publishing, new delivery keys, and the environment switcher's own\n default all follow immediately.\n- **Delete** any environment except the last remaining one of its kind. This is permanent and\n immediate: everything authored (or, for a delivery environment, everything published) there is\n gone, with no recovery. You'll be asked to type the environment's name to confirm. If the\n environment currently publishes to a delivery target, promotes into another environment, or is\n itself a promotion target, the confirmation names those connections — deleting still removes them\n along with everything else. The current default can't be deleted directly while another\n environment of its kind exists — set a different one as default first, then delete it.\n- **Refresh from…**: replace this environment's content wholesale from another authoring\n environment — the routine \"copy Production down into Staging\" move. See\n [environment-refresh.md](environment-refresh.md) for the full workflow, including how to rescue\n work that would otherwise be lost.\n\n### The topology canvas\n\nOne canvas shows every way your environments connect to each other. Each environment is a box with\nfour small circles — **connectors** — one on each side. Each connection is a labelled line drawn\nbetween two boxes, and every line points the same way: **content can move along the arrow**.\n\nThere are three kinds, and the legend under the canvas names all three:\n\n- **publishes to** — an authoring environment publishes to a delivery environment.\n- **promotes into** — an authoring environment can promote content into another authoring\n environment.\n- **inherited by** — an authoring environment's library is available, read-only, in another one.\n The arrow runs from the parent to the child, the same direction the content travels.\n\nAll three are routing, not content. Changing one redirects where the next publish, promote or sync\nlands; it does not move anything by itself.\n\n**Drawing a connection.** Select a connector on the environment you want to connect *from*, then a\nconnector on the one you want to connect *to*. It works the same with a mouse (click one then the\nother, or drag between them) and with the keyboard alone (<kbd>Tab</kbd> to a connector,\n<kbd>Enter</kbd>, <kbd>Tab</kbd> to another, <kbd>Enter</kbd>). <kbd>Escape</kbd> cancels at any\npoint.\n\n**The connectors you choose are the ones the line uses**, and they stay that way — moving a box\nre-routes the line between the same two connectors rather than picking different ones. Pick whichever\nsides make your topology read best; if you want a line to come in from below, connect to the bottom\nconnector and that is where it will arrive, for everyone, after every reload.\n\nConnecting two *authoring* environments is the one case the canvas can't work out on its own, since\nthere are two relationships it could mean, so it asks: **Promote {A} into {B}** or **{B} inherits\nfrom {A}**. Everything else is decided by what you connected.\n\n**A delivery environment only receives.** Its box is marked *Receives only*, and its connectors\ncan't start a connection at all — there's nothing to click or drag from. That's not a rule you'll\ndiscover by being told off after the fact; the canvas simply can't draw the line.\n\n**When something isn't allowed**, a short message appears where you dropped the connection and\nnothing is saved:\n\n- *That would create a cycle in the promotion pipeline* / *…an inheritance cycle* — content can't\n flow in a circle, directly or through a chain of other environments.\n- *Already connected* — that exact connection is already there.\n\n**A delivery environment can be published from only one authoring environment at a time.** Connect\none that's already claimed and you'll be asked to confirm reassigning it, naming the environment\nthat holds it now; confirming removes the other mapping. An authoring environment can promote into\nany number of others, and any number can promote into the same target — promotion has no such\nexclusivity. Each environment has at most one parent, so drawing an inheritance line into one that\nalready has a parent asks you to confirm replacing it — naming the parent it has **right now**,\nwhich is not always the one your page was showing if a colleague changed it while you had this open.\n\n**Removing a connection.** Select the **×** on the line's label, or **Remove** on the matching row\nin the Connections list below. Publishing and promotion lines go immediately — they're routing, and\nremoving one destroys nothing.\n\n**Removing a publishing line does not take your live site down.** Anything already published stays\npublished and keeps being served exactly as before: a published page is a finished copy held by the\ndelivery environment, not a view onto the authoring one. What stops is publishing itself — until you\ndraw the line again, you can't publish anything new to that environment or unpublish anything from\nit, and you'll be told so if you try. A delivery box in that state says *Still serving content\npublished from …* so it's clear the site is up even though nothing is connected to it.\n\nRemoving an inheritance line asks first, and explains that the content already inherited simply\nbecomes ordinary local content the child can edit: nothing is deleted.\n\n**Arranging the canvas.** Drag any box to where you want it. The arrangement is saved for your whole\norganization, so everyone sees the topology laid out the way you left it. Pan by dragging the\nbackground, zoom with the scroll wheel or the +/− buttons, and use the ⤢ button to fill the screen\n(<kbd>Escape</kbd> leaves full screen). An environment nobody has arranged yet is placed\nautomatically — authoring on the left, delivery on the right, in list order.\n\n**The Connections list** below the canvas says the same thing in words — *Live publishes to\nProduction* — grouped by the environment each connection starts from, with its own Remove on every\nrow. Use whichever you prefer; they're the same connections and the same actions.\n\nWithout the \"Manage Environments\" permission the canvas is read-only: you can pan, zoom, go full\nscreen and read the Connections list, but nothing offers to change anything.\n\n## Limiting who can use an environment\n\nBy default every member of your organization can open every authoring environment, with the role\nthey hold in the organization. That's usually what you want. When it isn't — an agency working on\none client's site, a contractor who should only see a Staging environment — you can limit a member\nto specific environments, and give them a different role in each.\n\nOpen **Environment access** at the bottom of the Environments page. Pick an environment, then choose\na member and the role they should have *in that environment*, and select **Bind member**. You can\nchange a bound member's role there at any time, or **Remove** them.\n\nThis needs the \"Assign member roles\" permission — the same one Hub uses to change a member's role —\nbecause giving someone a role in an environment is giving them that role. You also need \"View roles\",\nso the section can list the roles to choose from; if you have only one of the two, the section says\nwhich is missing.\n\n**What changes for a bound member:**\n\n- They can open **only** the environments they're bound to. The environment switcher shows just\n those, and anything that names another environment is refused.\n- In each one they have the role you chose there, not their organization role — so someone can be\n an editor in one environment and read-only in another.\n- The topology canvas is hidden from them, because it would show connections to environments they\n can't see.\n\n**Owners are never limited.** They always reach every environment with full access, so they don't\nappear in the member list and the Owner role can't be chosen.\n\n**Removing a member's last binding gives them back access to every environment** with their\norganization role — it doesn't lock them out. Having no bindings at all is the normal, unrestricted\nstate. To take someone out of Content entirely, change their role in Hub instead.\n\n## Promoting content\n\nPromoting copies a Component or Experience node — and everything it needs (its Contract, Template,\nany Audiences its variants reference, referenced Components, ancestor folders) — from the\nenvironment you're in into another one, ready to be worked on or published there. This is different\nfrom publishing: promoting moves *draft* content between authoring spaces; publishing takes draft\ncontent live to visitors.\n\nSelect **Promote…** on a Component or Experience node — a target is already picked for you (the\nfirst one configured, changeable from the dropdown if more than one exists), so you'll usually go\nstraight to reviewing the plan below rather than choosing first. If your current environment has no\npromotion target configured at all, **Promote…** is disabled with an explanation — set one up under\n[Managing environments](#managing-environments) first. Once a target is resolved, you'll see\neverything about to move, each marked:\n\n- **New** — doesn't exist in the target yet.\n- **Update** — already exists there, unchanged since it was last promoted; safe to overwrite.\n- **Diverged** — already exists there, but has been edited directly in the target (or promoted from\n somewhere else) since the last time this same source promoted it. You'll need to explicitly\n confirm overwriting it — nothing diverged is ever silently replaced. Whatever was there before\n stays recoverable in its own version history.\n\nContracts, Templates, Audiences, and ancestor folders/nodes always move along with the item you're\npromoting — there's no separate choice for those. Referenced Components can be unchecked\nindividually if you don't want them to move yet; a skipped reference is simply left as-is in the\ntarget, pointing at whatever (if anything) is already there. If the item you're skipping doesn't\nexist in the target at all yet, a note appears explaining that this leaves a dangling reference\nthere until it's promoted — see [Unresolved references](#unresolved-references-component-sync)\nbelow for how to find and fix one later.\n\nPromoting requires the same **Publish** permission the item's own branch requires; promoting a\nContract, Template, or Audience along with it additionally requires the permission to manage that\nkind of thing directly.\n\n### Promoting a Contract, Template, or Audience on its own\n\nA schema-only change — a field added to a Contract, an adjusted Template, a fixed Audience\ncondition — can be promoted by itself, without touching any Component that happens to use it.\nSelect **Promote…** directly from the Contract builder, the Template builder, or next to an\nAudience on the Audiences settings page. The same **New**/**Update**/**Diverged** states and\noverwrite confirmation apply; a Template's own settings Contract and a provider-contributed\nContract can't be promoted this way (promote the Template instead, or refresh/manage the provider\nregistration). This needs the permission to manage that kind of thing directly — there's no\n**Publish** branch involved, since Contracts/Templates/Audiences aren't organized into branches.\n\n## Unresolved references (Component Sync)\n\nSkipping a referenced Component during promotion (above) — or publishing a Component whose\nreference was already skipped in an earlier promotion — leaves that reference pointing at\nsomething that doesn't exist in this environment. This is allowed on purpose: it never blocks a\npromotion or a publish, and delivery itself handles it gracefully (the missing reference is simply\nomitted from what's served). But nothing else ever tells you it happened unless you go looking, so\n**Component Sync**, under **Settings** in the app navigation, lists every one currently in your\nenvironment: which Component or Experience node has the broken reference, which field it's in, and\n— where this environment has a direct upstream promotion source that still has the missing item —\nwhich environment that is.\n\nYou'll also see it called out in two other places, right where it matters: opening a Component\nwhose reference is broken shows an **Unresolved** badge in place of the usual resolved name, with a\nlink straight to its Component Sync entry; and publishing a closure that contains one shows a\nnon-blocking banner naming the affected item (publishing still proceeds — this is a heads-up, not a\nnew restriction).\n\n**To fix one:** promote the missing item forward from the environment Component Sync names — but\nthat step alone isn't enough on its own, because promoting the missing item doesn't touch the\nComponent that references it. Once the missing item exists here, **re-promote the referencing\nComponent too** (from wherever you originally promoted it), so its reference is re-checked against\nwhat's now available. After that second promotion, the entry disappears from Component Sync, the\nbadge on the Component resolves back to a normal name, and any publish banner clears.\n\n## Sharing content across environments (inheritance)\n\nPromoting is a deliberate, one-time push — good for moving a specific change from Staging to\nProduction. If instead you have content a *whole family* of environments should all draw from —\nshared design-system blocks, legal boilerplate, a common set of media Contracts — set up\ninheritance instead: link a \"Shared\" environment as the **parent** of each sibling that should\nreceive its content, and every relevant item in Shared shows up as a read-only copy in each child,\nkept up to date with a button press rather than a promotion per environment per change.\n\n**To link a parent:** draw an inheritance line on the topology canvas, from the parent to the\nchild, and choose **{child} inherits from {parent}** when the canvas asks which relationship you\nmeant. Removing that line unlinks them. The child's row also shows its current parent, as text —\nthe canvas is where you change it, so the two can never disagree. An environment can have at most\none parent, and a chain is fine (Shared → Region → Brand), but a loop is rejected.\n\n**To bring the parent's content in:** select **Sync now** on the child's row. This copies the\nparent's Contracts, Templates, Audiences, taxonomy, folders, and Components into the child,\nmarked as inherited. Running it again later picks up anything the parent has changed since —\nnew items appear, changed ones update, and anything the parent no longer has disappears from the\nchild too (unless something local in the child still depends on it, in which case the sync stops\nand tells you what's blocking it, so you can resolve that first). Nothing is ever half-applied — a\nsync either finishes completely or leaves the child exactly as it was.\n\n**Inherited items are read-only** in the child — you'll see an \"Inherited\" label on them, and any\nattempt to edit, rename, move, or delete one is refused with an explanation pointing you back to\nthe parent (or the Environments page, to unlink). You can still **publish** or **promote** an\ninherited Component from the child normally — it publishes as the child's own copy, just like\nanything else there.\n\n**Unlinking** a parent (or switching to a different one) doesn't delete anything — the child's\ncopies simply become ordinary local content you can edit freely from then on. If you relink the\nsame parent later and it now has a different version of something the child already has, syncing\nwill flag it and ask you to confirm before overwriting — your child's edit is version-recorded\nfirst, so nothing is lost even then.\n\nDeleting a parent environment automatically unlinks every child that pointed to it, the same way —\ntheir copies stay in place and become editable, nothing is deleted along with the parent.\n\n## How this affects everything else\n\nIf you never create a second environment, nothing here changes anything: the switcher never\nappears, publishing and delivery keys keep using your one delivery environment automatically, and\nthere's no promotion to do. See [publishing.md](publishing.md) for the publish lifecycle,\n[content-personalization.md](content-personalization.md) for Audiences (which, like everything else\nyou author, belong to one environment), and [content-providers.md](content-providers.md) for\ncopying a registered content provider between environments.\n"
40
40
  },
41
41
  {
42
42
  "slug": "content-links",
@@ -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,4qUAA4qU;KACrrU;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,igVAAigV;KAC1gV;IACD;QACE,MA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BAAmB;QAC3B,OAAO,EAAE,mBAAmB;QAC5B,MAAM,EAAE,upIAAupI;KAChqI;IACD;QACE,MAAM,EAAE,iBAAiB;QACzB,OAAO,EAAE,iBAAiB;QAC1B,MAAM,EAAE,2rLAA2rL;KACpsL;IACD;QACE,MAAM,EAAE,YAAY;QACpB,OAAO,EAAE,oBAAoB;QAC7B,MAAM,EAAE,2hVAA2hV;KACpiV;IACD;QACE,MAAM,EAAE,mBAAmB;QAC3B,OAAO,EAAE,+BAA+B;QACxC,MAAM,EAAE,g2EAAg2E;KACz2E;IACD;QACE,MAAM,EAAE,WAAW;QACnB,OAAO,EAAE,mCAAmC;QAC5C,MAAM,EAAE,8vKAA8vK;KACvwK;IACD;QACE,MAAM,EAAE,kBAAkB;QAC1B,OAAO,EAAE,kBAAkB;QAC3B,MAAM,EAAE,itIAAitI;KAC1tI;CACF,CAAA"}
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,knWAAknW;KAC3nW;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,igVAAigV;KAC1gV;IACD;QACE,MAAM,EAAE,kBAAkB;QAC1B,OAAO,EAAE,kCAAkC;QAC3C,MAAM,EAAE,6okBAA6okB;KACtpkB;IACD;QACE,MAAM,EAAE,mBAAmB;QAC3B,OAAO,EAAE,0BAA0B;QACnC,MAAM,EAAE,6oLAA6oL;KACtpL;IACD;QACE,MAAM,EAAE,kBAAkB;QAC1B,OAAO,EA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AAM,EAAE,2hVAA2hV;KACpiV;IACD;QACE,MAAM,EAAE,mBAAmB;QAC3B,OAAO,EAAE,+BAA+B;QACxC,MAAM,EAAE,g2EAAg2E;KACz2E;IACD;QACE,MAAM,EAAE,WAAW;QACnB,OAAO,EAAE,mCAAmC;QAC5C,MAAM,EAAE,8vKAA8vK;KACvwK;IACD;QACE,MAAM,EAAE,kBAAkB;QAC1B,OAAO,EAAE,kBAAkB;QAC3B,MAAM,EAAE,itIAAitI;KAC1tI;CACF,CAAA"}
package/dist/server.d.ts CHANGED
@@ -6,8 +6,31 @@ import { type Session } from './session.js';
6
6
  * (`session.has`), and which routes exist is decided by `routes.ts`. This file only wires them.
7
7
  */
8
8
  export declare const SERVER_NAME = "ebitex-content";
9
- /** Kept in step with `package.json` by the build; reported in the MCP handshake. */
10
- export declare const SERVER_VERSION = "0.1.0";
9
+ /**
10
+ * What this build reports in the MCP handshake, and in the startup banner.
11
+ *
12
+ * **Read from the installed `package.json` at load, never written here** (spec
13
+ * 791-content-mcp-version-reporting). It used to be the literal `'0.1.0'`, under a comment claiming
14
+ * the build kept it in step with `package.json`. The build does no such thing: `publish-packages.yml`
15
+ * stamps the version with `npm version` and never touches source, so *every published build announced
16
+ * `0.1.0`* — and that number is exactly what a reporter needs when two agent processes disagree about
17
+ * which tools exist, which is the situation it was useless in. `content_topology` is the newest tool,
18
+ * so a stale build has the other eight and not it; scopes cannot produce that, since the five read
19
+ * tools share one registration block.
20
+ *
21
+ * **Why not a generated constant**, following `scripts/bundleHelp.mjs`, which is the obvious shape:
22
+ * the publish workflow runs `npm version` *after* `npm run build`, so a prebuild stamp would bake the
23
+ * committed `0.0.0-dev` placeholder into every release — the same symptom with a different wrong
24
+ * number. Reading at runtime is immune to that ordering, because it reads the file `npm version`
25
+ * actually wrote. Reordering the workflow would work too, and is worse: it is deliberately
26
+ * package-agnostic and shared by four packages, so a change made to suit this one has three other
27
+ * consumers and no test.
28
+ *
29
+ * `../package.json` resolves correctly from both places this module ever runs — `dist/server.js` in a
30
+ * published install, and `src/server.ts` under vitest — which is why the path needs no build
31
+ * configuration and no conditional.
32
+ */
33
+ export declare const SERVER_VERSION: string;
11
34
  export type BuiltServer = {
12
35
  server: McpServer;
13
36
  session: Session;
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAEnE,OAAO,EAAc,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAE3D,OAAO,EAAmC,KAAK,OAAO,EAAE,MAAM,cAAc,CAAA;AAG5E;;;GAGG;AAEH,eAAO,MAAM,WAAW,mBAAmB,CAAA;AAE3C,oFAAoF;AACpF,eAAO,MAAM,cAAc,UAAU,CAAA;AAErC,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,SAAS,CAAA;IACjB,OAAO,EAAE,OAAO,CAAA;IAChB,6EAA6E;IAC7E,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,wBAAsB,WAAW,CAAC,OAAO,CAAC,EAAE;IAC1C,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,SAAS,CAAC,EAAE,OAAO,KAAK,CAAA;CACzB,GAAG,OAAO,CAAC,WAAW,CAAC,CA4BvB;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,CAoB5E"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAEnE,OAAO,EAAc,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAE3D,OAAO,EAAmC,KAAK,OAAO,EAAE,MAAM,cAAc,CAAA;AAG5E;;;GAGG;AAEH,eAAO,MAAM,WAAW,mBAAmB,CAAA;AAE3C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,cAAc,EAAE,MAAsB,CAAA;AAiBnD,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,SAAS,CAAA;IACjB,OAAO,EAAE,OAAO,CAAA;IAChB,6EAA6E;IAC7E,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,wBAAsB,WAAW,CAAC,OAAO,CAAC,EAAE;IAC1C,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,SAAS,CAAC,EAAE,OAAO,KAAK,CAAA;CACzB,GAAG,OAAO,CAAC,WAAW,CAAC,CAkCvB;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,CAuB5E"}
package/dist/server.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { createRequire } from 'node:module';
1
2
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
3
  import { createClient } from './client.js';
3
4
  import { readConfig } from './config.js';
@@ -9,8 +10,46 @@ import { registerTools } from './tools/register.js';
9
10
  * (`session.has`), and which routes exist is decided by `routes.ts`. This file only wires them.
10
11
  */
11
12
  export const SERVER_NAME = 'ebitex-content';
12
- /** Kept in step with `package.json` by the build; reported in the MCP handshake. */
13
- export const SERVER_VERSION = '0.1.0';
13
+ /**
14
+ * What this build reports in the MCP handshake, and in the startup banner.
15
+ *
16
+ * **Read from the installed `package.json` at load, never written here** (spec
17
+ * 791-content-mcp-version-reporting). It used to be the literal `'0.1.0'`, under a comment claiming
18
+ * the build kept it in step with `package.json`. The build does no such thing: `publish-packages.yml`
19
+ * stamps the version with `npm version` and never touches source, so *every published build announced
20
+ * `0.1.0`* — and that number is exactly what a reporter needs when two agent processes disagree about
21
+ * which tools exist, which is the situation it was useless in. `content_topology` is the newest tool,
22
+ * so a stale build has the other eight and not it; scopes cannot produce that, since the five read
23
+ * tools share one registration block.
24
+ *
25
+ * **Why not a generated constant**, following `scripts/bundleHelp.mjs`, which is the obvious shape:
26
+ * the publish workflow runs `npm version` *after* `npm run build`, so a prebuild stamp would bake the
27
+ * committed `0.0.0-dev` placeholder into every release — the same symptom with a different wrong
28
+ * number. Reading at runtime is immune to that ordering, because it reads the file `npm version`
29
+ * actually wrote. Reordering the workflow would work too, and is worse: it is deliberately
30
+ * package-agnostic and shared by four packages, so a change made to suit this one has three other
31
+ * consumers and no test.
32
+ *
33
+ * `../package.json` resolves correctly from both places this module ever runs — `dist/server.js` in a
34
+ * published install, and `src/server.ts` under vitest — which is why the path needs no build
35
+ * configuration and no conditional.
36
+ */
37
+ export const SERVER_VERSION = readVersion();
38
+ /**
39
+ * Deliberately `0.0.0-unknown` rather than `0.0.0` on failure: a plausible-looking version is
40
+ * indistinguishable from a real one, which is the defect this whole mechanism exists to remove. And
41
+ * deliberately not a throw — a version is diagnostic, never load-bearing, so refusing to start
42
+ * because a diagnostic is missing would trade a small confusion for a total outage.
43
+ */
44
+ function readVersion() {
45
+ try {
46
+ const pkg = createRequire(import.meta.url)('../package.json');
47
+ return typeof pkg.version === 'string' && pkg.version.length > 0 ? pkg.version : '0.0.0-unknown';
48
+ }
49
+ catch {
50
+ return '0.0.0-unknown';
51
+ }
52
+ }
14
53
  export async function buildServer(options) {
15
54
  const config = options?.config ?? readConfig();
16
55
  const client = createClient({ baseUrl: config.baseUrl, key: config.key, fetchImpl: options?.fetchImpl });
@@ -25,9 +64,15 @@ export async function buildServer(options) {
25
64
  'ebitex-content://help/agent-authoring resource before building a model; it explains what ' +
26
65
  'Contracts, Templates, Presentations, Adapters and the Experience tree are for, and the ' +
27
66
  'order to create them in. When a write is refused, the refusal names the failing field: ' +
28
- 'correct that one thing and call again.',
67
+ 'correct that one thing and call again. ' +
68
+ // Spec #792, and it belongs here rather than only in a tool description because an agent
69
+ // reads instructions before its first call — which is before the first empty result it
70
+ // would otherwise misread as "nothing exists".
71
+ 'This key is bound to exactly one organization and one authoring environment, so every ' +
72
+ 'result is scoped to that environment: an empty list means nothing matched there, not that ' +
73
+ 'nothing exists. content_whoami reports the binding, and needs no scope.',
29
74
  });
30
- registerTools(server, { client, session, target });
75
+ registerTools(server, { client, session, target, serverVersion: SERVER_VERSION });
31
76
  registerResources(server, { client, session });
32
77
  return { server, session, banner: startupBanner(config, session) };
33
78
  }
@@ -45,6 +90,9 @@ export function startupBanner(config, session) {
45
90
  const { who } = session;
46
91
  const lines = [
47
92
  'ebitex Content MCP',
93
+ // First, above the binding: when two agent processes disagree about which tools exist, this is
94
+ // the first thing to compare, and the operator reading stderr is who files that report.
95
+ ` version ${SERVER_VERSION}`,
48
96
  ` api ${config.baseUrl}`,
49
97
  ` organization ${who.organizationName ?? who.organizationId}`,
50
98
  ` environment ${who.environmentName ?? who.environmentId}`,
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AACnE,OAAO,EAAE,YAAY,EAAsB,MAAM,aAAa,CAAA;AAC9D,OAAO,EAAE,UAAU,EAAqB,MAAM,aAAa,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,cAAc,EAAE,eAAe,EAAgB,MAAM,cAAc,CAAA;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD;;;GAGG;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CAAA;AAE3C,oFAAoF;AACpF,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAA;AASrC,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,OAGjC;IACC,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,CAAA;IAE9C,MAAM,MAAM,GAAG,YAAY,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,SAAS,EAAE,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AG,CAAC,aAAa,GAAG,CAAC,CAAA;IACzG,CAAC;SAAM,CAAC;QACN,KAAK,CAAC,IAAI,CAAC,iEAAiE,CAAC,CAAA;IAC/E,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACzB,CAAC"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * `content_find`'s paging cursor.
3
+ *
4
+ * **The problem this exists for.** `content_find` puts two listings behind one tool, because both
5
+ * answer "what is already here" and an agent asking that should not have to know which one can
6
+ * filter. But they page differently, and not merely by parameter name: `GET /items` is cursor-paged
7
+ * (`{items, nextCursor}`), while `GET /components` is offset-paged (`page`/`pageSize`, answering
8
+ * `{items, total, page, pageSize}`) and returns no cursor at all. The tool's own schema promises
9
+ * `limit` and `cursor` for both, and the search branch once forwarded neither — so an agent
10
+ * paginating a search got page one forever, with nothing indicating its parameters were discarded.
11
+ *
12
+ * So the tool keeps its promise and normalizes: this module turns a page number into an opaque
13
+ * cursor, and an agent never sees which paging model it is riding.
14
+ *
15
+ * **This is not the knowledge the drift guard forbids.** Knowing that `/components` pages by `page`
16
+ * is the same category as knowing a Contract lives at `/contracts` — a fact about one endpoint's
17
+ * request shape, not about what a Contract may contain. It follows `toPublishItem`'s precedent: this
18
+ * server already normalizes an endpoint's irregular shape rather than documenting it, precisely
19
+ * because neither obvious move worked unaided.
20
+ */
21
+ /** What a cursor turned out to be. `malformed` is separate from `passthrough` on purpose — see {@link decodeCursor}. */
22
+ export type DecodedCursor = {
23
+ kind: 'search';
24
+ page: number;
25
+ } | {
26
+ kind: 'passthrough';
27
+ } | {
28
+ kind: 'malformed';
29
+ };
30
+ /** The next page of a components search, as one opaque string. */
31
+ export declare function encodeSearchCursor(page: number): string;
32
+ /**
33
+ * Classifies a cursor the agent sent back.
34
+ *
35
+ * A string without the prefix is the server's own and passes through to `/items` untouched — which
36
+ * is exactly what it already was before this spec, so nothing an agent is holding mid-session breaks.
37
+ *
38
+ * A string *with* the prefix that will not decode is `malformed` rather than quietly becoming page
39
+ * one. Defaulting it would be this spec's own defect in miniature: an input accepted, discarded, and
40
+ * answered with a plausible-looking result.
41
+ */
42
+ export declare function decodeCursor(cursor: string | undefined): DecodedCursor;
43
+ /**
44
+ * The cursor for the page after this one, or `null` when there is none.
45
+ *
46
+ * **`null` has to mean exactly "no next page", never "probably not".** An agent paging until
47
+ * `nextCursor` is `null` must terminate, and must not make one extra call that returns an empty
48
+ * page. Derived from the response's own `total`/`page`/`pageSize` rather than from what was
49
+ * requested, since the server may legitimately return a smaller page than asked for.
50
+ *
51
+ * Returns `null` for any response whose paging members are missing or unusable: an unpageable answer
52
+ * is the end of the walk, which terminates, where an emitted cursor would loop.
53
+ */
54
+ export declare function nextSearchCursor(response: unknown): string | null;
55
+ //# sourceMappingURL=cursor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../src/tools/cursor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAeH,wHAAwH;AACxH,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GACvB;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,CAAA;AAEzB,kEAAkE;AAClE,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,aAAa,CAmBtE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CASjE"}
@@ -0,0 +1,87 @@
1
+ /**
2
+ * `content_find`'s paging cursor.
3
+ *
4
+ * **The problem this exists for.** `content_find` puts two listings behind one tool, because both
5
+ * answer "what is already here" and an agent asking that should not have to know which one can
6
+ * filter. But they page differently, and not merely by parameter name: `GET /items` is cursor-paged
7
+ * (`{items, nextCursor}`), while `GET /components` is offset-paged (`page`/`pageSize`, answering
8
+ * `{items, total, page, pageSize}`) and returns no cursor at all. The tool's own schema promises
9
+ * `limit` and `cursor` for both, and the search branch once forwarded neither — so an agent
10
+ * paginating a search got page one forever, with nothing indicating its parameters were discarded.
11
+ *
12
+ * So the tool keeps its promise and normalizes: this module turns a page number into an opaque
13
+ * cursor, and an agent never sees which paging model it is riding.
14
+ *
15
+ * **This is not the knowledge the drift guard forbids.** Knowing that `/components` pages by `page`
16
+ * is the same category as knowing a Contract lives at `/contracts` — a fact about one endpoint's
17
+ * request shape, not about what a Contract may contain. It follows `toPublishItem`'s precedent: this
18
+ * server already normalizes an endpoint's irregular shape rather than documenting it, precisely
19
+ * because neither obvious move worked unaided.
20
+ */
21
+ /**
22
+ * The literal marker every cursor this module issues carries.
23
+ *
24
+ * **Detection has to be exact, not probabilistic.** An `/items` cursor is itself opaque base64url
25
+ * (the server's own `ManagementItemsCursor`), so "try to parse it as ours" would be a guess that
26
+ * usually works — and a call that usually works is the entire subject of this spec. With the prefix,
27
+ * a cursor either is ours or is not, with no third answer.
28
+ *
29
+ * The `1` is a format version. A later change to what we encode is then detectable rather than
30
+ * silently misread as the current shape.
31
+ */
32
+ const PREFIX = 'mcpc1.';
33
+ /** The next page of a components search, as one opaque string. */
34
+ export function encodeSearchCursor(page) {
35
+ return PREFIX + Buffer.from(JSON.stringify({ b: 'components', p: page }), 'utf8').toString('base64url');
36
+ }
37
+ /**
38
+ * Classifies a cursor the agent sent back.
39
+ *
40
+ * A string without the prefix is the server's own and passes through to `/items` untouched — which
41
+ * is exactly what it already was before this spec, so nothing an agent is holding mid-session breaks.
42
+ *
43
+ * A string *with* the prefix that will not decode is `malformed` rather than quietly becoming page
44
+ * one. Defaulting it would be this spec's own defect in miniature: an input accepted, discarded, and
45
+ * answered with a plausible-looking result.
46
+ */
47
+ export function decodeCursor(cursor) {
48
+ if (cursor === undefined || !cursor.startsWith(PREFIX))
49
+ return { kind: 'passthrough' };
50
+ try {
51
+ const decoded = JSON.parse(Buffer.from(cursor.slice(PREFIX.length), 'base64url').toString('utf8'));
52
+ if (typeof decoded === 'object' &&
53
+ decoded !== null &&
54
+ decoded.b === 'components' &&
55
+ Number.isInteger(decoded.p) &&
56
+ decoded.p >= 1) {
57
+ return { kind: 'search', page: decoded.p };
58
+ }
59
+ }
60
+ catch {
61
+ // Falls through to malformed.
62
+ }
63
+ return { kind: 'malformed' };
64
+ }
65
+ /**
66
+ * The cursor for the page after this one, or `null` when there is none.
67
+ *
68
+ * **`null` has to mean exactly "no next page", never "probably not".** An agent paging until
69
+ * `nextCursor` is `null` must terminate, and must not make one extra call that returns an empty
70
+ * page. Derived from the response's own `total`/`page`/`pageSize` rather than from what was
71
+ * requested, since the server may legitimately return a smaller page than asked for.
72
+ *
73
+ * Returns `null` for any response whose paging members are missing or unusable: an unpageable answer
74
+ * is the end of the walk, which terminates, where an emitted cursor would loop.
75
+ */
76
+ export function nextSearchCursor(response) {
77
+ if (typeof response !== 'object' || response === null)
78
+ return null;
79
+ const { total, page, pageSize } = response;
80
+ if (!Number.isFinite(total) || !Number.isFinite(page) || !Number.isFinite(pageSize))
81
+ return null;
82
+ if (pageSize <= 0 || page <= 0)
83
+ return null;
84
+ const seen = page * pageSize;
85
+ return seen < total ? encodeSearchCursor(page + 1) : null;
86
+ }
87
+ //# sourceMappingURL=cursor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursor.js","sourceRoot":"","sources":["../../src/tools/cursor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,MAAM,GAAG,QAAQ,CAAA;AAQvB,kEAAkE;AAClE,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,OAAO,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,C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C,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,OAAO,IAAI,CAAA;IAChG,IAAK,QAAmB,IAAI,CAAC,IAAK,IAAe,IAAI,CAAC;QAAE,OAAO,IAAI,CAAA;IAEnE,MAAM,IAAI,GAAI,IAAe,GAAI,QAAmB,CAAA;IACpD,OAAO,IAAI,GAAI,KAAgB,CAAC,CAAC,CAAC,kBAAkB,CAAE,IAAe,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;AACnF,CAAC"}
@@ -2,7 +2,7 @@ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
2
  import type { ContentClient } from '../client.js';
3
3
  import { type Session } from '../session.js';
4
4
  /**
5
- * The nine tools.
5
+ * The ten tools.
6
6
  *
7
7
  * They are **task-shaped**, not endpoint-shaped: one per thing an agent does, never one per REST
8
8
  * route or per entity kind. The API a management key reaches is roughly thirty endpoint groups, so a
@@ -21,6 +21,16 @@ export type ToolContext = {
21
21
  session: Session;
22
22
  /** The credential for the environment `content_transfer` imports into, when one is configured. */
23
23
  target: ContentClient | null;
24
+ /**
25
+ * Reported by `content_whoami`, so an agent can read the build it is talking to rather than
26
+ * inferring it from which tools happen to exist.
27
+ *
28
+ * Passed in rather than imported from `server.ts`: that module already imports this one, so
29
+ * reaching back for the constant would make a module cycle — one that happens to work, since
30
+ * nothing here reads it at module scope, which is exactly the kind of thing that stops being true
31
+ * quietly.
32
+ */
33
+ serverVersion: string;
24
34
  };
25
35
  export declare function registerTools(server: McpServer, context: ToolContext): void;
26
36
  //# sourceMappingURL=register.d.ts.map
@@ -1 +1 @@
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,EAA2D,KAAK,OAAO,EAAE,MAAM,eAAe,CAAA;AAGrG;;;;;;;;;;;;;;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;CAC7B,CAAA;AAID,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,GAAG,IAAI,CAiX3E"}
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,EAA2D,KAAK,OAAO,EAAE,MAAM,eAAe,CAAA;AAKrG;;;;;;;;;;;;;;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;AAID,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,GAAG,IAAI,CAsf3E"}
@@ -3,10 +3,12 @@ import { query } from '../client.js';
3
3
  import { ContentApiError } from '../errors.js';
4
4
  import { routesFor, withId, WRITABLE_KINDS } from '../routes.js';
5
5
  import { SCOPE_AUTHORING, SCOPE_PUBLISH, SCOPE_READ, SCOPE_WRITE } from '../session.js';
6
+ import { decodeCursor, nextSearchCursor } from './cursor.js';
6
7
  import { fail, guard, ok } from './result.js';
8
+ import { describeSession } from './whoami.js';
7
9
  const KIND = z.enum(WRITABLE_KINDS);
8
10
  export function registerTools(server, context) {
9
- const { client, session, target } = context;
11
+ const { client, session, target, serverVersion } = context;
10
12
  // Everything below is gated on a scope, and an absent tool is the point: an agent that cannot see
11
13
  // a tool will not plan around it, where a tool that is present and always 403s costs it a turn
12
14
  // and a re-plan (§4).
@@ -14,6 +16,43 @@ export function registerTools(server, context) {
14
16
  const canAuthor = session.has(SCOPE_AUTHORING);
15
17
  const canPublish = session.has(SCOPE_PUBLISH);
16
18
  const canTransfer = session.has(SCOPE_WRITE);
19
+ // Derived from the same four booleans the registrations below are gated on, in the same pass —
20
+ // never a separate tool→scope table, which would be a copy of a fact those `if` blocks already
21
+ // state and would go stale the first time a tool moved scope (spec #792; this codebase has had
22
+ // that exact failure twice, and both times the forgotten copy was the reader).
23
+ const withheld = [
24
+ ...(canRead
25
+ ? []
26
+ : ['content_describe', 'content_find', 'content_get', 'content_topology', 'content_operation_status'].map((tool) => ({ tool, requires: SCOPE_READ }))),
27
+ ...(canAuthor
28
+ ? []
29
+ : [
30
+ { tool: 'content_write', requires: SCOPE_AUTHORING },
31
+ { tool: 'content_delete', requires: SCOPE_AUTHORING },
32
+ ]),
33
+ ...(canPublish ? [] : [{ tool: 'content_publish', requires: SCOPE_PUBLISH }]),
34
+ ...(canTransfer ? [] : [{ tool: 'content_transfer', requires: SCOPE_WRITE }]),
35
+ ];
36
+ // Gated on NOTHING, and registered before every scope block so that is visible at a glance.
37
+ //
38
+ // It mirrors the server route's own scope exemption (ContentManagementRouteScopes.AuthenticatedOnly)
39
+ // and for the same reason spec #511 gave for it: a key minted with only `publish` must be able to
40
+ // discover that that is all it holds, which it could not if the answer itself required `read`. The
41
+ // MCP surface made that worse than the HTTP one — such a key watches five tools vanish with nothing
42
+ // to ask about it. It also costs nothing: `resolveSession` already called `/whoami` at startup, so
43
+ // this answers from memory and issues no request.
44
+ server.registerTool('content_whoami', {
45
+ title: 'Where am I scoped?',
46
+ description: 'What this credential is: the organization and authoring environment it is bound to, the ' +
47
+ 'role it acts as, its scopes, this server\'s version, and which tools were withheld and the ' +
48
+ 'scope each needs. Read it before concluding that something does not exist — every result ' +
49
+ 'from this server is scoped to one environment, so an empty list means nothing matched ' +
50
+ 'there, not that nothing exists anywhere.',
51
+ inputSchema: {},
52
+ // openWorldHint is false here and true on every other tool: this one reaches no external
53
+ // system at all, answering from the credential resolved when the server started.
54
+ annotations: { readOnlyHint: true, openWorldHint: false },
55
+ }, async () => ok(describeSession(session, withheld, serverVersion)));
17
56
  if (canRead) {
18
57
  server.registerTool('content_describe', {
19
58
  title: 'Describe what can exist here',
@@ -35,7 +74,8 @@ export function registerTools(server, context) {
35
74
  wanted.has('contracts') ? client.request('GET', '/contracts') : undefined,
36
75
  wanted.has('templates') ? client.request('GET', '/templates') : undefined,
37
76
  ]);
38
- return ok({ fieldTypes, contracts, templates });
77
+ const result = { fieldTypes, contracts, templates };
78
+ return ok(result, readContext(session, result));
39
79
  }));
40
80
  server.registerTool('content_find', {
41
81
  title: 'Find entities',
@@ -54,13 +94,41 @@ export function registerTools(server, context) {
54
94
  // Two listings, one tool, because both answer "what is already here" and an agent asking
55
95
  // that should not have to know which of them can filter. The components listing is the
56
96
  // only one that takes a query at all; /items is a flat inventory across every kind.
97
+ //
98
+ // They also PAGE differently, and not merely by parameter name: /items is cursor-paged,
99
+ // /components is offset-paged (page/pageSize, answering total) and returns no cursor at
100
+ // all. This tool's schema promises `limit` and `cursor` for both, and the search branch
101
+ // used to forward neither — so an agent paginating a search got page one forever, with
102
+ // nothing saying its parameters had been discarded (spec #793). `cursor.ts` normalizes the
103
+ // two into one contract; the branch an agent is on is never its problem.
104
+ const decoded = decodeCursor(cursor);
105
+ if (decoded.kind === 'malformed') {
106
+ return fail('That cursor is not one this tool issued, or it has been altered. Drop it to start ' +
107
+ 'from the first page, or pass the exact nextCursor from a previous call.');
108
+ }
57
109
  if (search !== undefined || externalId !== undefined) {
58
110
  if (kind !== undefined && kind !== 'component') {
59
111
  return fail('search and externalId filter components only; drop them, or pass kind: "component".');
60
112
  }
61
- return ok(await client.request('GET', `/components${query({ search, externalId })}`));
113
+ if (decoded.kind === 'passthrough' && cursor !== undefined) {
114
+ return fail('That cursor came from the inventory listing and cannot page a components search. ' +
115
+ 'Drop search/externalId to keep paging the inventory, or drop the cursor to search ' +
116
+ 'from the first page.');
117
+ }
118
+ const page = decoded.kind === 'search' ? decoded.page : 1;
119
+ const found = await client.request('GET',
120
+ // `page` only once past the first, so a search with no paging asked for is the exact
121
+ // request this tool has always sent.
122
+ `/components${query({ search, externalId, page: page > 1 ? page : undefined, pageSize: limit })}`);
123
+ return ok({ ...found, nextCursor: nextSearchCursor(found) }, readContext(session, found));
62
124
  }
63
- return ok(await client.request('GET', `/items${query({ kind, limit, cursor })}`));
125
+ if (decoded.kind === 'search') {
126
+ return fail('That cursor came from a components search and cannot page the inventory listing. ' +
127
+ 'Keep search/externalId to continue that search, or drop the cursor to list from the ' +
128
+ 'first page.');
129
+ }
130
+ const listed = await client.request('GET', `/items${query({ kind, limit, cursor })}`);
131
+ return ok(listed, readContext(session, listed));
64
132
  }));
65
133
  server.registerTool('content_get', {
66
134
  title: 'Read one entity',
@@ -76,7 +144,21 @@ export function registerTools(server, context) {
76
144
  (routes.list ? ` (kind: "${kind}")` : '') +
77
145
  ' instead.');
78
146
  }
79
- return ok(await client.request('GET', withId(routes.readOne, id)));
147
+ try {
148
+ return ok(await client.request('GET', withId(routes.readOne, id)), session.contextLine());
149
+ }
150
+ catch (error) {
151
+ // A 404 here always means "not found *in this key's environment*", and the relayed body
152
+ // cannot say so — it is the server's answer about a route, not about a binding. So the
153
+ // binding is ADDED after it, never substituted for it: §3's verbatim relay is what closes
154
+ // the agent's try → read → fix loop, and this is the same shape `errors.ts` already uses
155
+ // to add a `Request id:` line without touching the body.
156
+ if (error instanceof ContentApiError && error.status === 404) {
157
+ return fail(`${error.message}\n${session.contextLine()} — not found in this environment, which is ` +
158
+ 'the only one this key can read.');
159
+ }
160
+ throw error;
161
+ }
80
162
  }));
81
163
  // Its own tool rather than another `include` value on content_describe (spec 748): describe
82
164
  // answers "what can this environment hold", this answers "where does it sit", and an agent
@@ -97,7 +179,7 @@ export function registerTools(server, context) {
97
179
  annotations: { readOnlyHint: true, openWorldHint: true },
98
180
  }, async () => guard(async () => {
99
181
  try {
100
- return ok(await client.request('GET', '/topology'));
182
+ return ok(await client.request('GET', '/topology'), session.contextLine());
101
183
  }
102
184
  catch (error) {
103
185
  // The one refusal worth rewording, because its remedy is not in the body: routing
@@ -208,7 +290,7 @@ export function registerTools(server, context) {
208
290
  'result — for a plan, that result is the plan itself.',
209
291
  inputSchema: { operationId: z.string() },
210
292
  annotations: { readOnlyHint: true, openWorldHint: true },
211
- }, async ({ operationId }) => guard(async () => ok(await client.request('GET', `/operations/${encodeURIComponent(operationId)}`))));
293
+ }, async ({ operationId }) => guard(async () => ok(await client.request('GET', `/operations/${encodeURIComponent(operationId)}`), session.contextLine())));
212
294
  }
213
295
  if (canTransfer) {
214
296
  server.registerTool('content_transfer', {
@@ -269,15 +351,74 @@ export function registerTools(server, context) {
269
351
  // in this same file — the agent polls with content_operation_status. The naming is
270
352
  // load-bearing: returning a kick-off envelope under `result` is precisely how an agent
271
353
  // would report a finished import that had not run yet.
354
+ const selection = (plan.items ?? []).map((item) => ({ kind: item.kind, id: item.id }));
355
+ // `items[]` SELECTS what is written (spec #623), so an empty selection is not "import
356
+ // everything" — it is an import that writes nothing and answers `succeeded`, which an agent
357
+ // then reports as content that exists. Exactly the failure `toPublishItem` below was written
358
+ // to prevent on the publish path; this path had no guard at all (spec #793).
359
+ //
360
+ // Refused BEFORE the call, not after on the operation's result: starting a job that provably
361
+ // writes nothing spends a write quota and leaves an operation record implying an import
362
+ // happened. And `fail()` rather than a success carrying a warning, because a
363
+ // successful-looking result indistinguishable from a real import is the whole defect.
364
+ //
365
+ // Note an empty plan is not necessarily the server being wrong: a bundle whose every item
366
+ // already matches the target legitimately plans to nothing. What is wrong is calling that an
367
+ // import — so this says which of the two happened.
368
+ if (selection.length === 0) {
369
+ return fail('Nothing would be imported. The plan selected 0 items, and items[] is what an import ' +
370
+ 'writes — so this would start a job, import nothing, and report success. Nothing was ' +
371
+ 'sent. If the target already matches the source, that is the plan saying so.');
372
+ }
272
373
  const operation = await target.request('POST', '/import', {
273
374
  bundle,
274
375
  identityMode: mode,
275
- items: (plan.items ?? []).map((item) => ({ kind: item.kind, id: item.id })),
376
+ items: selection,
276
377
  });
277
378
  return ok({ plan, operation, pollWith: 'content_operation_status' });
278
379
  }));
279
380
  }
280
381
  }
382
+ /**
383
+ * The context line a read result carries, and the stronger sentence an empty one gets.
384
+ *
385
+ * Spec #792: an agent could not tell **"none exist"** from **"none in this key's scope"**, because
386
+ * neither `[]` nor a relayed `404` named the environment it was answered in. That is the same
387
+ * ambiguity spec #790 found one layer out, where it cost a long misdiagnosis — an empty array that
388
+ * meant "nothing selected" read as "nothing exists".
389
+ *
390
+ * An empty read stays a **success**. A brand-new environment genuinely has no Contracts, so marking
391
+ * it an error would send an agent hunting a fault that does not exist; what was missing is what the
392
+ * emptiness is *of*.
393
+ */
394
+ function readContext(session, result) {
395
+ return looksEmpty(result)
396
+ ? `${session.contextLine()} 0 of 0 — this key reads only this environment.`
397
+ : session.contextLine();
398
+ }
399
+ /**
400
+ * Whether a response carries no content at all.
401
+ *
402
+ * Deliberately conservative: it answers `false` whenever it is unsure, because claiming "0 of 0"
403
+ * about a result that did contain something would be a new way of saying the wrong thing. `null` and
404
+ * `undefined` members are ignored rather than counted (`{items: [], nextCursor: null}` is empty; so
405
+ * is a `content_describe` narrowed by `include` to one empty list).
406
+ */
407
+ function looksEmpty(result) {
408
+ if (Array.isArray(result))
409
+ return result.length === 0;
410
+ if (typeof result !== 'object' || result === null)
411
+ return false;
412
+ // Both listings answer with an `items` array, and that member alone decides for them. Checked
413
+ // before the general rule below because a paged `/components` body also carries `total`, `page`
414
+ // and `pageSize` — numbers, which are not evidence of content either way, and which the general
415
+ // rule would read as "this result contains something".
416
+ const items = result.items;
417
+ if (Array.isArray(items))
418
+ return items.length === 0;
419
+ const present = Object.values(result).filter((value) => value !== undefined && value !== null);
420
+ return present.length > 0 && present.every((value) => Array.isArray(value) && value.length === 0);
421
+ }
281
422
  /**
282
423
  * Normalizes one execute item.
283
424
  *
@@ -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;AAChE,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAgB,MAAM,eAAe,CAAA;AACrG,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA;AAyB7C,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;AAEnC,MAAM,UAAU,aAAa,CAAC,MAAiB,EAAE,OAAoB;IACnE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;IAE3C,kGAAkG;IAClG,+FAA+F;IAC/F,sBAAsB;IACtB,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IACvC,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAA;IAC9C,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAA;IAC7C,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;IAE5C,IAAI,OAAO,EAAE,CAAC;QACZ,MAAM,CAAC,YAAY,CACjB,kBAAkB,EAClB;YACE,KAAK,EAAE,8BAA8B;YACrC,WAAW,EACT,sFAAsF;gBACtF,wFAAwF;gBACxF,wF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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"}
@@ -0,0 +1,31 @@
1
+ import type { Session } from '../session.js';
2
+ /**
3
+ * What `content_whoami` answers.
4
+ *
5
+ * **Why this is a tool and not only the resource that already exists.** `ebitex-content://whoami`
6
+ * has been served since this server's first release, and many MCP clients surface resources to the
7
+ * *user* and never to the *model*. A resource the agent cannot read is, for this purpose, not an
8
+ * answer: it has no self-service way to ask "where am I scoped?" before interpreting an empty list,
9
+ * which is exactly when it needs to. Both read `session.who`, so the two can never disagree.
10
+ *
11
+ * **Why it costs nothing.** `resolveSession` already called `GET /whoami` at startup to decide which
12
+ * tools to register at all. This renders that same resolution; it issues no request.
13
+ */
14
+ /** One tool this key cannot see, and the scope that would have shown it. */
15
+ export type WithheldTool = {
16
+ tool: string;
17
+ requires: string;
18
+ };
19
+ /**
20
+ * The one genuinely new fact this tool reports.
21
+ *
22
+ * Tool *absence* is otherwise indistinguishable from "this server has no such capability" — an agent
23
+ * offered no `content_write` cannot tell a read-scoped key from a server that simply cannot write.
24
+ *
25
+ * The list is **derived** by the caller from the same booleans that gate registration, never
26
+ * enumerated in a table here. A second list of tool→scope is a copy of a fact the `if` blocks already
27
+ * state, and it goes stale the first time a tool moves scope — a failure this codebase has had twice
28
+ * elsewhere, both times in the *reader* rather than the writer.
29
+ */
30
+ export declare function describeSession(session: Session, withheld: readonly WithheldTool[], serverVersion: string): Record<string, unknown>;
31
+ //# sourceMappingURL=whoami.d.ts.map
@@ -0,0 +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,GACpB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAuBzB"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * The one genuinely new fact this tool reports.
3
+ *
4
+ * Tool *absence* is otherwise indistinguishable from "this server has no such capability" — an agent
5
+ * offered no `content_write` cannot tell a read-scoped key from a server that simply cannot write.
6
+ *
7
+ * The list is **derived** by the caller from the same booleans that gate registration, never
8
+ * enumerated in a table here. A second list of tool→scope is a copy of a fact the `if` blocks already
9
+ * state, and it goes stale the first time a tool moves scope — a failure this codebase has had twice
10
+ * elsewhere, both times in the *reader* rather than the writer.
11
+ */
12
+ export function describeSession(session, withheld, serverVersion) {
13
+ const { who } = session;
14
+ return {
15
+ organization: { id: who.organizationId, name: who.organizationName, slug: who.organizationSlug },
16
+ environment: { id: who.environmentId, name: who.environmentName },
17
+ actingAs: { roleName: who.roleName, keyName: who.keyName },
18
+ scopes: who.scopes,
19
+ // Reported even though it is not a property of the credential, because a key whose scopes list
20
+ // `authoring` while its write tools are absent is otherwise inexplicable from inside the
21
+ // session — the scope list and the tool list would flatly contradict each other with no visible
22
+ // cause. Hiding the write scopes instead would lie about the credential, which is the one thing
23
+ // this tool exists to tell the truth about.
24
+ readOnlyForced: session.readOnlyRequested,
25
+ serverVersion,
26
+ withheld,
27
+ // The sentence an agent needs *before* it misreads its first empty result. An empty list from
28
+ // this server is always scoped, and saying so is cheaper than the duplicates an agent creates
29
+ // after concluding that nothing exists.
30
+ note: 'This key reads and writes exactly one authoring environment, as one role. An empty result ' +
31
+ 'means nothing matched here — not that nothing exists.',
32
+ };
33
+ }
34
+ //# sourceMappingURL=whoami.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"whoami.js","sourceRoot":"","sources":["../../src/tools/whoami.ts"],"names":[],"mappings":"AAqBA;;;;;;;;;;GAUG;AACH,MAAM,UAAU,eAAe,CAC7B,OAAgB,EAChB,QAAiC,EACjC,aAAqB;IAErB,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,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.4.97",
3
+ "version": "0.5.99",
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/",