Files
threadkit/package.json
T
CatoandClaude 234d424707 Files on a message: an attachment policy, read receipts that ignore an assistant, whole-word mentions (#54)
A messenger's costs live in its files, so what may be attached is a rule
this package can answer: checkAttachment (allowlist, a ceiling per kind,
a count per message, a quota per person), the lifetime predicates, and
the Attachment type a Message can carry. Nothing is stored or signed
here.

readState answers none/some/all over the humans a message was for. In
OrangeCat an assistant that had joined a conversation never read
anything, so every later message stayed at delivered.

mentionsAny/mentionMatcher export the whole-word matcher whenMentioned
used, now aware of letters outside ASCII.

mergeMessages, visibleMessages and unreadMessages are generic over the
caller's message type.

Released as 0.1.2: additive, inside every consumer's ^0.1.1 range.


Claude-Session: https://claude.ai/code/session_019MDtmsmMXvM981mcszxEA6

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-12 07:13:19 +01:00

64 lines
1.6 KiB
JSON

{
"name": "@bitbaum/threadkit",
"version": "0.1.2",
"description": "Headless multi-participant message threads. Permission is participation, unread is per-person, and an AI can be a participant subject to the same visibility rules as everyone else.",
"license": "MIT",
"author": "Mao Nakamoto",
"homepage": "https://github.com/bitbaum/threadkit#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/bitbaum/threadkit.git"
},
"bugs": {
"url": "https://github.com/bitbaum/threadkit/issues"
},
"keywords": [
"messaging",
"chat",
"threads",
"group-chat",
"attachments",
"ai",
"authorization",
"headless"
],
"type": "module",
"sideEffects": false,
"packageManager": "pnpm@11.25.0",
"engines": {
"node": ">=20"
},
"publishConfig": {
"access": "public",
"provenance": true
},
"files": [
"dist"
],
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"scripts": {
"build": "tsc -p tsconfig.json",
"lint": "eslint .",
"typecheck": "tsc -p tsconfig.json --noEmit",
"test": "node --test test/*.test.js",
"verify": "pnpm run format:check && pnpm run lint && pnpm run typecheck && pnpm run build && pnpm test",
"prepare": "pnpm run build",
"format": "prettier --write .",
"format:check": "prettier --check ."
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@types/node": "^26.4.0",
"eslint": "^10.9.1",
"globals": "^17.12.0",
"prettier": "3.9.10",
"typescript": "^6.0.3",
"typescript-eslint": "^8.68.0"
}
}