@terminal3/t3n-sdk 5.11.0 → 5.12.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
@@ -5610,16 +5610,14 @@ declare class SessionUsageReportClient {
5610
5610
  */
5611
5611
  getOrgUsageReport(input: OrgUsageReportInput): Promise<OrgUsageReport>;
5612
5612
  /**
5613
- * Fetch how many calls an organisation's members and their agents have
5614
- * completed so far this calendar year (UTC).
5613
+ * How many protected-workflow executions the organisation has completed so
5614
+ * far this calendar year (UTC).
5615
5615
  *
5616
- * Counted by CALLER, not by contract owner, so calls into the platform's own
5617
- * system contracts count as the organisation's usage. Unsuccessful calls and
5618
- * admin-contract dispatches are excluded, the latter so that reading this
5619
- * number does not increase it.
5620
- *
5621
- * Refuses with `not_org_admin: ...` when the authenticated session DID is
5622
- * not in the org's admin set, exactly as {@link getOrgUsageReport} does.
5616
+ * A protected workflow is the organisation's **own** registered contract, so
5617
+ * platform traffic — signing in, profile edits, credential issuance,
5618
+ * organisation administration — leaves this untouched, as do unsuccessful
5619
+ * executions. Attributed by caller, so an agent's land on its owner's org.
5620
+ * Refuses with `not_org_admin: ...` off the org's admin set.
5623
5621
  */
5624
5622
  getOrgCallCountThisYear(orgDid: string): Promise<number>;
5625
5623
  /** As {@link getOrgCallCountThisYear}, for a given UTC calendar year. */
@@ -5639,25 +5637,19 @@ declare class SessionUsageReportClient {
5639
5637
  */
5640
5638
  getOrgCallCountForWindow(orgDid: string, fromMs: number, toMs: number): Promise<number>;
5641
5639
  /**
5642
- * How many calls the organisation's agents made over `[fromMs, toMs)` in
5643
- * milliseconds — **including the ones that were refused or failed**, since
5644
- * reviewing agents means seeing what they attempted.
5645
- *
5646
- * That makes this figure independent of {@link getOrgCallCountForWindow}
5647
- * rather than a share of it: a window of nothing but refused agent calls
5648
- * reads non-zero here and zero there, so do not render one as a percentage
5649
- * of the other. The node keeps them as two contract exports for that reason,
5650
- * and each reply carries only its own number — asking for both is two reads.
5651
- * Both do exclude administrative dispatches, this read included.
5652
- *
5653
- * Agent or person comes from the actor classification stamped on each call
5654
- * when it happened — a call an agent made before its DID was classified as
5655
- * one stays in the human share for ever.
5656
- *
5657
- * Same window rules, same `not_org_admin: ...` refusal, and the same throw
5658
- * on a window too wide to read in one call as
5659
- * {@link getOrgCallCountForWindow}. There is no calendar-year form: pass the
5660
- * window you want, on whole UTC days.
5640
+ * How many protected-workflow executions the organisation's agents ran over
5641
+ * `[fromMs, toMs)` — **refused and failed ones included**, since reviewing
5642
+ * agents means seeing the attempts.
5643
+ *
5644
+ * So this is independent of {@link getOrgCallCountForWindow}, not a share of
5645
+ * it: a window of nothing but refused executions reads non-zero here and
5646
+ * zero there. Never render one as a percentage of the other. Separate reads,
5647
+ * so both figures cost two calls.
5648
+ *
5649
+ * Agent or person comes from the actor classification stamped when the
5650
+ * execution happened, and is never revised: one an agent ran before its DID
5651
+ * was classified stays in the human share. Window rules, refusal and
5652
+ * truncation throw are {@link getOrgCallCountForWindow}'s; no year form.
5661
5653
  */
5662
5654
  getOrgAgentCallCountForWindow(orgDid: string, fromMs: number, toMs: number): Promise<number>;
5663
5655
  }