@unbrained/pm-cli 2026.11.13 → 2026.11.14
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 +1 -1
- package/dist/cli/register-mutation.js +2 -2
- package/dist/cli/register-operations.js +1 -1
- package/dist/cli-bundle/bundle-manifest.json +1 -1
- package/dist/cli-bundle/chunks/{chunk-O6PBQMD7.js → chunk-25BUKX4W.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-O6T24Z3M.js → chunk-27FG6ROB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5LG5YZYF.js → chunk-547OEGDR.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FAYX6C7H.js → chunk-5TGFB34A.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GWVP23RZ.js → chunk-65SBMIK6.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LKVFPQNY.js → chunk-AXTUB74T.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-L4F4ZHGR.js → chunk-BHH65KLL.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-C7M54YV6.js +122 -0
- package/dist/cli-bundle/chunks/{chunk-QSSENTXG.js → chunk-DMWL3K4A.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-36E4L2R4.js → chunk-DVN7CD5B.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4WD4CHVH.js → chunk-DZ7CWUVM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GXGMMIZN.js → chunk-EXO4PM5J.js} +50 -44
- package/dist/cli-bundle/chunks/chunk-FRCNYOTG.js +9 -0
- package/dist/cli-bundle/chunks/chunk-HXECILIE.js +31 -0
- package/dist/cli-bundle/chunks/{chunk-UYARS5XF.js → chunk-IDFRGH4X.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-URWNUZQZ.js → chunk-JSTBYDLL.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UFZQPKQS.js → chunk-MELSYAFE.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-OQCVU2SG.js → chunk-OTM6PXZQ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-COTC2QOR.js → chunk-PC5DGK3C.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6UXBWMEM.js → chunk-PF3V443A.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CO7RWLCM.js → chunk-U2HVJVA5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-PUU5DXSV.js → chunk-V2OAXGHK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IYDIPXBO.js → chunk-VERRDW3Q.js} +2 -2
- package/dist/cli-bundle/chunks/{item-revision-G5OVYGZ5.js → item-revision-VGIHIWZM.js} +2 -2
- package/dist/cli-bundle/chunks/item-transaction-6OB6BGTD.js +2 -0
- package/dist/cli-bundle/chunks/{mutation-admission-SET4KY73.js → mutation-admission-LL6SGQYU.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-JNJY2D3N.js → register-list-query-MCNOV6ML.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-WTHZHPOP.js → register-mutation-KYXLYHOK.js} +4 -4
- package/dist/cli-bundle/chunks/register-operations-6RQF6IAE.js +2 -0
- package/dist/cli-bundle/chunks/{register-setup-THFZP23A.js → register-setup-XGPOFFD3.js} +2 -2
- package/dist/cli-bundle/chunks/{stage-JXJILTYE.js → stage-ZS7WNUD4.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-2A4JCFMI.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-FNIX62V6.js → chunk-2T6MQ7NP.js} +3 -3
- package/dist/cli-bundle/focused-chunks/chunk-32QYILXW.js +82 -0
- package/dist/cli-bundle/focused-chunks/{chunk-4LFE3FQL.js → chunk-3SUKWYR2.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-4WOF3Q6R.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-5IQPFV4Y.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-RIMNSVFA.js → chunk-6C7NBJ7A.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-JR75B6HU.js → chunk-7KNF6RCV.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-Q3OA5OAK.js → chunk-EAYRYXA6.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-VGFKTSGY.js → chunk-EH7JKGDH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-ZJF6ZA7B.js → chunk-EXCVUBAE.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-3MB47JLT.js → chunk-FNLOLNPQ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-HRLGC3P7.js +28 -0
- package/dist/cli-bundle/focused-chunks/{chunk-IYV3IPRF.js → chunk-I7A5VP5E.js} +56 -56
- package/dist/cli-bundle/focused-chunks/{chunk-CSKDIMQP.js → chunk-JHC3X43E.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-VTOTZ5UC.js → chunk-MKYNDWT3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-WFVZ7GGR.js → chunk-RDTHL44U.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-TVJ2PHAK.js → chunk-TA4EGVE6.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-ADBFVDTG.js → chunk-UCCLV5GJ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-W3RWCLEU.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-W57DSFSU.js +44 -0
- package/dist/cli-bundle/focused-chunks/{chunk-J3LQQP3N.js → chunk-YNYO7PMT.js} +4 -4
- package/dist/cli-bundle/focused-chunks/{item-revision-IF7E7BVY.js → item-revision-7J7WSCPC.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{item-transaction-5TFWIOXI.js → item-transaction-F5YMCPRB.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{mutation-admission-KELM46JF.js → mutation-admission-2NRQEAOG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{stage-UAKMQTCI.js → stage-2KVCKOGC.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 +2 -2
- package/dist/cli-bundle/sdk-core.js +1 -1
- 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 +57 -57
- 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 +11 -11
- package/dist/core/item/item-format-version.d.ts +6 -5
- package/dist/core/item/item-format-version.js +1 -1
- package/dist/core/item/item-format.js +1 -1
- package/dist/core/lock/lock.js +3 -3
- package/dist/core/output/linked-test-projection.js +6 -0
- package/dist/core/output/output.js +7 -5
- package/dist/core/session/session-state.js +1 -1
- package/dist/core/shared/text-normalization.d.ts +24 -0
- package/dist/core/shared/text-normalization.js +1 -1
- package/dist/core/shared/url-credentials.js +1 -1
- package/dist/core/test/run-selectors.d.ts +3 -1
- package/dist/core/test/run-selectors.js +1 -1
- package/dist/sdk/annotations.js +1 -1
- package/dist/sdk/cli-contracts/completeness.js +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +1 -1
- package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +1 -1
- package/dist/sdk/cli-contracts/tool-schema.d.ts +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +1 -1
- package/dist/sdk/completion/bash.js +1 -1
- package/dist/sdk/completion/fish.js +4 -1
- package/dist/sdk/completion/zsh.js +4 -1
- package/dist/sdk/context-intent-contracts.js +1 -1
- package/dist/sdk/docs.d.ts +3 -1
- package/dist/sdk/docs.js +1 -1
- package/dist/sdk/environment/project-runtime-compatibility.d.ts +8 -1
- package/dist/sdk/environment/project-runtime-compatibility.js +2 -2
- package/dist/sdk/files.d.ts +3 -1
- package/dist/sdk/files.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -1
- package/dist/sdk/guide-topics.js +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/lifecycle/claim.d.ts +5 -1
- package/dist/sdk/lifecycle/claim.js +1 -1
- package/dist/sdk/lifecycle/create.js +1 -1
- package/dist/sdk/lifecycle/mutation-facet-contracts.js +1 -1
- package/dist/sdk/lifecycle/plan.js +1 -1
- package/dist/sdk/linked-artifacts.d.ts +45 -3
- package/dist/sdk/linked-artifacts.js +2 -2
- package/dist/sdk/output/table-rows.d.ts +28 -4
- package/dist/sdk/output/table-rows.js +1 -1
- package/dist/sdk/output.d.ts +1 -1
- package/dist/sdk/output.js +1 -1
- package/dist/sdk/package-import-adapters.js +1 -1
- package/dist/sdk/pagination.js +1 -1
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/read-output/continuation.js +1 -1
- package/dist/sdk/read-output-budget.js +1 -1
- package/dist/sdk/test/batch.d.ts +5 -2
- package/dist/sdk/test/batch.js +2 -2
- package/dist/sdk/test/command-args.js +1 -1
- package/dist/sdk/test/entry.js +2 -2
- package/dist/sdk/test/execution.d.ts +10 -7
- package/dist/sdk/test/execution.js +2 -2
- package/dist/sdk/test/parsers.js +1 -1
- package/dist/sdk/test/prerequisites.d.ts +1 -1
- package/dist/sdk/test/prerequisites.js +1 -1
- package/dist/sdk/test/run-phases.d.ts +44 -0
- package/dist/sdk/test/run-phases.js +2 -0
- package/dist/types.d.ts +3 -1
- package/dist/types.js +1 -1
- package/docs/AGENT_OUTPUT_ENCODINGS.md +16 -4
- package/docs/COMMANDS.md +22 -4
- package/docs/LINKED_TEST_EDITS.md +2 -1
- package/docs/OUTPUT_PROJECTION_CONTRACTS.md +6 -3
- package/docs/README.md +2 -2
- package/docs/READ_OUTPUT_CONTRACTS.md +23 -2
- package/docs/SDK.md +18 -1
- package/docs/TESTING.md +64 -1
- package/docs/WORKSPACE_CONCURRENCY.md +5 -1
- package/docs/generated/FLAG_LEXICON_BUDGETS.md +8 -8
- package/marketplace.json +1 -1
- package/package.json +1 -2
- 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 +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/pm-codex/package.json +1 -1
- package/plugins/pm-codex/plugin.json +1 -1
- package/runtime-dependencies.json +1 -1
- package/CHANGELOG.md +0 -4793
- package/dist/cli-bundle/chunks/chunk-GIAJX2QJ.js +0 -9
- package/dist/cli-bundle/chunks/chunk-HQINCDF6.js +0 -116
- package/dist/cli-bundle/chunks/chunk-TCYIGAQG.js +0 -31
- package/dist/cli-bundle/chunks/item-transaction-I2X2P4TW.js +0 -2
- package/dist/cli-bundle/chunks/register-operations-EZP3EG6A.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-2ZPGEGTB.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-5KTOMFLR.js +0 -44
- package/dist/cli-bundle/focused-chunks/chunk-5NTLNE54.js +0 -26
- package/dist/cli-bundle/focused-chunks/chunk-QGQJBQCH.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-VGJDKDKA.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-VGUQ4V47.js +0 -82
- package/dist/cli-bundle/focused-chunks/chunk-ZOGEQFGH.js +0 -2
package/dist/sdk/pagination.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]="9c5d8732-3e10-5224-a558-e870397090f2")}catch{}})();import{READ_OUTPUT_DIMENSION_FLAGS,READ_OUTPUT_COMPOSITION_FLAGS}from"./read-output/options.js";import{createHash}from"node:crypto";import{PmCliError}from"../core/shared/errors.js";import{EXIT_CODE}from"../core/shared/constants.js";import{stableStringify}from"../core/shared/serialization.js";import{isCompactedCursorArgument}from"../core/shared/text-normalization.js";import{decodeReadOutputContinuationCursor}from"./read-output/continuation.js";const QUERY_CURSOR_VERSION=1,MAX_CURSOR_LENGTH=4096,BASE64URL_PATTERN=/^[A-Za-z0-9_-]+$/;function optionKeyForFlag(flag){return flag.replace(/^--/u,"").replace(/[-_]([a-z0-9])/gu,(_,character)=>character.toUpperCase())}function selectCursorSemanticOptions(options,contracts){const universalFlags=[...Object.values(READ_OUTPUT_DIMENSION_FLAGS),...READ_OUTPUT_COMPOSITION_FLAGS],presentationKeys=new Set(universalFlags.flatMap(flag=>[optionKeyForFlag(flag),flag.slice(2).replaceAll("-","_")]));for(const contract of contracts)if(contract.cursor_semantics==="presentation"){presentationKeys.add(optionKeyForFlag(contract.flag));for(const alias of contract.aliases??[])presentationKeys.add(optionKeyForFlag(alias))}return Object.fromEntries(Object.entries(options).filter(([key])=>!presentationKeys.has(key)))}function createQueryFingerprint(command,contract){return createHash("sha256").update(command).update("\0").update(stableStringify(contract)).digest("hex").slice(0,24)}function encodeQueryCursor(fingerprint,afterId,afterIndex,snapshot){return Buffer.from(JSON.stringify({version:QUERY_CURSOR_VERSION,fingerprint,after_id:afterId,...afterIndex===void 0?{}:{after_index:afterIndex},...snapshot===void 0?{}:{snapshot}})).toString("base64url")}function invalidCursor(message,cursorFlag){return new PmCliError(message,EXIT_CODE.USAGE,{code:"invalid_query_cursor",nextSteps:[`Repeat the original query without ${cursorFlag} to obtain a fresh cursor.`]})}function compactedCursor(cursorFlag){return new PmCliError("Query cursor was shortened by output compaction: it contains an ellipsis, which no cursor encoder emits.",EXIT_CODE.USAGE,{code:"invalid_query_cursor",reason:"cursor_compacted",required:"Pass the whole cursor the previous page emitted; a shortened cursor cannot resume the query.",nextSteps:[`Re-read the previous page with a larger --output-budget (or --output-budget unbounded) and pass its whole next_cursor to ${cursorFlag}.`,`Or repeat the original query without ${cursorFlag} to obtain a fresh cursor.`]})}function isQueryCursorEnvelope(value){if(typeof value!="object"||value===null||Array.isArray(value))return!1;const envelope=value;return envelope.version===QUERY_CURSOR_VERSION&&typeof envelope.fingerprint=="string"&&typeof envelope.after_id=="string"&&envelope.after_id.length>0&&(envelope.after_index===void 0||Number.isSafeInteger(envelope.after_index)&&envelope.after_index>=0)&&(envelope.snapshot===void 0||typeof envelope.snapshot=="string"&&envelope.snapshot.length>0)}function decodeQueryCursorEnvelope(cursor,cursorFlag="--after"){if(typeof cursor!="string")throw invalidCursor("Query cursor is malformed.",cursorFlag);const normalized=cursor.trim();if(isCompactedCursorArgument(normalized))throw compactedCursor(cursorFlag);if(normalized.length===0||normalized.length>MAX_CURSOR_LENGTH||!BASE64URL_PATTERN.test(normalized))throw invalidCursor("Query cursor is malformed.",cursorFlag);let parsed;try{parsed=JSON.parse(Buffer.from(normalized,"base64url").toString("utf8"))}catch{throw invalidCursor("Query cursor is malformed.",cursorFlag)}if(!isQueryCursorEnvelope(parsed)){let outputCursor=!1;try{decodeReadOutputContinuationCursor(normalized),outputCursor=!0}catch{}throw outputCursor?new PmCliError(`An output cursor must be continued with --output-cursor, not ${cursorFlag}.`,EXIT_CODE.USAGE,{code:"invalid_query_cursor",nextSteps:[`Repeat the same query, replacing ${cursorFlag} with --output-cursor ${normalized}; retain any producer ${cursorFlag} cursor from the original page.`]}):invalidCursor("Query cursor version or payload is unsupported.",cursorFlag)}return parsed}function decodeQueryCursorState(cursor,expectedFingerprint,cursorFlag="--after"){const envelope=decodeQueryCursorEnvelope(cursor,cursorFlag);if(envelope.fingerprint!==expectedFingerprint)throw invalidCursor(`Query cursor does not match the current filters, sort, or query (${envelope.fingerprint} != ${expectedFingerprint}).`,cursorFlag);return{after_id:envelope.after_id,...envelope.after_index===void 0?{}:{after_index:envelope.after_index},...envelope.snapshot===void 0?{}:{snapshot:envelope.snapshot}}}function decodeQueryCursor(cursor,expectedFingerprint){return decodeQueryCursorState(cursor,expectedFingerprint).after_id}function resolveQueryCursorStart(rows,cursor,fingerprint,readId,cursorFlag="--after"){if(cursor===void 0)return 0;const state=decodeQueryCursorState(cursor,fingerprint,cursorFlag),index=rows.findIndex(row=>readId(row)===state.after_id);if(index<0){if(state.after_index!==void 0)return Math.min(state.after_index,rows.length);throw invalidCursor(`Query cursor item ${state.after_id} is no longer present in this result set.`,cursorFlag)}return index+1}function paginateQueryRows(rows,options){if(options.cursor!==void 0&&decodeQueryCursorState(options.cursor,options.fingerprint).snapshot!==options.snapshot)throw invalidCursor("Query cursor does not match the requested snapshot.","--after");const pageStart=resolveQueryCursorStart(rows,options.cursor,options.fingerprint,options.readId),pageRows=rows.slice(pageStart,pageStart+options.limit),hasMore=pageRows.length>0&&pageStart+pageRows.length<rows.length,lastRow=pageRows.at(-1);return{rows:pageRows,has_more:hasMore,...hasMore&&lastRow!==void 0?{next_cursor:encodeQueryCursor(options.fingerprint,options.readId(lastRow),pageStart+pageRows.length-1,options.snapshot)}:{}}}const QUERY_CURSOR_CONTRACT=Object.freeze({version:QUERY_CURSOR_VERSION,max_length:MAX_CURSOR_LENGTH});export{QUERY_CURSOR_CONTRACT,createQueryFingerprint,decodeQueryCursor,decodeQueryCursorEnvelope,decodeQueryCursorState,encodeQueryCursor,paginateQueryRows,resolveQueryCursorStart,selectCursorSemanticOptions};
|
|
2
2
|
//# sourceMappingURL=pagination.js.map
|