@picked/client 0.0.56-next.1 → 0.0.56-next.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.
- package/dist/{api-CNxyQeRM.js → api-DHSz_ruC.js} +1 -1
- package/dist/{api-CtE-gT1L.cjs → api-DVSjNleu.cjs} +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/plugins/dynamic-experiences/index.js +1 -1
- package/dist/docs/actions.md +58 -0
- package/dist/docs/api/index.md +32 -0
- package/dist/docs/api-keys.md +33 -0
- package/dist/docs/conditions.md +52 -0
- package/dist/docs/experiences.md +33 -0
- package/dist/docs/features.md +51 -0
- package/dist/docs/fields.md +70 -0
- package/dist/docs/flow-builder/building-flows.md +61 -0
- package/dist/docs/flow-builder/condition-builder.md +54 -0
- package/dist/docs/flow-builder/keyboard-shortcuts.md +66 -0
- package/dist/docs/flow-builder/nodes.md +43 -0
- package/dist/docs/flow-builder/overview.md +43 -0
- package/dist/docs/index.md +79 -0
- package/dist/docs/pickedql/data-sources.md +39 -0
- package/dist/docs/pickedql/dimensions.md +23 -0
- package/dist/docs/pickedql/examples.md +165 -0
- package/dist/docs/pickedql/filtering.md +31 -0
- package/dist/docs/pickedql/index.md +34 -0
- package/dist/docs/pickedql/schema.md +95 -0
- package/dist/docs/pickedql/virtual-functions.md +84 -0
- package/dist/docs/projects.md +30 -0
- package/dist/docs/reference/index.md +11 -0
- package/dist/docs/reports.md +11 -0
- package/dist/docs/sdk/actions.md +7 -0
- package/dist/docs/sdk/conditions.md +131 -0
- package/dist/docs/sdk/content-security-policy.md +31 -0
- package/dist/docs/sdk/experiences.md +41 -0
- package/dist/docs/sdk/features.md +213 -0
- package/dist/docs/sdk/fields.md +263 -0
- package/dist/docs/sdk/index.md +74 -0
- package/dist/docs/sdk/plugins/create-experience.md +133 -0
- package/dist/docs/sdk/plugins/dynamic-experiences.md +59 -0
- package/dist/docs/sdk/plugins/index.md +9 -0
- package/dist/docs/sdk/plugins/window-object.md +20 -0
- package/dist/docs/sdk/predicates.md +113 -0
- package/dist/docs/sdk/steps.md +411 -0
- package/dist/docs/steps.md +35 -0
- package/dist/docs/team-management.md +40 -0
- package/dist/docs/tooling/chrome-extension.md +29 -0
- package/dist/docs/tooling/gtm-template.md +69 -0
- package/dist/docs/tooling/index.md +19 -0
- package/dist/docs/tooling/mcp.md +120 -0
- package/dist/docs/tooling/vite-plugin.md +82 -0
- package/dist/docs/workspaces.md +35 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/plugins/dynamic-experiences/index.js +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: docs
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# MCP server
|
|
6
|
+
|
|
7
|
+
Manage your Picked workspace from AI coding tools using the Model Context Protocol (MCP).
|
|
8
|
+
|
|
9
|
+
## Connecting
|
|
10
|
+
|
|
11
|
+
The server URL is `https://api.picked.app/mcp`.
|
|
12
|
+
|
|
13
|
+
### Claude Desktop
|
|
14
|
+
|
|
15
|
+
1. Open **Settings > Connectors > Add custom connector**
|
|
16
|
+
2. Set **Name** to `Picked` and **URL** to `https://api.picked.app/mcp`
|
|
17
|
+
3. Click **Connect** and complete the authorization prompt
|
|
18
|
+
|
|
19
|
+
### Project configuration (.mcp.json)
|
|
20
|
+
|
|
21
|
+
Add to your repository root. Works with Claude Code, Cursor, Windsurf, and other MCP-compatible tools.
|
|
22
|
+
|
|
23
|
+
:::code-group
|
|
24
|
+
|
|
25
|
+
```json [.mcp.json]
|
|
26
|
+
{
|
|
27
|
+
"mcpServers": {
|
|
28
|
+
"picked": {
|
|
29
|
+
"type": "http",
|
|
30
|
+
"url": "https://api.picked.app/mcp"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
:::
|
|
37
|
+
|
|
38
|
+
### Cursor
|
|
39
|
+
|
|
40
|
+
Add to `.cursor/mcp.json` in your project root:
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"mcpServers": {
|
|
45
|
+
"picked": {
|
|
46
|
+
"type": "http",
|
|
47
|
+
"url": "https://api.picked.app/mcp"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Available tools
|
|
54
|
+
|
|
55
|
+
### Discovery
|
|
56
|
+
|
|
57
|
+
| Tool | Description |
|
|
58
|
+
| ------------------------ | ------------------------------------------------------------ |
|
|
59
|
+
| `list_projects` | List organizations and projects |
|
|
60
|
+
| `get_workspace_overview` | Full workspace state |
|
|
61
|
+
| `get_schema_info` | Documentation for Picked concepts and data model |
|
|
62
|
+
| `get_picked_docs` | Fetch the complete Picked documentation (LLM-optimized text) |
|
|
63
|
+
|
|
64
|
+
### Experiences
|
|
65
|
+
|
|
66
|
+
| Tool | Description |
|
|
67
|
+
| ------------------------ | ----------------------------------------------------------------------------------------- |
|
|
68
|
+
| `create_experience` | Create an experience |
|
|
69
|
+
| `get_experience` | Get experience details including flow graph |
|
|
70
|
+
| `list_experiences` | List experiences |
|
|
71
|
+
| `update_experience_flow` | Atomically create, update, or delete steps, conditions, actions, fields, nodes, and edges |
|
|
72
|
+
|
|
73
|
+
### Steps, fields, conditions, and actions
|
|
74
|
+
|
|
75
|
+
| Tool | Description |
|
|
76
|
+
| ----------------------------------- | --------------- |
|
|
77
|
+
| `get_step` / `list_steps` | Read steps |
|
|
78
|
+
| `get_field` / `list_fields` | Read fields |
|
|
79
|
+
| `get_condition` / `list_conditions` | Read conditions |
|
|
80
|
+
| `get_action` / `list_actions` | Read actions |
|
|
81
|
+
|
|
82
|
+
### Features
|
|
83
|
+
|
|
84
|
+
| Tool | Description |
|
|
85
|
+
| ---------------- | -------------------------------------------------- |
|
|
86
|
+
| `create_feature` | Create a feature |
|
|
87
|
+
| `get_feature` | Get feature details |
|
|
88
|
+
| `list_features` | List features |
|
|
89
|
+
| `update_feature` | Update name, description, enabled state, or weight |
|
|
90
|
+
|
|
91
|
+
### Analytics
|
|
92
|
+
|
|
93
|
+
| Tool | Description |
|
|
94
|
+
| ---------------- | ---------------------------------------------------------------- |
|
|
95
|
+
| `query_pickedql` | Execute a PickedQL analytics query and return results as a table |
|
|
96
|
+
|
|
97
|
+
Use `get_schema_info` with topic `pickedql` to see available tables, virtual functions, and dimension columns before writing queries.
|
|
98
|
+
|
|
99
|
+
### Publishing
|
|
100
|
+
|
|
101
|
+
| Tool | Description |
|
|
102
|
+
| ------------------- | ---------------------------------------------- |
|
|
103
|
+
| `get_preview_url` | Generate a preview URL for unpublished changes |
|
|
104
|
+
| `publish_workspace` | Publish the workspace |
|
|
105
|
+
|
|
106
|
+
## Example prompts
|
|
107
|
+
|
|
108
|
+
- "List my Picked projects and show me what's configured"
|
|
109
|
+
- "Create a feature flag called 'new-checkout' enabled at 50% traffic"
|
|
110
|
+
- "Create an experience with a step that collects email addresses"
|
|
111
|
+
- "Show me control vs variant users by device for the last 30 days"
|
|
112
|
+
- "Generate a preview URL for my workspace on https://example.com"
|
|
113
|
+
|
|
114
|
+
## Tips
|
|
115
|
+
|
|
116
|
+
- Ask your agent to list your projects first, then explore your workspace to see what's configured.
|
|
117
|
+
- When building complex experiences, ask your agent about flow graphs and JSON Logic — it can look up the documentation for you.
|
|
118
|
+
- Experience flow updates are atomic — your agent can create steps, fields, nodes, and edges in a single operation.
|
|
119
|
+
- Preview your changes on your site before publishing to verify everything looks right.
|
|
120
|
+
- Ask your agent to query analytics data with PickedQL — it can look up the schema, write the SQL, and explain the results.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: docs
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Vite Plugin
|
|
6
|
+
|
|
7
|
+
`@picked/vite-plugin-picked` integrates Picked into your Vite project. It fetches your project configuration at build time and injects it via Vite's `define`, eliminating the runtime API request. During development it also serves a launcher page for previewing experiences with feature overrides.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
:::code-group
|
|
12
|
+
|
|
13
|
+
```bash [npm]
|
|
14
|
+
npm install @picked/vite-plugin-picked
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```bash [pnpm]
|
|
18
|
+
pnpm add @picked/vite-plugin-picked
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
```bash [yarn]
|
|
22
|
+
yarn add @picked/vite-plugin-picked
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
:::
|
|
26
|
+
|
|
27
|
+
## Setup
|
|
28
|
+
|
|
29
|
+
Add the plugin to your `vite.config.ts`:
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
import { defineConfig } from 'vite'
|
|
33
|
+
import { picked } from '@picked/vite-plugin-picked'
|
|
34
|
+
|
|
35
|
+
export default defineConfig({
|
|
36
|
+
plugins: [
|
|
37
|
+
picked({
|
|
38
|
+
projectId: 'your-project-id',
|
|
39
|
+
}),
|
|
40
|
+
],
|
|
41
|
+
})
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## How It Works
|
|
45
|
+
|
|
46
|
+
### Build-Time Config Injection
|
|
47
|
+
|
|
48
|
+
When Vite starts (both `dev` and `build`), the plugin:
|
|
49
|
+
|
|
50
|
+
1. Fetches your project configuration from the Picked API
|
|
51
|
+
2. Embeds the config directly into your bundle
|
|
52
|
+
3. The SDK reads the embedded config at runtime, skipping the network request
|
|
53
|
+
|
|
54
|
+
When a preview token is present at runtime, the SDK ignores the build-time config and fetches fresh data from the API.
|
|
55
|
+
|
|
56
|
+
### Dev Launcher
|
|
57
|
+
|
|
58
|
+
During development, the plugin serves an HTML page at `/` that lets you:
|
|
59
|
+
|
|
60
|
+
- See all features in your project with their current status
|
|
61
|
+
- Toggle features on/off for local testing
|
|
62
|
+
- Preview experiences with specific feature overrides
|
|
63
|
+
|
|
64
|
+
After the dev server starts, the launcher URL appears alongside Vite's native output:
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
➜ Picked: http://localhost:5173/
|
|
68
|
+
➜ Local: http://localhost:5173/
|
|
69
|
+
➜ Network: use --host to expose
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Options
|
|
73
|
+
|
|
74
|
+
| Option | Type | Default | Description |
|
|
75
|
+
| ---------------- | --------- | ---------------------------- | -------------------------------------------------------- |
|
|
76
|
+
| `projectId` | `string` | — | **Required.** Your Picked project ID. |
|
|
77
|
+
| `apiUrl` | `string` | `https://api.picked.app` | Custom API URL for self-hosted or local API instances. |
|
|
78
|
+
| `disableLauncher`| `boolean` | `false` | Disable the launcher page in both dev and build output. |
|
|
79
|
+
|
|
80
|
+
## Build Output
|
|
81
|
+
|
|
82
|
+
When building for production (`vite build`), the plugin emits an `index.html` file containing the launcher page (unless `disableLauncher` is set). This lets you deploy the launcher alongside your application for stakeholder previews.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: docs
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Workspaces
|
|
6
|
+
|
|
7
|
+
A workspace is a version of your project's configuration. Use workspaces to stage changes, preview them, and publish when ready.
|
|
8
|
+
|
|
9
|
+
## How workspaces work
|
|
10
|
+
|
|
11
|
+
Each project has a workspace that holds your experiences, features, and entity configurations. When you make changes in the dashboard — editing a flow, updating a feature, or modifying an entity — those changes exist in the workspace until you publish.
|
|
12
|
+
|
|
13
|
+
## Preview
|
|
14
|
+
|
|
15
|
+
Preview your workspace to see how changes look before publishing.
|
|
16
|
+
|
|
17
|
+
1. Click **Preview** in the workspace toolbar.
|
|
18
|
+
2. Enter the URL of your site.
|
|
19
|
+
3. Optionally override individual features — set each to **Default**, **On**, or **Off**.
|
|
20
|
+
4. Click **Open Preview**.
|
|
21
|
+
|
|
22
|
+
Your site opens in a new tab with the unpublished workspace applied. Preview uses query parameters to pass the workspace state to the SDK, so visitors on your live site are unaffected.
|
|
23
|
+
|
|
24
|
+
## Publish
|
|
25
|
+
|
|
26
|
+
Publishing creates an immutable snapshot of your workspace. Once published, the SDK serves the new configuration to visitors.
|
|
27
|
+
|
|
28
|
+
1. Click **Publish** in the workspace toolbar.
|
|
29
|
+
2. Confirm in the publish dialog.
|
|
30
|
+
|
|
31
|
+
The publish button is only enabled when there are unpublished changes. A status badge in the toolbar shows whether the workspace has unpublished changes or is up to date.
|
|
32
|
+
|
|
33
|
+
## Unpublished changes
|
|
34
|
+
|
|
35
|
+
The workspace tracks whether any changes have been made since the last publish. If you create or update an experience, feature, or entity after the last publish, the toolbar shows a warning badge indicating unpublished changes.
|
package/dist/esm/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { t as r } from "../logger-6z_gb4rA.js";
|
|
|
4
4
|
import { a as i, c as a, d as o, i as s, l as c, n as l, o as u, p as d, r as f, s as p, t as m, u as h } from "../supports-0XIfd4-R.js";
|
|
5
5
|
import { a as g, c as _, i as v, l as ee, n as te, o as ne, r as re, s as y } from "../experience-instance-DffMstSs.js";
|
|
6
6
|
import { i as ie, n as b, r as x, t as S } from "../storage-6Xk0uAxB.js";
|
|
7
|
-
import { n as ae, r as oe } from "../api-
|
|
7
|
+
import { n as ae, r as oe } from "../api-DHSz_ruC.js";
|
|
8
8
|
import { t as se } from "../id-CRqy981z.js";
|
|
9
9
|
import { attach as C, combine as w, createApi as T, createDomain as E, createEffect as D, createEvent as O, createStore as k, sample as A } from "effector";
|
|
10
10
|
import { createFactory as j, invoke as M } from "@withease/factories";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@picked/client",
|
|
3
|
-
"version": "0.0.56-next.
|
|
3
|
+
"version": "0.0.56-next.2",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@withease/factories": "^1.0.5"
|
|
6
6
|
},
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
},
|
|
141
141
|
"private": false,
|
|
142
142
|
"scripts": {
|
|
143
|
-
"build": "vite build",
|
|
143
|
+
"build": "vite build && node scripts/copy-docs.js",
|
|
144
144
|
"build:docs": "pnpm typedoc",
|
|
145
145
|
"check": "pnpm type-check && pnpm lint && pnpm knip && pnpm jscpd",
|
|
146
146
|
"dev": "vite build --watch",
|