picked 0.0.108 → 0.0.109

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.
@@ -74,6 +74,19 @@ A reference field reports an error when its target does not exist, or when the t
74
74
  belongs to the wrong Model. Fix every error before you publish, because Picked serves
75
75
  valid content only.
76
76
 
77
+ ## Size limit
78
+
79
+ The data of one entry can hold 1,000,000 bytes at most, as JSON in UTF-8.
80
+
81
+ | Change | Result when the data is larger |
82
+ | --- | --- |
83
+ | Create or edit an entry | The save stops. |
84
+ | Change the schema of a Model | The change stops, and the error names the entry. |
85
+ | Import a workspace | Picked imports nothing, and the error names the entry. |
86
+
87
+ The error gives the size of the data, and it names the largest top-level field. Make that
88
+ field smaller, or move some of its data into a different entry.
89
+
77
90
  ## Delete rules
78
91
 
79
92
  Picked does not delete an entry while something still points at it.
@@ -23,11 +23,11 @@ one label for each namespace and key.
23
23
 
24
24
  ## Owners
25
25
 
26
- | Owner | Where the labels stay | Scope to read the labels | Scope to set and remove the labels |
27
- | ------------ | ------------------------------------------------------------------------------------------------------------ | ---------------------------- | ---------------------------------- |
28
- | Lead | Until you delete the lead. Picked deletes the labels of a lead with the lead. | `ORGANIZATION_LEADS_READ` | `ORGANIZATION_LEADS_UPDATE` |
29
- | Project | Picked keeps the labels when you delete the project. These labels hold data for all the runs of the project. | `ORGANIZATION_PROJECTS_READ` | `ORGANIZATION_PROJECTS_UPDATE` |
30
- | Workflow run | With the run. Picked does not delete a run. | `ORGANIZATION_PROJECTS_READ` | `ORGANIZATION_PROJECTS_UPDATE` |
26
+ | Owner | Where the labels stay | Scope to read the labels | Scope to set and remove the labels |
27
+ | ------------ | ------------------------------------------------------------------------------------------------------------ | ----------------------------- | ---------------------------------- |
28
+ | Lead | Until you delete the lead. Picked deletes the labels of a lead with the lead. | `ORGANIZATION_LEADS_READ` | `ORGANIZATION_LEADS_UPDATE` |
29
+ | Project | Picked keeps the labels when you delete the project. These labels hold data for all the runs of the project. | `ORGANIZATION_PROJECTS_READ` | `ORGANIZATION_PROJECTS_UPDATE` |
30
+ | Workflow run | With the run. Picked does not delete a run. | `ORGANIZATION_WORKSPACE_READ` | `ORGANIZATION_PROJECTS_UPDATE` |
31
31
 
32
32
  A run reads, sets and removes its own labels without a scope.
33
33
 
@@ -131,7 +131,7 @@ The **Workflow runs** card shows 20 runs. **Show older runs** adds the next 20.
131
131
  | Surface | Scopes |
132
132
  | -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
133
133
  | Runs, Run | `ORGANIZATION_WORKSPACE_READ` and `ORGANIZATION_PROJECTS_READ` |
134
- | The labels of a run | `ORGANIZATION_PROJECTS_READ` to read them, and `ORGANIZATION_PROJECTS_UPDATE` to change them |
134
+ | The labels of a run | `ORGANIZATION_WORKSPACE_READ` to read them, and `ORGANIZATION_PROJECTS_UPDATE` to change them |
135
135
  | The **Runs** tab of the workflow | `ORGANIZATION_WORKSPACE_READ` and `ORGANIZATION_PROJECTS_READ`. Without these scopes, the workflow does not show the **Runs** tab. |
136
136
  | Workflow runs card | `ORGANIZATION_LEADS_READ` for the lead, and `ORGANIZATION_WORKSPACE_READ` and `ORGANIZATION_PROJECTS_READ` for its runs. Without the last two scopes, the card does not show. |
137
137
 
