json-object-editor 0.10.650 → 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.
- package/CHANGELOG.md +15 -0
- package/_www/mcp-test.html +18 -0
- package/css/joe-styles.css +2 -1
- package/css/joe.css +4 -2
- package/css/joe.min.css +1 -1
- package/docs/joe_agent_custom_gpt_instructions_v_3.md +57 -3
- package/js/JsonObjectEditor.jquery.craydent.js +185 -5
- package/js/joe-ai.js +10 -6
- package/js/joe.js +186 -6
- package/js/joe.min.js +1 -1
- package/package.json +1 -1
- package/readme.md +12 -0
- package/server/apps/aihub.js +1 -0
- package/server/fields/core.js +13 -4
- package/server/modules/MCP.js +1237 -914
- package/server/modules/ThoughtPipeline.js +17 -3
- package/server/plugins/chatgpt.js +76 -7
- package/server/schemas/ai_pipeline.js +90 -0
- package/server/schemas/ai_response.js +162 -17
- package/server/schemas/thought.js +57 -5
- package/server/webconfig.js +1 -1
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -56,6 +56,16 @@ JOE is software that allows you to manage data models via JSON objects. There ar
|
|
|
56
56
|
- Params: `{ itemtype?, q, filters?, fields?, threshold?, limit?, offset?, highlight?, minQueryLength? }`
|
|
57
57
|
- Defaults: `fields` resolved from schema `searchables` (plural) if present; otherwise weights `name:0.6, info:0.3, description:0.1`. `threshold:0.5`, `limit:50`, `minQueryLength:2`.
|
|
58
58
|
- Returns: `{ items, count }`. Each item may include `_score` (0..1) and `_matches` when `highlight` is true.
|
|
59
|
+
- `findObjectsByTag { tags, itemtype?, limit?, offset?, source?, slim?, withCount?, countOnly?, tagThreshold? }`
|
|
60
|
+
- 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.
|
|
61
|
+
- Returns: `{ items, tags, count?, error? }` where `tags` contains the resolved tag objects used in the search.
|
|
62
|
+
- Use `countOnly: true` to get just the count and matched tags without fetching items.
|
|
63
|
+
- If tags cannot be resolved, returns `{ items: [], tags: [...resolved ones...], error: "message" }` instead of throwing.
|
|
64
|
+
- `findObjectsByStatus { status, itemtype?, limit?, offset?, source?, slim?, withCount?, countOnly?, statusThreshold? }`
|
|
65
|
+
- Find objects by status. Status can be provided as ID (CUID) or name (string) - name is resolved via fuzzy search.
|
|
66
|
+
- Returns: `{ items, status, count?, error? }` where `status` is the resolved status object used in the search.
|
|
67
|
+
- Use `countOnly: true` to get just the count and matched status without fetching items.
|
|
68
|
+
- If status cannot be resolved, returns `{ items: [], status: null, error: "message" }` instead of throwing.
|
|
59
69
|
- `saveObject({ object })`
|
|
60
70
|
- `saveObjects({ objects, stopOnError?, concurrency? })`
|
|
61
71
|
- Batch save with per-item history/events. Defaults: `stopOnError=false`, `concurrency=5`.
|
|
@@ -303,6 +313,8 @@ Properties for all Fields
|
|
|
303
313
|
- sortable(true)
|
|
304
314
|
- `code` :
|
|
305
315
|
- language
|
|
316
|
+
- `json` :
|
|
317
|
+
- edit/store JSON subobjects as objects (not strings) using the code editor in JSON mode; pretty-prints on blur/save and treats whitespace-only reformatting as no-op changes.
|
|
306
318
|
|
|
307
319
|
- `boolean`:
|
|
308
320
|
- label:controls checkbox label
|
package/server/apps/aihub.js
CHANGED
package/server/fields/core.js
CHANGED
|
@@ -97,6 +97,8 @@ var fields = {
|
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
99
|
created:{locked:true,width:'50%'},
|
|
100
|
+
creator_type:{type:'select',values:['','user','agent'],locked:true,comment:'High-level origin of this record: human user or agent.'},
|
|
101
|
+
creator_id:{type:'text',locked:true,comment:'_id of the user or logical agent that created this record.'},
|
|
100
102
|
itemtype:{locked:true, hidden:true},
|
|
101
103
|
priority:{type:'select',values:[{name:'',value:1000},{name:1},{name:2},{name:3}]},
|
|
102
104
|
site:{type:'select',values:'site',goto:'site',idprop:'_id',blank:true,icon:'site'},
|
|
@@ -568,7 +570,8 @@ var fields = {
|
|
|
568
570
|
}
|
|
569
571
|
var schema = _joe.current && _joe.current.schema || null;
|
|
570
572
|
var itemtype = (obj && obj.itemtype) || (schema && schema.name) || 'item';
|
|
571
|
-
// Allow schemas to override the default prompt via
|
|
573
|
+
// Allow schemas to override the default prompt/model via
|
|
574
|
+
// extend:'proposeThought', specs:{ prompt:'...', model:'gpt-5-nano' }
|
|
572
575
|
var fieldDef = null;
|
|
573
576
|
if (_joe && typeof _joe.getField === 'function') {
|
|
574
577
|
try { fieldDef = _joe.getField('proposeThought'); } catch(_e) {}
|
|
@@ -582,11 +585,17 @@ var fields = {
|
|
|
582
585
|
);
|
|
583
586
|
var taId = 'propose_thought_prompt_' + obj._id;
|
|
584
587
|
var html = '';
|
|
585
|
-
html += '<joe-
|
|
588
|
+
html += '<div class="joe-field-comment">Thought prompt</div>';
|
|
586
589
|
html += '<textarea id="'+taId+'" style="width:100%;min-height:80px;">'+defaultPrompt+'</textarea>';
|
|
587
590
|
// For now, use the generic Thought agent; scope_id is the current object id.
|
|
588
|
-
|
|
589
|
-
|
|
591
|
+
var args = "'" + obj._id + "','" + taId + "'";
|
|
592
|
+
if (fieldDef && fieldDef.model) {
|
|
593
|
+
// escape single quotes in model name for inline JS
|
|
594
|
+
var m = String(fieldDef.model).replace(/'/g, "\\'");
|
|
595
|
+
args += ",'" + m + "'";
|
|
596
|
+
}
|
|
597
|
+
html += '<joe-button class="joe-button joe-ai-button joe-iconed-button" ';
|
|
598
|
+
html += 'onclick="_joe.Ai.runProposeThought('+ args +')">Run Thought Agent</joe-button>';
|
|
590
599
|
return html;
|
|
591
600
|
}
|
|
592
601
|
},
|