DSH familySearch GitHub

hook / Classic

hook-dsh-batch-decision

Decides when a batch of edits is ready to apply

0.2.1 hook Classic

Facts

Package
@playform/hook-dsh-batch-decision
Version
0.2.1
Kind
hook
Release
Classic
Licence
CC0-1.0
Directory
Classic/packages/hook-dsh-batch-decision

What it does

Decides when a batch of edits is ready to apply.

Read the full description in the README.

Conversation

The turn as a document: the calls every plugin page shares, what this package changes in them, and the order its work happens in.

Conversational

Lane

The same run as time: one row per resource, a bar per span, and the clock every record shares. A wait is drawn as an outline, because nothing is busy.

Session

The tree, the document, and the inspector read one record list. The switch at the top of the document changes the face they read, and the run changes with it.

session 7c41e0a2 | deepseek-v4.1-flash | max | 3 turns | 9 steps | 40 records | simulated

*emit~waterfall=serial>parallel

Add the session view to the trace page. Read the specimens first, then build the lane strip, the tree, the document, and the inspector from one authored run. The family's plugins must be visible on the records they touch, and the page must read the same run with the family off.

Turn 1Read the specimens14 records | 3 steps

Step 12 calls, 265 chars

Step 24 calls, 313 chars

Step 33 calls, 153 chars

Turn 2Write the run13 records | 3 steps

Step 43 calls, 174 chars

Step 52 calls, 258 chars

Step 62 calls, 115 chars

Turn 3Repair the run13 records | 3 steps

Step 72 calls, 143 chars

Step 83 calls, 184 chars

Step 92 calls, 123 chars

The turn

The same 3 calls on every plugin page, so a reader who moves between plugins stays in the same frame.

The 3 calls every plugin page shares, in sequence order
SeqCallOutcome
20bash ls -laok
21write src/index.tsok
22read src/index.tsok

Change

The one line that differs with this package installed, transcribed from its source by the dissection.

  1. Model the proposal is applied
  2. Transcript decision held prop-1 (policy commit=approve)

44 character changed, from 23 to  44.

Property
A policy gate on batches
Knob
commit, approve by default
Seam
batch/proposed

This package ships disabled: the left side of the pair is what the harness does with the package installed but inactive, and enabling it is one line in the profile's bundle patch.

Flow

The order this package's work happens in, with the branch that decides it inline, transcribed from the source; the rule it obeys is the last band of Architecture.

  1. 01
    1. seam batch/proposed
    why

    One proposal arrives from the suggester, with its intent, its targets, and its revision.

  2. 02
    Record the proposal, and ignore a revision that is not newer
    why

    The recorder is synchronous: no awaits, no file I/O, and no throws into the emit.

  3. 03
    Sweep the decided entries past pendingTtlMs
    why

    Expiry is lazy, decided on first touch, because the family runs no timers.

  4. 04
    branch The policy block's commit verdict is approve
    why

    The shipped default, and the outer gate in front of the auto-approve knob.

  5. 05
    pass The proposal stays pending, and the held line is written
    why

    The knob can never widen an approve verdict, and an off knob writes no held line.

  6. 06
    branch autoApprove is on, and the intent, the target count, and the confidence all pass
    why

    The first batch of any intent class always requires the user.

  7. 07
    Record the decision as approved by policy, and emit batch/decision
    why

    The bus reaches the ingester and the live view.

  8. 08
    Write the decision into the agent-team inbox
    why

    The same channel plugin-dsh-batchstate reads, so the board's status follows the decision.

  9. 09
    fail No live agent to address
    why

    The inbox line says so, and the decision stands.

  10. 10
    store ~/.dsh/playform/hook-dsh-batch-decision.log
    why

    One line per decision, per refusal, and per handoff.

Harness

The laws the package states, the line it writes when it loads, the seam the harness dispatches with none of the family, and the surface and knobs a run can set.

Default

What the harness does at this package's seam with none of the family installed, so the surface below has something to be a difference from.

The harness dispatches batch/proposed as a emit, and its event matrix lists no listener of its own there.

An emit listener observes a fact that already happened, so the harness's own listeners can record it and cannot change it. This package records beside them, or acts on the world rather than on the payload.

