@coryrylan/cradle 1.2.0 → 1.3.1
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 +13 -0
- package/README.md +2 -2
- package/dist/agent/package-filters.d.ts +13 -0
- package/dist/agent/packages.d.ts +24 -10
- package/dist/index.js +30 -30
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
## [1.3.1](https://github.com/coryrylan/cradle/compare/cradle-v1.3.0...cradle-v1.3.1) (2026-08-30)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **clI:** update dependencies ([24e2afe](https://github.com/coryrylan/cradle/commit/24e2afe3827a4f2916015fd1676464cb66a2dcd5))
|
|
6
|
+
* **cli:** update deps ([07e4065](https://github.com/coryrylan/cradle/commit/07e4065826a2193d5c08ff7295441f0b496f89fe))
|
|
7
|
+
|
|
8
|
+
## [1.3.0](https://github.com/coryrylan/cradle/compare/cradle-v1.2.0...cradle-v1.3.0) (2026-07-26)
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* **cli:** enhance package filtering and extensions handling ([03ae139](https://github.com/coryrylan/cradle/commit/03ae1390de541f94f701413ac6853fede7b6c73a))
|
|
13
|
+
|
|
1
14
|
## [1.2.0](https://github.com/coryrylan/cradle/compare/cradle-v1.1.0...cradle-v1.2.0) (2026-07-26)
|
|
2
15
|
|
|
3
16
|
### Features
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
|
|
5
|
-
A runtime for portable agents defined as folders. `cradle run <dir>` reads an agent folder — a `SYSTEM.md` or `APPEND_SYSTEM.md` (at least one) plus optional pi-native config, skills, extensions, and sandbox posture — and launches the [pi](https://github.com/earendil-works/pi-mono) coding agent configured from it. An agent declaring `sandbox/nono.json` or `sandbox/sbx.json` runs sandboxed — inside the [nono](https://github.com/
|
|
5
|
+
A runtime for portable agents defined as folders. `cradle run <dir>` reads an agent folder — a `SYSTEM.md` or `APPEND_SYSTEM.md` (at least one) plus optional pi-native config, skills, extensions, and sandbox posture — and launches the [pi](https://github.com/earendil-works/pi-mono) coding agent configured from it. An agent declaring `sandbox/nono.json` or `sandbox/sbx.json` runs sandboxed — inside the [nono](https://github.com/nolabs-ai/nono) filesystem sandbox or the [Docker Sandboxes](https://docs.docker.com/ai/sandboxes/) microVM, respectively. See [ARCHITECTURE.md](../../ARCHITECTURE.md) for the folder format and [`examples/hello`](../../examples/hello) for a minimal agent. Built with Bun and TypeScript; install the standalone binary via `install.sh` (primary) or the npm package [`@coryrylan/cradle`](https://www.npmjs.com/package/@coryrylan/cradle) (alternative).
|
|
6
6
|
|
|
7
7
|
## Dependencies
|
|
8
8
|
|
|
@@ -11,7 +11,7 @@ A runtime for portable agents defined as folders. `cradle run <dir>` reads an ag
|
|
|
11
11
|
| Tool | Status | Why |
|
|
12
12
|
| ------------------------------------------------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
13
13
|
| [`pi`](https://github.com/earendil-works/pi-mono) | **Required** | The coding agent cradle launches. Every `cradle run` spawns it. |
|
|
14
|
-
| [`nono`](https://github.com/
|
|
14
|
+
| [`nono`](https://github.com/nolabs-ai/nono) | **Recommended** | The filesystem sandbox pi runs inside for a nono-backend run — a folder declaring `sandbox/nono.json`, or `--sandbox`/`--sandbox-backend nono`/`--offline`/`--allow-host` with no `sandbox/sbx.json`; required for that run, not needed otherwise. |
|
|
15
15
|
| [`sbx`](https://docs.docker.com/ai/sandboxes/) | **Recommended** | The Docker Sandboxes microVM pi runs inside for an sbx-backend run — a folder declaring `sandbox/sbx.json`, or `--sandbox-backend sbx`; required for that run, not needed otherwise. |
|
|
16
16
|
| [`mise`](https://mise.jdx.dev) | **Recommended** | The supported way to install and manage `pi` and `nono`. cradle doesn't invoke mise directly, but it falls back to mise's shims when resolving the tools, and the generated sandbox profile grants mise's trees so a sandboxed pi finds its runtime. |
|
|
17
17
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** `!`/`+`/`-` prefixed entries decide what loads; everything else names a source path or glob. */
|
|
2
|
+
export declare function isOverridePattern(pattern: string): boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Narrow `files` to what `patterns` selects, preserving input order: plain
|
|
5
|
+
* globs include (none listed includes everything), `!` globs then exclude,
|
|
6
|
+
* `+`/`-` exact paths force a file back in or out — force-exclude wins.
|
|
7
|
+
*/
|
|
8
|
+
export declare function applyPatterns(files: readonly string[], patterns: readonly string[], baseDir: string): string[];
|
|
9
|
+
/**
|
|
10
|
+
* pi's `autoload: false` delta: nothing loads except what a pattern names, and
|
|
11
|
+
* for a file matched by several patterns the last one decides.
|
|
12
|
+
*/
|
|
13
|
+
export declare function applyDeltaPatterns(files: readonly string[], patterns: readonly string[], baseDir: string): string[];
|
package/dist/agent/packages.d.ts
CHANGED
|
@@ -1,14 +1,25 @@
|
|
|
1
1
|
import { type JsonValue } from '../setup/utils.js';
|
|
2
|
+
/**
|
|
3
|
+
* The object form's resource filter, narrowed to the one resource type cradle
|
|
4
|
+
* delivers. Absent `extensions` loads everything the package declares, `[]`
|
|
5
|
+
* loads none, patterns decide otherwise (see `./package-filters.js`).
|
|
6
|
+
*/
|
|
7
|
+
interface PackageFilter {
|
|
8
|
+
readonly extensions?: readonly string[];
|
|
9
|
+
/** pi's `autoload: false` — nothing loads except what an `extensions` pattern names. */
|
|
10
|
+
readonly autoloadDisabled?: boolean;
|
|
11
|
+
}
|
|
2
12
|
/** A parsed `npm:<name>[@<version>]` package source from settings.json's `packages` key. */
|
|
3
|
-
export interface NpmPackageSpec {
|
|
13
|
+
export interface NpmPackageSpec extends PackageFilter {
|
|
4
14
|
readonly name: string;
|
|
5
15
|
readonly version: string;
|
|
6
16
|
}
|
|
7
17
|
/**
|
|
8
|
-
* Parse a settings.json record's `packages` key
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
18
|
+
* Parse a settings.json record's `packages` key — pi's source strings, pi's
|
|
19
|
+
* filter objects, or a mix — into validated npm: package specs. Only `npm:`
|
|
20
|
+
* sources are supported — pi also accepts `git:`, `https://`, `ssh://`, and
|
|
21
|
+
* local paths, all warned and dropped here, since cradle installs the package
|
|
22
|
+
* itself rather than delegating to pi's loader.
|
|
12
23
|
*/
|
|
13
24
|
export declare function readPackageSpecs(record: {
|
|
14
25
|
readonly [key: string]: JsonValue;
|
|
@@ -16,13 +27,16 @@ export declare function readPackageSpecs(record: {
|
|
|
16
27
|
/** Deterministic npm manifest for a per-agent packages install, dependencies sorted by name. */
|
|
17
28
|
export declare function emitPackagesManifest(specs: readonly NpmPackageSpec[]): string;
|
|
18
29
|
/**
|
|
19
|
-
* Resolve each spec's installed package into pi extension entry files
|
|
20
|
-
* to pass as explicit `-e` flags. Every
|
|
21
|
-
* manifest, an entry that escapes the
|
|
22
|
-
* file, no declared extensions) is a
|
|
23
|
-
* warn-don't-throw like every other
|
|
30
|
+
* Resolve each spec's installed package into the pi extension entry files its
|
|
31
|
+
* settings.json entry selects, ready to pass as explicit `-e` flags. Every
|
|
32
|
+
* failure (not installed, malformed manifest, an entry that escapes the
|
|
33
|
+
* package directory, a missing entry file, no declared extensions) is a
|
|
34
|
+
* warning + skip — packages are warn-don't-throw like every other
|
|
35
|
+
* agent-folder input. A filter selecting nothing is silent: that is the
|
|
36
|
+
* author asking for nothing, not a failure.
|
|
24
37
|
*/
|
|
25
38
|
export declare function resolvePackageEntries(npmDir: string, specs: readonly NpmPackageSpec[]): Promise<{
|
|
26
39
|
entries: string[];
|
|
27
40
|
warnings: string[];
|
|
28
41
|
}>;
|
|
42
|
+
export {};
|