JSPM

@agentclutch/loop

0.7.3-alpha.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 27
  • Score
    100M100P100Q75919F
  • License Apache-2.0

Loop lifecycle contracts for AgentClutch action proposals, decisions, events, and resume context.

Package Exports

  • @agentclutch/loop

Readme

@agentclutch/loop

Loop lifecycle contracts for AgentClutch action proposals, decisions, events, and resume context.

This package is part of AgentClutch: the local-first Action Card and takeover UX layer for consequential AI agent actions.

Status

0.7.3-alpha.1 is the latest published npm alpha version. Prefer installing with the explicit @alpha tag until AgentClutch is stable.

Install

pnpm add @agentclutch/loop@alpha

Minimal usage

import { buildResumeContext, normalizeActionProposal } from "@agentclutch/loop";

const proposal = normalizeActionProposal({
  sourceMode: "loop_native",
  loopId: "loop_checkout_001",
  stepId: "step_review_checkout",
  userGoal: { summary: "Buy headphones after review" },
  proposedAction: {
    kind: "browser.checkout",
    label: "Complete checkout",
    targetSurface: "browser",
    targetApp: "FakeStore",
    targetIdentifier: "#checkout",
  },
  riskHints: {
    requiresApproval: true,
    reversibility: "compensable",
    blastRadius: "single_user",
  },
});

const resumeContext = buildResumeContext(proposal, {
  type: "approve_once",
  approvedBy: "human-operator",
  decidedAt: new Date().toISOString(),
});

Package role

Use this package when your host app already has an engineered loop and needs typed Action Proposals, Clutch Decisions, loop events, and Resume Context objects.

Links: root README, quickstart, known limitations, examples.