@terminal3/t3n-sdk 5.13.0 → 5.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -5612,48 +5612,41 @@ declare class SessionUsageReportClient {
5612
5612
  */
5613
5613
  getOrgUsageReport(input: OrgUsageReportInput): Promise<OrgUsageReport>;
5614
5614
  /**
5615
- * How many protected-workflow executions the organisation has completed so
5616
- * far this calendar year (UTC).
5615
+ * How many protected-workflow executions the organisation's agents ran over
5616
+ * `[fromMs, toMs)`, in milliseconds. Reads the `org-call-count` export.
5617
5617
  *
5618
- * A protected workflow is the organisation's **own** registered contract, so
5619
- * platform traffic — signing in, profile edits, credential issuance,
5620
- * organisation administration — leaves this untouched, as do unsuccessful
5621
- * executions. Attributed by caller, so an agent's land on its owner's org.
5622
- * Refuses with `not_org_admin: ...` off the org's admin set.
5623
- */
5624
- getOrgCallCountThisYear(orgDid: string): Promise<number>;
5625
- /** As {@link getOrgCallCountThisYear}, for a given UTC calendar year. */
5626
- getOrgCallCountForYear(orgDid: string, year: number): Promise<number>;
5627
- /**
5628
- * As {@link getOrgCallCountThisYear}, over an explicit `[fromMs, toMs)`
5629
- * window in milliseconds.
5618
+ * A protected workflow is an agent's call to a client contract (`z:` /
5619
+ * `y:`), however it ended: a business-logic failure or a
5620
+ * refused grant is still an execution the agent attempted. Platform traffic
5621
+ * — signing in, profile edits, credential issuance, organisation
5622
+ * administration — and a member's own calls leave this untouched.
5623
+ * Attributed by caller, so an agent's land on its owner's org. Refuses with
5624
+ * `not_org_admin: ...` off the org's admin set.
5630
5625
  *
5631
5626
  * Pass whole UTC days (multiples of 86400000) unless you can live with a
5632
5627
  * figure wider than its label: the counter has day granularity, so the node
5633
5628
  * widens a ragged window to the days it touches and the count then includes
5634
- * the hours either side of what was asked for.
5629
+ * the hours either side of what was asked for. A calendar year is
5630
+ * `[Date.UTC(y, 0, 1), Date.UTC(y + 1, 0, 1))`.
5635
5631
  *
5636
5632
  * Throws when the window covers more active days than the node reads in one
5637
5633
  * call — roughly eleven years of unbroken daily use — rather than returning
5638
- * the partial count the node reports. The year forms cannot reach that.
5634
+ * the partial count the node reports.
5639
5635
  */
5640
- getOrgCallCountForWindow(orgDid: string, fromMs: number, toMs: number): Promise<number>;
5636
+ getOrgWorkflowExecutionsForWindow(orgDid: string, fromMs: number, toMs: number): Promise<number>;
5641
5637
  /**
5642
- * How many protected-workflow executions the organisation's agents ran over
5643
- * `[fromMs, toMs)` — **refused and failed ones included**, since reviewing
5644
- * agents means seeing the attempts.
5645
- *
5646
- * So this is independent of {@link getOrgCallCountForWindow}, not a share of
5647
- * it: a window of nothing but refused executions reads non-zero here and
5648
- * zero there. Never render one as a percentage of the other. Separate reads,
5649
- * so both figures cost two calls.
5638
+ * How many calls the organisation's agents made over `[fromMs, toMs)` —
5639
+ * every contract, platform ones included, every outcome. The rows
5640
+ * {@link getActivityLog} returns under `caller_type: "agent"`, so the two
5641
+ * agree on a window of whole UTC days, where
5642
+ * {@link getOrgWorkflowExecutionsForWindow} admits protected
5643
+ * workflows alone. A person's calls are in neither figure, which is also why
5644
+ * opening the usage page does not move them.
5650
5645
  *
5651
- * Agent or person comes from the actor classification stamped when the
5652
- * execution happened, and is never revised: one an agent ran before its DID
5653
- * was classified stays in the human share. Window rules, refusal and
5654
- * truncation throw are {@link getOrgCallCountForWindow}'s; no year form.
5646
+ * Window rules, refusal and truncation throw are
5647
+ * {@link getOrgWorkflowExecutionsForWindow}'s.
5655
5648
  */
5656
- getOrgAgentCallCountForWindow(orgDid: string, fromMs: number, toMs: number): Promise<number>;
5649
+ getOrgActivityCountForWindow(orgDid: string, fromMs: number, toMs: number): Promise<number>;
5657
5650
  }
5658
5651
  /**
5659
5652
  * Construct a {@link SessionUsageReportClient} from a caller-owned