@@ -190,7 +190,7 @@ An operation with `@auth` needs a caller that has authenticated. `@auth(only: US
190
190
  | [`workflowCreate`](/reference/management-api/schema/workflow#workflowcreate) | Mutation | Creates a workflow in a workspace. The caller must hold the scopes the tools of the graph need, as `Workflow.scopes` describes. Scope: `ORGANIZATION_WORKSPACE_UPDATE`. |
191
191
  | [`workflowDelete`](/reference/management-api/schema/workflow#workflowdelete) | Mutation | Deletes a workflow. Published versions keep their copy, and an action that started it can start another workflow. Scope: `ORGANIZATION_WORKSPACE_UPDATE`. |
192
192
  | [`workflowGraphUpdate`](/reference/management-api/schema/workflow#workflowgraphupdate) | Mutation | Updates the graph of a workflow with a change set, all or nothing. A refused change set writes nothing and comes back in `errors`. Scope: `ORGANIZATION_WORKSPACE_UPDATE`. |
193
- | [`workflowRun`](/reference/management-api/schema/workflow-run#workflowrun) | Query | Reads a workflow run. Scope: `ORGANIZATION_PROJECTS_READ`. |
193
+ | [`workflowRun`](/reference/management-api/schema/workflow-run#workflowrun) | Query | Reads a workflow run. Scope: `ORGANIZATION_WORKSPACE_READ`. |
194
194
  | [`workflowRunRerun`](/reference/management-api/schema/workflow-run#workflowrunrerun) | Mutation | Reruns a workflow run that has ended as a new run of the whole workflow, on the version chosen. Every step runs again, so leads are created and outbound requests are sent again, and an `action_response` answers nobody. The caller must also hold every scope the workflow of the chosen version acts with. Scope: `ORGANIZATION_WORKSPACE_UPDATE`. |
195
195
  | [`workflows`](/reference/management-api/schema/workflow#workflows) | Query | Lists the workflows in a workspace. `search` matches a case-insensitive substring of the name. Scope: `ORGANIZATION_WORKSPACE_READ`. |
196
196
  | [`workflowTestRun`](/reference/management-api/schema/workflow#workflowtestrun) | Mutation | Tests a workflow by walking its draft graph once, holding back every write. Nothing is stored, and the caller must also hold every scope in `Workflow.scopes`. Scope: `ORGANIZATION_WORKSPACE_UPDATE`. |
@@ -60,7 +60,7 @@ The kind of entity a label is on. Each kind is read and written under its own sc
60
60
  | --- | --- | --- |
61
61
  | `LEAD` | `ORGANIZATION_LEADS_READ` | `ORGANIZATION_LEADS_UPDATE` |
62
62
  | `PROJECT` | `ORGANIZATION_PROJECTS_READ` | `ORGANIZATION_PROJECTS_UPDATE` |
63
- | `WORKFLOW_RUN` | `ORGANIZATION_PROJECTS_READ` | `ORGANIZATION_PROJECTS_UPDATE` |
63
+ | `WORKFLOW_RUN` | `ORGANIZATION_WORKSPACE_READ` | `ORGANIZATION_PROJECTS_UPDATE` |
64
64
 
65
65
  A workflow run reads and writes its own labels without a scope.
66
66
  """
@@ -68,7 +68,7 @@ type Lead {
68
68
  operations(first: Int, after: String, sortKey: OperationSortKeys = OCCURRED_AT, reverse: Boolean = true): LeadOperationConnection! @auth
69
69
  """
70
70
  The workflow runs that created or changed the lead, each once, newest first.
71
- Scope: `ORGANIZATION_LEADS_READ` and `ORGANIZATION_PROJECTS_READ`.
71
+ Scope: `ORGANIZATION_LEADS_READ` and `ORGANIZATION_WORKSPACE_READ`.
72
72
  """
73
73
  workflowRuns(first: Int, after: String, last: Int, before: String, reverse: Boolean = true): WorkflowRunConnection! @auth
74
74
  """
@@ -142,6 +142,11 @@ type Project {
142
142
  AI agents read it. Null until set.
143
143
  """
144
144
  context: String
145
+ """
146
+ The analytics brief in Markdown: metric definitions, key events, segments, reporting conventions.
147
+ Picked's AI agents read it when they query or explain analytics. Null until set.
148
+ """
149
+ analyticsContext: String
145
150
  """The organisation the project belongs to."""
146
151
  organization: Organization!
147
152
  """
@@ -612,6 +617,8 @@ input ProjectUpdateInput {
612
617
  name: String
613
618
  """The project brief in Markdown. An empty string clears it."""
614
619
  context: String
620
+ """The project analytics brief in Markdown. An empty string clears it."""
621
+ analyticsContext: String
615
622
  }
616
623
  ```
