MCPcopy Index your code
hub / github.com/anomalyco/opencode / entryCore

Function entryCore

packages/opencode/src/plugin/meta.ts:83–106  ·  view source on GitHub ↗
(item: Touch)

Source from the content-addressed store, hash-verified

81}
82
83async function entryCore(item: Touch): Promise<Core> {
84 const spec = item.spec
85 const target = item.target
86 const source = pluginSource(spec)
87 if (source === "file") {
88 const file = fileTarget(spec, target)
89 return {
90 id: item.id,
91 source,
92 spec,
93 target,
94 modified: file ? await modifiedAt(file) : undefined,
95 }
96 }
97
98 return {
99 id: item.id,
100 source,
101 spec,
102 target,
103 requested: parsePluginSpecifier(spec).version,
104 version: await npmVersion(target),
105 }
106}
107
108function fingerprint(value: Core) {
109 if (value.source === "file") return [value.target, value.modified ?? ""].join("|")

Callers 1

rowFunction · 0.85

Calls 5

pluginSourceFunction · 0.90
parsePluginSpecifierFunction · 0.90
fileTargetFunction · 0.85
modifiedAtFunction · 0.85
npmVersionFunction · 0.85

Tested by

no test coverage detected