{"_id":"@albertomarturelo/nemo-core","_rev":"2-e7e474ffe51ff5255accd09fcbffd36a","name":"@albertomarturelo/nemo-core","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@albertomarturelo/nemo-core","version":"0.1.0","license":"MIT","_id":"@albertomarturelo/nemo-core@0.1.0","maintainers":[{"name":"albertomarturelo","email":"amarturelo@gmail.com"}],"homepage":"https://github.com/albertomarturelo/nemo#readme","bugs":{"url":"https://github.com/albertomarturelo/nemo/issues"},"dist":{"shasum":"85a0b3d4b900ddb1f3c36b71afbf79a248df32f1","tarball":"https://registry.npmjs.org/@albertomarturelo/nemo-core/-/nemo-core-0.1.0.tgz","fileCount":64,"integrity":"sha512-RpgmwBBCiadcyH+LAfRjFv8cmEecVxll6jhS7nrjXB18r3sVISDnB02Q/qlGMht7sKYcxX/sdKIWDXPveLOGMw==","signatures":[{"sig":"MEMCIAdYZo2CJPEv7bTuf1AzORlZUNvx5qCJBlEsttI0EZJdAh90Ca/vs2qwNoVNZpcDl8inKt3OCJ8cBh3b01HfCCit","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":127526},"main":"./dist/index.js","type":"module","_from":"file:albertomarturelo-nemo-core-0.1.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./cli":{"types":"./dist/cli.d.ts","default":"./dist/cli.js"},"./node":{"types":"./dist/node.d.ts","default":"./dist/node.js"}},"scripts":{"build":"tsc -b"},"_npmUser":{"name":"albertomarturelo","email":"amarturelo@gmail.com"},"_resolved":"/tmp/b9adb80ae89d14259d43463ff2f82eb9/albertomarturelo-nemo-core-0.1.0.tgz","_integrity":"sha512-RpgmwBBCiadcyH+LAfRjFv8cmEecVxll6jhS7nrjXB18r3sVISDnB02Q/qlGMht7sKYcxX/sdKIWDXPveLOGMw==","repository":{"url":"git+https://github.com/albertomarturelo/nemo.git","type":"git","directory":"packages/core"},"_npmVersion":"10.8.2","description":"Shared broker-portal domain core (Vector Capital): config, contracts, auth/session, tasks, seams. A Node library; external side-effects (HTTP, token store, clock, audit) are injected via seams (ADR-003).","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/nemo-core_0.1.0_1783572946084_0.2819170918766436","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@albertomarturelo/nemo-core","version":"0.2.0","type":"module","description":"Shared broker-portal domain core (Vector Capital): config, contracts, auth/session, tasks, seams. A Node library; external side-effects (HTTP, token store, clock, audit) are injected via seams (ADR-003).","license":"MIT","repository":{"type":"git","url":"git+https://github.com/albertomarturelo/nemo.git","directory":"packages/core"},"publishConfig":{"registry":"https://registry.npmjs.org","access":"public"},"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./cli":{"types":"./dist/cli.d.ts","default":"./dist/cli.js"},"./node":{"types":"./dist/node.d.ts","default":"./dist/node.js"}},"sideEffects":false,"scripts":{"build":"tsc -b"},"_id":"@albertomarturelo/nemo-core@0.2.0","bugs":{"url":"https://github.com/albertomarturelo/nemo/issues"},"homepage":"https://github.com/albertomarturelo/nemo#readme","_integrity":"sha512-gGgZq0HYeX1aDnPYsLOR8Ui2U7T0z6bDpyxyke3aRxdk9KKnE+74zH+BniqCsgzfxQeebJCW68sCdCXfepO7qw==","_resolved":"/tmp/1a57ad74bc0482bb60fb695e8a833edb/albertomarturelo-nemo-core-0.2.0.tgz","_from":"file:albertomarturelo-nemo-core-0.2.0.tgz","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-gGgZq0HYeX1aDnPYsLOR8Ui2U7T0z6bDpyxyke3aRxdk9KKnE+74zH+BniqCsgzfxQeebJCW68sCdCXfepO7qw==","shasum":"57267a592037006ebeac09fcbad640dfbb5c870a","tarball":"https://registry.npmjs.org/@albertomarturelo/nemo-core/-/nemo-core-0.2.0.tgz","fileCount":64,"unpackedSize":135204,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCa2K2hCPZVYgiVNBYMqYmhy4KAUUlMjvpci7ds1V3LogIhAKDzw86Re1dTUhogjiFHRKitZcPRcbgIDVwQdLw26Mtq"}]},"_npmUser":{"name":"albertomarturelo","email":"amarturelo@gmail.com"},"directories":{},"maintainers":[{"name":"albertomarturelo","email":"amarturelo@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nemo-core_0.2.0_1785477702602_0.7619769095595559"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-09T04:55:45.968Z","modified":"2026-07-31T06:01:43.177Z","0.1.0":"2026-07-09T04:55:46.337Z","0.2.0":"2026-07-31T06:01:42.767Z"},"bugs":{"url":"https://github.com/albertomarturelo/nemo/issues"},"license":"MIT","homepage":"https://github.com/albertomarturelo/nemo#readme","repository":{"type":"git","url":"git+https://github.com/albertomarturelo/nemo.git","directory":"packages/core"},"description":"Shared broker-portal domain core (Vector Capital): config, contracts, auth/session, tasks, seams. A Node library; external side-effects (HTTP, token store, clock, audit) are injected via seams (ADR-003).","maintainers":[{"name":"albertomarturelo","email":"amarturelo@gmail.com"}],"readme":"# @albertomarturelo/nemo-core\n\nThe shared domain nucleus for **nemo** — a TypeScript library that models the\nVector Capital broker portal (auth/session, instruments, cartera) behind a\nsmall set of injectable seams. Two thin surfaces consume it: the [`nemo`\nCLI](../cli) and the [`nemo-mcp` server](../mcp).\n\n> ⚠️ Unofficial. Not affiliated with, endorsed, or sponsored by Vector Capital\n> S.A. Corredores de Bolsa. Provided \"as is\" (MIT). See the repo root README.\n\n## Design\n\n- **Tasks are the public API.** Import only from the barrel (`@albertomarturelo/nemo-core`).\n  A surface never reaches past the task layer into the session/HTTP internals —\n  that is where the auth-renewal and audit rails live (ADR-003).\n- **External side-effects are seams.** `HttpClient`, `TokenStore`, `Clock`, and\n  `AuditSink` are interfaces with Node defaults (`@albertomarturelo/nemo-core/node`) and\n  in-memory fakes (`import { testing } from '@albertomarturelo/nemo-core'`). Tests inject\n  fakes and never touch the network, disk, or clock.\n- **The password never enters the main barrel.** `login` (credential-taking) is\n  exported only from `@albertomarturelo/nemo-core/cli`, so the MCP server cannot wire it\n  (ADR-006).\n\n## Usage\n\n```ts\nimport { instrumentsLocal, authStatus } from '@albertomarturelo/nemo-core';\nimport { createNodeRuntime } from '@albertomarturelo/nemo-core/node';\n\nconst rt = createNodeRuntime();\nconsole.log(await authStatus(rt));\nconsole.log(await instrumentsLocal(rt, { search: 'BCI' }));\n```\n\n## Tasks\n\nEach task takes the `Runtime` as its first argument (the one pure helper,\n`sparkline`, does not) and returns a plain, JSON-serializable object — no `Date`\n/ `Map` / `Set` and no human formatting. That shape is the integration contract\n(ADR-010).\n\n| Task | Returns |\n| --- | --- |\n| `authStatus` | Local session state (`active` / `expiring` / `expired` / `logged_out`) — never touches the network |\n| `logout` | Drops the cached bearer token |\n| `instrumentsLocal` | Chilean instruments, paged: `{ market, page, pageSize, total, items }` |\n| `instrumentsInternational` | US-listed instruments, same paged shape |\n| `instrumentPrices` | ~1y daily price history with pure client-side stats: `{ points, stats }` |\n| `sparkline` | Pure helper — renders a price series as a unicode sparkline |\n| `carteraSummary` | Holdings valued in one currency with computed P&L, plus totals by classification |\n| `carteraMovements` | Cash movements over a date range, classified per kind, with per-nemotécnico aggregates |\n| `carteraSaldo` | Standing cash balance per caja at a date, valued in one currency, plus a grand total (since 0.2.0) |\n\n`login` is deliberately absent from this barrel: it takes a password, so it is\nexported only from `@albertomarturelo/nemo-core/cli` (ADR-006).\n\nSee [`docs/ARCHITECTURE.md`](../../docs/ARCHITECTURE.md) and the wire contracts\nunder [`docs/vector-contract/`](../../docs/vector-contract/).\n","readmeFilename":"README.md"}