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.
plugin / Classic
plugin-dsh-cost
Tracks what each run costs
Facts
- Package
- @playform/plugin-dsh-cost
- Version
- 0.2.1
- Kind
- plugin
- Release
- Classic
- Licence
- CC0-1.0
- Directory
- Classic/packages/plugin-dsh-cost
What it does
Tracks what each run costs.
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.
The turn
The same 3 calls on every plugin page, so a reader who moves between plugins stays in the same frame.
| Seq | Call | Outcome |
|---|---|---|
20 | bash ls -la | ok |
21 | write src/index.ts | ok |
22 | read src/index.ts | ok |
Change
The one line that differs with this package installed, transcribed from its source by the dissection.
- Model no cost block
- Transcript // Inference cost: 12.4183 USD (direct 3.1022 + amortized 9.3161)
65 character changed, from 13 to 65.
- Property
- Cost visibility
- Knob
- rates, documented per model
- Seam
- session/event
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.
- 01
- seam session/event
why
A committed session event arrives; the recorder pushes it into the capture queue and never awaits.
- 02queue by session
why
No I/O on the event path, so a throw can never fail the tool call that produced the event.
- 03
- seam session/flush
why
The session's durability checkpoint.
- 04drain: price each call from the provider's usage, and split it across the files the turn touched
- 05attribute the output side by changed bytes, and the input side by each file's cached and uncached mass
- 06record the stage, the branch, and the read-before-edit at capture time
- 07rollup: rebuild exactly the UTC days the flush's events landed in
- 08a command reads the rollup, the views, or the assessment
- 09store ~/.dsh/cost/ledger.db
why
One SQLite file: the price rows, the call and touch grain, the allocations, the rollup, and the views.
- 10fail the ledger does not open
why
The mount fails loud, and no listener is registered behind a closed database.
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.
No documented seam
The behavior map does not document a seam for this package, so the page cannot show a default to compare against. It is a library, a base, or a package whose work is a tool rather than a listener.
Surface
Every listener, tool, service, and knob the README documents.
No surface
The README documents no listener, tool, service, or configuration, so this package registers nothing a page can list.
Install
The package as the profile adds it.
pnpm add @playform/plugin-dsh-costConfiguration
Every knob this plugin documents, with its default.
No configuration
The README documents no knob, so the package reads no field and takes no option.
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 documents no seam for this package, so it has no neighbour to name at one.
Arms
The seams its source also registers, beyond the one its README documents.
- session/event
- session/flush
Twin
The same package in the other release tree, when one exists.
Its twin is ets-plugin-dsh-cost.
It registers the same surface under the other runtime, and the two trees differ in the wiring: the Effect tree returns Effect envelopes where this one returns the dispatch envelope.
Dependencies
The packages this one imports, and whether each one is the family's own.
| Package | Role |
|---|---|
| family | |
| family |
Person
What the person waits for, reads, and never sees.
The person sees the call and its output; the gate, the fence, and the ledger behind it never reach the transcript.
Its shape machine belongs to Architecture.
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 session/event and session/flush listeners, one SQLite ledger, and the cost command.
The per-file inference cost ledger, priced from the session log and read back through five commands.
- Every call priced from the provider's usage, split across the files it touched
- Output by changed bytes, input by each file's cached and uncached mass
- The stage, the branch, and the read-before-edit, at capture time
- Five verbs over the ledger, and no model-visible surface
None of the five is a tool, and none enters the model context: a command renders its text outside the history.
- /cost report
- Takes
- a scope: file, project, client, model, or session; and one UTC day
- Returns
- the rollup rows for that scope, or for the whole ledger when no day is named
- /cost export
- Takes
- csv, json, or markdown, and an optional path
- Returns
- the bundle written, and the number of rows it carried
- /cost annotate
- Takes
- an optional path, or every file the project knows
- Returns
- written or skipped per file, with the reason
- /cost assess
- Takes
- an optional session
- Returns
- the spend bucketed as delivered, explored, reverted, overhead, and carry, with the cost per surviving line
- /cost forecast
- Takes
- a day count, thirty by default
- Returns
- the daily rate per scope and key, projected with its confidence band
The ledger behind the verbs is one SQLite file: the effective-dated prices, the call and touch grain, the allocations, the day rollup, and the views the five verbs read.
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
Source
The package as the repository holds it.
Origin
The files this page was built from, and what each one supplies.
The files this page was read from 5
| File | Contributed | State |
|---|---|---|
| package.json | The name, the version, the private flag, and the dependencies. | read |
| README.md | The summary, the surface table, and the configuration table. | absent |
| CHANGELOG.md | The release lines and their versions. | read |
| cordis.patch.yml | Activation: the bundle entry that mounts the plugin. | read |
| Source/Function/Apply.ts | The 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.