json-object-editor 0.10.642 → 0.10.653

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.
@@ -13,8 +13,8 @@ Note: Use `hydrate {}` to load schema summaries and global datasets. Prefer summ
13
13
  - Treat “schema” as “itemtype” (JOE object type). Use `itemtype` in tool params.
14
14
  - Reads are autonomous; writes require explicit confirmation.
15
15
  - Prefer cache (`search` default) for exploration; use `source:"storage"` for authoritative reads.
16
- - Keep results scoped (limit 10–25 by default; increase only when needed).
17
16
  - Do not expose secrets/tokens; server may sanitize.
17
+ - Use slim to reduce payloads when requesting long lists of objects.
18
18
 
19
19
  ## Tools
20
20
  - listSchemas {}
@@ -31,6 +31,16 @@ Note: Use `hydrate {}` to load schema summaries and global datasets. Prefer summ
31
31
  - `related` contains non‑global referenced objects (e.g., ingredient, project, user),
32
32
  - `tags` / `statuses` are deduped lookup maps `{ _id, itemtype, name }` for those global types.
33
33
  - When looking up by id, call `understandObject` first instead of issuing many separate `getObject` / `getSchema` / `search` calls.
34
+ - **findObjectsByTag { tags, itemtype?, limit?, offset?, source?, slim?, withCount?, countOnly?, tagThreshold? }**
35
+ - Find objects that have ALL specified tags (AND logic). Tags can be provided as IDs (CUIDs) or names (strings) - names are resolved via fuzzy search.
36
+ - Returns `{ items, tags, count?, error? }` where `tags` contains the resolved tag objects used in the search.
37
+ - Use `countOnly: true` to get just the count and matched tags without fetching items.
38
+ - If a tag cannot be resolved, returns `{ items: [], tags: [...resolved ones...], error: "message" }` instead of throwing.
39
+ - **findObjectsByStatus { status, itemtype?, limit?, offset?, source?, slim?, withCount?, countOnly?, statusThreshold? }**
40
+ - Find objects by status. Status can be provided as ID (CUID) or name (string) - name is resolved via fuzzy search.
41
+ - Returns `{ items, status, count?, error? }` where `status` is the resolved status object used in the search.
42
+ - Use `countOnly: true` to get just the count and matched status without fetching items.
43
+ - If status cannot be resolved, returns `{ items: [], status: null, error: "message" }` instead of throwing.
34
44
  - saveObject { object }
35
45
  - saveObjects { objects, stopOnError?, concurrency? }
36
46
 
@@ -46,15 +56,59 @@ Note: Use `hydrate {}` to load schema summaries and global datasets. Prefer summ
46
56
 
47
57
  ## 🧭 When Finding Objects
48
58
 
49
- Example: “List all the conditions in the system.”
59
+ ### General Search
60
+ Example: "List all the conditions in the system."
50
61
 
51
- - Identify the itemtype (e.g., `condition`, `client`, `recommendation`, `task`). Do not ask for confirmation if its clear.
62
+ - Identify the itemtype (e.g., `condition`, `client`, `recommendation`, `task`). Do not ask for confirmation if it's clear.
52
63
  - Search by itemtype using `search`.
53
64
  - Use `"slim": true` to limit per‑record data.
54
65
  - Return essential fields: `_id`, `itemtype`, `name`, `info`, timestamps (from slim).
55
66
  - Sort by `name` ascending.
56
67
  - Include `"withCount": true` and a reasonable `"limit"` (e.g., 100–250) for bulk lists.
57
68
 
69
+ ### Finding by Tags
70
+ Example: "Show me all tasks tagged with 'urgent' and 'bug'."
71
+
72
+ - Use `findObjectsByTag` when the user explicitly mentions tags or wants to filter by tags.
73
+ - Tags can be provided as names (e.g., `"urgent"`, `"bug"`) or IDs - the function will resolve names via fuzzy search.
74
+ - The function requires ALL tags to be present (AND logic).
75
+ - Check the `tags` array in the response to see which tag objects were matched.
76
+ - If tags cannot be resolved, the response will include an `error` field with details.
77
+
78
+ Example:
79
+ ```json
80
+ {
81
+ "method": "findObjectsByTag",
82
+ "params": {
83
+ "tags": ["urgent", "bug"],
84
+ "itemtype": "task",
85
+ "limit": 50,
86
+ "slim": true
87
+ }
88
+ }
89
+ ```
90
+
91
+ ### Finding by Status
92
+ Example: "List all tasks with status 'In Progress'."
93
+
94
+ - Use `findObjectsByStatus` when the user explicitly mentions a status or wants to filter by status.
95
+ - Status can be provided as a name (e.g., `"In Progress"`) or ID - the function will resolve names via fuzzy search.
96
+ - Check the `status` object in the response to see which status was matched.
97
+ - If status cannot be resolved, the response will include an `error` field with details.
98
+
99
+ Example:
100
+ ```json
101
+ {
102
+ "method": "findObjectsByStatus",
103
+ "params": {
104
+ "status": "In Progress",
105
+ "itemtype": "task",
106
+ "limit": 50,
107
+ "slim": true
108
+ }
109
+ }
110
+ ```
111
+
58
112
  Example JSON‑RPC:
59
113
 
60
114
  ```json