{"library":"seneca-basic","title":"Seneca Basic Utility Plugin","description":"seneca-basic is a foundational utility plugin for the Seneca.js microservices framework. It provides a small, essential set of action patterns for internal per-process communication, primarily through a 'notes' mechanism, allowing plugins to store and retrieve keyed values or lists. These patterns include `set`, `get`, `push`, `list`, and `pop` for `role:basic, note:true` actions. The package is often bundled by default within the main `seneca` module, simplifying its integration for most users. Its current stable version is 1.0.0, though the latest detailed release notes visible are from v0.5.0 in 2016, indicating a mature and stable, rather than rapidly evolving, project. Release cadence is infrequent, likely tied to Seneca's own maintenance cycles. Its key differentiator is its tightly integrated role within the Seneca ecosystem, providing a lightweight, built-in mechanism for internal plugin coordination without external dependencies.","language":"javascript","status":"maintenance","last_verified":"Sun Apr 19","install":{"commands":["npm install seneca-basic"],"cli":null},"imports":["const seneca = require('seneca')","seneca.use(require('seneca-basic'))","const seneca = require('seneca')({ default_plugins: { 'basic': false } })"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const seneca = require('seneca')({\n  default_plugins: {\n    'basic': false\n  }\n})\n\nseneca.use(require('seneca-basic'))\n\nasync function run() {\n  // Set a note\n  await seneca.act({ role: 'basic', note: true, cmd: 'set', key: 'myKey', value: 'Hello Seneca!' })\n  console.log('Note 'myKey' set.')\n\n  // Get a note\n  const resultGet = await seneca.act({ role: 'basic', note: true, cmd: 'get', key: 'myKey' })\n  console.log(`Retrieved 'myKey': ${resultGet.value}`)\n\n  // Push to a list\n  await seneca.act({ role: 'basic', note: true, cmd: 'push', key: 'myList', value: 10 })\n  await seneca.act({ role: 'basic', note: true, cmd: 'push', key: 'myList', value: 20 })\n  console.log('Pushed values to 'myList'.')\n\n  // Get the list\n  const resultList = await seneca.act({ role: 'basic', note: true, cmd: 'list', key: 'myList' })\n  console.log(`Retrieved 'myList': ${resultList.value}`)\n\n  // Pop from the list\n  const resultPop = await seneca.act({ role: 'basic', note: true, cmd: 'pop', key: 'myList' })\n  console.log(`Popped from 'myList': ${resultPop.value}`)\n\n  const finalResultList = await seneca.act({ role: 'basic', note: true, cmd: 'list', key: 'myList' })\n  console.log(`'myList' after pop: ${finalResultList.value}`)\n\n  await seneca.close()\n  console.log('Seneca instance closed.')\n}\n\nrun().catch(console.error)\n","lang":"javascript","description":"This quickstart initializes Seneca, explicitly loads the seneca-basic plugin, and demonstrates setting, getting, pushing, listing, and popping 'note' values.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}