/** * Per-type currency collectors and aggregator. * * Reads configured and locked entries from the WorkspaceMutations service, filters to * enabled registry-sourced entries, fetches each extension's index from * RegistryClient, and produces an array of ExtensionCurrencyEntry. * * @experimental This API is unstable and may change without notice. */ import * as Effect from "effect/Effect"; import type * as FileSystem from "effect/FileSystem"; import type * as HttpClient from "effect/unstable/http/HttpClient"; import * as Option from "effect/Option"; import type * as Path from "effect/Path"; import type * as Scope from "effect/Scope"; import { type AppError } from "../../app-error/index.js"; import type { ExtensionType } from "../../extensions/index.js"; import type { RegistryClient } from "../../registry/client.js"; import { SourceHostProviders } from "../../source-resolution/index.js"; import { type Version, type VersionRange } from "../../version-constraints/version-constraints.js"; import { WorkspaceMutations } from "../service-interface.js"; import { type CurrencyResult } from "./check-currency.js"; /** * Currency assessment for a single installed extension. * * @experimental This API is unstable and may change without notice. */ export interface ExtensionCurrencyEntry { readonly kind: "registry-version"; /** Fully-qualified name: `@owner/type/name`. */ readonly ref: string; readonly type: ExtensionType; readonly installedVersion: Version; readonly constraint: Option.Option; readonly currency: CurrencyResult; } /** * Source freshness assessment for a Git-hosted extension. * * @experimental This API is unstable and may change without notice. */ export interface ExtensionSourceFreshnessEntry { readonly kind: "source-freshness"; readonly ref: string; readonly type: ExtensionType; readonly source: string; readonly installedTreeHash: Option.Option; readonly currentTreeHash: Option.Option; readonly status: "current" | "changed" | "unknown"; readonly reason: Option.Option; } export type ExtensionUpdateEntry = ExtensionCurrencyEntry | ExtensionSourceFreshnessEntry; type SourceFreshnessCollector = () => Effect.Effect, AppError, FileSystem.FileSystem | HttpClient.HttpClient | Path.Path | WorkspaceMutations | SourceHostProviders | Scope.Scope>; export declare const collectSkillSourceFreshness: SourceFreshnessCollector; export declare const collectMcpServerSourceFreshness: SourceFreshnessCollector; export declare const collectSubagentSourceFreshness: SourceFreshnessCollector; export declare const collectRuleSourceFreshness: SourceFreshnessCollector; export declare const collectHookSourceFreshness: SourceFreshnessCollector; export declare const collectKnowledgeSourceFreshness: SourceFreshnessCollector; /** Every per-type git-source freshness collector, in catalog order. */ export declare const sourceFreshnessCollectors: ReadonlyArray; /** * Collect currency entries for all enabled, registry-sourced skills. */ export declare const collectSkillCurrency: (client: RegistryClient) => Effect.Effect, AppError, WorkspaceMutations>; /** * Collect currency entries for all registry-sourced MCP servers. */ export declare const collectMcpServerCurrency: (client: RegistryClient) => Effect.Effect, AppError, WorkspaceMutations>; /** * Collect currency entries for all enabled, registry-sourced subagents. */ export declare const collectSubagentCurrency: (client: RegistryClient) => Effect.Effect, AppError, WorkspaceMutations>; /** * Collect currency entries for all registry-sourced packs. */ export declare const collectPackCurrency: (client: RegistryClient) => Effect.Effect, AppError, WorkspaceMutations>; /** * Collect currency entries for all enabled, registry-sourced rules. */ export declare const collectRuleCurrency: (client: RegistryClient) => Effect.Effect, AppError, WorkspaceMutations>; /** * Collect currency entries for all enabled, registry-sourced hooks. */ export declare const collectHookCurrency: (client: RegistryClient) => Effect.Effect, AppError, WorkspaceMutations>; /** * Collect currency entries for all enabled, registry-sourced knowledge bundles. */ export declare const collectKnowledgeCurrency: (client: RegistryClient) => Effect.Effect, AppError, WorkspaceMutations>; /** * Collect currency entries for all extension types and merge into a single array. */ export declare const collectAllCurrencyEntries: (client: RegistryClient) => Effect.Effect, AppError, WorkspaceMutations>; export declare const collectAllUpdateEntries: (client: RegistryClient) => Effect.Effect, AppError, FileSystem.FileSystem | HttpClient.HttpClient | Path.Path | WorkspaceMutations | SourceHostProviders | Scope.Scope>; export {}; //# sourceMappingURL=collectors.d.ts.map