npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

opencode-plugin-imoveis

v0.1.0

Published

Plugin opencode para avaliação imobiliária (NBR 14653): método comparativo, geração de laudo, auditoria e trilhos de permissão.

Readme

opencode-plugin-imoveis

Plugin do opencode para avaliação imobiliária (NBR 14653). Serve também de exemplo didático da API de plugins. Pacote npm publicável, type-checado contra @opencode-ai/plugin.

O que faz

| Gancho | Função | |--------|--------| | tool.avaliacao_comparativa | Método comparativo direto (NBR 14653-2): fator de oferta, saneamento de outliers, CV e grau de fundamentação, campo de arbítrio ±15% | | tool.laudo_trecho | Gera trecho de laudo em Markdown (Obsidian) e registra no histórico do imóvel | | permission.ask | Auto-aprova leituras seguras (git status/log/diff, ls…); bloqueia destrutivos (rm -rf, push --force) | | chat.params | Fixa temperatura baixa (0,2) para precisão técnica | | tool.execute.after | Auditoria: registra cada tool executada em .opencode-auditoria.jsonl | | event | Registra session.idle na auditoria |

Estrutura

opencode-plugin-imoveis/
├─ package.json      # exports["./server"] → dist/index.js ; engines.opencode
├─ tsconfig.json     # NodeNext, strict, declaration
├─ src/index.ts      # fonte: default export { id: "imoveis", server: ImoveisPlugin }
├─ dist/             # build: index.js + index.d.ts (+ sourcemaps) — gerado por `npm run build`
└─ README.md

Compilado para JavaScript ESM (dist/), roda em Node e em Bun. As tools usam node:fs/promises (sem dependência de globais do Bun).

Desenvolvimento

npm install        # @opencode-ai/plugin, @types/node, typescript
npm run typecheck  # tsc --noEmit          (passa limpo)
npm run build      # tsc → dist/index.js + index.d.ts

Instalação no opencode

No config (opencode.json do projeto ou ~/.config/opencode/opencode.json):

A) Por caminho de diretório (desenvolvimento local) — o loader lê o package.json e resolve exports["./server"]:

{
  "plugin": ["D:/Documentos/Tecnologia/IA/Claude/Claude Code/Robos/opencode-plugin-imoveis"]
}

B) Por npm (após publicar)prepublishOnly roda o build automaticamente:

npm publish --access public
{
  "plugin": ["opencode-plugin-imoveis"]
}

O tarball publicado contém apenas dist/ + README.md + package.json (verifique com npm pack --dry-run). Edite sempre em src/ e rode npm run build.

Arquivos gerados (no projeto onde o opencode roda)

  • avaliacoes-historico.jsonl — 1 laudo por linha (histórico por imóvel)
  • .opencode-auditoria.jsonl — trilha de auditoria das tools/eventos

Notas técnicas

  • Tratamento estatístico simplificado (didático). Avaliação formal exige modelo de regressão/homogeneização completo conforme a NBR 14653-2.
  • Tools de plugin recebem os args sem os defaults do Zod aplicados — por isso os defaults são reaplicados dentro de cada execute (args.x ?? padrão).
  • O hook permission.ask lê o comando de input.metadata.command; se a chave diferir na sua versão do opencode, o plugin cai no comportamento padrão (perguntar).
  • Compatibilidade declarada em engines.opencode (checada pelo loader apenas para plugins npm, quando a versão major do opencode for > 0).