Something went wrong. Try again.
fork of prime agent with changes i want but are not upstreamable probqbly (and some fixes)
Something went wrong. Try again.
852 B · 40 lines
TypeScript
at main
1234567891011121314151617181920212223242526272829303132333435363738394041import type { PathMetadata } from "./package-manager.js";
export type SourceScope = "user" | "project" | "temporary";export type SourceOrigin = "package" | "top-level";
export interface SourceInfo { path: string; source: string; scope: SourceScope; origin: SourceOrigin; baseDir?: string;}
export function createSourceInfo(path: string, metadata: PathMetadata): SourceInfo { return { path, source: metadata.source, scope: metadata.scope, origin: metadata.origin, baseDir: metadata.baseDir, };}
export function createSyntheticSourceInfo( path: string, options: { source: string; scope?: SourceScope; origin?: SourceOrigin; baseDir?: string; },): SourceInfo { return { path, source: options.source, scope: options.scope ?? "temporary", origin: options.origin ?? "top-level", baseDir: options.baseDir, };}