@collective-intelligence/extensions-sdk-frontend 0.2.0 → 0.2.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/AGENTS.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# `@collective-intelligence/extensions-sdk-frontend`: agent guide
|
|
2
|
+
|
|
3
|
+
The framework-neutral frontend contracts of Collective Intelligence (CI)
|
|
4
|
+
extensions: declarations, the catalog and activation. React bindings are
|
|
5
|
+
in `extensions-sdk-frontend-react`. The package `README.md` holds the full
|
|
6
|
+
API.
|
|
7
|
+
|
|
8
|
+
## Rules
|
|
9
|
+
|
|
10
|
+
- Import from the root `.`. Its `/effect` entry is empty: this package has no
|
|
11
|
+
I/O client and no Expected Error, and its loaders come from the host.
|
|
12
|
+
- Keep one `effect` (`^4.1.0`) in the extension package. It is a required
|
|
13
|
+
peer.
|
|
14
|
+
- Take the Studio API on Effect (`StudioApi`) from
|
|
15
|
+
`extensions-sdk-frontend-react/effect`.
|
|
16
|
+
|
|
17
|
+
## Index
|
|
18
|
+
|
|
19
|
+
- [docs/effect.md](docs/effect.md): read when a frontend extension uses
|
|
20
|
+
Effect, or you look for an Effect API of this package.
|
|
21
|
+
- [skills/extensions-sdk-frontend-move-to-effect/SKILL.md](skills/extensions-sdk-frontend-move-to-effect/SKILL.md):
|
|
22
|
+
run when a frontend extension package adds `effect`, has more than one
|
|
23
|
+
`effect` version, or lint reports `ci-solution/effect-subpath`.
|
package/docs/effect.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Effect
|
|
2
|
+
|
|
3
|
+
`/effect` of this package is empty, by the convention of the SDK family: a
|
|
4
|
+
package with no I/O client and no Expected Error has no Effect service, layer
|
|
5
|
+
or tagged error. A test pins the empty export list.
|
|
6
|
+
|
|
7
|
+
- `effect` `^4.1.0` is a required peer. The extension package installs one
|
|
8
|
+
copy; the package build keeps it external.
|
|
9
|
+
- Import the contracts of this package from `.`, also in Effect code.
|
|
10
|
+
- Effect APIs of the family:
|
|
11
|
+
- `StudioApi`, `layerStudioApi`, `StudioApiError`: from
|
|
12
|
+
`extensions-sdk-frontend-react/effect`.
|
|
13
|
+
- `effectSchema`, `withWorkflowDefault`: from
|
|
14
|
+
`extensions-sdk-backend/effect`.
|
|
15
|
+
- The `ci-solution/effect-subpath` rule of `@collective-intelligence/lint`
|
|
16
|
+
reports an Effect API from outside `/effect`.
|
package/package.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@collective-intelligence/extensions-sdk-frontend",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Framework-neutral frontend declaration, catalog, and activation contracts for Collective Intelligence extension packages.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"files": [
|
|
8
8
|
"dist",
|
|
9
|
-
"README.md"
|
|
9
|
+
"README.md",
|
|
10
|
+
"AGENTS.md",
|
|
11
|
+
"docs",
|
|
12
|
+
"skills"
|
|
10
13
|
],
|
|
11
14
|
"main": "./dist/index.js",
|
|
12
15
|
"types": "./dist/index.d.ts",
|
|
@@ -41,7 +44,7 @@
|
|
|
41
44
|
"access": "public"
|
|
42
45
|
},
|
|
43
46
|
"dependencies": {
|
|
44
|
-
"@collective-intelligence/extensions-sdk": "0.2.
|
|
47
|
+
"@collective-intelligence/extensions-sdk": "0.2.1"
|
|
45
48
|
},
|
|
46
49
|
"peerDependencies": {
|
|
47
50
|
"effect": "^4.1.0"
|
|
@@ -56,5 +59,5 @@
|
|
|
56
59
|
"typescript": "7.0.2",
|
|
57
60
|
"ultracite": "7.10.7"
|
|
58
61
|
},
|
|
59
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "7b3d604c39db3969749b14174d660a814a1f3a72"
|
|
60
63
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: extensions-sdk-frontend-move-to-effect
|
|
3
|
+
description: Set up a frontend extension package that uses `@collective-intelligence/extensions-sdk-frontend` for the `/effect` convention of the extension SDK family. Use when the package adds `effect`, the lockfile has more than one `effect` version, or lint reports `ci-solution/effect-subpath`.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Move a frontend extension to the `/effect` convention
|
|
7
|
+
|
|
8
|
+
Reference: [effect.md](../../docs/effect.md).
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. **Add the peer once.** Give the extension package `effect` `^4.1.0` as a
|
|
13
|
+
dependency. Done when the lockfile holds one `effect@` version.
|
|
14
|
+
2. **Keep the imports.** Contracts of this package stay on `.`; nothing comes
|
|
15
|
+
from its empty `/effect`. Studio API calls in Effect code use `StudioApi`
|
|
16
|
+
of `extensions-sdk-frontend-react/effect`. Done when no module imports an
|
|
17
|
+
Effect API from a root entry.
|
|
18
|
+
3. **Verify.** Run the type-check, the tests and oxlint with the
|
|
19
|
+
`recommended` config of `@collective-intelligence/lint`. Done when all
|
|
20
|
+
pass with no `ci-solution/effect-subpath` finding.
|