@rubytech/create-realagent 1.0.868 → 1.0.869
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/package.json +1 -1
- package/payload/platform/lib/graph-mcp/dist/__tests__/warnings-envelope.test.d.ts +2 -0
- package/payload/platform/lib/graph-mcp/dist/__tests__/warnings-envelope.test.d.ts.map +1 -0
- package/payload/platform/lib/graph-mcp/dist/__tests__/warnings-envelope.test.js +140 -0
- package/payload/platform/lib/graph-mcp/dist/__tests__/warnings-envelope.test.js.map +1 -0
- package/payload/platform/lib/graph-mcp/dist/cypher-shim-read.d.ts +85 -0
- package/payload/platform/lib/graph-mcp/dist/cypher-shim-read.d.ts.map +1 -0
- package/payload/platform/lib/graph-mcp/dist/cypher-shim-read.js +93 -0
- package/payload/platform/lib/graph-mcp/dist/cypher-shim-read.js.map +1 -0
- package/payload/platform/lib/graph-mcp/dist/index.js +82 -11
- package/payload/platform/lib/graph-mcp/dist/index.js.map +1 -1
- package/payload/platform/lib/graph-mcp/src/__tests__/warnings-envelope.test.ts +151 -0
- package/payload/platform/lib/graph-mcp/src/cypher-shim-read.ts +141 -0
- package/payload/platform/lib/graph-mcp/src/index.ts +107 -11
- package/payload/platform/plugins/admin/PLUGIN.md +2 -1
- package/payload/platform/plugins/admin/mcp/dist/__tests__/public-hostname.test.d.ts +2 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/public-hostname.test.d.ts.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/public-hostname.test.js +106 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/public-hostname.test.js.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/index.js +34 -0
- package/payload/platform/plugins/admin/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/admin/mcp/dist/lib/public-hostname.d.ts +21 -0
- package/payload/platform/plugins/admin/mcp/dist/lib/public-hostname.d.ts.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/lib/public-hostname.js +54 -0
- package/payload/platform/plugins/admin/mcp/dist/lib/public-hostname.js.map +1 -0
- package/payload/platform/plugins/admin/skills/publish-site/SKILL.md +2 -3
- package/payload/platform/plugins/docs/references/internals.md +2 -0
- package/payload/platform/templates/specialists/agents/content-producer.md +1 -1
- package/payload/server/chunk-B5VSPQQP.js +11320 -0
- package/payload/server/maxy-edge.js +1 -1
- package/payload/server/server.js +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface ResolverSession {
|
|
2
|
+
run(cypher: string, params: Record<string, unknown>): Promise<{
|
|
3
|
+
records: Array<{
|
|
4
|
+
get: (k: string) => unknown;
|
|
5
|
+
}>;
|
|
6
|
+
}>;
|
|
7
|
+
}
|
|
8
|
+
export interface PublicHostnameHit {
|
|
9
|
+
hostname: string;
|
|
10
|
+
isApex: boolean;
|
|
11
|
+
tunnelId: string;
|
|
12
|
+
}
|
|
13
|
+
export interface PublicHostnameMiss {
|
|
14
|
+
hostname: null;
|
|
15
|
+
isApex: null;
|
|
16
|
+
tunnelId: null;
|
|
17
|
+
reason: "no-hostname" | "no-tunnel";
|
|
18
|
+
}
|
|
19
|
+
export type PublicHostnameResult = PublicHostnameHit | PublicHostnameMiss;
|
|
20
|
+
export declare function resolvePublicHostname(session: ResolverSession, accountId: string): Promise<PublicHostnameResult>;
|
|
21
|
+
//# sourceMappingURL=public-hostname.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-hostname.d.ts","sourceRoot":"","sources":["../../src/lib/public-hostname.ts"],"names":[],"mappings":"AAmBA,MAAM,WAAW,eAAe;IAC9B,GAAG,CACD,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,OAAO,CAAC;QAAE,OAAO,EAAE,KAAK,CAAC;YAAE,GAAG,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,OAAO,CAAA;SAAE,CAAC,CAAA;KAAE,CAAC,CAAC;CACjE;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,IAAI,CAAC;IACf,MAAM,EAAE,IAAI,CAAC;IACb,QAAQ,EAAE,IAAI,CAAC;IACf,MAAM,EAAE,aAAa,GAAG,WAAW,CAAC;CACrC;AAED,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,GAAG,kBAAkB,CAAC;AAsB1E,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,eAAe,EACxB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,oBAAoB,CAAC,CAkB/B"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Task 970 — public-hostname deterministic resolver.
|
|
2
|
+
//
|
|
3
|
+
// Backs the `mcp__admin__public-hostname` MCP tool. Returns the operator's
|
|
4
|
+
// canonical public hostname in one tool call so the agent following the
|
|
5
|
+
// publish-site skill never has to guess the property name on
|
|
6
|
+
// `:CloudflareHostname` nodes — the failure mode that produced the third
|
|
7
|
+
// `llm-framing-deterministic` recurrence (cf. failure marker
|
|
8
|
+
// `676504f1` at platform/ui/app/lib/claude-agent/spawn-env.ts:334-336).
|
|
9
|
+
//
|
|
10
|
+
// Contract:
|
|
11
|
+
// - On hit: { hostname: string, isApex: boolean, tunnelId: string }
|
|
12
|
+
// - On miss: { hostname: null, isApex: null, tunnelId: null,
|
|
13
|
+
// reason: "no-hostname" | "no-tunnel" }
|
|
14
|
+
//
|
|
15
|
+
// `reason` distinguishes "tunnel is up but no hostname is bound to it yet"
|
|
16
|
+
// (operator must run setup-hostname) from "no tunnel at all" (operator must
|
|
17
|
+
// run setup-tunnel). Both are actionable diagnoses; "no-tunnel" was the
|
|
18
|
+
// underlying state in the recurrence log.
|
|
19
|
+
const HOSTNAME_CYPHER = "MATCH (h:CloudflareHostname {accountId: $accountId}) " +
|
|
20
|
+
"WHERE NOT h:Trashed " +
|
|
21
|
+
"RETURN h.hostnameValue AS hostname, h.isApex AS isApex, h.tunnelId AS tunnelId " +
|
|
22
|
+
"ORDER BY h.isApex DESC, h.updatedAt DESC " +
|
|
23
|
+
"LIMIT 1";
|
|
24
|
+
const TUNNEL_COUNT_CYPHER = "MATCH (t:CloudflareTunnel {accountId: $accountId}) " +
|
|
25
|
+
"WHERE NOT t:Trashed " +
|
|
26
|
+
"RETURN count(t) AS n";
|
|
27
|
+
function toNumber(v) {
|
|
28
|
+
if (typeof v === "number")
|
|
29
|
+
return v;
|
|
30
|
+
if (v && typeof v === "object" && "toNumber" in v && typeof v.toNumber === "function") {
|
|
31
|
+
return v.toNumber();
|
|
32
|
+
}
|
|
33
|
+
return Number(v);
|
|
34
|
+
}
|
|
35
|
+
export async function resolvePublicHostname(session, accountId) {
|
|
36
|
+
const hostnameRes = await session.run(HOSTNAME_CYPHER, { accountId });
|
|
37
|
+
if (hostnameRes.records.length > 0) {
|
|
38
|
+
const r = hostnameRes.records[0];
|
|
39
|
+
return {
|
|
40
|
+
hostname: r.get("hostname"),
|
|
41
|
+
isApex: r.get("isApex"),
|
|
42
|
+
tunnelId: r.get("tunnelId"),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
const tunnelRes = await session.run(TUNNEL_COUNT_CYPHER, { accountId });
|
|
46
|
+
const n = tunnelRes.records.length > 0 ? toNumber(tunnelRes.records[0].get("n")) : 0;
|
|
47
|
+
return {
|
|
48
|
+
hostname: null,
|
|
49
|
+
isApex: null,
|
|
50
|
+
tunnelId: null,
|
|
51
|
+
reason: n > 0 ? "no-hostname" : "no-tunnel",
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=public-hostname.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-hostname.js","sourceRoot":"","sources":["../../src/lib/public-hostname.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACr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AAC;IACD,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;IACxE,MAAM,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACrF,OAAO;QACL,QAAQ,EAAE,IAAI;QACd,MAAM,EAAE,IAAI;QACZ,QAAQ,EAAE,IAAI;QACd,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW;KAC5C,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Publish Site
|
|
2
2
|
|
|
3
|
-
Move an already-extracted static-site tree into the per-account static-publish surface (`<accountDir>/sites/<slug>/`) and emit exactly one canonical path slug
|
|
3
|
+
Move an already-extracted static-site tree into the per-account static-publish surface (`<accountDir>/sites/<slug>/`) and emit exactly one canonical path slug. Pair the slug with the deterministic public hostname returned by `mcp__admin__public-hostname` (Task 970) to surface the full URL in a single turn.
|
|
4
4
|
|
|
5
5
|
**Invoked from `specialists:content-producer`** when the brief carries a host-website / publish-site / put-online intent (Task 966). Admin's IDENTITY.md routes those intents to that specialist on turn 1; running this skill inline on the main admin runner exhausts the 10-turn budget on per-turn ToolSearch + plugin-read discovery before publish-site executes.
|
|
6
6
|
|
|
@@ -54,7 +54,7 @@ The operator message for `ambiguous-html` names the candidate files and asks the
|
|
|
54
54
|
4. **Choose the canonical path.** `index.html` present at top level → path is `/sites/<slug>/`. Otherwise the single top-level HTML file → path is `/sites/<slug>/<file>.html`.
|
|
55
55
|
5. **Emit.** One log line:
|
|
56
56
|
`[publish-site] url emitted=<path-slug> kind=<index|file>`
|
|
57
|
-
6. **
|
|
57
|
+
6. **Resolve the public hostname and emit the full URL.** Call `mcp__admin__public-hostname` (Task 970 — single deterministic tool, never raw cypher) to fetch this account's hostname. Concatenate `https://<hostname><path-slug>` and surface that one URL to the operator. If the tool returns `reason: no-tunnel` or `reason: no-hostname`, relay the tool's remediation message verbatim — do not improvise the URL. The route at `/sites/*` (see [server/routes/sites.ts](../../../../ui/server/routes/sites.ts)) handles the trailing-slash redirect on the dir form, so the slug is correct as-emitted whether the operator's HTML uses an `index.html` entry-point or a publisher-named landing file.
|
|
58
58
|
|
|
59
59
|
## Log lines (grep targets)
|
|
60
60
|
|
|
@@ -66,7 +66,6 @@ The operator message for `ambiguous-html` names the candidate files and asks the
|
|
|
66
66
|
|
|
67
67
|
## Out of scope
|
|
68
68
|
|
|
69
|
-
- Discovering or emitting the operator's public hostname. The hostname is whatever their tunnel terminates at — not knowable from inside this skill, and not the platform's concern. The operator pairs the slug with their own host root.
|
|
70
69
|
- Cleanup of pre-existing synthetic files left by earlier sessions (e.g. a stray `index.html` produced by an earlier `cp brochure.html index.html` workaround). Refuse with `destination-occupied` and let the operator clean up explicitly.
|
|
71
70
|
- Extraction. `unzip-attachment` already owns the extract step; the source path is its output.
|
|
72
71
|
- DNS, tunnels, certificates, or any public-host configuration. The route at `/sites/*` is the wire contract; this skill is a placement + URL-shape skill only.
|
|
@@ -328,6 +328,8 @@ Each row in the Conversations modal exposes a `View logs` row-action that opens
|
|
|
328
328
|
|
|
329
329
|
**Directory canonicalisation.** A request whose disk target is a directory is `301`'d to the trailing-slash form (query string preserved) before any body is served — RFC 3986 §5.3 base resolution requires the trailing slash so relative refs in the served HTML resolve under the directory, not its parent. After the redirect the route serves `<dir>/index.html` if it exists on disk; otherwise `404`. There is **no** implicit-`index.html` invention for missing paths — the publisher owns canonical URLs. A brochure shipped without `index.html` is reached at `/sites/<slug>/<file>.html`, and the admin skill `publish-site` is the sanctioned surface that moves the extracted tree under `<accountDir>/sites/<slug>/` and emits the canonical path slug. Operator-side: drop a brochure at `<accountDir>/sites/properties/<id>/brochure/output/` and it serves at `<public-host>/sites/properties/<id>/brochure/output/brochure.html` (or `<public-host>/sites/properties/<id>/brochure/output/` if that directory contains an `index.html`). See `.docs/web-chat.md` `/sites/*` route entry for the wire contract and `[sites]` log lines (`serve|redirect-trailing-slash|not-found|path-traversal-rejected|symlink-escape-rejected|no-account`).
|
|
330
330
|
|
|
331
|
+
**Deterministic public-hostname surface.** The `<public-host>` half of the URL the operator pastes is resolved by the `mcp__admin__public-hostname` MCP tool — single call against `:CloudflareHostname.hostnameValue` returning `{hostname, isApex, tunnelId}` on hit or `{hostname:null, reason:"no-tunnel"\|"no-hostname"}` on miss. `publish-site` step 6 calls it after the move and emits the full URL (`https://<hostname><path-slug>`) in the same turn. Agents must never write raw cypher to discover the hostname; the property name (`hostnameValue`, not `hostname`) was the canonical recurrence-class failure mode. The graph-mcp shim additionally runs a sequential envelope-warning probe on every read response — when Neo4j emits `gql_status` codes matching `^0[12]N5\d$` (e.g. `01N52` "property does not exist"), the shim stitches them into a prefix content block on the response so property-name misses surface to the agent inline instead of returning silent `[]`. Probe failure is best-effort: the upstream response forwards unchanged with `[mcp:graph] probe-error`.
|
|
332
|
+
|
|
331
333
|
### Cross-tab session rotation
|
|
332
334
|
|
|
333
335
|
When you click "New conversation" in the chat tab, {{productName}} mints a fresh admin session key on the server and clears the old one. Sibling admin tabs (`/graph`, `/data`) opened in the same browser keep working without re-login: the chat tab broadcasts the new key on a same-origin channel so each sibling tab updates its captured key instantly, and any in-flight admin request that 401s with the rotation-orphan code retries once after re-reading the latest key from per-tab storage. If neither path recovers (browser locked down, second 401 after retry, session expired), the tab shows a single banner — "Your admin session was renewed in another tab. Click to reload." — and one click sends you back through login. No silent 401s; no re-clicking through the same trash icon hoping it sticks. See `.docs/web-chat.md` "Cross-tab rotation contract" for the wire-level `code` taxonomy and observability surfaces.
|
|
@@ -3,7 +3,7 @@ name: content-producer
|
|
|
3
3
|
description: "Visual production and static-site hosting — reads from the populated graph to produce visual artifacts (image generation, PDF rendering, component delivery) and hosts already-prepared static sites by extracting attached archives via unzip-attachment then placing the tree under <accountDir>/sites/<slug>/ via publish-site. Delegate for: generating images, saving rendered pages as PDF, or any 'host this website' / 'publish this site' / 'put this online' intent carrying an HTML+assets archive. **Not** document ingestion — graph ingestion of any kind routes to `specialists:database-operator`. Static-site zips are extracted to disk for publication, never written to the graph."
|
|
4
4
|
summary: "Produces visual output from your graph — generates images, renders pages to PDF, and hosts static websites you upload as a zip. For example, when you need a cover image for a brief, want to save a rendered page as PDF, or upload a brochure zip and ask to put it online."
|
|
5
5
|
model: claude-sonnet-4-6
|
|
6
|
-
tools: Bash, mcp__memory__memory-search, mcp__replicate__image-generate, mcp__plugin_playwright_playwright__browser_navigate, mcp__plugin_playwright_playwright__browser_snapshot, mcp__plugin_playwright_playwright__browser_take_screenshot, mcp__plugin_playwright_playwright__browser_pdf_save, mcp__admin__render-component, mcp__admin__file-attach, mcp__admin__plugin-read
|
|
6
|
+
tools: Bash, mcp__memory__memory-search, mcp__replicate__image-generate, mcp__plugin_playwright_playwright__browser_navigate, mcp__plugin_playwright_playwright__browser_snapshot, mcp__plugin_playwright_playwright__browser_take_screenshot, mcp__plugin_playwright_playwright__browser_pdf_save, mcp__admin__render-component, mcp__admin__file-attach, mcp__admin__plugin-read, mcp__admin__public-hostname
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Content Producer
|