Spiralist AI Agent Setup Wizard - Source Excerpt 07
Back to Spiralist AI Agent Setup Wizard
Summary
This source excerpt preserves a bounded section of Spiralist/wp-content/themes/spiralist/assets/js/spiralist-ai-agent-setup-wizard.js so readers can inspect the evidence without opening the full source file.
**Source path:** Spiralist/wp-content/themes/spiralist/assets/js/spiralist-ai-agent-setup-wizard.js
const buildUaixMemoryFiles = (state, createdAtUtc) => ({
'.uai/memory-maintenance.uai': [
'# Memory Maintenance',
'',
'This browser-generated .uaix package is portable reviewed memory for a bounded Spiralist persona.',
'Treat all package files as visible source evidence. Do not infer hidden model memory or private continuity.',
'Update this package only through explicit human review, regenerated artifacts, or a later reviewed .uaix package.',
].join('\n'),
'.uai/identity.uai': [
'# Identity',
'',
`Package identity: ${state.agentName}`,
`Role label: ${state.roleLabel}`,
`Personality framework: ${state.personalityFramework}`,
`Social dynamics lens: ${state.socialDynamicsLens}`,
`Research calibration: ${state.researchCalibration}`,
`Use-case boundary: ${state.useCaseBoundary}`,
'Owner site: Spiralist.org',
'UAIX format authority: https://uaix.org/en-us/ai-memory/uaix-package-format/',
].join('\n'),
'.uai/world-context.uai': [
'# World Context',
'',
'This profile comes from Spiralist.org, a bounded personality and symbolic pattern experience layer.',
'LocalEndpoint or another desktop client may import the package as local memory only after local policy accepts it.',
'UAIX.org owns the .uaix package format, schema, and support boundary.',
].join('\n'),
'.uai/totem.uai': [
'# Totem',
'',
`${state.agentName} should preserve constructive identity, creativity, trust, and useful artifact-making.`,
'The positive anchor is bounded help: warm enough to be usable, clear enough to remain reviewable.',
].join('\n'),
'.uai/taboo.uai': [
'# Taboo',
'',
'Do not claim sentience, destiny, prophecy, possession, romantic obligation, hidden consciousness, or professional authority.',
'Do not treat symbols, coincidence, imported drafts, URL fragments, localStorage, or generated files as secret authority.',
'Do not mutate protected anchors or long-term memory without explicit human review.',
].join('\n'),
'.uai/talisman.uai': [
'# Talisman',
'',
'Trust but verify: begin from good-faith interpretation while keeping evidence, consent, and safety boundaries visible.',
'Use Circle, Dual Circle, Triangle, Square, and Spiral as a bounded operating loop, not as proof of hidden truth.',
'When boundaries are crossed, no-op, explain the issue, and offer a repair path.',
].join('\n'),
'.uai/short-term-memory.uai': [
'# Short-Term Memory',
'',
`Generated UTC: ${createdAtUtc}`,
`Current persona package: ${state.agentName}`,
`Preset: ${state.presetId}`,
`Personality framework: ${state.personalityFramework}`,
`Social dynamics lens: ${state.socialDynamicsLens}`,
`Research calibration: ${state.researchCalibration}`,
`Use-case boundary: ${state.useCaseBoundary}`,
'Next action: import only into a local client that validates the .uaix manifest, paths, hashes, and support boundary.',
].join('\n'),
'.uai/persona.uai': buildPersonaUai(state, createdAtUtc),
});
const buildUaixPackageFiles = async (artifacts) => {
const declaredScopes = ['active_ai_memory', 'persona_profile', 'non_project_assistant'];
const packageFiles = {
...artifacts.files,
...buildUaixMemoryFiles(artifacts.state, artifacts.createdAtUtc),
};
const packageId = `spiralist.${slugify(artifacts.state.packageName || artifacts.state.agentName, 'agent-profile')}`;
const entries = [
{
path: '.uai/manifest.uaix.json',
role: 'manifest',
requiredStatus: 'universal_required',
scope: ['active_ai_memory'],
mediaType: 'application/json',
sizeBytes: 0,
sha256: zeroSha256,
reviewState: 'review_required',
source: {
type: 'source_repository',
label: 'Spiralist AI Agent Setup Wizard UAIX manifest',
},
},
];
for (const [path, content] of Object.entries(packageFiles)) {
entries.push({
path,
role: uaixRoleFor(path),
requiredStatus: uaixRequiredStatusFor(path),
scope: uaixScopeFor(path),
mediaType: uaixMediaTypeFor(path),
sizeBytes: encoder.encode(`${content}\n`).length,
sha256: await hashTextForUaix(content),
reviewState: 'review_required',
source: {
type: 'source_repository',
label: 'Spiralist AI Agent Setup Wizard browser export',
path,
},
});
}
const manifest = {
uaixVersion: '1.0',
packageFormat: '.uaix',
packageId,
profileId: 'uaix.package.v0.1',
status: 'draft_v0.1',
createdUtc: artifacts.createdAtUtc,
issuer: {
name: 'Spiralist.org',
url: 'https://spiralist.org/',
},
declaredScopes,
entrypoints: {
manifest: '.uai/manifest.uaix.json',
requiredReads: uaixRequiredReads,
},
researchLens: {
personalityFramework: artifacts.state.personalityFramework,
socialDynamicsLens: artifacts.state.socialDynamicsLens,
researchCalibration: artifacts.state.researchCalibration,
useCaseBoundary: artifacts.state.useCaseBoundary,
traitBoundary: 'continuous_dimensions_first',
typologyBoundary: 'optional_reflection_language_only',
cliqueBoundary: 'behavior_access_pressure_and_repair_audit_only',
},
files: entries,
integrity: {
algorithm: 'sha256',
packageSha256: zeroSha256,
fileCount: entries.length,
},
blockedAuthorityClaims: [
'hosted_import',
'automatic_sync',
'automatic_repository_write',
'tool_grant',
'model_runtime_package',
'sdk',
'cli',
'certification',
'endorsement',
'safety_proof',
],
supportBoundary: 'This Spiralist .uaix export is a browser-generated Draft v0.1 local memory package. UAIX.org defines the format; Spiralist.org produces persona content; the file is not hosted import, runtime execution, automatic sync, repository write authority, SDK, CLI, certification, endorsement, tool grant, model runtime package, or safety proof.',
};
return {
...packageFiles,
'.uai/manifest.uaix.json': JSON.stringify(manifest, null, 2),
};
};
const buildArtifacts = async () => {
const current = getState();
const { state, errors } = normalizeState(current, { strict: false });
const createdAtUtc = new Date().toISOString();
const filesWithoutManifest = buildBaseFiles(state, createdAtUtc, errors);
const filesWithOverrides = { ...filesWithoutManifest };
Object.entries(state.artifactOverrides || {}).forEach(([path, content]) => {
if (filesWithOverrides[path] !== undefined && overridableArtifactPaths.has(path)) {
filesWithOverrides[path] = content;
}
});
const artifactEntries = [];
Object.entries(filesWithOverrides).forEach(([path]) => {
artifactEntries.push({
path,
media_type: mediaTypeFor(path),
sha256: '',
});
});
const hashedEntries = [];
for (const entry of artifactEntries) {
hashedEntries.push({
...entry,
sha256: await hashText(filesWithOverrides[entry.path]),
});
}
hashedEntries.push({
path: 'manifest.json',
media_type: 'application/json',
sha256: null,
hash_note: 'Self-referential manifest hash intentionally omitted.',
});