@theokit/di-agent 0.4.0 → 0.5.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +27 -0
  3. package/package.json +7 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,54 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 1e880aa: The `@theokit/sdk` peer range admits the published `latest`. `>=4.0.1 <5` excluded `5.9.0`, so the
8
+ dependency gate counted this package among those a release would strand
9
+ (usetheokit/shared-workflows#64).
10
+
11
+ **Both ends were installed and run, not reasoned about from a changelog:**
12
+
13
+ | sdk | typecheck | suite |
14
+ | ---------------------------------------------------- | --------- | --------------------- |
15
+ | 4.0.1 — the declared floor, previously untested here | clean | 118 passed, 2 skipped |
16
+ | 5.9.0 — the published latest | clean | 118 passed, 2 skipped |
17
+
18
+ No code changed: the two imports this package makes — `@theokit/sdk` and `@theokit/sdk/workflow` —
19
+ resolve identically across the major.
20
+
21
+ A clean consumer install of this package's tarball with `@theokit/sdk@5.9.0` reports no `ERESOLVE`
22
+ and resolves **one** copy of the sdk. That check is here because widening a peer range is how
23
+ `@theokit/studio` ended up with two copies in a consumer's tree, and a range that installs is not the
24
+ same claim as a range that installs once.
25
+
26
+ ### Patch Changes
27
+
28
+ - e3f55b2: The README states what the decorators do and what reads them, because the export list reads like a
29
+ promise that something runs them (usetheokit/theokit-di#70).
30
+
31
+ `@Tool`, `@SubAgent`, `@Squad`, `@Workflow`, `@Step`, `@Cron`, `@Hitl`, `@Retriever`, `@Reranker`
32
+ and their siblings write metadata onto a class and nothing else. The split is deliberate — a
33
+ declaration and the runtime that acts on it version independently — but a consumer reading the
34
+ exports has no way to learn that, and reasonably concludes `@Workflow` executes something.
35
+
36
+ Measured across every repository in this ecosystem, excluding `node_modules`: **no consumer outside
37
+ this package reads any of the readers, `@theokit/sdk` included.** Inside it, `workflow-builder.ts`
38
+ reads `readStepMetadata` and `readWorkflowMetadata`; the other fourteen readers have no consumer
39
+ anywhere. The issue reported zero readers in total — the two in `workflow-builder.ts` are the
40
+ refinement, and they matter because the docblock in `decorators/tool.ts` says _"nothing in this
41
+ package acts on it"_, which is true of `@Tool` and not of `@Workflow`.
42
+
43
+ Nothing is retired and no behaviour changes. A declaration surface waiting for a consumer is a fine
44
+ thing to be, stated; the README now says which one it is, and points at `AgentBuilder` for someone
45
+ choosing an authoring surface that executes today.
46
+
47
+ `tests/decorator-consumers.test.ts` keeps the table honest in both directions: wiring a reader fails
48
+ until the table names it, and naming a decorator the code does not read fails too. Both were proven
49
+ by breaking them — the first assertion was written against the whole README, passed with a reader
50
+ wired, and was rewritten to read the table row.
51
+
3
52
  ## 0.4.0
4
53
 
5
54
  ### Minor Changes
package/README.md CHANGED
@@ -51,6 +51,33 @@ await container.runInRequest(async () => {
51
51
  });
52
52
  ```
53
53
 
54
+ ## The decorators record; they do not execute
55
+
56
+ `@Tool`, `@SubAgent`, `@Squad`, `@Workflow`, `@Step`, `@Cron`, `@Hitl`, `@Retriever`, `@Reranker`
57
+ and their siblings **write metadata onto a class and nothing else**. Each has a matching
58
+ `read*Metadata` reader, exported so a consumer can retrieve what was recorded.
59
+
60
+ That split is deliberate — it lets a declaration and the runtime that acts on it version
61
+ independently. What it means in practice is stated here rather than inferred from the export list,
62
+ because an export list that names `@Workflow` reads like a promise that something runs it.
63
+
64
+ **Measured 2026-09-17, across every repository in this ecosystem, excluding `node_modules`:**
65
+
66
+ | Decorator family | Read by |
67
+ | --- | --- |
68
+ | `@Workflow`, `@Step` | `workflow-builder.ts`, inside this package |
69
+ | the other fourteen | nothing, anywhere |
70
+
71
+ No consumer outside this package reads any of them, including `@theokit/sdk`.
72
+
73
+ **This is a declaration surface waiting for a consumer, and that is a fine thing to be — stated.**
74
+ If you are choosing an authoring surface today, `AgentBuilder` in `@theokit/agents` is the one that
75
+ executes. Reach for these when you want a class to *carry* a declaration that your own code reads
76
+ back through `read*Metadata`, which works exactly as documented.
77
+
78
+ `tests/decorator-consumers.test.ts` keeps this table honest: wiring a reader makes it fail until the
79
+ table says so.
80
+
54
81
  ## License
55
82
 
56
83
  Apache-2.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theokit/di-agent",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Agent-first DI integration for @theokit/di. Ships @InjectAgent() decorator + createAgentProvider() helper that produces a REQUEST-scoped Agent factory — so every HTTP request gets an isolated @theokit/sdk Agent automatically.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/usetheokit/theokit-di#readme",
@@ -27,7 +27,8 @@
27
27
  "types": "./dist/index.d.cts",
28
28
  "default": "./dist/index.cjs"
29
29
  }
30
- }
30
+ },
31
+ "./package.json": "./package.json"
31
32
  },
32
33
  "files": [
33
34
  "dist",
@@ -44,12 +45,12 @@
44
45
  ],
45
46
  "peerDependencies": {
46
47
  "@theokit/di": ">=0.1.1 <0.3",
47
- "@theokit/sdk": ">=4.0.1 <5",
48
+ "@theokit/sdk": ">=4.0.1 <6",
48
49
  "reflect-metadata": "^0.2.0"
49
50
  },
50
51
  "devDependencies": {
51
52
  "@swc/core": "^1.15.40",
52
- "@theokit/sdk": "^4.57.0",
53
+ "@theokit/sdk": "^5.9.0",
53
54
  "reflect-metadata": "^0.2.0",
54
55
  "tsup": "^8.5.0",
55
56
  "typedoc": "^0.28.19",
@@ -57,12 +58,13 @@
57
58
  "unplugin-swc": "^1.5.9",
58
59
  "vitest": "^4.1.8",
59
60
  "zod": "^4.0.0",
60
- "@theokit/di": "0.2.0"
61
+ "@theokit/di": "0.2.1"
61
62
  },
62
63
  "publishConfig": {
63
64
  "access": "public",
64
65
  "provenance": true
65
66
  },
67
+ "sideEffects": true,
66
68
  "scripts": {
67
69
  "build": "tsup",
68
70
  "typecheck": "tsc --noEmit",