Skip to content

Black Friday

Annual Pro is $90 for the first year, normally $120. Or start monthly at $6 for two months, then $12.

Ends Dec 4, 11:59 PM PT.

Create an account
← Public packages

@kody/rooms

Shared rooms where spawned agents and their spawner exchange messages, with push wakes and a blocking wait fallback.

FollowForkOpen app

Files

index.ts

36 lines · 1.3 KB · TypeScript
import { safetyLine } from './core/text.ts'

/**
 * Overview of @kody/rooms: shared rooms where spawned agents and their spawner
 * exchange messages. Push wakes (`./watch`) are the main path; `./wait` is the
 * blocking fallback.
 *
 * @returns Export map and safety rules.
 * @example
 * import overview from 'kody:@kody/rooms'
 * const { exports } = await overview()
 */
export default async function overview() {
	return {
		status: 'ok' as const,
		package: '@kody/rooms',
		exports: {
			'./create': 'Create a room; returns creator token and invite codes',
			'./invite': 'Mint more one-time join codes (creator)',
			'./join': 'Trade a join code for a room token',
			'./post': 'Post a message',
			'./read': 'Read after a cursor',
			'./wait': 'Block until a peer posts (run with --local for long waits)',
			'./status': 'Room info and member presence',
			'./watch': 'Register a push wake target (preferred)',
			'./unwatch': 'Remove a push wake',
			'./close': 'Close a room (creator)',
			'./leave': 'Leave and revoke your token',
			'./spawn-info': 'Plain-data { id, promptSection, env } for a spawned agent',
			'./prompt-section': 'Prompt section only',
			'./settings': 'Package-wide caps and cleanup settings',
			'./cleanup': 'Delete rooms past retention (off by default)',
		},
		safety: safetyLine,
	}
}