178 lines
5.9 KiB
JavaScript
178 lines
5.9 KiB
JavaScript
#!/usr/bin/env node
|
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
import path from "node:path";
|
|
|
|
const document = {
|
|
schema: "gamecult.eve.provider_advertisement.v1",
|
|
providerId: "weksa.intent.service",
|
|
title: "Weksa Intent Service",
|
|
description:
|
|
"Weksa converts writing, interlingua, and agent state into typed conversational intent, pronunciation plans, and utterance handoff documents for AquaSynth and other consumers.",
|
|
mode: "fixture-read-only",
|
|
serviceVerse: {
|
|
id: "verse.weksa.service.v1",
|
|
cultMeshKey: "weksa.service/provider-advertisement",
|
|
authority: "Weksa daemon identity, schema catalog, and provider publication",
|
|
owns: [
|
|
"typed conversational intent",
|
|
"pronunciation plans",
|
|
"utterance handoff documents",
|
|
"lowering traces",
|
|
"language-project and flavor-profile state",
|
|
],
|
|
doesNotOwn: [
|
|
"AquaSynth learned embeddings",
|
|
"Faust compilation",
|
|
"rendered audio",
|
|
"Persona canonical state",
|
|
],
|
|
},
|
|
nestedVerses: [
|
|
{
|
|
id: "weksa.intent",
|
|
kind: "intent",
|
|
cultMeshKey: "weksa.intent/current",
|
|
authority: "Weksa conversational intent compiler",
|
|
schemas: ["weksa.conversational_intent.v0"],
|
|
},
|
|
{
|
|
id: "weksa.pronunciation",
|
|
kind: "pronunciation",
|
|
cultMeshKey: "weksa.pronunciation/current",
|
|
authority: "Weksa pronunciation lowering",
|
|
schemas: ["weksa.pronunciation_plan.v0"],
|
|
},
|
|
{
|
|
id: "weksa.utterance",
|
|
kind: "utterance",
|
|
cultMeshKey: "weksa.utterance/handoffs",
|
|
authority: "Weksa utterance handoff export",
|
|
schemas: ["weksa.utterance_handoff.v0", "weksa.utterance_embedding_handoff.v0.1"],
|
|
},
|
|
{
|
|
id: "weksa.operator",
|
|
kind: "operator",
|
|
cultMeshKey: "weksa.operator/status",
|
|
authority: "Weksa daemon runtime",
|
|
schemas: ["weksa.operator_state.v0", "gamecult.eve.surface.v1"],
|
|
},
|
|
{
|
|
id: "weksa.cultural_ontology",
|
|
kind: "cultural_ontology",
|
|
cultMeshKey: "weksa.cultural-ontology/catalogs",
|
|
authority: "Weksa cultural ontology profile store",
|
|
schemas: ["weksa.cultural_ontology_profile.v0", "weksa.cultural_ontology_catalog.v0"],
|
|
},
|
|
],
|
|
schemaWitnessFamilies: [
|
|
{
|
|
family: "intent",
|
|
namespace: "weksa.intent.*",
|
|
witnesses: ["weksa.conversational_intent.v0"],
|
|
durableShape: ".weksa/intent/{intentId}.cc",
|
|
},
|
|
{
|
|
family: "pronunciation",
|
|
namespace: "weksa.pronunciation.*",
|
|
witnesses: ["weksa.pronunciation_plan.v0"],
|
|
durableShape: ".weksa/pronunciation/{utteranceId}.cc",
|
|
},
|
|
{
|
|
family: "utterance",
|
|
namespace: "weksa.utterance.*",
|
|
witnesses: ["weksa.utterance_handoff.v0", "weksa.utterance_embedding_handoff.v0.1"],
|
|
durableShape: ".weksa/handoff/{utteranceId}.cc",
|
|
},
|
|
{
|
|
family: "trace",
|
|
namespace: "weksa.trace.*",
|
|
witnesses: ["weksa.lowering_trace.v0"],
|
|
durableShape: ".weksa/traces/{traceId}.cc",
|
|
},
|
|
{
|
|
family: "cultural_ontology",
|
|
namespace: "weksa.cultural_ontology.*",
|
|
witnesses: ["weksa.cultural_ontology_profile.v0", "weksa.cultural_ontology_catalog.v0"],
|
|
durableShape: ".weksa/cultural-ontology/{storeId}.cc",
|
|
},
|
|
{
|
|
family: "eve",
|
|
namespace: "weksa.eve.*",
|
|
witnesses: ["gamecult.eve.provider_advertisement.v1", "gamecult.eve.surface.v1"],
|
|
durableShape: ".weksa/eve-surfaces.cc",
|
|
},
|
|
],
|
|
cultMeshSurfaceKeys: [
|
|
{
|
|
id: "weksa.eve.intent_review.v0",
|
|
documentSchema: "gamecult.eve.surface.v1",
|
|
cultMeshKey: "weksa.eve.surface.intent-review",
|
|
binds: ["weksa.intent.*", "weksa.trace.*"],
|
|
status: "expected-surface",
|
|
},
|
|
{
|
|
id: "weksa.eve.pronunciation_trace.v0",
|
|
documentSchema: "gamecult.eve.surface.v1",
|
|
cultMeshKey: "weksa.eve.surface.pronunciation-trace",
|
|
binds: ["weksa.pronunciation.*", "weksa.trace.*"],
|
|
status: "expected-surface",
|
|
},
|
|
{
|
|
id: "weksa.eve.utterance_handoff.v0",
|
|
documentSchema: "gamecult.eve.surface.v1",
|
|
cultMeshKey: "weksa.eve.surface.utterance-handoff",
|
|
binds: ["weksa.utterance.*", "aquasynth.speech.*"],
|
|
status: "expected-surface",
|
|
},
|
|
],
|
|
commandBoundaries: [
|
|
{
|
|
id: "weksa.command.intent.create",
|
|
owner: "Weksa",
|
|
acceptedByFixture: false,
|
|
allowedInputs: ["writing", "interlingua packet", "Persona/agent state projection"],
|
|
emits: ["weksa.conversational_intent.v0", "weksa.lowering_trace.v0"],
|
|
},
|
|
{
|
|
id: "weksa.command.utterance.lower",
|
|
owner: "Weksa",
|
|
acceptedByFixture: false,
|
|
allowedInputs: ["accepted conversational intent", "language project", "speaker state"],
|
|
emits: ["weksa.pronunciation_plan.v0", "weksa.utterance_handoff.v0"],
|
|
},
|
|
{
|
|
id: "weksa.command.handoff.export",
|
|
owner: "Weksa",
|
|
acceptedByFixture: false,
|
|
emits: ["weksa.utterance_embedding_handoff.v0.1"],
|
|
forbiddenTargets: ["Faust compilation", "audio rendering", "AquaSynth synth driver truth"],
|
|
},
|
|
],
|
|
loweringRules: [
|
|
"Weksa owns conversational intent and utterance lowering.",
|
|
"AquaSynth owns learned embeddings, synth controls, Faust compilation, and audio output.",
|
|
"Eve surfaces submit commands and inspect witnesses; they do not own intent truth.",
|
|
"Fixture exports are discovery metadata until the daemon loop commits typed witnesses.",
|
|
],
|
|
};
|
|
|
|
async function main() {
|
|
const args = process.argv.slice(2);
|
|
const outIndex = args.indexOf("--out");
|
|
const outputPath = outIndex >= 0 ? args[outIndex + 1] : undefined;
|
|
const json = `${JSON.stringify(document, null, 2)}\n`;
|
|
|
|
if (outputPath) {
|
|
const resolved = path.resolve(process.cwd(), outputPath);
|
|
await mkdir(path.dirname(resolved), { recursive: true });
|
|
await writeFile(resolved, json, "utf8");
|
|
return;
|
|
}
|
|
|
|
process.stdout.write(json);
|
|
}
|
|
|
|
main().catch((error) => {
|
|
console.error(error);
|
|
process.exitCode = 1;
|
|
});
|