json-object-editor 0.10.654 → 0.10.657

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "json-object-editor",
3
- "version": "0.10.654",
3
+ "version": "0.10.657",
4
4
  "description": "JOE the Json Object Editor | Platform Edition",
5
5
  "main": "app.js",
6
6
  "scripts": {
package/readme.md CHANGED
@@ -5,6 +5,18 @@ JOE is software that allows you to manage data models via JSON objects. There ar
5
5
 
6
6
 
7
7
 
8
+ ## What’s new in 0.10.657 (brief)
9
+ - MCP everywhere (prompts, autofill, widget):
10
+ - **Prompts** (`ai_prompt`): new MCP config block (`mcp_enabled`, `mcp_toolset`, `mcp_selected_tools`, `mcp_instructions_mode`) lets you turn MCP tools on per‑prompt, pick a toolset (`read-only`, `minimal`, `all`, or `custom`), and auto‑generate short tool instructions.
11
+ - **Autofill fields**: the same MCP keys are now supported under a field’s `ai` config so autofill runs can optionally call MCP tools with the same toolset/playlist model.
12
+ - **Audit**: `ai_response` records MCP config and actual tool calls (`mcp_tools_used[]`) plus `used_openai_file_ids[]` so you can see which tools and files were used for any run.
13
+ - Uploader file roles + AI‑aware attachments:
14
+ - Uploader fields can define `file_roles` (e.g. `{ value:'transcript', label:'Intake Transcript', default:true }`) and JOE renders a per‑file role `<select>` that saves to `file_role` on each file object.
15
+ - `executeJOEAiPrompt` now sends a compact `uploaded_files[]` header (including `itemtype`, `field`, `filename`, `file_role`, and `openai_file_id`) alongside Responses input so prompts can reason about “transcript vs summary” sources while the OpenAI Files integration still handles raw content.
16
+ - Responses+tools (`runWithTools`) now attaches files on both the initial tool‑planning call and the final answer call, so MCP runs see the same attachments end‑to‑end.
17
+ - History safety:
18
+ - Hardened `JOE.Storage.save` history diffing to avoid a `craydent-object` edge case where comparing `null`/`undefined` values could throw on `.toString()`. This only affects `_history.changes`, not what is saved.
19
+
8
20
  ## What’s new in 0.10.654 (brief)
9
21
  - OpenAI Files mirrored on S3 upload; uploader tiles show the `openai_file_id`. Retry upload is available per file.
10
22
  - Responses integration improvements:
@@ -220,6 +232,23 @@ JOE is software that allows you to manage data models via JSON objects. There ar
220
232
  fs.writeFileSync('downloaded.bin', buf);
221
233
  ```
222
234
 
235
+ ### File roles on uploader fields
236
+ - **Schema configuration**:
237
+ - Any uploader field can declare `file_roles` as an array of `{ value, label?, default? }` objects, for example:
238
+ - `{ value:'transcript', label:'Intake Transcript', default:true }`
239
+ - `{ value:'summary', label:'Intake Summary' }`
240
+ - `label` is optional; it falls back to `value`. At most one role should have `default:true`.
241
+ - **Runtime behavior**:
242
+ - JOE renders a role `<select>` next to each uploaded file with:
243
+ - A blank option, and one option per configured role.
244
+ - The select updates the file object’s `file_role` property in the parent object (e.g. `client.files[].file_role`).
245
+ - Existing uploads show the role selector on first render as long as `file_roles` is configured on the field.
246
+ - When OpenAI Files are enabled, uploader files still receive `openai_file_id`, `openai_purpose`, `openai_status`, and `openai_error` as before; `file_role` is an additional, JOE‑level label.
247
+ - **AI integration**:
248
+ - When running an AI prompt via `executeJOEAiPrompt`, JOE inspects referenced objects for uploader fields and builds an `uploaded_files[]` header:
249
+ - Each entry includes `{ itemtype, field, name, role, openai_file_id }`.
250
+ - This header is merged into the user input so prompts can explicitly reason about which files are “transcripts”, “summaries”, etc., while the actual file bytes are attached via Responses `input_file` parts / `file_search` tool resources.
251
+
223
252
  ### Related endpoints (server/plugins)
224
253
 
225
254
  - `POST /API/plugin/awsConnect` – S3 upload (and OpenAI mirror when configured)
@@ -731,4 +760,4 @@ To help you develop and debug the widget + plugin in your instance, JOE exposes
731
760
  - Added a Responses‑based tool runner for `<joe-ai-widget>` that wires `ai_assistant.tools` into MCP functions via `chatgpt.runWithTools`.
732
761
  - Enhanced widget UX: assistant/user bubble theming (using `assistant_color` and user `color`), inline “tools used this turn” meta messages, and markdown rendering for assistant replies.
733
762
  - Expanded the AI widget test page with an assistant picker, live tool JSON viewer, a clickable conversation history list (resume existing `ai_widget_conversation` threads), and safer user handling (widget conversations now store user id/name/color explicitly and OAuth token‑exchange errors from Google are surfaced clearly during login).
734
- - Added field-level AI autofill support: schemas can declare `ai` config on a field (e.g. `{ name:'ai_summary', type:'rendering', ai:{ prompt:'Summarize the project in a few sentences.' } }`), which renders an inline “AI” button that calls `_joe.Ai.populateField('ai_summary')` and posts to `/API/plugin/chatgpt/autofill` to compute a JSON `patch` and update the UI (with confirmation before overwriting non-empty values).
763
+ - Added field-level AI autofill support: schemas can declare `ai` config on a field (e.g. `{ name:'ai_summary', type:'rendering', ai:{ prompt:'Summarize the project in a few sentences.' } }`), which renders an inline “AI” button that calls `_joe.Ai.populateField('ai_summary')` and posts to `/API/plugin/chatgpt/autofill` to compute a JSON `patch` and update the UI (with confirmation before overwriting non-empty values).