@mxstage/mxstage 0.2.8 → 0.2.9

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/README.md CHANGED
@@ -22,7 +22,7 @@ Website: https://mxstage.tsunagi.app · Contact: mxstage@tsunagi.app
22
22
  - **Keep a record of what was approved.** The commit panel saves a diff report (Excel): one row per changed cell with the old value, the new value, who changed it (the AI assistant or a person) and why. After a commit, it also holds the write log of that commit.
23
23
  - **Nothing leaves your PC except calls to your Maximo and your AI assistant.** There is no MX Stage cloud and no telemetry. There are two optional exceptions: if you turn on **Settings → Updates → Update automatically** (off by default), the bridge asks GitHub once a day for the latest version number; and if you choose **Settings → Demo → Download data and connect**, it downloads fictional sample data once from `mxstage-demo.pages.dev` (nothing is sent). Installs made with the setup script then update themselves while no work is open (the new version from GitHub, its packages from the npm registry); the Claude Desktop extension downloads the new file from GitHub and checks it for you to install. A small local process (the *bridge*) serves the work screen, talks MCP to your AI assistant and relays requests to Maximo, so Maximo needs no CORS settings. Your Maximo API key is saved on this PC by the bridge, encrypted with Windows data protection (DPAPI), and is not sent to the browser (on macOS, untested, the Keychain protects it; on Linux, a file only your user can read). Every window of the work screen — the installed app, a browser tab, or the browser inside your AI assistant — connects automatically, even after a restart, and you can switch between saved Maximo environments in Settings. (You can also connect without saving; the key then stays only in the tab's memory.)
24
24
  - **Teach it your procedures.** Save a procedure worked out in a conversation as a *Skill*; the AI follows it next time.
25
- - **Keep the customer's way of writing.** *Customer dictionaries* hold how a customer writes names, the words that mean a failure code, and how values such as maker or department names are written. The AI adds entries and the work screen applies them as rules (matching, codes from text, value replacement), so the next month's files need less reading. You check and save them in the work screen; with a shared folder per connection (OneDrive, SharePoint, a network folder…), saved entries reach every member through your own file sync. MX Stage itself sends them nowhere.
25
+ - **Keep the customer's way of writing.** *Customer dictionaries* hold how a customer writes names, the words that mean a failure code, and how values such as maker or department names are written. The AI adds entries and the work screen applies them as rules (matching, codes from text, value replacement), so the next month's files need less reading. You check and save them in the work screen. Each connection keeps its dictionaries and Skills in its own folder (Documents\MX Stage\<connection> by default); choose a shared folder (OneDrive, SharePoint, a network folder…) in Settings → Skills & dictionaries, and saved entries reach every member through your own file sync. MX Stage itself sends them nowhere.
26
26
 
27
27
  ## Why not call the Maximo REST API from the AI directly?
28
28
 
@@ -174,12 +174,13 @@ A Skill is a procedure the AI assistant follows.
174
174
  | Built-in: index | `skills/mxstage-workbench` | The rules for every task and which Skill to read when | Replaced with MX Stage updates; do not edit |
175
175
  | Built-in: basic operations | `skills/mxstage-core-*` (8) | Loading, analysing, changing, matching, importing, committing, the work screen, writing Skills | Same |
176
176
  | Built-in: standard Maximo objects | `skills/mxstage-obj-*` (8) | Assets and meters, locations, classifications and specifications, work orders, PMs and job plans, items and inventory, purchasing, reference data: what Maximo does with them, what MX Stage can change and the traps | Same |
177
- | Yours | `~/.config/mxstage/skills/<name>/SKILL.md` | Each customer's environment (custom objects, attributes, rules) and your repeated tasks | Yours; kept across updates and never sent anywhere. Names starting with `mxstage` are reserved |
177
+ | A customer's | The connection's folder, with its dictionaries (`skills/<name>/versions/`) | That customer's environment (custom objects, attributes, rules) and repeated tasks | Shared with the members who use the same folder; every save is a new version. Given to the AI only while the work screen is connected to that customer |
178
+ | Yours on this PC | `~/.config/mxstage/skills/<name>/SKILL.md` | Your own procedures for any connection | Kept across updates and never sent anywhere. Names starting with `mxstage` are reserved |
178
179
 
179
180
  - **Every assistant gets the index**: it is attached, with the list of all Skills, to the result of the first tool call in each conversation, so assistants that cannot load Skill files (Claude Desktop chat, for example) follow the same rules. Tool results name the Skills for each step (for example the asset and classification Skills when asset specifications are loaded), and the AI reads them with `get_skill`.
180
- - **Your Skills come first for their customer**: they may replace steps of the built-in Skills, never the rules of the index.
181
- - **Create Skills from the chat**: say "save this procedure as a Skill". The AI shows the name, description and body, and saves it after you agree.
182
- - Run the installer again to copy new or changed Skills to each assistant.
181
+ - **Your Skills come first for their customer**: they may replace steps of the built-in Skills, never the rules of the index. A customer's Skill is used instead of one of this PC with the same name.
182
+ - **Create Skills from the chat**: say "keep this procedure as a Skill". The AI shows the name, description and body and, after you agree, keeps a draft; the work screen shows a notice, and the draft is used only after you check it and press Save in Settings → Skills & dictionaries. Each Skill there has a history and can be restored.
183
+ - Run the installer again to copy new or changed Skills of this PC to each assistant. A customer's Skills are never copied there, so they are not read while you work for another customer.
183
184
 
184
185
  ## Documentation
185
186
 
@@ -1 +1 @@
1
- import{s as L,r,i as D,a as $,b as z,c as J,T as Q,C as U,m as Z}from"./index-C9kLOfvw.js";const ee=()=>t=>t.targetX,te=()=>t=>t.targetY,re=()=>t=>t.targetWidth,ne=()=>t=>t.targetHeight,ie=()=>t=>t.targetY+10,se=()=>t=>Math.max(0,(t.targetHeight-28)/2),ae=L("div")({name:"DataGridOverlayEditorStyle",class:"gdg-d19meir1",propsAsIs:!1,vars:{"d19meir1-0":[te(),"px"],"d19meir1-1":[ee(),"px"],"d19meir1-2":[re(),"px"],"d19meir1-3":[ne(),"px"],"d19meir1-4":[ie(),"px"],"d19meir1-5":[se(),"px"]}});function oe(){const[t,s]=r.useState();return[t??void 0,s]}function de(){const[t,s]=oe(),[n,p]=r.useState(0),[f,b]=r.useState(!0);r.useLayoutEffect(()=>{if(t===void 0||!("IntersectionObserver"in window))return;const a=new IntersectionObserver(o=>{o.length!==0&&b(o[0].isIntersecting)},{threshold:1});return a.observe(t),()=>a.disconnect()},[t]),r.useEffect(()=>{if(f||t===void 0)return;let a;const o=()=>{const{right:v}=t.getBoundingClientRect();p(g=>Math.min(g+window.innerWidth-v-10,0)),a=requestAnimationFrame(o)};return a=requestAnimationFrame(o),()=>{a!==void 0&&cancelAnimationFrame(a)}},[t,f]);const C=r.useMemo(()=>({transform:`translateX(${n}px)`}),[n]);return{ref:s,style:C}}const ue=t=>{const{target:s,content:n,onFinishEditing:p,forceEditMode:f,initialValue:b,imageEditorOverride:C,markdownDivCreateNode:a,highlight:o,className:v,theme:g,id:G,cell:x,bloom:I,validateCell:m,getCellRenderer:w,provideEditor:F,isOutsideClick:H}=t,[d,X]=r.useState(f?n:void 0),O=r.useRef(d??n);O.current=d??n;const[y,S]=r.useState(()=>m===void 0?!0:!(D(n)&&m?.(x,n,O.current)===!1)),u=r.useCallback((e,i)=>{p(y?e:void 0,i)},[y,p]),A=r.useCallback(e=>{if(m!==void 0&&e!==void 0&&D(e)){const i=m(x,e,O.current);i===!1?S(!1):(typeof i=="object"&&(e=i),S(!0))}X(e)},[x,m]),h=r.useRef(!1),c=r.useRef(void 0),K=r.useCallback(()=>{u(d,[0,0]),h.current=!0},[d,u]),W=r.useCallback((e,i)=>{u(e,i??c.current??[0,0]),h.current=!0},[u]),Y=r.useCallback(async e=>{let i=!1;e.key==="Escape"?(e.stopPropagation(),e.preventDefault(),c.current=[0,0]):e.key==="Enter"&&!e.shiftKey?(e.stopPropagation(),e.preventDefault(),c.current=[0,1],i=!0):e.key==="Tab"&&(e.stopPropagation(),e.preventDefault(),c.current=[e.shiftKey?-1:1,0],i=!0),window.setTimeout(()=>{!h.current&&c.current!==void 0&&(u(i?d:void 0,c.current),h.current=!0)},0)},[u,d]),k=d??n,[l,j]=r.useMemo(()=>{if($(n))return[];const e=F?.(n);return e!==void 0?[e,!1]:[w(n)?.provideEditor?.(n),!1]},[n,w,F]),{ref:q,style:B}=de();let P=!0,M,_=!0,E;if(l!==void 0){P=l.disablePadding!==!0,_=l.disableStyling!==!0;const e=z(l);e&&(E=l.styleOverride);const i=e?l.editor:l;M=r.createElement(i,{isHighlighted:o,onChange:A,value:k,initialValue:b,onFinishedEditing:W,validatedSelection:D(k)?k.selectionRange:void 0,forceEditMode:f,target:s,imageEditorOverride:C,markdownDivCreateNode:a,isValid:y,theme:g})}E={...E,...B};const N=document.getElementById("portal");if(N===null)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please add `<div id="portal" />` as the last child of your `<body>`.'),null;let R=_?"gdg-style":"gdg-unstyle";y||(R+=" gdg-invalid"),P&&(R+=" gdg-pad");const T=I?.[0]??1,V=I?.[1]??1;return J.createPortal(r.createElement(Q.Provider,{value:g},r.createElement(U,{style:Z(g),className:v,onClickOutside:K,isOutsideClick:H},r.createElement(ae,{ref:q,id:G,className:R,style:E,as:j===!0?"label":void 0,targetX:s.x-T,targetY:s.y-V,targetWidth:s.width+T*2,targetHeight:s.height+V*2},r.createElement("div",{className:"gdg-clip-region",onKeyDown:Y},M)))),N)};export{ue as default};
1
+ import{s as L,r,i as D,a as $,b as z,c as J,T as Q,C as U,m as Z}from"./index-XMj1dRRx.js";const ee=()=>t=>t.targetX,te=()=>t=>t.targetY,re=()=>t=>t.targetWidth,ne=()=>t=>t.targetHeight,ie=()=>t=>t.targetY+10,se=()=>t=>Math.max(0,(t.targetHeight-28)/2),ae=L("div")({name:"DataGridOverlayEditorStyle",class:"gdg-d19meir1",propsAsIs:!1,vars:{"d19meir1-0":[te(),"px"],"d19meir1-1":[ee(),"px"],"d19meir1-2":[re(),"px"],"d19meir1-3":[ne(),"px"],"d19meir1-4":[ie(),"px"],"d19meir1-5":[se(),"px"]}});function oe(){const[t,s]=r.useState();return[t??void 0,s]}function de(){const[t,s]=oe(),[n,p]=r.useState(0),[f,b]=r.useState(!0);r.useLayoutEffect(()=>{if(t===void 0||!("IntersectionObserver"in window))return;const a=new IntersectionObserver(o=>{o.length!==0&&b(o[0].isIntersecting)},{threshold:1});return a.observe(t),()=>a.disconnect()},[t]),r.useEffect(()=>{if(f||t===void 0)return;let a;const o=()=>{const{right:v}=t.getBoundingClientRect();p(g=>Math.min(g+window.innerWidth-v-10,0)),a=requestAnimationFrame(o)};return a=requestAnimationFrame(o),()=>{a!==void 0&&cancelAnimationFrame(a)}},[t,f]);const C=r.useMemo(()=>({transform:`translateX(${n}px)`}),[n]);return{ref:s,style:C}}const ue=t=>{const{target:s,content:n,onFinishEditing:p,forceEditMode:f,initialValue:b,imageEditorOverride:C,markdownDivCreateNode:a,highlight:o,className:v,theme:g,id:G,cell:x,bloom:I,validateCell:m,getCellRenderer:w,provideEditor:F,isOutsideClick:H}=t,[d,X]=r.useState(f?n:void 0),O=r.useRef(d??n);O.current=d??n;const[y,S]=r.useState(()=>m===void 0?!0:!(D(n)&&m?.(x,n,O.current)===!1)),u=r.useCallback((e,i)=>{p(y?e:void 0,i)},[y,p]),A=r.useCallback(e=>{if(m!==void 0&&e!==void 0&&D(e)){const i=m(x,e,O.current);i===!1?S(!1):(typeof i=="object"&&(e=i),S(!0))}X(e)},[x,m]),h=r.useRef(!1),c=r.useRef(void 0),K=r.useCallback(()=>{u(d,[0,0]),h.current=!0},[d,u]),W=r.useCallback((e,i)=>{u(e,i??c.current??[0,0]),h.current=!0},[u]),Y=r.useCallback(async e=>{let i=!1;e.key==="Escape"?(e.stopPropagation(),e.preventDefault(),c.current=[0,0]):e.key==="Enter"&&!e.shiftKey?(e.stopPropagation(),e.preventDefault(),c.current=[0,1],i=!0):e.key==="Tab"&&(e.stopPropagation(),e.preventDefault(),c.current=[e.shiftKey?-1:1,0],i=!0),window.setTimeout(()=>{!h.current&&c.current!==void 0&&(u(i?d:void 0,c.current),h.current=!0)},0)},[u,d]),k=d??n,[l,j]=r.useMemo(()=>{if($(n))return[];const e=F?.(n);return e!==void 0?[e,!1]:[w(n)?.provideEditor?.(n),!1]},[n,w,F]),{ref:q,style:B}=de();let P=!0,M,_=!0,E;if(l!==void 0){P=l.disablePadding!==!0,_=l.disableStyling!==!0;const e=z(l);e&&(E=l.styleOverride);const i=e?l.editor:l;M=r.createElement(i,{isHighlighted:o,onChange:A,value:k,initialValue:b,onFinishedEditing:W,validatedSelection:D(k)?k.selectionRange:void 0,forceEditMode:f,target:s,imageEditorOverride:C,markdownDivCreateNode:a,isValid:y,theme:g})}E={...E,...B};const N=document.getElementById("portal");if(N===null)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please add `<div id="portal" />` as the last child of your `<body>`.'),null;let R=_?"gdg-style":"gdg-unstyle";y||(R+=" gdg-invalid"),P&&(R+=" gdg-pad");const T=I?.[0]??1,V=I?.[1]??1;return J.createPortal(r.createElement(Q.Provider,{value:g},r.createElement(U,{style:Z(g),className:v,onClickOutside:K,isOutsideClick:H},r.createElement(ae,{ref:q,id:G,className:R,style:E,as:j===!0?"label":void 0,targetX:s.x-T,targetY:s.y-V,targetWidth:s.width+T*2,targetHeight:s.height+V*2},r.createElement("div",{className:"gdg-clip-region",onKeyDown:Y},M)))),N)};export{ue as default};