
Research
/Security News
737 Chrome VPN Extensions Linked to Brand Impersonation and Browser Traffic Redirection
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.
@ar-agents/fecred
Advanced tools
Agent toolkit for AFIP/ARCA WSFECred (Factura de Credito Electronica MiPyME): check if a counterparty is obligated to the FCE regime, list received FCEs, and accept or reject them. Pair with @ar-agents/identity for WSAA cert + signature handling.
Agent toolkit for AFIP/ARCA WSFECred (Registro de Facturas de Credito Electronica MiPyME, RG 4367). Check if a counterparty is obligated to the FCE regime, list received FCEs, and accept or reject them within the legal window.
pnpm add @ar-agents/fecred
HttpFecredAdapter: real adapter that POSTs SOAP to AFIP WSFECred (homo or prod). Caller supplies a WSAA access ticket for the wsfecred service; the adapter handles envelope construction, SOAPAction header, and response parsing.InMemoryFecredAdapter: deterministic adapter for integration tests + demos. Seed received FCEs and obligated CUITs; accept/reject mutate the in-memory state with AFIP-realistic semantics.UnconfiguredFecredAdapter: explicit throws-on-every-call default, so an agent without creds never silently lies.fecred_check_obligation, fecred_list_received, fecred_accept_invoice, fecred_reject_invoice, fecred_health.| You want to... | Use |
|---|---|
| Issue a regular factura (A/B/C) and get a CAE | @ar-agents/facturacion |
| Validate that a received factura's CAE is real | @ar-agents/wscdc |
| Know if your invoice to a big buyer MUST be an FCE | this package |
| Manage FCEs you received: list, accept, reject | this package |
The FCE regime applies when a MiPyME invoices a large company above a threshold amount (montoDesde). AFIP updates that threshold periodically (for example the April 2026 update to roughly ARS 5.5M); fecred_check_obligation returns the live value, so never hardcode it.
import { HttpFecredAdapter, type AccessTicket } from "@ar-agents/fecred";
// Acquire a TA from your WSAA flow first, service id "wsfecred":
// const ta = await acquireWsaaTicket("wsfecred", { certPem, keyPem });
const ticket: AccessTicket = /* ... */ undefined!;
const fecred = new HttpFecredAdapter({ env: "prod", ticket });
// 1. Before issuing: must this invoice be an FCE?
const oblig = await fecred.checkObligation({ cuitConsultada: "30-50000001-8" });
if (oblig.obligado && invoiceTotal >= (oblig.montoDesde ?? Infinity)) {
// Issue FCE type 201/206/211 via @ar-agents/facturacion.
}
// 2. As receptor: what is pending acceptance?
const pending = await fecred.listComprobantes({
rol: "Receptor",
estadoCmp: "Recepcionado",
fechaTipo: "Emision",
});
// 3. Accept one (IRREVERSIBLE legal act):
const r = await fecred.acceptInvoice({
idFactura: { cuitEmisor: "20-41758101-5", codTipoCmp: 201, ptoVta: 3, nroCmp: 42 },
saldoAceptado: 8_000_000,
codMoneda: "PES",
cotizacionMonedaUlt: 1,
});
Wired as agent tools:
import { Experimental_Agent as Agent } from "ai";
import { fecredTools, HttpFecredAdapter } from "@ar-agents/fecred";
import { anthropic } from "@ai-sdk/anthropic";
const agent = new Agent({
model: anthropic("claude-sonnet-4-7"),
tools: fecredTools({
adapter: new HttpFecredAdapter({ env: "prod", ticket }),
}),
system: "Sos un agente que gestiona Facturas de Credito Electronica recibidas.",
});
A received FCE that is not rejected within the legal acceptance window (15 corridos days from puesta a disposicion) is tacitly accepted and becomes a negotiable credit title. Run fecred_list_received regularly and surface anything close to fechaVenAcep.
import { InMemoryFecredAdapter, fecredTools } from "@ar-agents/fecred";
const adapter = new InMemoryFecredAdapter({
obligatedCuits: ["30-50000001-8"],
montoDesde: 5_500_000, // configurable; the real value comes from AFIP
comprobantes: [/* seeded FecredComprobante objects */],
});
const tools = fecredTools({ adapter });
import {
FecredError,
FecredValidationError, // bad input, do NOT retry
FecredProtocolError, // network / HTTP / SOAP fault, may retry
FecredUnconfiguredError,
} from "@ar-agents/fecred";
A resultado: "R" in an accept/reject response is NOT thrown: it means AFIP refused the operation (already accepted, out of window, etc.) and the errors[] array explains why.
wsfecred and requires its own authorization in the AFIP portal, separate from wsfe and wscdc.codMotivo, descMotivo, and justificacion (max 250 chars each).For LLM agents using these tools, see AGENTS.md.
MIT, Nazareno Clemente naza@naza.ar
FAQs
Agent toolkit for AFIP/ARCA WSFECred (Factura de Credito Electronica MiPyME): check if a counterparty is obligated to the FCE regime, list received FCEs, and accept or reject them. Pair with @ar-agents/identity for WSAA cert + signature handling.
The npm package @ar-agents/fecred receives a total of 15 weekly downloads. As such, @ar-agents/fecred popularity was classified as not popular.
We found that @ar-agents/fecred demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.