mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-08 03:38:23 +00:00
xwiki was listed in requirement 036 as an unverified candidate. Probing the
running instance showed no AI or LLM extension in the extension repository
of the pinned lts-postgres-tomcat image, so there was no surface to point at
the gateway. Rather than excluding the role, wire the extension the same way
mediawiki wires AIEditingAssistant.
The declaration follows the nine existing consumers: a litellm service block
bound to 'svc-ai-litellm' in group_names, a sk_prefixed litellm_api_key, the
gateway pinned on variant 2 as 036 prescribes for three-variant roles, and an
integration hook that pulls the shared consumer contract.
meta/addons/ai-llm.yml feeds the existing installer: xwiki_enabled_install_items
turns enabled addons into the {id, version} list that the Groovy extension
installer consumes.
Two limits, deliberately not papered over. The maven coordinate
org.xwiki.contrib.llm:application-ai-llm-ui at 0.7 is not verified against
the upstream repository, so a wrong coordinate fails loudly on first deploy.
And the spec asserts the extension is installed and the gateway host stays
undotted, not that a prompt is answered: the extension's configuration model
has to be measured on a running container before that wiring can be written
without guessing. xwiki therefore does not yet satisfy criterion 6.
This role has never been deployed; only the gate has run.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
52 lines
2.1 KiB
JavaScript
52 lines
2.1 KiB
JavaScript
const { test, expect } = require("@playwright/test");
|
|
const { resolveTimeout } = require("../timeouts");
|
|
|
|
const { skipUnlessAddonEnabled } = require("../addon-gating");
|
|
const {
|
|
decodeDotenvQuotedValue,
|
|
normalizeBaseUrl,
|
|
gotoOnion,
|
|
} = require("../personas");
|
|
|
|
test.use({ ignoreHTTPSErrors: true });
|
|
|
|
const appBaseUrl = normalizeBaseUrl(process.env.APP_BASE_URL || "");
|
|
const aiGatewayBaseUrl = normalizeBaseUrl(process.env.AI_GATEWAY_BASE_URL || "");
|
|
const superadminUsername = decodeDotenvQuotedValue(process.env.XWIKI_SUPERADMIN_USERNAME || "");
|
|
const superadminPassword = decodeDotenvQuotedValue(process.env.XWIKI_SUPERADMIN_PASSWORD || "");
|
|
|
|
const EXTENSION_ID = "org.xwiki.contrib.llm:application-ai-llm-ui";
|
|
|
|
test("ai-llm: the AI LLM Application extension is installed on the wiki", async ({ page }) => {
|
|
skipUnlessAddonEnabled("ai-llm");
|
|
test.setTimeout(resolveTimeout(120_000));
|
|
|
|
expect(appBaseUrl, "APP_BASE_URL must be set").toBeTruthy();
|
|
|
|
const gatewayHost = new URL(aiGatewayBaseUrl).hostname;
|
|
expect(
|
|
gatewayHost.includes("."),
|
|
`the gateway must be addressed by its bare in-cluster service name; "${gatewayHost}" carries a dot, so the container dns-search suffix completes it and prompts leave the deployment through the public ingress`,
|
|
).toBe(false);
|
|
|
|
expect(superadminUsername, "XWIKI_SUPERADMIN_USERNAME must be set").toBeTruthy();
|
|
expect(superadminPassword, "XWIKI_SUPERADMIN_PASSWORD must be set").toBeTruthy();
|
|
|
|
const installed = await page.request.get(
|
|
`${appBaseUrl}/rest/extensions/${encodeURIComponent(EXTENSION_ID)}`,
|
|
{
|
|
headers: { Accept: "application/json" },
|
|
params: { media: "json" },
|
|
failOnStatusCode: false,
|
|
timeout: resolveTimeout(60_000),
|
|
},
|
|
);
|
|
|
|
expect(
|
|
installed.status(),
|
|
`the deploy installs ${EXTENSION_ID} through the Extension Script Service; a 404 means the addon never reached the wiki, so no AI surface exists to point at the gateway (HTTP ${installed.status()})`,
|
|
).toBe(200);
|
|
|
|
await gotoOnion(page, `${appBaseUrl}/`, { waitUntil: "domcontentloaded" }).catch(() => {});
|
|
});
|