create-t2k 0.2.0 → 0.3.0

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 CHANGED
@@ -4,7 +4,7 @@ Create a runnable local T2K project with a synthetic ontology, accepted facts,
4
4
  a Decision Context, two executable policies, and disjoint replay evidence.
5
5
 
6
6
  ```bash
7
- npx create-t2k my-decision-loop
7
+ npx create-t2k@latest my-decision-loop
8
8
  cd my-decision-loop
9
9
  npm start
10
10
  ```
@@ -26,10 +26,32 @@ That command records authorization, execution receipts, observations, computed
26
26
  rewards, held-out evaluation, independent promotion, and exact rollback in the
27
27
  open reference runtime.
28
28
 
29
+ Stop the local containers without deleting lifecycle data with `npm run
30
+ db:down`. Use the explicitly destructive `npm run db:reset` only when you
31
+ intend to delete the disposable local database volume.
32
+
33
+ To expose ontology validation, compilation, policy execution, replay, and
34
+ reward evaluation to an MCP host, add:
35
+
36
+ ```json
37
+ {
38
+ "mcpServers": {
39
+ "t2k": {
40
+ "command": "npx",
41
+ "args": ["-y", "@t2kai/mcp@latest"]
42
+ }
43
+ }
44
+ }
45
+ ```
46
+
47
+ This starts read-only and does not send project data to a hosted service. See
48
+ the [`@t2kai/mcp` guide](https://github.com/sigaihealth/t2k-core/blob/main/packages/mcp/README.md)
49
+ before enabling database access or agent writes.
50
+
29
51
  Use `--no-install` to generate files without running `npm install`:
30
52
 
31
53
  ```bash
32
- npx create-t2k my-decision-loop --no-install
54
+ npx create-t2k@latest my-decision-loop --no-install
33
55
  ```
34
56
 
35
57
  The command refuses to write into a non-empty directory. Node.js 20.10 or newer
@@ -24,7 +24,8 @@ Options:
24
24
  -v, --version Show the package version
25
25
 
26
26
  The default directory is my-t2k-project. Existing non-empty directories are
27
- never overwritten.`;
27
+ never overwritten. Generated projects include decision and optional
28
+ persisted-lifecycle examples.`;
28
29
 
29
30
  try {
30
31
  const options = parseArguments(process.argv.slice(2));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-t2k",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Create a local T2K governed-decision project in minutes.",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
package/src/scaffold.mjs CHANGED
@@ -171,6 +171,7 @@ export async function scaffoldProject({
171
171
  stdout.write(" npm start\n\n");
172
172
  stdout.write("The first run computes a recommendation; a human must still authorize it.\n");
173
173
  stdout.write("Run `npm run db:up && npm run lifecycle` for the persisted closed loop.\n");
174
+ stdout.write("Use `npm run db:down` to stop it or `npm run db:reset` to delete its volume.\n");
174
175
 
175
176
  return { targetPath, projectName };
176
177
  }
@@ -40,7 +40,29 @@ The actors who propose, evaluate, promote, and roll back are deliberately
40
40
  separate synthetic identities. The event ledger is hash-chained and append-only.
41
41
  In production, authenticate those actor IDs and enforce organization roles in
42
42
  the calling service; the local runtime is not an identity provider. To remove
43
- the local database and its volume, run `npm run db:down`.
43
+ the local containers while preserving their volume, run `npm run db:down`. To
44
+ explicitly delete the disposable local volume and all lifecycle data in it, run
45
+ `npm run db:reset`.
46
+
47
+ ## Connect an MCP host
48
+
49
+ Expose validation, compilation, policy execution, replay, and reward evaluation
50
+ to an MCP host with the safe database-free mode:
51
+
52
+ ```json
53
+ {
54
+ "mcpServers": {
55
+ "t2k": {
56
+ "command": "npx",
57
+ "args": ["-y", "@t2kai/mcp@latest"]
58
+ }
59
+ }
60
+ }
61
+ ```
62
+
63
+ The MCP server does not expose human authorization or promotion operations.
64
+ Read <https://t2k.ai/developers/> before enabling its optional Postgres or agent
65
+ mutation modes.
44
66
 
45
67
  ## Change the example
46
68
 
@@ -10,10 +10,11 @@
10
10
  "start": "node src/run.mjs",
11
11
  "check": "node src/run.mjs",
12
12
  "db:up": "docker compose up -d --wait",
13
- "db:down": "docker compose down -v",
13
+ "db:down": "docker compose down",
14
+ "db:reset": "docker compose down -v",
14
15
  "lifecycle": "node src/lifecycle.mjs"
15
16
  },
16
17
  "dependencies": {
17
- "@t2kai/core": "^0.2.0"
18
+ "@t2kai/core": "^0.3.0"
18
19
  }
19
20
  }