@adecore/plan 0.17.0-beta.1 → 0.17.0-beta.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.
Files changed (3) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +38 -23
  3. package/package.json +1 -1
package/LICENSE CHANGED
@@ -6,7 +6,7 @@ FSL-1.1-MIT
6
6
 
7
7
  ## Notice
8
8
 
9
- Copyright 2026 Bas Milius
9
+ Copyright 2026 - present Bas Milius
10
10
 
11
11
  ## Terms and Conditions
12
12
 
package/README.md CHANGED
@@ -1,35 +1,50 @@
1
1
  # @adecore/plan
2
2
 
3
- Plan schemas, strict drafts, atomic tree operations, person/agent permissions, progress and Markdown/reading output. The core depends on Zod and owns no store, transport or UI.
3
+ [![npm](https://img.shields.io/npm/v/@adecore/plan)](https://www.npmjs.com/package/@adecore/plan)
4
+ [![Docs](https://img.shields.io/badge/docs-adecore.dev-blue)](https://adecore.dev/plan/)
4
5
 
5
- The package is private at `0.0.0` pending initial publication. Use the local checkout with `source` conditions or build JavaScript/declarations in `dist` for default imports. Transferred code retains FSL-1.1-MIT in [LICENSE](./LICENSE).
6
+ A plan that a person and an agent work through together: steps, sub-steps, sections and notes, with rules for who may check what. Every change is a batch of operations that applies as a whole or is refused with a code and a reason. Plans read and write as a Markdown task list. No storage, no clock and no UI: the app brings those.
7
+
8
+ **[Documentation with live demos](https://adecore.dev/plan/)**
9
+
10
+ ## Install
11
+
12
+ ```sh
13
+ bun add @adecore/plan
14
+ ```
15
+
16
+ ## Use
6
17
 
7
18
  ```ts
8
19
  import { applyPlanOps, createPlan, parsePlanMarkdown } from '@adecore/plan';
9
20
 
10
- const parsed = parsePlanMarkdown('# Delivery\n\n- [ ] Review the result\n');
11
- if (!parsed.ok) {
12
- throw new Error(parsed.message);
13
- }
14
- const created = createPlan(parsed.draft, {
15
- id: 'delivery',
16
- now: '2026-01-01T00:00:00.000Z',
17
- mintId: () => 'review'
18
- });
19
- if (!created.ok) {
20
- throw new Error(created.message);
21
- }
22
- const checked = applyPlanOps(created.plan, [{ op: 'set', ids: ['review'], state: 'done' }], {
23
- actor: 'person',
24
- now: '2026-01-01T00:01:00.000Z'
25
- });
26
- if (!checked.ok) {
27
- throw new Error(checked.message);
21
+ const parsed = parsePlanMarkdown('# Ship the release\n\n- [ ] Run the tests\n');
22
+ const created = parsed.ok ? createPlan(parsed.draft, { id: 'release', now: new Date().toISOString() }) : parsed;
23
+
24
+ if (created.ok) {
25
+ const [step] = created.minted;
26
+ const result = applyPlanOps(created.plan, [{ op: 'set', ids: [step!], state: 'done' }], {
27
+ actor: 'person',
28
+ now: new Date().toISOString()
29
+ });
28
30
  }
29
31
  ```
30
32
 
31
- The host supplies authenticated actors and time, applies batches to the latest stored plan and persists successful results atomically. Refusals leave input unchanged. Parents derive state; unlocks and person-set state survive updates. Markdown omits ids, attribution and checks, so persist validated JSON for full fidelity.
33
+ ## Entry points
34
+
35
+ | Import | What it holds |
36
+ |---|---|
37
+ | `@adecore/plan` | Creating, validating and changing plans, permissions, progress, Markdown and text |
38
+ | `@adecore/plan/protocol` | The Zod schemas and types of a plan and its operations |
39
+
40
+ ## Documentation
41
+
42
+ | Page | What it covers |
43
+ |---|---|
44
+ | [Plans](https://adecore.dev/plan/plans) | The tree, states, progress and creating a plan |
45
+ | [Operations](https://adecore.dev/plan/operations) | `applyPlanOps`, permissions, refusals and a store |
46
+ | [Markdown and text](https://adecore.dev/plan/markdown) | The Markdown format and the text an agent reads |
32
47
 
33
- Read the [overview](https://adecore.dev/plan/), [getting started](https://adecore.dev/plan/getting-started), [tree/progress concepts](https://adecore.dev/plan/concepts), [operations guide](https://adecore.dev/plan/operations), [format guide](https://adecore.dev/plan/formats), [API reference](https://adecore.dev/plan/api), [protocol](https://adecore.dev/plan/protocol) and [integration/testing guide](https://adecore.dev/plan/migration).
48
+ ## License
34
49
 
35
- From the repository root, run `bun run --cwd packages/plan test`, `typecheck` or `build`. The [standalone example](./examples/check-plan.ts) imports, checks and exports a task list.
50
+ FSL-1.1-MIT, see [LICENSE](./LICENSE).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adecore/plan",
3
- "version": "0.17.0-beta.1",
3
+ "version": "0.17.0-beta.2",
4
4
  "description": "Plan schemas, atomic tree operations, actor permissions and Markdown.",
5
5
  "license": "FSL-1.1-MIT",
6
6
  "author": "Bas Milius",