@chrok/braid 0.1.1 → 0.1.2
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/CHANGELOG.md +8 -0
- package/CONTRIBUTING.md +11 -4
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -0
- package/docs/compatibility.md +10 -4
- package/docs/releasing.md +12 -5
- package/docs/repository-settings.md +2 -1
- package/package.json +11 -7
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.1.2 — 2026-09-27
|
|
6
|
+
|
|
7
|
+
- Make Pi depend on the exact `@chrok/braid` version instead of bundling core.
|
|
8
|
+
Export shared model-adapter helpers from the existing root entry point.
|
|
9
|
+
- Use one npm workspace lockfile and a development-only local core link; test
|
|
10
|
+
Pi-only installation against the unpublished core tarball outside the checkout.
|
|
11
|
+
- Wait for core registry metadata and tarball availability before publishing Pi.
|
|
12
|
+
|
|
5
13
|
## 0.1.1 — 2026-09-27
|
|
6
14
|
|
|
7
15
|
- Validate the Pi integration against Pi 0.87.1; update GitHub Actions and tsx.
|
package/CONTRIBUTING.md
CHANGED
|
@@ -12,13 +12,20 @@ Use Node.js 22.19+ and npm. From a fresh checkout:
|
|
|
12
12
|
git clone https://github.com/Epsirom/braid.git
|
|
13
13
|
cd braid
|
|
14
14
|
npm ci
|
|
15
|
-
npm ci --prefix integrations/pi
|
|
16
15
|
npm run verify
|
|
17
16
|
```
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
The root npm workspace lockfile covers both packages. A development-only
|
|
19
|
+
`@chrok/braid: file:.` dependency links the core checkout into `node_modules`;
|
|
20
|
+
Pi's manifest still declares the exact release version. This lets CI test a
|
|
21
|
+
new core before it is published. `check:pi`, `test:pi`, and `build:pi` rebuild
|
|
22
|
+
core so package imports resolve current JavaScript and declarations. Consumers
|
|
23
|
+
installing either published package do not install this development dependency.
|
|
24
|
+
Use `npm install --workspace @chrok/pi-braid <dependency>` for Pi dependency
|
|
25
|
+
updates; do not create a separate lockfile in `integrations/pi`.
|
|
26
|
+
|
|
27
|
+
The core has no runtime dependencies. Pi's dependencies belong in its workspace
|
|
28
|
+
manifest. Update and commit the root lockfile when changing a dependency. Do not commit generated `dist` directories,
|
|
22
29
|
tarballs, credentials, or provider output containing private data.
|
|
23
30
|
|
|
24
31
|
`verify` type-checks both packages, runs deterministic tests and offline examples,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { braid } from "./runtime.js";
|
|
2
2
|
export { validateGraph, GraphValidationError } from "./validate.js";
|
|
3
3
|
export type { BraidInput, BraidNode, BraidOptions, BraidResult, DecisionNode, Edge, ExecuteNode, ExecutionContext, ExecutionError, ExecutionEvent, ModelRequest, ModelResponse, ModelRunner, MergeNode, MergeDisposition, MergeSource, GitPreview, SourceCheckoutStatus, NodeWorkspace, GitResult, NodeOutput, NodeResult, NodeStatus, PredecessorOutput, TokenUsage, } from "./types.js";
|
|
4
|
+
export { formatBudgetReminder } from "./budgets.js";
|
|
5
|
+
export { gitToolDefinition, finishMergeToolDefinition, mergeInstructions, parseGitToolArguments, parseFinishMergeArguments, } from "./merge-tools.js";
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
export { braid } from "./runtime.js";
|
|
2
2
|
export { validateGraph, GraphValidationError } from "./validate.js";
|
|
3
|
+
// Shared helpers for model adapters, including the Pi integration.
|
|
4
|
+
export { formatBudgetReminder } from "./budgets.js";
|
|
5
|
+
export { gitToolDefinition, finishMergeToolDefinition, mergeInstructions, parseGitToolArguments, parseFinishMergeArguments, } from "./merge-tools.js";
|
package/docs/compatibility.md
CHANGED
|
@@ -23,8 +23,9 @@ exactly one automatic continuation when a job finishes during `agent_settled`.
|
|
|
23
23
|
This covers the Pi 0.86/0.87 transcript and settling changes without provider
|
|
24
24
|
credentials or network model calls. Version 0.1.0 was originally validated with
|
|
25
25
|
Pi 0.85.1; the current checkout's pinned validation target is 0.87.1.
|
|
26
|
-
The Pi npm package
|
|
27
|
-
core
|
|
26
|
+
The Pi npm package declares an exact dependency on the matching `@chrok/braid`
|
|
27
|
+
release. npm installs the core automatically; Pi does not bundle another copy of
|
|
28
|
+
its runtime and does not need a source checkout.
|
|
28
29
|
|
|
29
30
|
Git must be installed for workspace execution inside a Git checkout. Non-Git
|
|
30
31
|
text-only runs do not require Git workspace management.
|
|
@@ -36,8 +37,13 @@ preserve documented behavior; breaking API or semantic changes require a minor
|
|
|
36
37
|
version bump, a changelog entry, and migration guidance. New optional fields or
|
|
37
38
|
fixes that restore the documented contract may ship in a patch.
|
|
38
39
|
|
|
39
|
-
Supported core entry points are `@chrok/braid` and `@chrok/braid/adapters/openai`.
|
|
40
|
-
|
|
40
|
+
Supported core entry points are `@chrok/braid` and `@chrok/braid/adapters/openai`.
|
|
41
|
+
The root `@chrok/braid` entry point also exports adapter helpers:
|
|
42
|
+
`formatBudgetReminder`, `gitToolDefinition`, `finishMergeToolDefinition`,
|
|
43
|
+
`mergeInstructions`, `parseGitToolArguments`, and `parseFinishMergeArguments`.
|
|
44
|
+
These helpers share the core's compatibility policy; Git workspace implementation
|
|
45
|
+
classes remain internal. Internal files and Pi helper classes are not stable
|
|
46
|
+
public APIs. Documented result/error
|
|
41
47
|
fields, routing behavior, `ModelRunner`, and existing event meanings are part of
|
|
42
48
|
the public contract. Consumers should ignore new diagnostic fields and provide a
|
|
43
49
|
fallback for new event types; event sequence numbers order events within a run,
|
package/docs/releasing.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Releasing
|
|
2
2
|
|
|
3
3
|
Core and Pi are separate public npm packages built from one commit. Both use the
|
|
4
|
-
same version. The core has no runtime dependencies. Pi
|
|
5
|
-
|
|
4
|
+
same version. The core has no runtime dependencies. Pi declares an exact
|
|
5
|
+
`@chrok/braid` dependency and includes only its own compiled integration code.
|
|
6
6
|
|
|
7
7
|
## Prepare a release
|
|
8
8
|
|
|
@@ -10,11 +10,14 @@ Version tags (`v*`) cannot be moved or deleted. New GitHub releases are immutabl
|
|
|
10
10
|
prepare a draft and attach any assets before publishing. Published tag/asset
|
|
11
11
|
corrections require a new version. See [repository settings](repository-settings.md).
|
|
12
12
|
|
|
13
|
-
1. Update both `package.json` versions
|
|
13
|
+
1. Update both `package.json` versions, Pi's exact `@chrok/braid` dependency,
|
|
14
|
+
and the root workspace lockfile (`npm install --package-lock-only`). Use a minor version
|
|
14
15
|
for breaking 0.x changes, and describe migrations in the changelog.
|
|
15
|
-
2. Run `npm ci
|
|
16
|
+
2. Run `npm ci` and `npm run verify` from the repository root.
|
|
16
17
|
The package check verifies clean builds, public ESM imports, declarations,
|
|
17
18
|
licenses, and Pi registration in a temporary consumer outside the checkout.
|
|
19
|
+
A temporary local registry serves the unpublished core tarball; installing
|
|
20
|
+
only the Pi tarball must fetch core transitively through its version dependency.
|
|
18
21
|
3. Update the changelog and supported Pi version. Commit and review the changes;
|
|
19
22
|
require the CI matrix to pass before tagging that commit `vX.Y.Z`.
|
|
20
23
|
4. Inspect `npm pack --dry-run` and `npm pack --dry-run` from `integrations/pi`.
|
|
@@ -64,7 +67,11 @@ npm trust list @chrok/pi-braid
|
|
|
64
67
|
|
|
65
68
|
Publishing a non-prerelease GitHub release triggers `.github/workflows/release.yml`.
|
|
66
69
|
It validates the tag/version relationship, repeats all checks, and publishes
|
|
67
|
-
core then Pi using short-lived OIDC credentials.
|
|
70
|
+
core then Pi using short-lived OIDC credentials. After each publish (or retry
|
|
71
|
+
of an existing version), it waits for matching version/commit metadata and a
|
|
72
|
+
successful tarball download. Pi is not published until core is available. npm
|
|
73
|
+
processing is polled every 15 seconds for up to 10 minutes; a timeout fails the
|
|
74
|
+
workflow with retry instructions. It does not require `NPM_TOKEN`.
|
|
68
75
|
The workflow installs npm 11 and uses Node 24. See
|
|
69
76
|
[npm's trusted publishing documentation](https://docs.npmjs.com/trusted-publishers/).
|
|
70
77
|
|
|
@@ -68,7 +68,8 @@ sign-off nor a CLA is required for contributions.
|
|
|
68
68
|
|
|
69
69
|
## Dependency maintenance
|
|
70
70
|
|
|
71
|
-
Dependabot checks both npm manifests
|
|
71
|
+
Dependabot checks both npm workspace manifests through the root lockfile weekly.
|
|
72
|
+
The internal `@chrok/braid` dependency is updated by the coordinated release process. Pi host packages stay in a separate
|
|
72
73
|
group because even 0.x minor releases can change extension contracts. Other npm
|
|
73
74
|
minor/patch updates are grouped; GitHub Actions updates are grouped monthly and
|
|
74
75
|
retain full commit SHA pins. Grouping does not enable automatic merging.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chrok/braid",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "A small, framework-agnostic DAG runtime for isolated model invocations",
|
|
6
6
|
"type": "module",
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "node scripts/build.mjs",
|
|
34
34
|
"check": "tsc --noEmit",
|
|
35
|
-
"test": "tsx --test test/*.test.ts",
|
|
35
|
+
"test": "tsx --test test/*.test.ts test/*.test.mjs",
|
|
36
36
|
"demo": "tsx examples/basic.ts",
|
|
37
|
-
"check:pi": "npm
|
|
38
|
-
"test:pi": "npm --
|
|
37
|
+
"check:pi": "npm run build && npm run check --workspace @chrok/pi-braid",
|
|
38
|
+
"test:pi": "npm run build && npm test --workspace @chrok/pi-braid",
|
|
39
39
|
"prepack": "npm run build",
|
|
40
|
-
"build:pi": "npm --
|
|
40
|
+
"build:pi": "npm run build --workspace @chrok/pi-braid",
|
|
41
41
|
"test:package": "node scripts/package-smoke.mjs",
|
|
42
42
|
"verify": "npm run check && npm test && npm run check:pi && npm run test:pi && npm run examples && npm run test:package",
|
|
43
43
|
"examples": "tsx examples/basic.ts && tsx examples/code-review.ts && tsx examples/failure-handling.ts && tsx examples/custom-runner.ts",
|
|
@@ -48,7 +48,8 @@
|
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/node": "^22.0.0",
|
|
50
50
|
"tsx": "^4.23.15",
|
|
51
|
-
"typescript": "^5.0.0"
|
|
51
|
+
"typescript": "^5.0.0",
|
|
52
|
+
"@chrok/braid": "file:."
|
|
52
53
|
},
|
|
53
54
|
"repository": {
|
|
54
55
|
"type": "git",
|
|
@@ -68,5 +69,8 @@
|
|
|
68
69
|
"publishConfig": {
|
|
69
70
|
"access": "public",
|
|
70
71
|
"registry": "https://registry.npmjs.org"
|
|
71
|
-
}
|
|
72
|
+
},
|
|
73
|
+
"workspaces": [
|
|
74
|
+
"integrations/pi"
|
|
75
|
+
]
|
|
72
76
|
}
|