vouchington-tooling 0.11.2 → 0.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/README.md CHANGED
@@ -215,6 +215,7 @@ import {
215
215
  import { runRetrospectiveTranscript } from 'vouchington-tooling/retrospective-transcript'
216
216
  import { appendJournal, probeBlackboard } from 'vouchington-tooling/agent-blackboard'
217
217
  import { buildSessionFrictionReport, recordFriction } from 'vouchington-tooling/session-friction'
218
+ import { GITHUB_BODY_MAX_CHARACTERS, validateGitHubBodyLength } from 'vouchington-tooling'
218
219
  import { createPullRequest, getDiffAgainstBase, runGh, runGit } from 'vouchington-tooling/gh-cli'
219
220
  import {
220
221
  shellScriptViolations,
@@ -231,6 +232,10 @@ throws on a `run:` value that is a YAML alias or a multiline PLAIN scalar, shape
231
232
  scan safely. Both functions scan already-in-scope source text — deciding which files count as a
232
233
  shell script or a workflow/action YAML file is left to the caller.
233
234
 
235
+ `validateGitHubBodyLength` measures an issue or pull-request body against GitHub's 65,536 Unicode
236
+ code-point limit without altering it. Its result includes the UTF-8 byte count for diagnostics; that
237
+ byte count is not a validation limit.
238
+
234
239
  `agent-harness-config` merges classifier-auto and sandbox keys into Claude, Codex, Grok, and Cursor
235
240
  config files. See [docs/agent-harness-config.md](./docs/agent-harness-config.md). `--global` updates
236
241
  home-directory configs; `--repo` updates a checkout. It does not copy allowlists, hooks, or plugins.
@@ -0,0 +1,15 @@
1
+ /** GitHub's maximum issue or pull-request body length, counted in Unicode code points. */
2
+ export declare const GITHUB_BODY_MAX_CHARACTERS = 65536;
3
+ /** The measured GitHub body length and whether it fits within GitHub's character limit. */
4
+ export interface GitHubBodyLengthValidation {
5
+ readonly ok: boolean;
6
+ readonly characterCount: number;
7
+ readonly utf8ByteCount: number;
8
+ readonly maxCharacterCount: number;
9
+ }
10
+ /**
11
+ * Measures a GitHub issue or pull-request body without altering its content.
12
+ *
13
+ * GitHub's limit is evaluated in Unicode code points. UTF-8 bytes are returned only for diagnostics.
14
+ */
15
+ export declare function validateGitHubBodyLength(body: string): GitHubBodyLengthValidation;
@@ -0,0 +1,16 @@
1
+ /** GitHub's maximum issue or pull-request body length, counted in Unicode code points. */
2
+ export const GITHUB_BODY_MAX_CHARACTERS = 65_536;
3
+ /**
4
+ * Measures a GitHub issue or pull-request body without altering its content.
5
+ *
6
+ * GitHub's limit is evaluated in Unicode code points. UTF-8 bytes are returned only for diagnostics.
7
+ */
8
+ export function validateGitHubBodyLength(body) {
9
+ const characterCount = Array.from(body).length;
10
+ return {
11
+ ok: characterCount <= GITHUB_BODY_MAX_CHARACTERS,
12
+ characterCount,
13
+ utf8ByteCount: Buffer.byteLength(body, 'utf8'),
14
+ maxCharacterCount: GITHUB_BODY_MAX_CHARACTERS,
15
+ };
16
+ }
@@ -1,5 +1,7 @@
1
1
  export { createCommandRunner, runGh, runGit } from './exec.mts';
2
2
  export type { ExecFileText, RunTextCommand } from './exec.mts';
3
3
  export { getDiffAgainstBase } from './diff.mts';
4
+ export { GITHUB_BODY_MAX_CHARACTERS, validateGitHubBodyLength } from './body-length.mts';
5
+ export type { GitHubBodyLengthValidation } from './body-length.mts';
4
6
  export { assertHeadPushed, buildGhPrCreateArgs, createPullRequest, DetachedHeadError, HeadNotPushedError, HeadOutOfDateError, resolveHeadBranch, } from './pr-create.mts';
5
7
  export type { AssertHeadPushedOptions, BuildGhPrCreateArgsOptions, CreatePullRequestExecutors, CreatePullRequestOptions, } from './pr-create.mts';
@@ -1,3 +1,4 @@
1
1
  export { createCommandRunner, runGh, runGit } from './exec.mjs';
2
2
  export { getDiffAgainstBase } from './diff.mjs';
3
+ export { GITHUB_BODY_MAX_CHARACTERS, validateGitHubBodyLength } from './body-length.mjs';
3
4
  export { assertHeadPushed, buildGhPrCreateArgs, createPullRequest, DetachedHeadError, HeadNotPushedError, HeadOutOfDateError, resolveHeadBranch, } from './pr-create.mjs';
package/dist/index.d.mts CHANGED
@@ -89,5 +89,7 @@ export type { DiagnosticReportLimitOptions, DiagnosticReportSummary, } from './v
89
89
  export { createCommandRunner, runGh, runGit } from './gh-cli/index.mts';
90
90
  export type { ExecFileText, RunTextCommand } from './gh-cli/index.mts';
91
91
  export { getDiffAgainstBase } from './gh-cli/index.mts';
92
+ export { GITHUB_BODY_MAX_CHARACTERS, validateGitHubBodyLength } from './gh-cli/index.mts';
93
+ export type { GitHubBodyLengthValidation } from './gh-cli/index.mts';
92
94
  export { assertHeadPushed, buildGhPrCreateArgs, createPullRequest, DetachedHeadError, HeadNotPushedError, HeadOutOfDateError, resolveHeadBranch, } from './gh-cli/index.mts';
93
95
  export type { AssertHeadPushedOptions, BuildGhPrCreateArgsOptions, CreatePullRequestExecutors, CreatePullRequestOptions, } from './gh-cli/index.mts';
package/dist/index.mjs CHANGED
@@ -50,4 +50,5 @@ export { validateResolvedPinDelta } from './swift-resolved-pin-delta/index.mjs';
50
50
  export { DEFAULT_MAX_DIAGNOSTIC_REPORTS, DEFAULT_MAX_FORMATTED_DIAGNOSTIC_REPORTS, formatDiagnosticReportSummaries, HARD_MAX_DIAGNOSTIC_REPORTS, readDiagnosticReportSummaries, summarizeDiagnosticReport, } from './vitest-diagnostics/index.mjs';
51
51
  export { createCommandRunner, runGh, runGit } from './gh-cli/index.mjs';
52
52
  export { getDiffAgainstBase } from './gh-cli/index.mjs';
53
+ export { GITHUB_BODY_MAX_CHARACTERS, validateGitHubBodyLength } from './gh-cli/index.mjs';
53
54
  export { assertHeadPushed, buildGhPrCreateArgs, createPullRequest, DetachedHeadError, HeadNotPushedError, HeadOutOfDateError, resolveHeadBranch, } from './gh-cli/index.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vouchington-tooling",
3
- "version": "0.11.2",
3
+ "version": "0.12.0",
4
4
  "description": "Vouchington CLI and extractable tooling libraries.",
5
5
  "homepage": "https://github.com/vouchington/vouchington-tooling/tree/main/packages/vouchington-tooling#readme",
6
6
  "bugs": {