UNPKG

json-object-editor

Version:

JOE the Json Object Editor | Platform Edition

90 lines (87 loc) 4.09 kB
var schema = { title: "AI Pipeline | ${name}", display: "AI Pipeline", info: "Configurable AI context pipelines composed of ordered steps, used to compile context for agents like the Thought Engine.", summary: { description: "Declarative definition of AI context pipelines: an ordered list of steps (schema summaries, thoughts, objects, etc.) that feed agents.", purpose: "Use ai_pipeline to configure what context is compiled for a given agent run (e.g., which schemas, thoughts, and objects are included) without changing code.", labelField: "name", defaultSort: { field: "created", dir: "desc" }, searchableFields: ["name", "pipeline_id", "info", "_id"], allowedSorts: ["created", "joeUpdated", "name"], relationships: { outbound: [ // Future: agents that reference this pipeline_id ], inbound: { graphRef: "server/relationships.graph.json" } }, joeManagedFields: ["created", "joeUpdated"], fields: [ { name: "_id", type: "string", required: true }, { name: "itemtype", type: "string", required: true, const: "ai_pipeline" }, { name: "name", type: "string", required: true }, { name: "pipeline_id", type: "string", required: true }, { name: "info", type: "string" }, // Steps are minimal, but expressive enough to mirror current PIPELINES config { name: "steps", type: "objectList" }, { name: "joeUpdated", type: "string", format: "date-time" }, { name: "created", type: "string", format: "date-time" } ] }, listView: { title: function (p) { return ` <joe-subtext>${_joe.Utils.prettyPrintDTS(p.created)}</joe-subtext> <joe-title>${p.name}</joe-title> <joe-subtitle>${p.pipeline_id || ""}</joe-subtitle> `; }, listWindowTitle: "AI Pipelines" }, sorter: ["!created", "name"], fields: [ "name", { name: "pipeline_id", width: "50%", comment: "Logical id used by agents and ThoughtPipeline (e.g., thought_default, protocol_planning)." }, "info", { section_start: "steps", display: "Pipeline Steps", collapsed: false }, { name: "steps", type: "objectList", display: "Steps", comment: "Ordered steps that define how context is compiled.", properties: [ { name: "id", width: "20%", comment: "Stable step id (e.g., schema_summaries, accepted_thoughts)." }, { name: "step_type", type: "select", values: ["schema_summaries", "thoughts", "objects", "scope_object", "text", "tools"], width: "15%", comment: "Determines how this step is executed." }, { name: "render_mode", type: "select", values: ["json", "compact_json", "bullets", "text"], width: "15%", comment: "How this step is rendered into the agent prompt." }, { name: "required", type: "boolean", width: "10%", comment: "If true, pipeline fails when this step cannot be resolved." }, { name: "selector", type: "code", language: "json", width: "40%", comment: "Free-form selector JSON (e.g., { \"names\": [\"thought\",\"ai_prompt\" ] } or { \"query\": {\"itemtype\":\"thought\"}, \"sortBy\":\"joeUpdated\" } )." } ] }, { section_end: "steps" }, { section_start: "system", collapsed: true }, "_id", "created", "itemtype", { section_end: "system" } ], idprop: "_id" }; module.exports = schema;