can1357/oh-my-pi · error
Unsupported vault:// vault op: ${rawOp}
Error message
Unsupported vault:// vault op: ${rawOp} What it means
When a vault:// URL has an `op` query parameter but no file path, `parseVaultOp` validates the op against the vault-op whitelist (search, daily, daily-path, tags, tag, tasks, orphans, unresolved, deadends, bases, bookmarks, recents, templates, aliases, properties, property). Unknown values throw this error. Matching is exact and case-sensitive.
Source
Thrown at packages/coding-agent/src/internal-urls/vault-protocol.ts:202
}
function isFileOp(rawOp: string): rawOp is FileOp {
return FILE_OPS[rawOp as FileOp] === true;
}
function isVaultOp(rawOp: string): rawOp is VaultOp {
return VAULT_OPS[rawOp as VaultOp] === true;
}
function parseVaultOp(rawOp: string, hasFilePath: boolean): FileOp | VaultOp {
if (hasFilePath) {
if (!isFileOp(rawOp)) {
throw new Error(`Unsupported vault:// file op: ${rawOp}`);
}
return rawOp;
}
if (!isVaultOp(rawOp)) {
throw new Error(`Unsupported vault:// vault op: ${rawOp}`);
}
return rawOp;
}
export function parseVaultUrl(input: string | InternalUrl): ParsedVaultUrl {
const url = typeof input === "string" ? parseInternalUrl(input) : input;
const host = url.rawHost || url.hostname;
const params = paramsFromUrl(url);
const rawOp = typeof params.op === "string" ? params.op : undefined;
const { rawPathname, relativePath, hasPath, isDirectory } = decodeVaultPath(url);
if (!host && !hasPath && !rawOp) {
return { kind: "list-vaults", url: url.href, params };
}
const ref = makeVaultReference(host);
if (rawOp) {
const op = parseVaultOp(rawOp, relativePath.length > 0);View on GitHub (pinned to 9690622007)
Solutions
- Use a supported vault op: search, daily, daily-path, tags, tag, tasks, orphans, unresolved, deadends, bases, bookmarks, recents, templates, aliases, properties, property.
- Fix casing and hyphenation exactly as listed (e.g. `daily-path`, not `dailyPath`).
- If you meant a per-file operation, include the file path in the URL so it is validated against FILE_OPS instead.
- Add genuinely new CLI ops to VAULT_OPS in vault-protocol.ts.
Example fix
// before const url = "vault://_/?op=Search&q=meeting"; // wrong casing // after const url = "vault://_/?op=search&q=meeting";
Defensive patterns
Strategy: validation
Validate before calling
const VAULT_OPS = ["search","daily","daily-path","tags","tag","tasks","orphans","unresolved","deadends","bases","bookmarks","recents","templates","aliases","properties","property"];
function isValidVaultOp(op: string): boolean { return VAULT_OPS.includes(op); }
// check isValidVaultOp(op) before building a path-less vault://?op= URL Type guard
function isVaultOpValue(op: string): op is "search"|"daily"|"daily-path"|"tags"|"tag"|"tasks"|"orphans"|"unresolved"|"deadends"|"bases"|"bookmarks"|"recents"|"templates"|"aliases"|"properties"|"property" {
return ["search","daily","daily-path","tags","tag","tasks","orphans","unresolved","deadends","bases","bookmarks","recents","templates","aliases","properties","property"].includes(op);
} Try / catch
try {
const res = await handler.resolve(parseInternalUrl(url));
} catch (err) {
if (err instanceof Error && err.message.startsWith("Unsupported vault:// vault op:")) {
// fall back to vault://_/ (vault listing) or a supported op
} else throw err;
} Prevention
- Copy op names from the documented whitelist rather than guessing
- Use exact casing/hyphenation (`daily-path`, not `dailyPath`)
- If an op needs a file, it belongs in FILE_OPS with a path-bearing URL
- Validate op strings at the boundary where user input enters your URL builder
When it happens
Trigger: `vault://_/?op=Search&q=x`, `vault://_/?op=graph`, `vault://myvault?op=list` — any op value not in VAULT_OPS on a path-less URL.
Common situations: Guessing op names instead of using the documented set; casing mistakes; referencing ops from other tools or newer CLI versions not yet whitelisted.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Unsupported vault:// file op: ${rawOp}
- vault:// path resolution only supports plain filesystem path
- vault://${op} requires '${name}' query parameter
- Provider delete URL must not embed an account credential
- Gemini Files API delete requires a valid file name
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/64f2606a124462a4.
Report an issue: GitHub.