Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ All notable changes are documented here. This project follows [Semantic Versioni

## Unreleased

## 0.3.0 - 2026-10-17

### Changed

- Upgrade the public runtime schema dependency to Zod 4. The CTL task and wire formats are unchanged, while exported schema declaration types now follow Zod 4.
- Group Vitest and its coverage provider into one compatible dependency update.
- Keep TypeScript and Node.js type definitions on their currently supported major versions.

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ CTL2 is compact serialization, not a privacy boundary. Anyone who can read a pay
Install directly from the immutable public GitHub release tag without registry authentication:

```bash
npm install github:lcherone/ctl2#v0.2.0
npm install github:lcherone/ctl2#v0.3.0
```

Or install from GitHub Packages after authenticating npm for `npm.pkg.github.com`:

```bash
npm config set @lcherone:registry https://npm.pkg.github.com
npm install @lcherone/ctl2@0.2.0
npm install @lcherone/ctl2@0.3.0
```

The runtime supports Node.js 18 and later. The ESM build also works in modern browsers that provide `TextEncoder`.
Expand Down
78 changes: 37 additions & 41 deletions dist/index.d.cts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ import { z } from 'zod';
* - `review`: inspect and report rather than mutate.
* - `test`: add or execute verification work.
*/
declare const operationSchema: z.ZodEnum<["implement", "fix", "refactor", "review", "test"]>;
declare const operationSchema: z.ZodEnum<{
implement: "implement";
fix: "fix";
refactor: "refactor";
review: "review";
test: "test";
}>;
/** A supported task operation inferred from {@link operationSchema}. */
type Operation = z.infer<typeof operationSchema>;
/**
Expand All @@ -28,14 +34,22 @@ type Operation = z.infer<typeof operationSchema>;
* This label is descriptive metadata. CTL2 does not enforce an organisation's
* authorization policy and does not make restricted content private.
*/
declare const classificationSchema: z.ZodEnum<["public", "internal-approved", "restricted"]>;
declare const classificationSchema: z.ZodEnum<{
public: "public";
"internal-approved": "internal-approved";
restricted: "restricted";
}>;
/** A task-context classification inferred from {@link classificationSchema}. */
type ContextClassification = z.infer<typeof classificationSchema>;
/**
* Runtime validator for payload representations supported by
* {@link decodeTransferPayload}.
*/
declare const transferFormatSchema: z.ZodEnum<["ctl", "ctl-abstract", "json"]>;
declare const transferFormatSchema: z.ZodEnum<{
ctl: "ctl";
"ctl-abstract": "ctl-abstract";
json: "json";
}>;
/** A supported transfer representation inferred from {@link transferFormatSchema}. */
type TransferFormat = z.infer<typeof transferFormatSchema>;
/**
Expand Down Expand Up @@ -91,44 +105,26 @@ declare const handoverTaskSchema: z.ZodObject<{
id: z.ZodString;
title: z.ZodString;
objective: z.ZodString;
operation: z.ZodEnum<["implement", "fix", "refactor", "review", "test"]>;
targets: z.ZodArray<z.ZodString, "many">;
requirements: z.ZodArray<z.ZodString, "many">;
acceptanceCriteria: z.ZodArray<z.ZodString, "many">;
constraints: z.ZodArray<z.ZodString, "many">;
verification: z.ZodArray<z.ZodString, "many">;
assumptions: z.ZodArray<z.ZodString, "many">;
exclusions: z.ZodArray<z.ZodString, "many">;
contextClassification: z.ZodEnum<["public", "internal-approved", "restricted"]>;
}, "strict", z.ZodTypeAny, {
version: 1;
id: string;
title: string;
objective: string;
operation: "implement" | "fix" | "refactor" | "review" | "test";
targets: string[];
requirements: string[];
acceptanceCriteria: string[];
constraints: string[];
verification: string[];
assumptions: string[];
exclusions: string[];
contextClassification: "public" | "internal-approved" | "restricted";
}, {
version: 1;
id: string;
title: string;
objective: string;
operation: "implement" | "fix" | "refactor" | "review" | "test";
targets: string[];
requirements: string[];
acceptanceCriteria: string[];
constraints: string[];
verification: string[];
assumptions: string[];
exclusions: string[];
contextClassification: "public" | "internal-approved" | "restricted";
}>;
operation: z.ZodEnum<{
implement: "implement";
fix: "fix";
refactor: "refactor";
review: "review";
test: "test";
}>;
targets: z.ZodArray<z.ZodString>;
requirements: z.ZodArray<z.ZodString>;
acceptanceCriteria: z.ZodArray<z.ZodString>;
constraints: z.ZodArray<z.ZodString>;
verification: z.ZodArray<z.ZodString>;
assumptions: z.ZodArray<z.ZodString>;
exclusions: z.ZodArray<z.ZodString>;
contextClassification: z.ZodEnum<{
public: "public";
"internal-approved": "internal-approved";
restricted: "restricted";
}>;
}, z.core.$strict>;

/**
* Deterministic CTL2 encoding, strict CTL2/CTL1 decoding, and format helpers.
Expand Down
78 changes: 37 additions & 41 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ import { z } from 'zod';
* - `review`: inspect and report rather than mutate.
* - `test`: add or execute verification work.
*/
declare const operationSchema: z.ZodEnum<["implement", "fix", "refactor", "review", "test"]>;
declare const operationSchema: z.ZodEnum<{
implement: "implement";
fix: "fix";
refactor: "refactor";
review: "review";
test: "test";
}>;
/** A supported task operation inferred from {@link operationSchema}. */
type Operation = z.infer<typeof operationSchema>;
/**
Expand All @@ -28,14 +34,22 @@ type Operation = z.infer<typeof operationSchema>;
* This label is descriptive metadata. CTL2 does not enforce an organisation's
* authorization policy and does not make restricted content private.
*/
declare const classificationSchema: z.ZodEnum<["public", "internal-approved", "restricted"]>;
declare const classificationSchema: z.ZodEnum<{
public: "public";
"internal-approved": "internal-approved";
restricted: "restricted";
}>;
/** A task-context classification inferred from {@link classificationSchema}. */
type ContextClassification = z.infer<typeof classificationSchema>;
/**
* Runtime validator for payload representations supported by
* {@link decodeTransferPayload}.
*/
declare const transferFormatSchema: z.ZodEnum<["ctl", "ctl-abstract", "json"]>;
declare const transferFormatSchema: z.ZodEnum<{
ctl: "ctl";
"ctl-abstract": "ctl-abstract";
json: "json";
}>;
/** A supported transfer representation inferred from {@link transferFormatSchema}. */
type TransferFormat = z.infer<typeof transferFormatSchema>;
/**
Expand Down Expand Up @@ -91,44 +105,26 @@ declare const handoverTaskSchema: z.ZodObject<{
id: z.ZodString;
title: z.ZodString;
objective: z.ZodString;
operation: z.ZodEnum<["implement", "fix", "refactor", "review", "test"]>;
targets: z.ZodArray<z.ZodString, "many">;
requirements: z.ZodArray<z.ZodString, "many">;
acceptanceCriteria: z.ZodArray<z.ZodString, "many">;
constraints: z.ZodArray<z.ZodString, "many">;
verification: z.ZodArray<z.ZodString, "many">;
assumptions: z.ZodArray<z.ZodString, "many">;
exclusions: z.ZodArray<z.ZodString, "many">;
contextClassification: z.ZodEnum<["public", "internal-approved", "restricted"]>;
}, "strict", z.ZodTypeAny, {
version: 1;
id: string;
title: string;
objective: string;
operation: "implement" | "fix" | "refactor" | "review" | "test";
targets: string[];
requirements: string[];
acceptanceCriteria: string[];
constraints: string[];
verification: string[];
assumptions: string[];
exclusions: string[];
contextClassification: "public" | "internal-approved" | "restricted";
}, {
version: 1;
id: string;
title: string;
objective: string;
operation: "implement" | "fix" | "refactor" | "review" | "test";
targets: string[];
requirements: string[];
acceptanceCriteria: string[];
constraints: string[];
verification: string[];
assumptions: string[];
exclusions: string[];
contextClassification: "public" | "internal-approved" | "restricted";
}>;
operation: z.ZodEnum<{
implement: "implement";
fix: "fix";
refactor: "refactor";
review: "review";
test: "test";
}>;
targets: z.ZodArray<z.ZodString>;
requirements: z.ZodArray<z.ZodString>;
acceptanceCriteria: z.ZodArray<z.ZodString>;
constraints: z.ZodArray<z.ZodString>;
verification: z.ZodArray<z.ZodString>;
assumptions: z.ZodArray<z.ZodString>;
exclusions: z.ZodArray<z.ZodString>;
contextClassification: z.ZodEnum<{
public: "public";
"internal-approved": "internal-approved";
restricted: "restricted";
}>;
}, z.core.$strict>;

/**
* Deterministic CTL2 encoding, strict CTL2/CTL1 decoding, and format helpers.
Expand Down
2 changes: 1 addition & 1 deletion docs/ADOPTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ For public Git installation, pin an immutable tag:
```json
{
"dependencies": {
"@lcherone/ctl2": "github:lcherone/ctl2#v0.2.0"
"@lcherone/ctl2": "github:lcherone/ctl2#v0.3.0"
}
}
```
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lcherone/ctl2",
"version": "0.2.0",
"version": "0.3.0",
"description": "Deterministic, reversible Compact Task Language serialization for structured AI handovers.",
"license": "MIT",
"author": "Lawrence Cherone",
Expand Down Expand Up @@ -70,7 +70,7 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"zod": "^3.24.2"
"zod": "^4.6.7"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
Expand Down
2 changes: 1 addition & 1 deletion scripts/check-release-tag.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* The release workflow supplies `GITHUB_REF_NAME`. A positional argument is
* also accepted for local verification, for example:
* node scripts/check-release-tag.mjs v0.2.0
* node scripts/check-release-tag.mjs v0.3.0
*/

import { readFileSync } from 'node:fs';
Expand Down
21 changes: 20 additions & 1 deletion typedoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,38 @@
"entryPoints": ["src/index.ts"],
"excludeInternal": true,
"intentionallyNotDocumented": [
"classificationSchema.__type.public",
"classificationSchema.__type.internal-approved",
"classificationSchema.__type.restricted",
"handoverTaskSchema.__type.version",
"handoverTaskSchema.__type.id",
"handoverTaskSchema.__type.title",
"handoverTaskSchema.__type.objective",
"handoverTaskSchema.__type.operation",
"handoverTaskSchema.__type.operation.__type.implement",
"handoverTaskSchema.__type.operation.__type.fix",
"handoverTaskSchema.__type.operation.__type.refactor",
"handoverTaskSchema.__type.operation.__type.review",
"handoverTaskSchema.__type.operation.__type.test",
"handoverTaskSchema.__type.targets",
"handoverTaskSchema.__type.requirements",
"handoverTaskSchema.__type.acceptanceCriteria",
"handoverTaskSchema.__type.constraints",
"handoverTaskSchema.__type.verification",
"handoverTaskSchema.__type.assumptions",
"handoverTaskSchema.__type.exclusions",
"handoverTaskSchema.__type.contextClassification"
"handoverTaskSchema.__type.contextClassification",
"handoverTaskSchema.__type.contextClassification.__type.public",
"handoverTaskSchema.__type.contextClassification.__type.internal-approved",
"handoverTaskSchema.__type.contextClassification.__type.restricted",
"operationSchema.__type.implement",
"operationSchema.__type.fix",
"operationSchema.__type.refactor",
"operationSchema.__type.review",
"operationSchema.__type.test",
"transferFormatSchema.__type.ctl",
"transferFormatSchema.__type.ctl-abstract",
"transferFormatSchema.__type.json"
],
"treatWarningsAsErrors": true,
"treatValidationWarningsAsErrors": true,
Expand Down
Loading