@unbrained/pm-cli 2026.10.8 → 2026.10.10
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/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +36 -0
- package/dist/cli/register-list-query.js +2 -2
- package/dist/cli/register-mutation.js +2 -2
- package/dist/cli-bundle/bundle-manifest.json +150 -150
- package/dist/cli-bundle/chunks/{chunk-MJVRF67I.js → chunk-2JYTSTQP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UGFN5NJ2.js → chunk-BXSXT5Z6.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HFCIAXLP.js → chunk-ESRACL6K.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-34L2BS2Z.js → chunk-K2UTE75T.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ZHIMZ65M.js → chunk-KNW3RSLS.js} +30 -30
- package/dist/cli-bundle/chunks/chunk-MEWBSWE3.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-RCFZ6H2Y.js → chunk-OBLO45UM.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-FOLSEOJ2.js → chunk-RBPOO46D.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TNU56MZI.js → chunk-RUT3CCAG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-K6E2FFUT.js → chunk-S445XEYT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ZBVAZ7XX.js → chunk-SSY4OSJR.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OG66KEOF.js → chunk-YMLF6QT7.js} +75 -79
- package/dist/cli-bundle/chunks/{chunk-L7U5FSZ5.js → chunk-ZWRLAOA4.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-PYVSPGPV.js → register-list-query-T6BOR67M.js} +7 -7
- package/dist/cli-bundle/chunks/register-mutation-6NXR7SAJ.js +20 -0
- package/dist/cli-bundle/chunks/{register-operations-WL25C3NP.js → register-operations-PDOBQZUJ.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-PFKYNEQI.js → register-setup-MAYFPKBX.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-6TKAFFEB.js → chunk-2CJWTLQG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-EOUORVJA.js → chunk-52UJEHEV.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-V3EPBB6V.js → chunk-AU6VJGTY.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-L3CZNKZE.js → chunk-B3YW6H2I.js} +16 -20
- package/dist/cli-bundle/focused-chunks/{chunk-XT7JAVHI.js → chunk-DMSADMEU.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-A3W6HFFO.js → chunk-EIOQNLBQ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-OLCJ2PJS.js → chunk-GVGFUD52.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-2KSPGWLH.js → chunk-JGFSSR3G.js} +16 -16
- package/dist/cli-bundle/focused-chunks/{chunk-MW2TQHZ3.js → chunk-KNJR2WUO.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-MJQ253F3.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-F2ME5MJY.js → chunk-PBCYGO7X.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-PBPPIGUL.js → chunk-PLTTMQAW.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-SIEGIPNT.js +165 -0
- package/dist/cli-bundle/focused-chunks/{chunk-DRHJOG5X.js → chunk-W5AE7GKZ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-LZQGEVKT.js → chunk-WAOXID5J.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-BDT5EALU.js → chunk-WOEZJUA2.js} +2 -2
- package/dist/cli-bundle/main.js +2 -2
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +1 -1
- package/dist/cli-bundle/sdk-core.js +22 -22
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +50 -50
- package/dist/cli-bundle/sdk-query.js +1 -1
- package/dist/cli-bundle/sdk-runtime.js +1 -1
- package/dist/cli-bundle/sdk-testing.js +1 -1
- package/dist/cli-bundle/sdk.js +9 -9
- package/dist/core/history/event-index.d.ts +1 -2
- package/dist/core/history/event-index.js +2 -2
- package/dist/core/item/item-format.d.ts +2 -0
- package/dist/core/item/item-format.js +3 -3
- package/dist/core/output/output.d.ts +16 -14
- package/dist/core/output/output.js +6 -10
- package/dist/core/schema/runtime-field-values.d.ts +2 -2
- package/dist/core/schema/runtime-field-values.js +1 -1
- package/dist/core/store/item-format-migration.js +1 -1
- package/dist/core/store/item-metadata-query-index.d.ts +1 -2
- package/dist/core/store/item-metadata-query-index.js +1 -1
- package/dist/core/store/item-store.js +1 -1
- package/dist/core/store/sqlite-runtime.d.ts +15 -0
- package/dist/core/store/sqlite-runtime.js +2 -0
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
- package/dist/sdk/governance/reliability.d.ts +74 -0
- package/dist/sdk/governance/reliability.js +2 -0
- package/dist/sdk/governance.d.ts +1 -0
- package/dist/sdk/governance.js +1 -1
- package/dist/sdk/output/table-rows.d.ts +37 -0
- package/dist/sdk/output/table-rows.js +2 -0
- package/dist/sdk/output.d.ts +1 -0
- package/dist/sdk/output.js +2 -2
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/read-output-contracts.d.ts +3 -3
- package/dist/sdk/read-output-contracts.js +1 -1
- package/dist/sdk/structured-mutations.d.ts +5 -1
- package/dist/sdk/structured-mutations.js +1 -1
- package/dist/sdk/test/workspace-snapshot.d.ts +1 -1
- package/dist/sdk/test/workspace-snapshot.js +1 -1
- package/docs/AGENT_OUTPUT_ENCODINGS.md +119 -0
- package/docs/PACKAGE_GATE_ACCEPTANCE.md +56 -0
- package/docs/QUALITY_EVIDENCE.md +52 -1
- package/docs/README.md +2 -0
- package/docs/RELEASE_RELIABILITY.md +54 -3
- package/docs/SDK.md +16 -2
- package/docs/TESTING.md +47 -3
- package/docs/agent-task-token-baseline.json +15 -14
- package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +4 -3
- package/marketplace.json +2 -2
- package/package.json +1 -1
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/package.json +2 -2
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/pm-codex/package.json +2 -2
- package/plugins/pm-codex/plugin.json +1 -1
- package/runtime-dependencies.json +2 -2
- package/dist/cli-bundle/chunks/chunk-JDTBPW4Y.js +0 -2
- package/dist/cli-bundle/chunks/register-mutation-WXP3YLIN.js +0 -20
- package/dist/cli-bundle/focused-chunks/chunk-OSKXYRYZ.js +0 -165
- package/dist/cli-bundle/focused-chunks/chunk-PEBOVLEG.js +0 -2
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/** One original attempt in a caller-defined recurrence family. */
|
|
2
|
+
export interface ReliabilityAttempt {
|
|
3
|
+
/** Unique occurrence identity; retries retain the original occurrence separately. */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Stable family identity independent of the occurrence's lifecycle. */
|
|
6
|
+
family: string;
|
|
7
|
+
/** Recorded start instant, used for half-open window membership. */
|
|
8
|
+
started_at: string;
|
|
9
|
+
/** Original outcome; a successful retry must not replace a failure. */
|
|
10
|
+
outcome: "success" | "failure" | "pending";
|
|
11
|
+
/** Observed repair instant, when supported by independent evidence. */
|
|
12
|
+
repaired_at?: string;
|
|
13
|
+
/** Failure-only cause; omit on success/pending and leave unknown without classification. */
|
|
14
|
+
cause?: "product" | "infrastructure" | "unknown";
|
|
15
|
+
}
|
|
16
|
+
/** Explicit population and thresholds for a reproducible reliability query. */
|
|
17
|
+
export interface ReliabilityWindowPolicy {
|
|
18
|
+
/** Inclusive UTC window boundary. */
|
|
19
|
+
window_start: string;
|
|
20
|
+
/** Exclusive UTC window boundary and repair-observation cutoff. */
|
|
21
|
+
window_end: string;
|
|
22
|
+
/** Expected families, including families with no observed attempts. */
|
|
23
|
+
families: readonly string[];
|
|
24
|
+
/** Maximum permitted original-attempt failure fraction in [0, 1). */
|
|
25
|
+
max_failure_rate: number;
|
|
26
|
+
/** Minimum completed attempts required to establish coverage. */
|
|
27
|
+
min_completed_attempts: number;
|
|
28
|
+
}
|
|
29
|
+
/** Bounded aggregate evidence for one recurrence family. */
|
|
30
|
+
export interface ReliabilityFamilyReport {
|
|
31
|
+
/** Stable identity from the declared population. */
|
|
32
|
+
family: string;
|
|
33
|
+
/** All original attempts in the selected window. */
|
|
34
|
+
attempts: number;
|
|
35
|
+
/** Attempts with a terminal original outcome. */
|
|
36
|
+
completed: number;
|
|
37
|
+
/** Originally failed attempts, including repaired occurrences. */
|
|
38
|
+
failed: number;
|
|
39
|
+
/** Attempts whose original outcome remains pending. */
|
|
40
|
+
pending: number;
|
|
41
|
+
/** Null denotes absent completed evidence, distinct from zero failures. */
|
|
42
|
+
failure_rate: number | null;
|
|
43
|
+
/** UTC dates carrying at least one original failure. */
|
|
44
|
+
affected_days: string[];
|
|
45
|
+
/** Sorted observed repair durations in minutes; missing repairs are excluded. */
|
|
46
|
+
repair_minutes: number[];
|
|
47
|
+
/** Failures without a repair observed before the query cutoff. */
|
|
48
|
+
unresolved: number;
|
|
49
|
+
/** Cause counts retain unclassified failures instead of guessing attribution. */
|
|
50
|
+
causes: Record<"product" | "infrastructure" | "unknown", number>;
|
|
51
|
+
/** Coverage or rate findings that enforce the declared policy. */
|
|
52
|
+
violations: Array<"insufficient_completed_attempts" | "failure_rate">;
|
|
53
|
+
/** True only when both coverage and the rate satisfy policy. */
|
|
54
|
+
ok: boolean;
|
|
55
|
+
}
|
|
56
|
+
/** Reproducible aggregate verdict suitable for a package, gate, or recorded measurement. */
|
|
57
|
+
export interface ReliabilityWindowReport {
|
|
58
|
+
/** Versioned result schema for persisted evidence. */
|
|
59
|
+
schema: "pm-reliability-window/1";
|
|
60
|
+
/** Normalized inclusive query boundary. */
|
|
61
|
+
window_start: string;
|
|
62
|
+
/** Normalized exclusive query boundary. */
|
|
63
|
+
window_end: string;
|
|
64
|
+
/** True only when every expected family satisfies policy. */
|
|
65
|
+
ok: boolean;
|
|
66
|
+
/** Reports preserve the caller's declared family order. */
|
|
67
|
+
families: ReliabilityFamilyReport[];
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Evaluate original attempts in [start, end), keeping repair and cause evidence separate.
|
|
71
|
+
* Reject duplicate identities, undeclared families, invalid outcomes and chronology.
|
|
72
|
+
* Empty families fail coverage; they never masquerade as healthy zero-rate evidence.
|
|
73
|
+
*/
|
|
74
|
+
export declare function evaluateReliabilityWindow(attempts: readonly ReliabilityAttempt[], policy: ReliabilityWindowPolicy): ReliabilityWindowReport;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="604d7dcb-9fea-5631-8a72-b2a7ff3278f8")}catch{}})();import{isRfc3339DateTime}from"../../core/shared/time.js";function instant(value){if(typeof value!="string"||!isRfc3339DateTime(value))throw new TypeError("Invalid reliability timestamp.");return Date.parse(value)}function validatePolicy(policy){const start=instant(policy.window_start),end=instant(policy.window_end);if(start>=end||!Number.isFinite(policy.max_failure_rate)||policy.max_failure_rate<0||policy.max_failure_rate>=1||!Number.isSafeInteger(policy.min_completed_attempts)||policy.min_completed_attempts<1)throw new TypeError("Invalid reliability window policy.");if(policy.families.length===0||policy.families.some(family=>typeof family!="string"||family.trim().length===0)||new Set(policy.families).size!==policy.families.length)throw new TypeError("Expected unique, nonempty reliability families.");return{start,end}}function groupAttempts(attempts,families,start,end){const groups=new Map(families.map(family=>[family,[]])),ids=new Set;for(const attempt of attempts){if(typeof attempt.id!="string"||attempt.id.trim().length===0||ids.has(attempt.id))throw new TypeError("Invalid or duplicate reliability attempt identity.");ids.add(attempt.id);const group=groups.get(attempt.family);if(!group||!["success","failure","pending"].includes(attempt.outcome)||attempt.cause!==void 0&&(!["product","infrastructure","unknown"].includes(attempt.cause)||attempt.outcome!=="failure"))throw new TypeError("Invalid reliability attempt family, outcome or cause.");const created=instant(attempt.started_at);if(attempt.repaired_at!==void 0&&(instant(attempt.repaired_at)<created||attempt.outcome!=="failure"))throw new TypeError("Invalid reliability repair chronology.");created>=start&&created<end&&group.push(attempt)}return groups}function evaluateReliabilityWindow(attempts,policy){const{start,end}=validatePolicy(policy),families=[...groupAttempts(attempts,policy.families,start,end)].map(([family,rows])=>{const failed=rows.filter(row=>row.outcome==="failure"),completed=rows.filter(row=>row.outcome!=="pending").length,rate=completed===0?null:failed.length/completed,repairs=failed.filter(row=>row.repaired_at!==void 0&&instant(row.repaired_at)<end),causes={product:0,infrastructure:0,unknown:0};for(const row of failed)causes[row.cause??"unknown"]+=1;const violations=[];return completed<policy.min_completed_attempts&&violations.push("insufficient_completed_attempts"),rate!==null&&rate>policy.max_failure_rate&&violations.push("failure_rate"),{family,attempts:rows.length,completed,failed:failed.length,pending:rows.length-completed,failure_rate:rate,affected_days:[...new Set(failed.map(row=>new Date(instant(row.started_at)).toISOString().slice(0,10)))].sort(),repair_minutes:repairs.map(row=>(instant(row.repaired_at)-instant(row.started_at))/6e4).sort((a,b)=>a-b),unresolved:failed.length-repairs.length,causes,violations,ok:violations.length===0}});return{schema:"pm-reliability-window/1",window_start:new Date(start).toISOString(),window_end:new Date(end).toISOString(),ok:families.every(family=>family.ok),families}}export{evaluateReliabilityWindow};
|
|
2
|
+
//# sourceMappingURL=reliability.js.map
|
package/dist/sdk/governance.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export * from "./governance/linked-file-report.js";
|
|
|
27
27
|
export * from "./author-attribution.js";
|
|
28
28
|
export * from "./mutation-guard.js";
|
|
29
29
|
export * from "./governance/provenance-health.js";
|
|
30
|
+
export * from "./governance/reliability.js";
|
|
30
31
|
export * from "./similarity.js";
|
|
31
32
|
export * from "./history/maintenance.js";
|
|
32
33
|
export * from "./history/attestation.js";
|
package/dist/sdk/governance.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c0218aaf-791c-57b1-8f9a-13816cb0c01f")}catch{}})();export*from"./governance/gc.js";export*from"./governance/health.js";export*from"./governance/extension-host-version.js";export*from"./governance/assurance.js";export*from"./governance/assurance-action.js";export*from"./governance/assurance-mutation-error.js";export*from"./governance/assurance-presets.js";export*from"./governance/assurance-runtime.js";export*from"./governance/boundary-fixtures.js";export*from"./governance/defect-recurrence.js";export*from"./governance/defect-recurrence-coverage.js";import{runReindex}from"./governance/reindex.js";export*from"./governance/stale-work.js";export*from"./governance/storage-integrity.js";export*from"./governance/status-role-diagnostics.js";export*from"./governance/workspace-position.js";export*from"./governance/workflow-policy.js";import{runUpgrade}from"./governance/upgrade.js";export*from"./governance/validate.js";export*from"./governance/closure-timestamps.js";export*from"./governance/linked-file-report.js";export*from"./author-attribution.js";export*from"./mutation-guard.js";export*from"./governance/provenance-health.js";export*from"./governance/reliability.js";export*from"./similarity.js";export*from"./history/maintenance.js";export*from"./history/attestation.js";export*from"./history/attestation-command.js";export*from"../core/history/digest.js";export{runReindex,runUpgrade};
|
|
2
2
|
//# sourceMappingURL=governance.js.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module sdk/output/table-rows
|
|
3
|
+
*
|
|
4
|
+
* Lossless nested-cell projection for key-hoisted agent tables. Scalar columns
|
|
5
|
+
* retain their types; declared JSON columns and absent coordinates restore the
|
|
6
|
+
* original rows without confusing missing fields with explicit null values.
|
|
7
|
+
*/
|
|
8
|
+
import type { JsonValue } from "@toon-format/toon";
|
|
9
|
+
/** Metadata required to restore nested cells and sparse object rows. */
|
|
10
|
+
export interface PmTableCellEncoding {
|
|
11
|
+
/** Columns whose every present cell contains a JSON-serialized value. */
|
|
12
|
+
json_columns: string[];
|
|
13
|
+
/** Missing field coordinates, expressed as [zero-based row, column name]. */
|
|
14
|
+
absent: Array<[number, string]>;
|
|
15
|
+
}
|
|
16
|
+
/** Primitive rows accepted by the standard TOON tabular encoder. */
|
|
17
|
+
export interface PmEncodedTableRows {
|
|
18
|
+
/** Key-hoisted rows with primitive cells and null padding for absent keys. */
|
|
19
|
+
rows: Record<string, string | number | boolean | null>[];
|
|
20
|
+
/** Explicit decoding metadata; never inferred from cell content. */
|
|
21
|
+
encoding: PmTableCellEncoding;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Project JSON object rows into a lossless table, preserving key order by first
|
|
25
|
+
* occurrence. A column containing any container serializes all present values
|
|
26
|
+
* as JSON so mixed strings, nulls, arrays, and objects remain unambiguous.
|
|
27
|
+
* Allocation is proportional to rows times distinct columns; callers budget
|
|
28
|
+
* that dense grid before encoding sparse inputs. The host formatter preflights
|
|
29
|
+
* automatic candidates and falls back to expanded TOON for sparse grids.
|
|
30
|
+
*/
|
|
31
|
+
export declare function encodePmTableRows(rows: readonly Record<string, JsonValue>[]): PmEncodedTableRows;
|
|
32
|
+
/**
|
|
33
|
+
* Restore rows emitted by {@link encodePmTableRows}. Metadata is explicit, so
|
|
34
|
+
* strings resembling JSON stay strings unless their column declares JSON.
|
|
35
|
+
* Malformed JSON cells throw instead of silently changing their meaning.
|
|
36
|
+
*/
|
|
37
|
+
export declare function decodePmTableRows(table: PmEncodedTableRows): Record<string, JsonValue>[];
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8936e93f-25bf-58cc-ba91-37cc2677c5d2")}catch{}})();function encodePmTableRows(rows){const columns=[...new Set(rows.flatMap(row=>Object.keys(row)))],jsonColumns=columns.filter(column=>rows.some(row=>{const cell=row[column];return cell!==null&&typeof cell=="object"})),nested=new Set(jsonColumns),absent=[];return{rows:rows.map((row,index)=>Object.fromEntries(columns.map(column=>{if(!Object.hasOwn(row,column))return absent.push([index,column]),[column,null];const cell=row[column];return[column,nested.has(column)?JSON.stringify(cell):cell]}))),encoding:{json_columns:jsonColumns,absent}}}function decodePmTableRows(table){const nested=new Set(table.encoding.json_columns),absent=new Set(table.encoding.absent.map(([row,column])=>JSON.stringify([row,column])));return table.rows.map((row,index)=>Object.fromEntries(Object.entries(row).flatMap(([column,cell])=>absent.has(JSON.stringify([index,column]))?[]:[[column,nested.has(column)?JSON.parse(String(cell)):cell]])))}export{decodePmTableRows,encodePmTableRows};
|
|
2
|
+
//# sourceMappingURL=table-rows.js.map
|
package/dist/sdk/output.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* renderers, and custom SDK-built hosts.
|
|
6
6
|
*/
|
|
7
7
|
export { SUPPRESS_HOST_OUTPUT_MARKER, isHostOutputSuppressed, suppressHostOutput, type SuppressedHostOutput, } from "../core/output/output-control.js";
|
|
8
|
+
export { encodePmTableRows, decodePmTableRows, type PmTableCellEncoding, type PmEncodedTableRows, } from "./output/table-rows.js";
|
|
8
9
|
/**
|
|
9
10
|
* Serialize object rows as newline-delimited JSON without adding a trailing
|
|
10
11
|
* newline. CLI hosts can append their final newline while SDK consumers can
|
package/dist/sdk/output.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
-
`)}function serializeNdjsonStream(rows,trailer){if(trailer.count!==rows.length)throw new TypeError(`NDJSON trailer count ${trailer.count} does not match ${rows.length} ${rows.length===1?"row":"rows"}.`);for(const[index,row]of rows.entries())if(typeof row=="object"&&row!==null&&!Array.isArray(row)&&Reflect.get(row,"record_type")==="pm.stream.trailer")throw new TypeError(`NDJSON row ${index} uses reserved record_type pm.stream.trailer`);return serializeNdjsonRows([...rows,{...trailer,record_type:"pm.stream.trailer"}])}export{SUPPRESS_HOST_OUTPUT_MARKER,isHostOutputSuppressed,serializeNdjsonRows,serializeNdjsonStream,suppressHostOutput};
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1a6915d3-31fe-5269-b945-caef21172c86")}catch{}})();import{SUPPRESS_HOST_OUTPUT_MARKER,isHostOutputSuppressed,suppressHostOutput}from"../core/output/output-control.js";import{encodePmTableRows,decodePmTableRows}from"./output/table-rows.js";function serializeNdjsonRows(rows){return rows.map((row,index)=>{if(typeof row!="object"||row===null||Array.isArray(row))throw new TypeError(`NDJSON row ${index} must be a non-null object.`);const serialized=JSON.stringify(row);if(serialized===void 0)throw new TypeError(`NDJSON row ${index} must serialize to a non-null object.`);const projected=JSON.parse(serialized);if(typeof projected!="object"||projected===null||Array.isArray(projected))throw new TypeError(`NDJSON row ${index} must serialize to a non-null object.`);return serialized}).join(`
|
|
2
|
+
`)}function serializeNdjsonStream(rows,trailer){if(trailer.count!==rows.length)throw new TypeError(`NDJSON trailer count ${trailer.count} does not match ${rows.length} ${rows.length===1?"row":"rows"}.`);for(const[index,row]of rows.entries())if(typeof row=="object"&&row!==null&&!Array.isArray(row)&&Reflect.get(row,"record_type")==="pm.stream.trailer")throw new TypeError(`NDJSON row ${index} uses reserved record_type pm.stream.trailer`);return serializeNdjsonRows([...rows,{...trailer,record_type:"pm.stream.trailer"}])}export{SUPPRESS_HOST_OUTPUT_MARKER,decodePmTableRows,encodePmTableRows,isHostOutputSuppressed,serializeNdjsonRows,serializeNdjsonStream,suppressHostOutput};
|
|
3
3
|
//# sourceMappingURL=output.js.map
|