Skip to content
← Public packages

@kody/personal-capture

Quick onboarding example: stash notes/links in packageStorage; list recent captures.

AGENTS.md

75 lines · 2.3 KB · Markdown

@kody/personal-capture — agent notes

Human setup and intent live in README.md. This file is for agents: imports, smoke snippets, storage quirks, and edge cases. No secrets. Do not disable live webhooks or jobs (this package declares none).

Import paths

ExportImport
namespace (named helpers)kody:@kody/personal-capture
capture (default export)kody:@kody/personal-capture/capture
listCaptures (default export)kody:@kody/personal-capture/listCaptures

Prefer static kody:@…/personal-capture/... imports from execute against the caller's fork (or installed copy). Do not lead with packages.invoke.

After fork, replace @kody with the caller's scope in import paths.

Storage caveat

packageStorage() is bound to the package account that owns the published code. A bare static import of the shared @kody/personal-capture listing writes into the platform package's bucket — usually wrong for onboarding. Fork (or install into the caller's account) first, then import that fork.

Smoke test

import capture from 'kody:@YOUR_SCOPE/personal-capture/capture'
import listCaptures from 'kody:@YOUR_SCOPE/personal-capture/listCaptures'

export default async function main() {
	await capture({
		text: 'Try Kody onboarding Step 2',
		url: 'https://kody.codes',
	})
	return await listCaptures({ limit: 5 })
}

Capture without notify (default):

import capture from 'kody:@YOUR_SCOPE/personal-capture/capture'

export default async function main() {
	return await capture({ text: 'Quick note' })
}

Optional email confirm:

import capture from 'kody:@YOUR_SCOPE/personal-capture/capture'

export default async function main() {
	return await capture({
		text: 'Ship reminder',
		url: 'https://kody.codes',
		notify: true,
	})
}

Edge cases / fork notes

  • listCaptures is newest-first; pass limit to bound results.
  • notify: true is the only side-effect beyond storage — skip it for silent smoke checks.
  • Subpaths ./capture and ./listCaptures expose default exports (handy for invoke-style callers after fork); still prefer static imports in agent docs and README examples.
  • Keep MIT license intent, community icon, and README Intent when forking unless deliberately changing scope.