617
624
 
@@ -13,7 +13,7 @@ See [Management API schema](/reference/management-api/schema) for every domain,
13
13
  ### `workflowRun`
14
14
 
15
15
  Reads a workflow run.
16
- Scope: `ORGANIZATION_PROJECTS_READ`.
16
+ Scope: `ORGANIZATION_WORKSPACE_READ`.
17
17
 
18
18
  ```graphql
19
19
  workflowRun(id: ID!): WorkflowRun @auth
@@ -148,24 +148,24 @@ type WorkflowRun {
148
148
  rerun: Boolean!
149
149
  """
150
150
  The tasks of the run, one per visit of a node, in the order the run reached them.
151
- Scope: `ORGANIZATION_PROJECTS_READ`.
151
+ Scope: `ORGANIZATION_WORKSPACE_READ`.
152
152
  """
153
153
  tasks(first: Int, after: String, sortKey: WorkflowTaskSortKeys = STARTED_AT, reverse: Boolean = false): WorkflowTaskConnection! @auth
154
154
  """
155
155
  The live labels on the run, ordered by namespace, then key. `labelsSet` with `ownerType:
156
156
  WORKFLOW_RUN` writes them.
157
- Scope: `ORGANIZATION_PROJECTS_READ`.
157
+ Scope: `ORGANIZATION_WORKSPACE_READ`.
158
158
  """
159
159
  labels: [Label!]! @auth
160
160
  """
161
161
  The run the chain of a rerun started from. Null when the run is not a rerun.
162
- Scope: `ORGANIZATION_PROJECTS_READ`.
162
+ Scope: `ORGANIZATION_WORKSPACE_READ`.
163
163
  """
164
164
  rerunRoot: WorkflowRun @auth
165
165
  """
166
166
  The reruns of the run, latest first. A rerun of a rerun is listed under the run its chain
167
167
  started from, so the list is empty on a rerun.
168
- Scope: `ORGANIZATION_PROJECTS_READ`.
168
+ Scope: `ORGANIZATION_WORKSPACE_READ`.
169
169
  """
170
170
  reruns(first: Int, after: String, last: Int, before: String, reverse: Boolean = true): WorkflowRunConnection! @auth
171
171
  """
@@ -263,7 +263,7 @@ type WorkflowTask {
263
263
  run: WorkflowRun!
264
264
  """
265
265
  The creates, updates and deletes the task made to leads and labels, newest first.
266
- Scope: `ORGANIZATION_PROJECTS_READ`.
266
+ Scope: `ORGANIZATION_WORKSPACE_READ`.
267
267
  """
268
268
  operations(first: Int, after: String, sortKey: OperationSortKeys = OCCURRED_AT, reverse: Boolean = true): OperationConnection! @auth
269
269
  }
@@ -331,7 +331,7 @@ type WorkflowTaskEdge {
331
331
  extend type Workflow {
332
332
  """
333
333
  The runs of the workflow, oldest first.
334
- Scope: `ORGANIZATION_PROJECTS_READ`.
334
+ Scope: `ORGANIZATION_WORKSPACE_READ`.
335
335
  """
336
336
  runs(first: Int, after: String, last: Int, before: String, sortKey: WorkflowRunSortKeys = STARTED_AT, reverse: Boolean = false): WorkflowRunConnection! @auth
337
337
  }
@@ -408,7 +408,7 @@ extend type Subscription {
408
408
  Pushes a workflow run's progress: its state, its tasks from the one `from` names, then each
409
409
  change. The last message's `end` says why the stream ended and when to subscribe again, and a
410
410
  run that has already finished sends only that message. Served only at `/api/graphql/stream`.
411
- Scope: `ORGANIZATION_PROJECTS_READ`.
411
+ Scope: `ORGANIZATION_WORKSPACE_READ`.
412
412
  """
413
413
  workflowRunProgress(
414
414
  id: ID!
@@ -19,6 +19,13 @@ Each tool has its own section. Link to a tool with its name as the anchor, for e
19
19
 
20
20
  Lists your organizations and projects. Call it first: each other tool needs a project ID or a workspace ID.
21
21
 
22
+ #### `get_my_permissions`
23
+
24
+ Lists the permissions that you hold in each organization. A tool call fails with the
25
+ permission that it needs when you do not hold it. Call this tool before a change, or to
26
+ find out why a call failed. Give `organization_id` to see one organization. Give
27
+ `project_id` with it to see your permissions at that project.
28
+
22
29
  #### `list_workspaces`
23
30
 
24
31
  Lists the workspaces in a project.
@@ -31,10 +38,29 @@ Reads the live version of the project, and the draft of a workspace with its exp
31
38
 
32
39
  Reads the brief that the project owner wrote about the project, its goals and its entry points.
33
40
 
41
+ #### `update_project_context`
42
+
43
+ Replaces the project brief. Read the brief first with `get_project_context`, change it,
44
+ and send the whole document back. An empty value clears the brief. You must have
45
+ permission to edit project settings.
46
+
47
+ #### `get_project_analytics_context`
48
+
49
+ Reads the analytics brief that the project owner wrote: the metric definitions, the key
50
+ events, the segments and the report rules. Read it before you query or explain
51
+ analytics.
52
+
53
+ #### `update_project_analytics_context`
54
+
55
+ Replaces the analytics brief. Read the brief first with `get_project_analytics_context`,
56
+ change it, and send the whole document back. An empty value clears the brief. You must
57
+ have permission to edit project settings.
58
+
34
59
  #### `get_project_settings`
35
60
 
36
- Gives the name, the time zone, and the stored settings of a project, with the link to the
37
- project settings page. You change the settings in the dashboard.
61
+ Gives the name, the time zone, and the stored settings of a project. Also gives the country where
62
+ the project keeps its analytics data, and the link to the project settings page. You change the
63
+ settings in the dashboard.
38
64
 
39
65
  #### `guide_create_organisation`
40
66
 
@@ -470,10 +496,6 @@ Gives the arguments and the result of each tool that you name, for use in `picke
470
496
 
471
497
  Sends a report about a problem in the MCP server to the Picked team.
472
498
 
473
- :::note
474
- A PickedQL query is not available through the MCP server at this time.
475
- :::
476
-
477
499
  ## Example prompts
478
500
 
479
501
  - "List my Picked projects and show me the options on each one"
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "picked",
3
3
  "description": "The Picked SDK front door: the client, the picked.config helpers, and the picked CLI in one install",
4
- "version": "0.0.108",
4
+ "version": "0.0.109",
5
5
  "bin": {
6
6
  "picked": "dist/esm/bin.js"
7
7
  },
8
8
  "dependencies": {
9
- "@picked/cli": "0.0.108",
10
- "@picked/config": "0.0.108"
9
+ "@picked/cli": "0.0.109",
10
+ "@picked/config": "0.0.109"
11
11
  },
12
12
  "devDependencies": {
13
13
  "@picked/client": "workspace:*",
@@ -64,7 +64,7 @@
64
64
  "main": "./dist/cjs/index.js",
65
65
  "module": "./dist/esm/index.js",
66
66
  "peerDependencies": {
67
- "@picked/client": "0.0.108"
67
+ "@picked/client": "0.0.109"
68
68
  },
69
69
  "private": false,
70
70
  "publishConfig": {