Surface

Every listener, tool, service, and knob the README documents.

The surfaces hook-dsh-batch-decision registers
KindNameWhat
toolbatch_decision(the one entry point; no args lists pending proposals, id + approve records the decision).
listenerbatch/proposedevent listener (synchronous recorder).
configSource/Variable/Config.tsledger (Source/Variable/Config.ts logFile).

Install

The package as the profile adds it.

Install sh
pnpm add @playform/hook-dsh-batch-decision

Configuration

Every knob this plugin documents, with its default.

Configuration of hook-dsh-batch-decision
FieldTypeDefaultMeaning
enabledfalseships disabled (idle-forever posture)
logFile~/.dsh/playform/hook-dsh-batch-decision.logthe workflow ledger
autoApproveoffthe second explicit flip; off = user only
allowlist[]intent classes eligible for policy approval
maxAutoTargets5the bounded-batch rule
minConfidence0.8the high-confidence rule
pendingTtlMs3600000how long decided entries linger
policy.*D6 defaultsthe per-action allowlist (the outer gate)

Family

The neighbours at the same seam, the arms beyond it, the twin in the other release tree, and the packages this one needs.

Neighbours

The behavior map lists 1 answer at batch/proposed, in the order the family registers them.

The family's answers at batch/proposed, in the order the behavior map lists them
AnswerEffectPosition
hook-dsh-batch-decisionrecordthis package

Arms

The seams its source also registers, beyond the one its README documents.

Its source registers no seam beyond the one its README documents.

Twin

The same package in the other release tree, when one exists.

Its twin is ets-hook-dsh-batch-decision.

It registers the same listeners in the same order and composes the same ledger strings; the ledger file's name, which carries the package identity, and the factory base import are the only differences.

Dependencies

The packages this one imports, and whether each one is the family's own.

Dependencies of hook-dsh-batch-decision
PackageRole
@playform/lib-dsh-corefamily
@playform/plugin-dsh-factoryfamily

Person

What the person waits for, reads, and never sees.

The person sees the effect and not the record: the line that testifies to what happened sits in a file, and the page prints the line rather than a screen that shows it.

The source records no verdict table for this package, so no gate machine is drawn; the branch it takes is in the flow above.

Architecture

This plugin's own structure: the shape the portrait gives it, the facts its source documents, and the rule its flow obeys.

Shape

Plugs into the batch/proposed and batch/decision events, the batch_decision tool, and the agent-team inbox.

The thin workflow owner between a proposal, its decision, and the board.

  • Records a proposal once, and ignores a revision that is not newer
  • Answers the policy gate before the auto-approve knob, so an approve verdict is never widened
  • Expires a proposal on first touch rather than on a timer, and says so in the ledger
  • Writes the decision into the inbox as well as the bus, so the board and the ingester both hear it
  • Its flow is the interesting part: a proposal crosses a policy gate, a knob, and a handoff before anyone is told

Its shape machine belongs to Person.

Record

The release line, the source, and the files this page was read from.

Release

The versions the package's own changelog records, newest first.

  • 0.3.0
  • 0.2.1
  • 0.2.0
  • 0.1.0

Source

The package as the repository holds it.

Open the package source

Origin

The files this page was built from, and what each one supplies.

The files this page was read from 5
The files behind https://github.com/PlayForm/DeepSeek/tree/Current/Classic/packages/hook-dsh-batch-decision
FileContributedState
package.jsonThe name, the version, the private flag, and the dependencies.read
README.mdThe summary, the surface table, and the configuration table.read
CHANGELOG.mdThe release lines and their versions.read
cordis.patch.ymlActivation: the bundle entry that mounts the plugin.read
Source/Function/Apply.tsThe listeners, their registration order, and the service the flow calls.read
Data
The monorepo, read during the build
Connection
Build-time read; nothing is fetched at runtime
Capture
package.json, README.md, CHANGELOG.md, Source/Function/Apply.ts
Expand provenance source

This page is static. It cannot invoke the plugin, read a ledger, or change a configuration. Every figure comes from those files; a missing README falls back to the manifest's own description, and a package with no surface table shows no surface section.