mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-29 11:42:17 +00:00
536 lines
23 KiB
TypeScript
536 lines
23 KiB
TypeScript
export * as Config from "./config.js"
|
|
|
|
import { makeLocationNode } from "@opencode/util/effect/app-node"
|
|
import path from "path"
|
|
import { isDeepStrictEqual } from "node:util"
|
|
import { applyEdits, modify, type ParseError, parse } from "jsonc-parser"
|
|
import { Context, Effect, FiberMap, Layer, Option, PubSub, Schema, Semaphore, Stream } from "effect"
|
|
import { Directory, Document, Info, type Patch, type Entry, Event } from "@opencode/schema/config"
|
|
import { Credential } from "./credential.js"
|
|
import { Bus } from "./bus.js"
|
|
import { Watcher } from "./filesystem/watcher.js"
|
|
import { FSUtil } from "@opencode/util/fs-util"
|
|
import { Global } from "@opencode/util/global"
|
|
import { Location } from "./location.js"
|
|
import { AbsolutePath } from "./schema.js"
|
|
import { ConfigVariable } from "./config/variable.js"
|
|
import { ConfigNormalize } from "./config/normalize.js"
|
|
import { ConfigDiscovery } from "./config/discovery.js"
|
|
import { ConfigWatch } from "./config/watch.js"
|
|
import { ConfigIntegration } from "./config/integration.js"
|
|
import { ConfigManaged } from "./config/managed.js"
|
|
import { ManagedPolicy } from "./managed-policy.js"
|
|
import { Connection } from "@opencode/schema/connection"
|
|
import { WellKnown } from "./wellknown.js"
|
|
import { AppProcess } from "@opencode/util/process"
|
|
import { ChildProcess } from "effect/process"
|
|
|
|
export function latest<K extends keyof Info>(entries: readonly Entry[], key: K): Info[K] | undefined {
|
|
return entries.findLast((entry): entry is Document => entry.type === "document" && entry.info[key] !== undefined)
|
|
?.info[key]
|
|
}
|
|
|
|
export interface Interface {
|
|
/** Returns location config documents and discovery sources from lowest to highest priority. */
|
|
readonly entries: () => Effect.Effect<Entry[]>
|
|
/**
|
|
* The entries `entries()` returns, read synchronously. Transforms read this, so a reload that runs right after a
|
|
* config change, such as an integration replacing its document, sees the change before `config.updated` arrives.
|
|
*/
|
|
readonly snapshot: () => Entry[]
|
|
/** Compatibility roots consumed by internal compatibility plugins. */
|
|
readonly compatibility?: () => Effect.Effect<{
|
|
readonly claude: readonly AbsolutePath[]
|
|
readonly agents: readonly AbsolutePath[]
|
|
}>
|
|
/**
|
|
* Streams raw filesystem updates under config roots. Config owns root
|
|
* topology and watch reconciliation; domain owners filter this feed for the
|
|
* source files they parse and rebuild their own state.
|
|
*/
|
|
readonly changes: () => Stream.Stream<Watcher.Update>
|
|
/** Updates supported global config fields while preserving unrelated JSONC content. */
|
|
readonly update?: (patch: Patch) => Effect.Effect<void, FSUtil.Error>
|
|
/**
|
|
* Replaces, or clears with `undefined`, the document an integration connection contributes. It loads right after
|
|
* managed policies: its settings layer below remote, user, and project config, while its policies outrank theirs.
|
|
* Changing it reloads config like any other source.
|
|
*/
|
|
readonly integration?: (
|
|
integrationID: ConfigIntegration.Document["integrationID"],
|
|
document: ConfigIntegration.Document | undefined,
|
|
) => Effect.Effect<void>
|
|
}
|
|
|
|
export const Options = Schema.Struct({
|
|
project: Schema.optional(Schema.Boolean),
|
|
// false skips the system and global config dirs, ~/.claude, and ~/.agents;
|
|
// wellknown, file, and content entries still load.
|
|
global: Schema.optional(Schema.Boolean),
|
|
system: Schema.optional(Schema.Union([Schema.Boolean, Schema.String])),
|
|
// false skips ~/.claude and project .claude dirs.
|
|
claude: Schema.optional(Schema.Boolean),
|
|
file: Schema.optional(Schema.String),
|
|
content: Schema.optional(Schema.String),
|
|
})
|
|
export type Options = typeof Options.Type
|
|
|
|
export class Service extends Context.Service<Service, Interface>()("@opencode/Config") {}
|
|
|
|
export interface TestInterface extends Interface {
|
|
/** Replaces the entries returned by subsequent entries() calls. */
|
|
readonly setEntries: (entries: Entry[]) => Effect.Effect<void>
|
|
/** Emits one filesystem update to every changes() subscriber. */
|
|
readonly emitChange: (update: Watcher.Update) => Effect.Effect<void>
|
|
}
|
|
|
|
export class Test extends Context.Service<Test, TestInterface>()("@opencode/Config/Test") {}
|
|
|
|
/** In-memory config for tests: static entries with replaceable state and a test-driven change feed. */
|
|
export const testLayer = (
|
|
initial: Entry[] = [],
|
|
compatibility: { readonly claude: readonly AbsolutePath[]; readonly agents: readonly AbsolutePath[] } = {
|
|
claude: [],
|
|
agents: [],
|
|
},
|
|
) =>
|
|
Layer.effectContext(
|
|
Effect.gen(function* () {
|
|
const state = { entries: initial, integrations: new Map<string, ConfigIntegration.Document>() }
|
|
const updates = yield* PubSub.unbounded<Watcher.Update>()
|
|
const snapshot = () => [...state.integrations.values(), ...state.entries]
|
|
const service = Test.of({
|
|
entries: () => Effect.sync(snapshot),
|
|
snapshot,
|
|
compatibility: () => Effect.succeed(compatibility),
|
|
changes: () => Stream.fromPubSub(updates),
|
|
setEntries: (next) =>
|
|
Effect.sync(() => {
|
|
state.entries = next
|
|
}),
|
|
emitChange: (update) => PubSub.publish(updates, update).pipe(Effect.asVoid),
|
|
integration: (integrationID, document) =>
|
|
Effect.sync(() => {
|
|
const next = new Map(state.integrations)
|
|
next.delete(integrationID)
|
|
state.integrations = document ? next.set(integrationID, document) : next
|
|
}),
|
|
})
|
|
return Context.empty().pipe(Context.add(Service, service), Context.add(Test, service))
|
|
}),
|
|
)
|
|
|
|
export const layer = (options?: Options) =>
|
|
Layer.effect(
|
|
Service,
|
|
Effect.gen(function* () {
|
|
const fs = yield* FSUtil.Service
|
|
const location = yield* Location.Service
|
|
const watcher = yield* Watcher.Service
|
|
const bus = yield* Bus.Service
|
|
const credentials = yield* Credential.Service
|
|
const globalService = yield* Global.Service
|
|
const wellknown = yield* WellKnown.Service
|
|
const processes = yield* AppProcess.Service
|
|
const integrations = new Map<string, ConfigIntegration.Document>()
|
|
// Integrations set their documents from outside this layer, so their reloads run with its services.
|
|
const context = yield* Effect.context<FSUtil.Service | Global.Service | Location.Service>()
|
|
const reloadLock = Semaphore.makeUnsafe(1)
|
|
const updateLock = Semaphore.makeUnsafe(1)
|
|
const decodeOptions = { errors: "all", onExcessProperty: "ignore" } as const
|
|
const decodeInfo = Schema.decodeUnknownOption(Info, decodeOptions)
|
|
const parseInfo = Effect.fn("Config.parseInfo")(function* (text: string, source: string) {
|
|
const errors: ParseError[] = []
|
|
const input: unknown = parse(text, errors, { allowTrailingComma: true })
|
|
if (errors.length) {
|
|
yield* Effect.logWarning("configuration normalization diagnostic", {
|
|
source,
|
|
path: "$",
|
|
kind: "invalid",
|
|
action: "rejected malformed JSON or JSONC document",
|
|
})
|
|
return
|
|
}
|
|
const result = ConfigNormalize.normalize(input)
|
|
yield* Effect.forEach(result.diagnostics, (diagnostic) =>
|
|
Effect.logWarning("configuration normalization diagnostic", {
|
|
source,
|
|
path: diagnostic.path[0] === "$" ? "$" : `$.${diagnostic.path.join(".")}`,
|
|
kind: diagnostic.kind,
|
|
action: diagnostic.message,
|
|
}),
|
|
)
|
|
if (result.type === "rejected") return
|
|
const info = Option.getOrUndefined(decodeInfo(result.encoded))
|
|
if (info) return info
|
|
yield* Effect.logWarning("configuration normalization diagnostic", {
|
|
source,
|
|
path: "$",
|
|
kind: "invalid",
|
|
action: "rejected canonical configuration after final validation",
|
|
})
|
|
})
|
|
|
|
const loadFile = Effect.fnUntraced(function* (filepath: string) {
|
|
const text = yield* fs.readFileStringSafe(filepath)
|
|
if (text === undefined) return
|
|
const substituted = yield* ConfigVariable.substitute({ type: "path", path: filepath, text })
|
|
const info = yield* parseInfo(substituted, filepath)
|
|
if (!info) return
|
|
return new Document({ type: "document", path: AbsolutePath.make(filepath), info })
|
|
})
|
|
|
|
const loadWellknownEntry = Effect.fnUntraced(function* (entry: WellKnown.Entry) {
|
|
const auth = entry.manifest.auth
|
|
const credential = (yield* credentials.list(entry.integrationID)).at(-1)
|
|
const variables = auth && credential?.value.type === "key" ? { [auth.env]: credential.value.key } : undefined
|
|
// A failed refresh, including a missing credential, keeps the last resolved config so remote providers
|
|
// and allowlists do not disappear; only removing the source clears it.
|
|
const configs = yield* (
|
|
variables ? wellknown.resolve(entry, variables) : Effect.fail(new Error("No usable wellknown credential"))
|
|
).pipe(
|
|
Effect.catch((error) =>
|
|
Effect.logWarning("failed to load wellknown config", { source: entry.origin, error }).pipe(
|
|
Effect.andThen(wellknown.cached(entry.origin)),
|
|
),
|
|
),
|
|
)
|
|
return yield* Effect.forEach(configs, (config) =>
|
|
ConfigVariable.substitute({
|
|
type: "virtual",
|
|
source: entry.origin,
|
|
dir: entry.origin,
|
|
text: JSON.stringify(config),
|
|
env: variables,
|
|
}).pipe(
|
|
Effect.flatMap((text) => parseInfo(text, entry.origin)),
|
|
Effect.map((info) =>
|
|
info
|
|
? new ConfigIntegration.WellKnownDocument({
|
|
type: "document",
|
|
info,
|
|
integrationID: entry.integrationID,
|
|
})
|
|
: undefined,
|
|
),
|
|
),
|
|
).pipe(Effect.map((documents) => documents.filter((document) => document !== undefined)))
|
|
})
|
|
|
|
const loadWellknown = Effect.fn("Config.loadWellknown")(function* () {
|
|
const entries = yield* wellknown
|
|
.entries()
|
|
.pipe(
|
|
Effect.catch((error) =>
|
|
Effect.logWarning("failed to discover wellknown config", { error }).pipe(Effect.as([] as const)),
|
|
),
|
|
)
|
|
return yield* Effect.forEach(entries, (entry) =>
|
|
loadWellknownEntry(entry).pipe(
|
|
Effect.map((documents) => ({ integrationID: entry.integrationID, documents })),
|
|
),
|
|
)
|
|
})
|
|
|
|
// `integration.use` decides whether an integration may supply anything. Only managed policies can withhold the
|
|
// documents an integration delivers, so a project file can never strip the Console document carrying org policy.
|
|
// A withheld document keeps its policies, so denying an integration never lifts the restrictions it carries.
|
|
const supplies = Effect.fnUntraced(function* (
|
|
lockdown: ReturnType<typeof ManagedPolicy.statements>,
|
|
integrationID: string,
|
|
connection?: Connection.Info,
|
|
) {
|
|
const stored =
|
|
connection?.type === "credential" ? yield* credentials.get(Credential.ID.make(connection.id)) : undefined
|
|
const resource = ManagedPolicy.integrationResource(
|
|
integrationID,
|
|
stored ? ManagedPolicy.account(stored.value) : undefined,
|
|
)
|
|
return ManagedPolicy.decision(lockdown, "integration.use", resource) !== "deny"
|
|
})
|
|
|
|
const loadPreferences = Effect.fn("Config.loadPreferences")(function* (plist: AbsolutePath) {
|
|
const result = yield* processes
|
|
.run(ChildProcess.make("plutil", ["-convert", "json", "-o", "-", plist], { stdin: "ignore" }), {
|
|
timeout: "10 seconds",
|
|
})
|
|
.pipe(Effect.flatMap(AppProcess.requireSuccess), Effect.option)
|
|
if (Option.isNone(result)) {
|
|
yield* Effect.logWarning("failed to convert managed preferences", { source: plist })
|
|
return []
|
|
}
|
|
const text = yield* ConfigVariable.substitute({
|
|
type: "virtual",
|
|
source: plist,
|
|
dir: path.dirname(plist),
|
|
text: ConfigDiscovery.stripPreferenceMetadata(result.value.stdout.toString()),
|
|
})
|
|
const info = yield* parseInfo(text, plist)
|
|
return info ? [new Document({ type: "document", path: plist, info })] : []
|
|
})
|
|
|
|
const loadDirectory = Effect.fnUntraced(function* (directory: AbsolutePath) {
|
|
return [
|
|
...(yield* Effect.forEach(ConfigDiscovery.names, (file) => loadFile(path.join(directory, file))).pipe(
|
|
Effect.map((configs) => configs.filter((config): config is Document => config !== undefined)),
|
|
)),
|
|
new Directory({ type: "directory", path: directory }),
|
|
]
|
|
})
|
|
|
|
const load = Effect.fn("Config.load")(function* (sources: ConfigDiscovery.Sources) {
|
|
const direct = yield* Effect.forEach(sources.direct, (filepath) => loadFile(filepath)).pipe(
|
|
Effect.orDie,
|
|
Effect.map((entries) => entries.filter((entry): entry is Document => entry !== undefined)),
|
|
)
|
|
|
|
const explicit = sources.explicit
|
|
? yield* loadFile(sources.explicit).pipe(
|
|
Effect.map((config) => (config ? [config] : [])),
|
|
Effect.orDie,
|
|
)
|
|
: []
|
|
const content =
|
|
options?.content !== undefined
|
|
? yield* ConfigVariable.substitute({
|
|
type: "virtual",
|
|
source: "OPENCODE_CONFIG_CONTENT",
|
|
dir: location.directory,
|
|
text: options.content,
|
|
}).pipe(
|
|
Effect.flatMap((text) => parseInfo(text, "OPENCODE_CONFIG_CONTENT")),
|
|
Effect.map((info) => (info ? [new Document({ type: "document", info })] : [])),
|
|
Effect.orDie,
|
|
)
|
|
: []
|
|
|
|
// Managed settings load last so they override everything, and MDM
|
|
// preferences outrank the system directory as in V1. Policies evaluate
|
|
// in reverse load order, so managed policies split off and load first
|
|
// to keep final file-based authority.
|
|
const managed = [
|
|
...(sources.system?.present ? yield* loadDirectory(sources.system.path).pipe(Effect.orDie) : []),
|
|
...(sources.preferences ? yield* loadPreferences(sources.preferences).pipe(Effect.orDie) : []),
|
|
]
|
|
const managedPolicies = managed
|
|
.flatMap((entry) =>
|
|
entry.type === "document" && entry.info.policies
|
|
? [
|
|
new ConfigManaged.Document({
|
|
type: "document",
|
|
path: entry.path,
|
|
info: new Info({ policies: entry.info.policies }),
|
|
}),
|
|
]
|
|
: [],
|
|
)
|
|
.toReversed()
|
|
const managedSettings = managed.map((entry) =>
|
|
entry.type === "document"
|
|
? new ConfigManaged.Document({ ...entry, info: new Info({ ...entry.info, policies: undefined }) })
|
|
: entry,
|
|
)
|
|
// Integration documents load right after managed policies: every remote, user, and project layer overrides
|
|
// their settings, and since policies evaluate earliest-loaded first, only managed policies outrank theirs.
|
|
// Global entries sit below explicit and direct files; project directories rank above them.
|
|
const globalSupplementary = sources.global ? yield* loadDirectory(sources.global).pipe(Effect.orDie) : []
|
|
const projectSupplementary = yield* Effect.forEach(
|
|
sources.project.filter((root) => root.present),
|
|
(root) => loadDirectory(root.path),
|
|
).pipe(
|
|
Effect.orDie,
|
|
Effect.map((entries) => entries.flat()),
|
|
)
|
|
const lockdown = ManagedPolicy.statements(managedPolicies)
|
|
const integrated = yield* Effect.forEach(integrations.values(), (document) =>
|
|
supplies(lockdown, document.integrationID, document.connection).pipe(
|
|
Effect.map((allowed) =>
|
|
allowed
|
|
? document
|
|
: new ConfigIntegration.Document({ ...document, info: new Info({ policies: document.info.policies }) }),
|
|
),
|
|
),
|
|
)
|
|
const wellknownDocuments = yield* Effect.forEach(yield* loadWellknown().pipe(Effect.orDie), (entry) =>
|
|
supplies(lockdown, entry.integrationID).pipe(
|
|
Effect.map((allowed) =>
|
|
allowed
|
|
? entry.documents
|
|
: entry.documents.map(
|
|
(document) =>
|
|
new ConfigIntegration.WellKnownDocument({
|
|
...document,
|
|
info: new Info({ policies: document.info.policies }),
|
|
}),
|
|
),
|
|
),
|
|
),
|
|
)
|
|
return [
|
|
...managedPolicies,
|
|
...integrated,
|
|
...wellknownDocuments.flat(),
|
|
...globalSupplementary,
|
|
...explicit,
|
|
...direct,
|
|
...projectSupplementary,
|
|
...content,
|
|
...managedSettings,
|
|
]
|
|
})
|
|
|
|
const initial = yield* ConfigDiscovery.discover(options)
|
|
let sources = initial
|
|
let configs = yield* load(initial)
|
|
const updates = yield* PubSub.unbounded<Watcher.Update>()
|
|
const reloads = yield* PubSub.sliding<void>(1)
|
|
// Readiness rescans recover writes made before a watch attached.
|
|
const requestReload = PubSub.publish(reloads, undefined).pipe(Effect.asVoid)
|
|
const watched = yield* FiberMap.make<string>()
|
|
const reconcile = Effect.fn("Config.reconcileWatches")(function* (sources: ConfigDiscovery.Sources) {
|
|
const plan = ConfigWatch.plan(sources)
|
|
for (const key of Array.from(watched, ([key]) => key)) {
|
|
if (!plan.has(key)) yield* FiberMap.remove(watched, key)
|
|
}
|
|
for (const [key, target] of plan) {
|
|
yield* watcher
|
|
.subscribe(target, requestReload)
|
|
.pipe(
|
|
Effect.flatMap(
|
|
Stream.runForEach((update) => PubSub.publish(updates, update).pipe(Effect.andThen(requestReload))),
|
|
),
|
|
FiberMap.run(watched, key, { onlyIfMissing: true, startImmediately: true }),
|
|
)
|
|
}
|
|
})
|
|
|
|
const reload = Effect.fn("Config.reload")(
|
|
function* () {
|
|
const discovered = yield* ConfigDiscovery.discover(options)
|
|
const next = yield* load(discovered)
|
|
yield* reconcile(discovered)
|
|
const compatibilityChanged =
|
|
!isDeepStrictEqual(sources.claude, discovered.claude) ||
|
|
!isDeepStrictEqual(sources.agents, discovered.agents)
|
|
if (isDeepStrictEqual(configs, next) && !compatibilityChanged) return
|
|
sources = discovered
|
|
configs = next
|
|
yield* bus.publish(Event.Updated, {})
|
|
},
|
|
(effect) => reloadLock.withPermit(effect),
|
|
)
|
|
|
|
// Subscribe eagerly so synchronous watch readiness isn't dropped.
|
|
const pendingReloads = yield* PubSub.subscribe(reloads)
|
|
yield* Stream.fromSubscription(pendingReloads).pipe(
|
|
Stream.debounce("100 millis"),
|
|
Stream.runForEach(() =>
|
|
reload().pipe(Effect.catchCause((cause) => Effect.logError("failed to reload config", { cause }))),
|
|
),
|
|
Effect.forkScoped({ startImmediately: true }),
|
|
)
|
|
yield* bus.subscribe(Credential.Event.Switched).pipe(
|
|
Stream.filterEffect((event) =>
|
|
wellknown.entries().pipe(
|
|
Effect.map((entries) => entries.some((entry) => entry.integrationID === event.data.integrationID)),
|
|
Effect.orElseSucceed(() => false),
|
|
),
|
|
),
|
|
Stream.runForEach(() =>
|
|
reload().pipe(Effect.catchCause((cause) => Effect.logError("failed to reload wellknown config", { cause }))),
|
|
),
|
|
Effect.forkScoped({ startImmediately: true }),
|
|
)
|
|
yield* bus.subscribe(WellKnown.Event.Updated).pipe(
|
|
Stream.runForEach(() =>
|
|
reload().pipe(Effect.catchCause((cause) => Effect.logError("failed to reload wellknown sources", { cause }))),
|
|
),
|
|
Effect.forkScoped({ startImmediately: true }),
|
|
)
|
|
yield* Effect.sleep("10 minutes").pipe(
|
|
Effect.andThen(
|
|
Effect.suspend(() => {
|
|
if (!wellknown.snapshot().length) return Effect.void
|
|
return Effect.gen(function* () {
|
|
const changed = yield* wellknown
|
|
.refresh()
|
|
.pipe(
|
|
Effect.catch((error) =>
|
|
Effect.logWarning("failed to refresh wellknown manifests", { error }).pipe(Effect.as(false)),
|
|
),
|
|
)
|
|
if (!changed) yield* reload()
|
|
}).pipe(Effect.catchCause((cause) => Effect.logWarning("failed to refresh wellknown config", { cause })))
|
|
}),
|
|
),
|
|
Effect.forever,
|
|
Effect.forkScoped({ startImmediately: true }),
|
|
)
|
|
yield* reloadLock.withPermit(reconcile(initial))
|
|
|
|
const update = Effect.fn("Config.update")(
|
|
function* (patch: Patch) {
|
|
const directory = initial.global ?? AbsolutePath.make(globalService.config)
|
|
const candidates = ConfigDiscovery.names.map((name) => path.join(directory, name))
|
|
const filepath =
|
|
(yield* Effect.filter(candidates, fs.isFile)).at(-1) ?? path.join(directory, "opencode.jsonc")
|
|
const text = (yield* fs.readFileStringSafe(filepath)) ?? "{}\n"
|
|
const updated = yield* Effect.try({
|
|
try: () =>
|
|
applyEdits(
|
|
text,
|
|
modify(text, ["shell"], patch.shell ?? undefined, {
|
|
formattingOptions: { tabSize: 2, insertSpaces: true },
|
|
}),
|
|
),
|
|
catch: (cause) => new FSUtil.FileSystemError({ method: "config.update", cause }),
|
|
})
|
|
yield* fs.writeWithDirs(filepath, updated.endsWith("\n") ? updated : `${updated}\n`)
|
|
yield* requestReload
|
|
},
|
|
(effect) => updateLock.withPermit(effect),
|
|
)
|
|
|
|
return Service.of({
|
|
entries: Effect.fnUntraced(function* () {
|
|
return configs
|
|
}),
|
|
snapshot: () => configs,
|
|
compatibility: () =>
|
|
Effect.all({
|
|
claude: Effect.filter(sources.claude, fs.isDir),
|
|
agents: Effect.filter(sources.agents, fs.isDir),
|
|
}),
|
|
changes: () => Stream.fromPubSub(updates),
|
|
update,
|
|
integration: Effect.fn("Config.integration")(function* (integrationID, document) {
|
|
if (isDeepStrictEqual(integrations.get(integrationID), document)) return
|
|
integrations.delete(integrationID)
|
|
if (document) integrations.set(integrationID, document)
|
|
yield* reload().pipe(
|
|
Effect.provide(context),
|
|
Effect.catchCause((cause) => Effect.logError("failed to reload config", { cause })),
|
|
)
|
|
}),
|
|
})
|
|
}),
|
|
)
|
|
|
|
export function configured(options?: Options) {
|
|
return makeLocationNode({
|
|
service: Service,
|
|
layer: layer(options),
|
|
deps: [
|
|
Watcher.node,
|
|
Bus.node,
|
|
FSUtil.node,
|
|
Global.node,
|
|
Location.node,
|
|
Credential.node,
|
|
WellKnown.node,
|
|
AppProcess.node,
|
|
],
|
|
})
|
|
}
|
|
|
|
export const node = configured()
|