@open-mercato/cezar 0.9.1-pr699.831 → 0.9.1-pr705.839
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 +6 -6
- package/dist/release/manifests.d.ts +72 -0
- package/dist/release/manifests.js +73 -0
- package/dist/release/manifests.js.map +1 -0
- package/dist/release/snapshot.d.ts +9 -23
- package/dist/release/snapshot.js +9 -22
- package/dist/release/snapshot.js.map +1 -1
- package/dist/release/stable.d.ts +15 -29
- package/dist/release/stable.js +14 -27
- package/dist/release/stable.js.map +1 -1
- package/dist/server/app-type.d.ts +20 -0
- package/dist/server/app-type.js +2 -0
- package/dist/server/app-type.js.map +1 -0
- package/dist/server/server.d.ts +577 -1
- package/dist/server/server.js +129 -38
- package/dist/server/server.js.map +1 -1
- package/package.json +13 -38
- package/scripts/sync-readme.mjs +20 -0
- package/web/dist/assets/{compare-variants-TJKdzfN5.js → compare-variants-KyucddH5.js} +1 -1
- package/web/dist/assets/{diff-C_yn0zu7.js → diff-B1TroQje.js} +2 -2
- package/web/dist/assets/{diff-view-Q8IZyESb.js → diff-view-RF_nCX4u.js} +1 -1
- package/web/dist/assets/{git-toolbar-Cu7gVPaW.js → git-toolbar-B4anIwhb.js} +1 -1
- package/web/dist/assets/{github-aV7xX6c8.js → github-CGinvMbL.js} +1 -1
- package/web/dist/assets/{index-DJykuw06.js → index-dVJvf20I.js} +9 -9
- package/web/dist/assets/{repo-git-k2vUa8Hh.js → repo-git-iSctu2IP.js} +1 -1
- package/web/dist/assets/{run-diff-DYFvDbXj.js → run-diff-BPsHpM-r.js} +1 -1
- package/web/dist/assets/{run-header-CsBw8BWJ.js → run-header-ConQmEVL.js} +1 -1
- package/web/dist/assets/{skills-ClWzchtu.js → skills-B0FbvF2c.js} +1 -1
- package/web/dist/assets/{task-changes-ExT5fFjr.js → task-changes-BDZzCnVO.js} +1 -1
- package/web/dist/assets/{task-commits-B-3Sria4.js → task-commits-BWzyRCnM.js} +1 -1
- package/web/dist/assets/{task-files-Cv1ld-ys.js → task-files-Bql05Mu3.js} +1 -1
- package/web/dist/assets/task-thread-D_gXgug0.js +9 -0
- package/web/dist/assets/{use-desktop-BNLp1il6.js → use-desktop-BxN_DAYI.js} +1 -1
- package/web/dist/assets/{workflows-OvfJ-Mdi.js → workflows-D-KuxA7g.js} +1 -1
- package/web/dist/index.html +2 -2
- package/scripts/dev.mjs +0 -74
- package/scripts/release-snapshot.mjs +0 -130
- package/scripts/release.mjs +0 -119
- package/web/dist/assets/open-mercato-toBr6SOa.svg +0 -11
- package/web/dist/assets/task-thread-DLg0najW.js +0 -9
- /package/web/{open-mercato.svg → dist/open-mercato.svg} +0 -0
package/README.md
CHANGED
|
@@ -497,7 +497,7 @@ Parallel variants (×2/×3) of one task share that task's backend — mixing
|
|
|
497
497
|
happens per task and per step, not inside a variant group.
|
|
498
498
|
|
|
499
499
|
The seam is deliberately small: a backend is one class implementing the
|
|
500
|
-
`AgentRunner` interface (`src/core/agent-runner.ts`) that turns a prompt into
|
|
500
|
+
`AgentRunner` interface (`packages/cezar/src/core/agent-runner.ts`) that turns a prompt into
|
|
501
501
|
a stream of normalized events. Other CLIs — pi, aider, whatever ships next —
|
|
502
502
|
can slot in the same way.
|
|
503
503
|
|
|
@@ -613,8 +613,8 @@ cd cezar
|
|
|
613
613
|
npm install
|
|
614
614
|
```
|
|
615
615
|
|
|
616
|
-
**3. Build** — compiles the server (`tsc → dist/`) and the cockpit
|
|
617
|
-
(`vite build → web/dist/`), then runs the pack gate:
|
|
616
|
+
**3. Build** — compiles the api-client and the server (`tsc → packages/cezar/dist/`) and the cockpit
|
|
617
|
+
(`vite build → packages/cezar/web/dist/`), then runs the pack gate:
|
|
618
618
|
|
|
619
619
|
```bash
|
|
620
620
|
npm run build
|
|
@@ -666,9 +666,9 @@ npm run uninstall-as-command # removes cezar / cez / cezar-cli (either flavor
|
|
|
666
666
|
|
|
667
667
|
```bash
|
|
668
668
|
npm run dev # server (API :4321) + Vite dev server, opens the cockpit in the browser
|
|
669
|
-
npm run dev:server # tsx src/index.ts — the API server alone
|
|
669
|
+
npm run dev:server # tsx packages/cezar/src/index.ts — the API server alone
|
|
670
670
|
npm run dev:web # Vite dev server alone (proxies /api to :4321)
|
|
671
|
-
npm run build # tsc → dist/, vite build → web/dist/, then the pack gate
|
|
671
|
+
npm run build # tsc → packages/cezar/dist/, vite build → packages/cezar/web/dist/, then the pack gate
|
|
672
672
|
npm run typecheck # server + web (tsc --noEmit)
|
|
673
673
|
npm test # vitest — server + cockpit unit suites
|
|
674
674
|
npm run test:unit # node:test — fast core-module tests
|
|
@@ -678,7 +678,7 @@ npm run test:e2e # real-browser cockpit suite (agent-browser)
|
|
|
678
678
|
|
|
679
679
|
The stack is deliberately small: **TypeScript** (strict, ESM), **Hono** + SSE for
|
|
680
680
|
the server, **Zod** at every boundary, **YAML** for workflows, and a **React 19 +
|
|
681
|
-
Vite + Tailwind v4 + shadcn/ui** cockpit shipped pre-built in `web/dist/` — the
|
|
681
|
+
Vite + Tailwind v4 + shadcn/ui** cockpit shipped pre-built in `packages/cezar/web/dist/` — the
|
|
682
682
|
published package carries the built app, so `npx` users never run a bundler.
|
|
683
683
|
Every module is meant to be read in one sitting.
|
|
684
684
|
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/** The manifest arithmetic both release channels share — the pure half of stamping.
|
|
2
|
+
*
|
|
3
|
+
* `stable.ts` and `snapshot.ts` differ in exactly one decision (how a released package pins
|
|
4
|
+
* its sibling: a caret range for stable, an exact pin for a snapshot), so everything else
|
|
5
|
+
* lives here rather than twice.
|
|
6
|
+
*
|
|
7
|
+
* Deliberately name-agnostic: names come from the checked-out manifests at call time, never
|
|
8
|
+
* from constants, so a package rename lands without touching this pipeline.
|
|
9
|
+
*/
|
|
10
|
+
/** The minimal manifest shape the stamper touches; everything else passes through. */
|
|
11
|
+
export interface ManifestLike {
|
|
12
|
+
name: string;
|
|
13
|
+
version: string;
|
|
14
|
+
/** npm's own opt-out. A private package is still versioned in lockstep, never published. */
|
|
15
|
+
private?: boolean;
|
|
16
|
+
dependencies?: Record<string, string>;
|
|
17
|
+
devDependencies?: Record<string, string>;
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Whether a release stamps AND publishes this package, or only stamps it.
|
|
22
|
+
*
|
|
23
|
+
* The distinction exists because "in the release" and "on the registry" are different things.
|
|
24
|
+
* A package that ships nowhere yet still needs its version moved in lockstep: the api-client is
|
|
25
|
+
* the worked example — the service pins it, so a frozen version would leave that range pointing
|
|
26
|
+
* at a build the release was not cut from, which is exactly the drift this pipeline exists to
|
|
27
|
+
* prevent. Publishing is gated on npm's own `private` flag rather than a list here, so opening
|
|
28
|
+
* a package up is one line in ITS manifest and no change to the release code.
|
|
29
|
+
*/
|
|
30
|
+
export declare function isPublishable(pkg: ManifestLike): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Every manifest a release stamps.
|
|
33
|
+
*
|
|
34
|
+
* The order of the fields is the order they must be PUBLISHED in, because each one depends on
|
|
35
|
+
* the one before it: the alias is a bin-shim over the service, and the service (from the phase
|
|
36
|
+
* where it stops merely testing against the client and starts importing it) depends on the
|
|
37
|
+
* api-client. Publishing the dependent first would briefly advertise a version of its
|
|
38
|
+
* dependency that does not exist on the registry yet.
|
|
39
|
+
*/
|
|
40
|
+
export interface ReleaseManifests {
|
|
41
|
+
/** The contract package a consumer installs to talk to a cezar service. */
|
|
42
|
+
apiClient: ManifestLike;
|
|
43
|
+
/** The published service + CLI. */
|
|
44
|
+
cezar: ManifestLike;
|
|
45
|
+
/** The unscoped bin alias, so `npx cezar-cli` works. */
|
|
46
|
+
alias: ManifestLike;
|
|
47
|
+
}
|
|
48
|
+
/** How a released package pins a sibling it depends on. */
|
|
49
|
+
export type PinStyle = (version: string) => string;
|
|
50
|
+
/**
|
|
51
|
+
* Rewrite `pkg`'s range for `depName`, in whichever dependency section already declares it.
|
|
52
|
+
*
|
|
53
|
+
* Absent means absent: a package that does not depend on the other is returned untouched. That
|
|
54
|
+
* is what lets the api-client dependency migrate from `devDependencies` (today: only the tests
|
|
55
|
+
* import it) to `dependencies` (once the service imports its DTOs at runtime) without the
|
|
56
|
+
* release pipeline needing to know it happened.
|
|
57
|
+
*/
|
|
58
|
+
export declare function pinDependency(pkg: ManifestLike, depName: string, range: string): ManifestLike;
|
|
59
|
+
/**
|
|
60
|
+
* Stamp every manifest to `version` and re-pin the intra-release dependencies.
|
|
61
|
+
*
|
|
62
|
+
* Two pins, both derived from the manifests rather than hardcoded:
|
|
63
|
+
* - the alias → the service, so `npx <alias>@<v>` runs the matching CLI;
|
|
64
|
+
* - the service → the api-client, so a published service can never resolve a client build it
|
|
65
|
+
* was not released with.
|
|
66
|
+
*
|
|
67
|
+
* The alias also inherits `repository`/`homepage`/`bugs` from the service manifest: we publish
|
|
68
|
+
* with `--provenance`, and npm rejects (E422) any manifest whose `repository.url` does not
|
|
69
|
+
* match the building repo. The alias file carries none of its own, so it borrows the
|
|
70
|
+
* service's — already correct, and being a git URL, unaffected by any npm-name rename.
|
|
71
|
+
*/
|
|
72
|
+
export declare function stampManifestSet(manifests: ReleaseManifests, version: string, pin: PinStyle): ReleaseManifests;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/** The manifest arithmetic both release channels share — the pure half of stamping.
|
|
2
|
+
*
|
|
3
|
+
* `stable.ts` and `snapshot.ts` differ in exactly one decision (how a released package pins
|
|
4
|
+
* its sibling: a caret range for stable, an exact pin for a snapshot), so everything else
|
|
5
|
+
* lives here rather than twice.
|
|
6
|
+
*
|
|
7
|
+
* Deliberately name-agnostic: names come from the checked-out manifests at call time, never
|
|
8
|
+
* from constants, so a package rename lands without touching this pipeline.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Whether a release stamps AND publishes this package, or only stamps it.
|
|
12
|
+
*
|
|
13
|
+
* The distinction exists because "in the release" and "on the registry" are different things.
|
|
14
|
+
* A package that ships nowhere yet still needs its version moved in lockstep: the api-client is
|
|
15
|
+
* the worked example — the service pins it, so a frozen version would leave that range pointing
|
|
16
|
+
* at a build the release was not cut from, which is exactly the drift this pipeline exists to
|
|
17
|
+
* prevent. Publishing is gated on npm's own `private` flag rather than a list here, so opening
|
|
18
|
+
* a package up is one line in ITS manifest and no change to the release code.
|
|
19
|
+
*/
|
|
20
|
+
export function isPublishable(pkg) {
|
|
21
|
+
return pkg.private !== true;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Rewrite `pkg`'s range for `depName`, in whichever dependency section already declares it.
|
|
25
|
+
*
|
|
26
|
+
* Absent means absent: a package that does not depend on the other is returned untouched. That
|
|
27
|
+
* is what lets the api-client dependency migrate from `devDependencies` (today: only the tests
|
|
28
|
+
* import it) to `dependencies` (once the service imports its DTOs at runtime) without the
|
|
29
|
+
* release pipeline needing to know it happened.
|
|
30
|
+
*/
|
|
31
|
+
export function pinDependency(pkg, depName, range) {
|
|
32
|
+
const sections = ['dependencies', 'devDependencies', 'peerDependencies'];
|
|
33
|
+
const out = { ...pkg };
|
|
34
|
+
for (const section of sections) {
|
|
35
|
+
const deps = pkg[section];
|
|
36
|
+
if (deps && depName in deps)
|
|
37
|
+
out[section] = { ...deps, [depName]: range };
|
|
38
|
+
}
|
|
39
|
+
return out;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Stamp every manifest to `version` and re-pin the intra-release dependencies.
|
|
43
|
+
*
|
|
44
|
+
* Two pins, both derived from the manifests rather than hardcoded:
|
|
45
|
+
* - the alias → the service, so `npx <alias>@<v>` runs the matching CLI;
|
|
46
|
+
* - the service → the api-client, so a published service can never resolve a client build it
|
|
47
|
+
* was not released with.
|
|
48
|
+
*
|
|
49
|
+
* The alias also inherits `repository`/`homepage`/`bugs` from the service manifest: we publish
|
|
50
|
+
* with `--provenance`, and npm rejects (E422) any manifest whose `repository.url` does not
|
|
51
|
+
* match the building repo. The alias file carries none of its own, so it borrows the
|
|
52
|
+
* service's — already correct, and being a git URL, unaffected by any npm-name rename.
|
|
53
|
+
*/
|
|
54
|
+
export function stampManifestSet(manifests, version, pin) {
|
|
55
|
+
const { apiClient, cezar, alias } = manifests;
|
|
56
|
+
const range = pin(version);
|
|
57
|
+
const inherited = {};
|
|
58
|
+
for (const field of ['repository', 'homepage', 'bugs']) {
|
|
59
|
+
if (cezar[field] !== undefined)
|
|
60
|
+
inherited[field] = cezar[field];
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
apiClient: { ...apiClient, version },
|
|
64
|
+
cezar: pinDependency({ ...cezar, version }, apiClient.name, range),
|
|
65
|
+
alias: {
|
|
66
|
+
...pinDependency({ ...alias, ...inherited, version }, cezar.name, range),
|
|
67
|
+
// The alias exists only to depend on the service — an unpinned or missing entry would
|
|
68
|
+
// make `npx <alias>` install nothing useful, so this one is asserted, not merged.
|
|
69
|
+
dependencies: { ...alias.dependencies, [cezar.name]: range },
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=manifests.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifests.js","sourceRoot":"","sources":["../../src/release/manifests.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAaH;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa,CAAC,GAAiB;IAC7C,OAAO,GAAG,CAAC,OAAO,KAAK,IAAI,CAAC;AAC9B,CAAC;AAuBD;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,GAAiB,EAAE,OAAe,EAAE,KAAa;IAC7E,MAAM,QAAQ,GAAG,CAAC,cAAc,EAAE,iBAAiB,EAAE,kBAAkB,CAAU,CAAC;IAClF,MAAM,GAAG,GAAiB,EAAE,GAAG,GAAG,EAAE,CAAC;IACrC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,CAAuC,CAAC;QAChE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#501) lands independently of this pipeline.
|
|
13
13
|
*/
|
|
14
|
+
import { type ReleaseManifests as ReleaseManifestSet } from './manifests.js';
|
|
14
15
|
/** The CI facts the decision needs, straight from GitHub Actions' env/event. */
|
|
15
16
|
export interface SnapshotContext {
|
|
16
17
|
/** `GITHUB_EVENT_NAME` — only `pull_request` and `push` ever publish. */
|
|
@@ -40,30 +41,15 @@ export interface SnapshotPlan {
|
|
|
40
41
|
distTag: string;
|
|
41
42
|
}
|
|
42
43
|
export declare function computeSnapshot(ctx: SnapshotContext): SnapshotPlan | null;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
name: string;
|
|
46
|
-
version: string;
|
|
47
|
-
dependencies?: Record<string, string>;
|
|
48
|
-
[key: string]: unknown;
|
|
49
|
-
}
|
|
50
|
-
/** Stamp both manifests to the snapshot version.
|
|
51
|
-
*
|
|
52
|
-
* The alias is a bin-shim whose only dependency is the scoped package; a
|
|
53
|
-
* snapshot must pin that dependency **exact** (`0.1.5-pr482.123`, no range) so
|
|
54
|
-
* `npx <alias>@<version>` runs exactly the PR's code — a `^` range would
|
|
55
|
-
* resolve to whatever newer version exists (spec, resolved Q5). Stable
|
|
56
|
-
* releases keep their `^` range and never go through this stamper.
|
|
44
|
+
export type { ManifestLike, ReleaseManifests } from './manifests.js';
|
|
45
|
+
/** Stamp the release set to the snapshot version.
|
|
57
46
|
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
export declare function stampManifests(
|
|
64
|
-
root: ManifestLike;
|
|
65
|
-
alias: ManifestLike;
|
|
66
|
-
};
|
|
47
|
+
* Every intra-release dependency is pinned **exact** (`0.1.5-pr482.123`, no range) so
|
|
48
|
+
* `npx <alias>@<version>` runs exactly the PR's code and the service resolves exactly the
|
|
49
|
+
* api-client it was cut with — a `^` range would resolve to whatever newer version exists
|
|
50
|
+
* (spec, resolved Q5). Stable releases keep their `^` range and never go through this
|
|
51
|
+
* stamper. */
|
|
52
|
+
export declare function stampManifests(manifests: ReleaseManifestSet, version: string): ReleaseManifestSet;
|
|
67
53
|
/** The copy-pasteable commands for the sticky PR comment and the step summary.
|
|
68
54
|
* Rendered from the *actual* alias package name so a future rename of the npx
|
|
69
55
|
* command can never leave stale instructions (spec, resolved Q1). */
|
package/dist/release/snapshot.js
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* at call time, never from constants — so the `@pat-lewczuk/cezar` →
|
|
12
12
|
* `@open-mercato/cezar` rename (PR #501) lands independently of this pipeline.
|
|
13
13
|
*/
|
|
14
|
+
import { stampManifestSet } from './manifests.js';
|
|
14
15
|
export function computeSnapshot(ctx) {
|
|
15
16
|
const channel = resolveChannel(ctx);
|
|
16
17
|
if (!channel)
|
|
@@ -48,29 +49,15 @@ function resolveChannel(ctx) {
|
|
|
48
49
|
}
|
|
49
50
|
return null;
|
|
50
51
|
}
|
|
51
|
-
/** Stamp
|
|
52
|
+
/** Stamp the release set to the snapshot version.
|
|
52
53
|
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
* we publish with `--provenance`, and npm rejects (E422) any manifest whose
|
|
61
|
-
* `repository.url` doesn't match the building repo. The alias file carries no
|
|
62
|
-
* such fields of its own, so it must borrow the root's — which already matches
|
|
63
|
-
* and, being a git URL, is unaffected by any npm-name rename. */
|
|
64
|
-
export function stampManifests(rootPkg, aliasPkg, version) {
|
|
65
|
-
const inherited = {};
|
|
66
|
-
for (const field of ['repository', 'homepage', 'bugs']) {
|
|
67
|
-
if (rootPkg[field] !== undefined)
|
|
68
|
-
inherited[field] = rootPkg[field];
|
|
69
|
-
}
|
|
70
|
-
return {
|
|
71
|
-
root: { ...rootPkg, version },
|
|
72
|
-
alias: { ...aliasPkg, ...inherited, version, dependencies: { [rootPkg.name]: version } },
|
|
73
|
-
};
|
|
54
|
+
* Every intra-release dependency is pinned **exact** (`0.1.5-pr482.123`, no range) so
|
|
55
|
+
* `npx <alias>@<version>` runs exactly the PR's code and the service resolves exactly the
|
|
56
|
+
* api-client it was cut with — a `^` range would resolve to whatever newer version exists
|
|
57
|
+
* (spec, resolved Q5). Stable releases keep their `^` range and never go through this
|
|
58
|
+
* stamper. */
|
|
59
|
+
export function stampManifests(manifests, version) {
|
|
60
|
+
return stampManifestSet(manifests, version, (v) => v);
|
|
74
61
|
}
|
|
75
62
|
/** The copy-pasteable commands for the sticky PR comment and the step summary.
|
|
76
63
|
* Rendered from the *actual* alias package name so a future rename of the npx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../../src/release/snapshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;
|
|
1
|
+
{"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../../src/release/snapshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,gBAAgB,EAA+C,MAAM,gBAAgB,CAAC;AAgC/F,MAAM,UAAU,eAAe,CAAC,GAAoB;IAClD,MAAM,OAAO,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;IACpC,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAC1B,IAAI,CAAC,GAAG,CAAC,WAAW,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,GAAG,CAAC,SAAS,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAC5F,MAAM,OAAO,GAAG,GAAG,CAAC,UAAU,KAAK,SAAS,IAAI,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,GAAG,CAAC,UAAU,GAAG,CAAC;QACpG,CAAC,CAAC,IAAI,GAAG,CAAC,UAAU,EAAE;QACtB,CAAC,CAAC,EAAE,CAAC;IACP,OAAO;QACL,OAAO,EAAE,OAAO,CAAC,OAAO;QAC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AiB,EAAE,OAAe;IAClE,MAAM,GAAG,GAAG,OAAO,SAAS,IAAI,OAAO,EAAE,CAAC;IAC1C,OAAO;QACL,GAAG,GAAG,oEAAoE;QAC1E,GAAG,GAAG,gDAAgD;QACtD,GAAG,GAAG,qEAAqE;KAC5E,CAAC;AACJ,CAAC"}
|
package/dist/release/stable.d.ts
CHANGED
|
@@ -6,15 +6,14 @@
|
|
|
6
6
|
* thing that ever moves the `latest` dist-tag (spec
|
|
7
7
|
* `.ai/specs/2026-07-18-npm-preview-publish.md`, #482).
|
|
8
8
|
*
|
|
9
|
-
* Two decisions live here so they stay unit-testable
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* opposite of the snapshot stamper's exact pin — so a stable `cezar-cli` picks
|
|
14
|
-
* up compatible patch releases of the implementation package.
|
|
9
|
+
* Two decisions live here so they stay unit-testable and side-effect-free: the next stable
|
|
10
|
+
* version for a given bump, and the pin style the release set is stamped with. Crucially,
|
|
11
|
+
* stable releases use a **caret** range — the opposite of the snapshot stamper's exact pin —
|
|
12
|
+
* so a stable `cezar-cli` picks up compatible patch releases of the implementation package.
|
|
15
13
|
*/
|
|
14
|
+
import { type ReleaseManifests as ReleaseManifestSet } from './manifests.js';
|
|
16
15
|
/** The version-bump modes the Release workflow offers. `existing` publishes the
|
|
17
|
-
* version already committed to the
|
|
16
|
+
* version already committed to the service manifest (for hand-prepared releases);
|
|
18
17
|
* the rest increment semver from the current base. */
|
|
19
18
|
export type ReleaseBump = 'patch' | 'minor' | 'major' | 'existing';
|
|
20
19
|
export declare const RELEASE_BUMPS: readonly ReleaseBump[];
|
|
@@ -27,26 +26,13 @@ export declare function isReleaseBump(value: string): value is ReleaseBump;
|
|
|
27
26
|
* `npm version` does. Returns `null` for an unparseable base so the caller can
|
|
28
27
|
* fail loudly instead of publishing a garbage version. */
|
|
29
28
|
export declare function computeStableVersion(bump: ReleaseBump, base: string): string | null;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
name: string;
|
|
33
|
-
version: string;
|
|
34
|
-
dependencies?: Record<string, string>;
|
|
35
|
-
[key: string]: unknown;
|
|
36
|
-
}
|
|
37
|
-
/** Stamp both manifests to a stable version.
|
|
29
|
+
export type { ManifestLike, ReleaseManifests } from './manifests.js';
|
|
30
|
+
/** Stamp the release set to a stable version.
|
|
38
31
|
*
|
|
39
|
-
* Mirror of `
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
|
|
46
|
-
* the manifest's `repository.url` matches the building repo, and the alias file
|
|
47
|
-
* carries none of its own. The git URL already matches and survives any
|
|
48
|
-
* npm-name rename. */
|
|
49
|
-
export declare function stampStableManifests(rootPkg: ManifestLike, aliasPkg: ManifestLike, version: string): {
|
|
50
|
-
root: ManifestLike;
|
|
51
|
-
alias: ManifestLike;
|
|
52
|
-
};
|
|
32
|
+
* Mirror of `stampSnapshotManifests`, differing in exactly one decision: intra-release
|
|
33
|
+
* dependencies get a **caret** range (`^0.1.6`), not an exact pin. A stable `cezar-cli` should
|
|
34
|
+
* follow compatible releases of the implementation package, and a stable service should follow
|
|
35
|
+
* compatible releases of the api-client; a snapshot must pin the one exact build it was cut
|
|
36
|
+
* from. Everything else — which manifests exist, which sections carry the pin, what the alias
|
|
37
|
+
* inherits — lives in `manifests.ts` so the two channels cannot drift apart. */
|
|
38
|
+
export declare function stampStableManifests(manifests: ReleaseManifestSet, version: string): ReleaseManifestSet;
|
package/dist/release/stable.js
CHANGED
|
@@ -6,13 +6,12 @@
|
|
|
6
6
|
* thing that ever moves the `latest` dist-tag (spec
|
|
7
7
|
* `.ai/specs/2026-07-18-npm-preview-publish.md`, #482).
|
|
8
8
|
*
|
|
9
|
-
* Two decisions live here so they stay unit-testable
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* opposite of the snapshot stamper's exact pin — so a stable `cezar-cli` picks
|
|
14
|
-
* up compatible patch releases of the implementation package.
|
|
9
|
+
* Two decisions live here so they stay unit-testable and side-effect-free: the next stable
|
|
10
|
+
* version for a given bump, and the pin style the release set is stamped with. Crucially,
|
|
11
|
+
* stable releases use a **caret** range — the opposite of the snapshot stamper's exact pin —
|
|
12
|
+
* so a stable `cezar-cli` picks up compatible patch releases of the implementation package.
|
|
15
13
|
*/
|
|
14
|
+
import { stampManifestSet } from './manifests.js';
|
|
16
15
|
export const RELEASE_BUMPS = ['patch', 'minor', 'major', 'existing'];
|
|
17
16
|
export function isReleaseBump(value) {
|
|
18
17
|
return RELEASE_BUMPS.includes(value);
|
|
@@ -42,27 +41,15 @@ export function computeStableVersion(bump, base) {
|
|
|
42
41
|
return null;
|
|
43
42
|
}
|
|
44
43
|
}
|
|
45
|
-
/** Stamp
|
|
44
|
+
/** Stamp the release set to a stable version.
|
|
46
45
|
*
|
|
47
|
-
* Mirror of `
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
* carries none of its own. The git URL already matches and survives any
|
|
56
|
-
* npm-name rename. */
|
|
57
|
-
export function stampStableManifests(rootPkg, aliasPkg, version) {
|
|
58
|
-
const inherited = {};
|
|
59
|
-
for (const field of ['repository', 'homepage', 'bugs']) {
|
|
60
|
-
if (rootPkg[field] !== undefined)
|
|
61
|
-
inherited[field] = rootPkg[field];
|
|
62
|
-
}
|
|
63
|
-
return {
|
|
64
|
-
root: { ...rootPkg, version },
|
|
65
|
-
alias: { ...aliasPkg, ...inherited, version, dependencies: { [rootPkg.name]: `^${version}` } },
|
|
66
|
-
};
|
|
46
|
+
* Mirror of `stampSnapshotManifests`, differing in exactly one decision: intra-release
|
|
47
|
+
* dependencies get a **caret** range (`^0.1.6`), not an exact pin. A stable `cezar-cli` should
|
|
48
|
+
* follow compatible releases of the implementation package, and a stable service should follow
|
|
49
|
+
* compatible releases of the api-client; a snapshot must pin the one exact build it was cut
|
|
50
|
+
* from. Everything else — which manifests exist, which sections carry the pin, what the alias
|
|
51
|
+
* inherits — lives in `manifests.ts` so the two channels cannot drift apart. */
|
|
52
|
+
export function stampStableManifests(manifests, version) {
|
|
53
|
+
return stampManifestSet(manifests, version, (v) => `^${v}`);
|
|
67
54
|
}
|
|
68
55
|
//# sourceMappingURL=stable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stable.js","sourceRoot":"","sources":["../../src/release/stable.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"stable.js","sourceRoot":"","sources":["../../src/release/stable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,gBAAgB,EAA+C,MAAM,gBAAgB,CAAC;AAO/F,MAAM,CAAC,MAAM,aAAa,GAA2B,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AAE7F,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,OAAQ,aAAmC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC9D,CAAC;AAED;;;;;;2DAM2D;AAC3D,MAAM,UAAU,oBAAoB,CAAC,IAAiB,EAAE,IAAY;IAClE,MAAM,CAAC,GAAG,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IACpD,IAAI,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IACpB,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACzE,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,UAAU;YACb,OAAO,GAAG,KAAK,IAAI,KAAK,IAAI,KAAK,EAAE,CAAC;QACtC,KAAK,OAAO;YACV,OAAO,GAAG,KAAK,IAAI,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;QAC1C,KAAK,OAAO;YACV,OAAO,GAAG,KAAK,IAAI,KAAK,GAAG,CAAC,IAAI,CAAC;QACnC,KAAK,OAAO;YACV,OAAO,GAAG,KAAK,GAAG,CAAC,MAAM,CAAC;QAC5B;YACE,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC;AAID;;;;;;;iFAOiF;AACjF,MAAM,UAAU,oBAAoB,CAClC,SAA6B,EAC7B,OAAe;IAEf,OAAO,gBAAgB,CAAC,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { createApp } from './server.js';
|
|
2
|
+
/**
|
|
3
|
+
* The service's HTTP contract, as a type.
|
|
4
|
+
*
|
|
5
|
+
* This is the whole boundary between the cezar service and a typed consumer: Hono infers an
|
|
6
|
+
* app's endpoint table from the app's *type*, and `hc<AppType>` turns that table into a client
|
|
7
|
+
* whose paths, request bodies and response shapes are checked at compile time. No hand-written
|
|
8
|
+
* mirror, no schema to author twice — the routes ARE the contract.
|
|
9
|
+
*
|
|
10
|
+
* Only routes registered through a **chained** builder appear here. `server.ts` still registers
|
|
11
|
+
* most families as loose statements (whose return value, and with it the accumulated route
|
|
12
|
+
* type, is discarded), so this type currently covers the chained families mounted under
|
|
13
|
+
* `/api/v1` — health, agent-config and workflows. Each family that gets chained widens this
|
|
14
|
+
* type automatically; nothing here needs updating.
|
|
15
|
+
*
|
|
16
|
+
* Type-only by construction: importing this module pulls in no runtime code (`import type`
|
|
17
|
+
* disappears at build), which is what lets a browser bundle consume it without dragging
|
|
18
|
+
* `node:*` in.
|
|
19
|
+
*/
|
|
20
|
+
export type AppType = ReturnType<typeof createApp>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-type.js","sourceRoot":"","sources":["../../src/server/app-type.ts"],"names":[],"mappings":""}
|