@cplace/mcp-server 1.14.1 β†’ 1.15.1

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.
Files changed (90) hide show
  1. package/README.md +20 -9
  2. package/dist/api.d.ts +2 -0
  3. package/dist/api.d.ts.map +1 -1
  4. package/dist/api.js +22 -4
  5. package/dist/api.js.map +1 -1
  6. package/dist/index.js +4 -15
  7. package/dist/index.js.map +1 -1
  8. package/dist/linter.d.ts.map +1 -1
  9. package/dist/linter.js +20 -6
  10. package/dist/linter.js.map +1 -1
  11. package/dist/plugins/core/widget-specifications/cf.cplace.platform.tableWidget/columns.md +2 -2
  12. package/dist/plugins/core/widget-specifications/cf.platform.embeddedSearchAsTable/_summary.md +1 -1
  13. package/dist/plugins/core/widget-specifications/cf.platform.embeddedSearchAsTable/columns.md +12 -0
  14. package/dist/plugins/workspace-admin.d.ts.map +1 -1
  15. package/dist/plugins/workspace-admin.js +5 -0
  16. package/dist/plugins/workspace-admin.js.map +1 -1
  17. package/dist/server-identity.d.ts +4 -0
  18. package/dist/server-identity.d.ts.map +1 -0
  19. package/dist/server-identity.js +25 -0
  20. package/dist/server-identity.js.map +1 -0
  21. package/dist/tools/app-configuration.d.ts +18 -0
  22. package/dist/tools/app-configuration.d.ts.map +1 -0
  23. package/dist/tools/app-configuration.js +71 -0
  24. package/dist/tools/app-configuration.js.map +1 -0
  25. package/dist/tools/change-listeners.d.ts +4 -3
  26. package/dist/tools/change-listeners.d.ts.map +1 -1
  27. package/dist/tools/change-listeners.js +64 -8
  28. package/dist/tools/change-listeners.js.map +1 -1
  29. package/dist/tools/common-schemas.d.ts +2 -1
  30. package/dist/tools/common-schemas.d.ts.map +1 -1
  31. package/dist/tools/common-schemas.js +2 -1
  32. package/dist/tools/common-schemas.js.map +1 -1
  33. package/dist/tools/job-schedule-trigger.d.ts.map +1 -1
  34. package/dist/tools/job-schedule-trigger.js +2 -1
  35. package/dist/tools/job-schedule-trigger.js.map +1 -1
  36. package/dist/tools/job-scripts.d.ts +3 -3
  37. package/dist/tools/job-scripts.d.ts.map +1 -1
  38. package/dist/tools/job-scripts.js +23 -9
  39. package/dist/tools/job-scripts.js.map +1 -1
  40. package/dist/tools/layout.d.ts +1 -1
  41. package/dist/tools/layout.d.ts.map +1 -1
  42. package/dist/tools/layout.js +16 -9
  43. package/dist/tools/layout.js.map +1 -1
  44. package/dist/tools/linting.d.ts +1 -1
  45. package/dist/tools/linting.js +1 -1
  46. package/dist/tools/linting.js.map +1 -1
  47. package/dist/tools/page-actions.d.ts +3 -3
  48. package/dist/tools/page-actions.d.ts.map +1 -1
  49. package/dist/tools/page-actions.js +23 -8
  50. package/dist/tools/page-actions.js.map +1 -1
  51. package/dist/tools/pages.d.ts +14 -0
  52. package/dist/tools/pages.d.ts.map +1 -1
  53. package/dist/tools/pages.js +131 -1
  54. package/dist/tools/pages.js.map +1 -1
  55. package/dist/tools/richstring-widgets.js +2 -2
  56. package/dist/tools/satellite-errors.d.ts +2 -0
  57. package/dist/tools/satellite-errors.d.ts.map +1 -0
  58. package/dist/tools/satellite-errors.js +8 -0
  59. package/dist/tools/satellite-errors.js.map +1 -0
  60. package/dist/tools/schedule.d.ts.map +1 -1
  61. package/dist/tools/schedule.js +2 -1
  62. package/dist/tools/schedule.js.map +1 -1
  63. package/dist/tools/script-logs.d.ts +4 -1
  64. package/dist/tools/script-logs.d.ts.map +1 -1
  65. package/dist/tools/script-logs.js +46 -3
  66. package/dist/tools/script-logs.js.map +1 -1
  67. package/dist/tools/script.d.ts +2 -2
  68. package/dist/tools/script.d.ts.map +1 -1
  69. package/dist/tools/script.js +15 -9
  70. package/dist/tools/script.js.map +1 -1
  71. package/dist/tools/search.d.ts +3 -3
  72. package/dist/tools/search.d.ts.map +1 -1
  73. package/dist/tools/search.js +10 -41
  74. package/dist/tools/search.js.map +1 -1
  75. package/dist/tools/solution-packages.d.ts +1 -1
  76. package/dist/tools/solution-packages.d.ts.map +1 -1
  77. package/dist/tools/solution-packages.js +2 -2
  78. package/dist/tools/solution-packages.js.map +1 -1
  79. package/dist/tools/workspace-core.d.ts +2 -2
  80. package/dist/tools/workspace-core.d.ts.map +1 -1
  81. package/dist/tools/workspace-core.js +13 -4
  82. package/dist/tools/workspace-core.js.map +1 -1
  83. package/dist/utils/dateValidation.d.ts.map +1 -1
  84. package/dist/utils/dateValidation.js +2 -4
  85. package/dist/utils/dateValidation.js.map +1 -1
  86. package/dist/utils.d.ts +2 -0
  87. package/dist/utils.d.ts.map +1 -1
  88. package/dist/utils.js +23 -1
  89. package/dist/utils.js.map +1 -1
  90. package/package.json +3 -2
@@ -37,7 +37,7 @@ export declare const LayoutContextSchema: z.ZodEffects<z.ZodUnion<[z.ZodObject<{
37
37
  export type LayoutContext = z.infer<typeof LayoutContextSchema>;
38
38
  export declare const LAYOUT_TOOL_DEFINITIONS: {
39
39
  readonly cplace_execute_layout_script: {
40
- readonly description: "Execute a layout script β€” either a full layout.define() replacement or per-widget edit verbs.\n\nTWO MODES (determined by script content):\n\nMODE 1 β€” FULL REPLACE (layout.define):\n- Script calls layout.define() exactly once to declare the complete layout structure\n- Replaces the entire layout atomically\n- Same behavior as before\n\nMODE 2 β€” EDIT VERBS (per-widget):\n- Script calls one or more edit methods: layout.updateWidget(), layout.addWidget(), layout.removeWidget(), layout.moveWidget(), layout.addRow(), layout.compact()\n- Each call collects an operation; all operations commit atomically or fail together\n- Cannot mix layout.define() with edit verbs in the same script\n\nEDIT VERBS:\n layout.updateWidget(\"widgetId\", { \"cf.cplace.x\": newValue }) β€” partial config merge (only specified keys change)\n layout.addWidget({ widgetType: \"cf.platform.wiki\", position: { rowIndex: 0, columnIndex: 0, widgetIndex: 0 }, configuration: { ... } })\n layout.removeWidget(\"widgetId\")\n layout.moveWidget(\"widgetId\", { rowIndex: 1, columnIndex: 0, widgetIndex: 0 })\n layout.addRow(rowIndex, [6, 6]) β€” column proportions must sum to 12\n layout.compact() β€” remove empty rows\n\nWORKFLOW for per-widget edit:\n1. Read: cplace_get_layout_script with widgetIds to get layout.updateWidget() fragments\n2. Edit: modify the config values in the fragment\n3. Execute: post the modified script via this tool\n\nKEY BEHAVIORS (for layout.define mode):\n- The script must call layout.define() exactly once\n- The entire layout is atomically replaced β€” previous layout is fully overwritten\n- Script timeout: 30 seconds\n- Widget IDs: MUST be omitted from layout.define. Ids are assigned by the server and returned in the response. Use the returned id in subsequent layout.updateWidget() calls.\n- ID PRESERVATION: edit verbs (updateWidget/addWidget/removeWidget/moveWidget/addRow/compact) look widgets up by id and mutate in place β€” they PRESERVE the IDs of every widget you don't touch. This is the only safe path for cross-referenced widgets (e.g. a Low-Code Button's tableWidgetId). By contrast, layout.define β€” and cplace_edit_layout, which round-trips through layout.define β€” REGENERATES every widget id.\n\nRESPONSE OUTCOMES:\n- VALID_COMPLETE: Layout saved, all widgets fully configured\n- VALID_INCOMPLETE: Layout saved, but some widgets have missing optional configuration (warnings returned)\n- Validation errors: Layout NOT saved β€” structural or widget errors returned with details\n- Generic errors: Entity not found, permission denied, script errors\n\nVALIDATION FEEDBACK:\n- Structural errors: invalid column proportions (must be 3-12 each, sum to 12 per row)\n- Widget errors: unknown widget types, invalid configurations\n- Warnings: widgets saved but missing optional configuration (e.g., search filter not set)\n\nTIP: After a VALID_INCOMPLETE response, re-run layout.define() with corrected widget configuration to resolve warnings.\n\nON A SyntaxError / SCRIPT ERROR: the response carries the parser message with a caret (^) under the\noffending token. Correct THAT line before re-submitting β€” never resend the identical script,\nincluding after a \"Session expired\" reconnect. A blind retry reproduces the same error.\n\nCOMMON WIDGET TYPES (platform, always available):\ncf.platform.attributes, cf.cplace.platform.attributesGroup,\ncf.platform.wiki, cf.platform.richString, cf.cplace.demoWidgets.demoRichString,\ncf.platform.embeddedSearchAsTable, cf.cplace.platform.tableWidget,\ncf.platform.connectedBarChart, cf.platform.connectedPieChart,\ncf.platform.connectedMatrix, cf.platform.connectedTableFilter,\ncf.platform.incomingReferences, cf.platform.comments, cf.platform.files,\ncf.cplace.visualizations.scriptingHighcharts\n\nFor app-dependent widgets not in this list, call cplace_list_widget_definitions with embeddingContext \"AS_WIDGET\".\n\nRICHSTRING WIDGETS AND EMBEDDED WIDGETS (decoded form):\nRichString widgets (cf.platform.richString, cf.cplace.demoWidgets.demoRichString)\nhold HTML in their 'content' config. Embedded widgets inside that HTML are\nexpressed in decoded form:\n <decoded-widget id=\"id_w1\" type=\"cf.platform.singleAttribute\">{\"properties\":{\"attribute\":\"name\"}}</decoded-widget>\n\nSemantics when submitting a script:\n β€’ Tag with an existing id + same type β†’ update (properties replace current)\n β€’ Tag without id β†’ insert new embedded widget (backend assigns id)\n β€’ Existing id omitted from new content β†’ delete\n β€’ Unknown id, duplicate id, or type change for same id β†’ error\n\nRaw base64 <embeddedwidget>BASE64</embeddedwidget> tags are REJECTED on writes.\nFetch current decoded form via cplace_get_layout_script.\n\nIMPORTANT: Decoded <decoded-widget> tags must appear directly inline in a content: value.\nDo NOT build the tag in a variable and pass it β€” the parser rejects tags outside content: literals.\n βœ… layout.updateWidget(\"id\", { content: '<decoded-widget type=\"...\">...</decoded-widget>' });\n ❌ var tag = '<decoded-widget ...>...</decoded-widget>'; layout.updateWidget(\"id\", { content: tag });\n\nEMBEDDED WIDGET SCRIPT ATTRIBUTES β€” PLACEHOLDER WORKFLOW (REQUIRED):\nFor script-typed attributes on embedded widgets (e.g. cf.cplace.lowCodeWidgets.lowCodeTextWidget.script),\ninitialize the value to a minimal placeholder body inside the inline <decoded-widget> JSON, then fill the\nreal script body afterward via cplace_richstring_set_widget_script (full replace) or\ncplace_richstring_edit_widget_script (str-replace diff). Authoring a non-trivial script body inline\nforces it through four nested encoding layers (HTML β†’ JSON β†’ JS string literal β†’ MCP wire) and is a\ndocumented source of escape-bug churn β€” the dedicated tools take the script as a plain string in a\nstructured argument and avoid all four layers.\n\nSafe placeholder for cf.cplace.lowCodeWidgets.lowCodeText: return '';\nOther script-bearing widget types: pick any runtime-valid placeholder for that widget.\n\nNon-script attributes (strings, numbers, references, lists) do NOT have this problem and are authored\ninline as normal JSON properties on the <decoded-widget> tag.\n\nFor atomic single-embedded-widget edits without rewriting the full script,\nsee cplace_layout_richstring_* and cplace_richstring_*_widget_script tools.";
40
+ readonly description: "Execute a layout script β€” either a full layout.define() replacement or per-widget edit verbs.\n\nTWO MODES (determined by script content):\n\nMODE 1 β€” FULL REPLACE (layout.define):\n- Script calls layout.define() exactly once to declare the complete layout structure\n- Replaces the entire layout atomically\n- Same behavior as before\n\nMODE 2 β€” EDIT VERBS (per-widget):\n- Script calls one or more edit methods: layout.updateWidget(), layout.addWidget(), layout.removeWidget(), layout.moveWidget(), layout.addRow(), layout.compact()\n- Each call collects an operation; all operations commit atomically or fail together\n- Cannot mix layout.define() with edit verbs in the same script\n\nEDIT VERBS:\n layout.updateWidget(\"widgetId\", { \"cf.cplace.x\": newValue }) β€” partial config merge (only specified keys change)\n layout.addWidget({ widgetType: \"cf.platform.wiki\", position: { rowIndex: 0, columnIndex: 0, widgetIndex: 0 }, configuration: { ... } })\n layout.removeWidget(\"widgetId\")\n layout.moveWidget(\"widgetId\", { rowIndex: 1, columnIndex: 0, widgetIndex: 0 })\n layout.addRow(rowIndex, [6, 6]) β€” column proportions must be one of the layout templates (listed in the script parameter description)\n layout.compact() β€” remove empty rows\n\nWORKFLOW for per-widget edit:\n1. Read: cplace_get_layout_script with widgetIds to get layout.updateWidget() fragments\n2. Edit: modify the config values in the fragment\n3. Execute: post the modified script via this tool\n\nKEY BEHAVIORS (for layout.define mode):\n- The script must call layout.define() exactly once\n- The entire layout is atomically replaced β€” previous layout is fully overwritten\n- Script timeout: 30 seconds\n- Widget IDs: MUST be omitted from layout.define. Ids are assigned by the server and returned in the response. Use the returned id in subsequent layout.updateWidget() calls.\n- ID PRESERVATION: edit verbs (updateWidget/addWidget/removeWidget/moveWidget/addRow/compact) look widgets up by id and mutate in place β€” they PRESERVE the IDs of every widget you don't touch. This is the only safe path for cross-referenced widgets (e.g. a Low-Code Button's tableWidgetId). By contrast, layout.define β€” and cplace_edit_layout, which round-trips through layout.define β€” REGENERATES every widget id.\n\nRESPONSE OUTCOMES:\n- VALID_COMPLETE: Layout saved, all widgets fully configured\n- VALID_INCOMPLETE: Layout saved, but some widgets have missing optional configuration (warnings returned)\n- Validation errors: Layout NOT saved β€” structural or widget errors returned with details\n- Generic errors: Entity not found, permission denied, script errors\n\nVALIDATION FEEDBACK:\n- Structural errors: column proportions that are not a layout template\n- Widget errors: unknown widget types, invalid configurations\n- Property value errors: a widget property value outside its allowed domain (e.g. a heading `size` other than h1-h6) is rejected β€” for top-level layout widgets and for embedded <decoded-widget> properties alike. Only the property names you submit are checked; omitted required properties are reported as warnings, not errors.\n- Warnings: widgets saved but missing optional configuration (e.g., search filter not set)\n\nTIP: After a VALID_INCOMPLETE response, re-run layout.define() with corrected widget configuration to resolve warnings.\n\nON A SyntaxError / SCRIPT ERROR: the response carries the parser message with a caret (^) under the\noffending token. Correct THAT line before re-submitting β€” never resend the identical script,\nincluding after a \"Session expired\" reconnect. A blind retry reproduces the same error.\n\nCOMMON WIDGET TYPES (platform, always available):\ncf.platform.attributes, cf.cplace.platform.attributesGroup,\ncf.platform.wiki, cf.platform.richString, cf.cplace.demoWidgets.demoRichString,\ncf.platform.embeddedSearchAsTable, cf.cplace.platform.tableWidget,\ncf.platform.connectedBarChart, cf.platform.connectedPieChart,\ncf.platform.connectedMatrix, cf.platform.connectedTableFilter,\ncf.platform.incomingReferences, cf.platform.comments, cf.platform.files,\ncf.cplace.visualizations.scriptingHighcharts\n\nFor app-dependent widgets not in this list, call cplace_list_widget_definitions with embeddingContext \"AS_WIDGET\".\n\nRICHSTRING WIDGETS AND EMBEDDED WIDGETS (decoded form):\nRichString widgets (cf.platform.richString, cf.cplace.demoWidgets.demoRichString)\nhold HTML in their 'content' config. Embedded widgets inside that HTML are\nexpressed in decoded form:\n <decoded-widget id=\"id_w1\" type=\"cf.platform.singleAttribute\">{\"properties\":{\"attribute\":\"name\"}}</decoded-widget>\n\nSemantics when submitting a script:\n β€’ Tag with an existing id + same type β†’ update (properties replace current)\n β€’ Tag without id β†’ insert new embedded widget (backend assigns id)\n β€’ Existing id omitted from new content β†’ delete\n β€’ Unknown id, duplicate id, or type change for same id β†’ error on cplace_richstring_* tools; NOT checked on layout-script and page writes, which treat richstring markup as fully-replaced client-authored text\n\nRaw base64 <embeddedwidget>BASE64</embeddedwidget> tags are REJECTED on writes.\nFetch current decoded form via cplace_get_layout_script.\n\nIMPORTANT: Decoded <decoded-widget> tags must appear directly inline in a content: value.\nDo NOT build the tag in a variable and pass it β€” the parser rejects tags outside content: literals.\n βœ… layout.updateWidget(\"id\", { content: '<decoded-widget type=\"...\">...</decoded-widget>' });\n ❌ var tag = '<decoded-widget ...>...</decoded-widget>'; layout.updateWidget(\"id\", { content: tag });\n\nEMBEDDED WIDGET SCRIPT ATTRIBUTES β€” PLACEHOLDER WORKFLOW (REQUIRED):\nFor script-typed attributes on embedded widgets (e.g. cf.cplace.lowCodeWidgets.lowCodeTextWidget.script),\ninitialize the value to a minimal placeholder body inside the inline <decoded-widget> JSON, then fill the\nreal script body afterward via cplace_richstring_set_widget_script (full replace) or\ncplace_richstring_edit_widget_script (str-replace diff). Authoring a non-trivial script body inline\nforces it through four nested encoding layers (HTML β†’ JSON β†’ JS string literal β†’ MCP wire) and is a\ndocumented source of escape-bug churn β€” the dedicated tools take the script as a plain string in a\nstructured argument and avoid all four layers.\n\nSafe placeholder for cf.cplace.lowCodeWidgets.lowCodeText: return '';\nOther script-bearing widget types: pick any runtime-valid placeholder for that widget.\n\nNon-script attributes (strings, numbers, references, lists) do NOT have this problem and are authored\ninline as normal JSON properties on the <decoded-widget> tag.\n\nFor atomic single-embedded-widget edits without rewriting the full script,\nsee cplace_layout_richstring_* and cplace_richstring_*_widget_script tools.";
41
41
  readonly inputSchema: {
42
42
  readonly context: z.ZodEffects<z.ZodUnion<[z.ZodObject<{
43
43
  type: z.ZodLiteral<"page">;
@@ -1 +1 @@
1
- {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/tools/layout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAe5C,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAe/B,CAAC;AAGF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAUhE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6S1B,CAAC;AAYX,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,QAgf7E"}
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/tools/layout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAe5C,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAe/B,CAAC;AAGF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAUhE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoT1B,CAAC;AAYX,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,QAgf7E"}
@@ -44,7 +44,7 @@ EDIT VERBS:
44
44
  layout.addWidget({ widgetType: "cf.platform.wiki", position: { rowIndex: 0, columnIndex: 0, widgetIndex: 0 }, configuration: { ... } })
45
45
  layout.removeWidget("widgetId")
46
46
  layout.moveWidget("widgetId", { rowIndex: 1, columnIndex: 0, widgetIndex: 0 })
47
- layout.addRow(rowIndex, [6, 6]) β€” column proportions must sum to 12
47
+ layout.addRow(rowIndex, [6, 6]) β€” column proportions must be one of the layout templates (listed in the script parameter description)
48
48
  layout.compact() β€” remove empty rows
49
49
 
50
50
  WORKFLOW for per-widget edit:
@@ -66,8 +66,9 @@ RESPONSE OUTCOMES:
66
66
  - Generic errors: Entity not found, permission denied, script errors
67
67
 
68
68
  VALIDATION FEEDBACK:
69
- - Structural errors: invalid column proportions (must be 3-12 each, sum to 12 per row)
69
+ - Structural errors: column proportions that are not a layout template
70
70
  - Widget errors: unknown widget types, invalid configurations
71
+ - Property value errors: a widget property value outside its allowed domain (e.g. a heading \`size\` other than h1-h6) is rejected β€” for top-level layout widgets and for embedded <decoded-widget> properties alike. Only the property names you submit are checked; omitted required properties are reported as warnings, not errors.
71
72
  - Warnings: widgets saved but missing optional configuration (e.g., search filter not set)
72
73
 
73
74
  TIP: After a VALID_INCOMPLETE response, re-run layout.define() with corrected widget configuration to resolve warnings.
@@ -97,7 +98,7 @@ Semantics when submitting a script:
97
98
  β€’ Tag with an existing id + same type β†’ update (properties replace current)
98
99
  β€’ Tag without id β†’ insert new embedded widget (backend assigns id)
99
100
  β€’ Existing id omitted from new content β†’ delete
100
- β€’ Unknown id, duplicate id, or type change for same id β†’ error
101
+ β€’ Unknown id, duplicate id, or type change for same id β†’ error on cplace_richstring_* tools; NOT checked on layout-script and page writes, which treat richstring markup as fully-replaced client-authored text
101
102
 
102
103
  Raw base64 <embeddedwidget>BASE64</embeddedwidget> tags are REJECTED on writes.
103
104
  Fetch current decoded form via cplace_get_layout_script.
@@ -135,7 +136,7 @@ layout.define({
135
136
  {
136
137
  columns: [
137
138
  {
138
- proportion: 6, // Column width: integer 3-12, all columns in a row must sum to 12
139
+ proportion: 6, // Column width; the row's proportions must be one of the layout templates listed below
139
140
  widgets: [
140
141
  {
141
142
  type: "cf.platform.embeddedSearchAsTable", // Required: widget type identifier
@@ -164,10 +165,12 @@ layout.moveWidget("widgetId", { rowIndex: 1, columnIndex: 0, widgetIndex: 0 });
164
165
  layout.addRow(0, [6, 6]);
165
166
  layout.compact();
166
167
 
167
- COLUMN PROPORTION RULES:
168
- - Each column proportion must be between 3 and 12
169
- - All column proportions in a row must sum to exactly 12
170
- - Common patterns: [12] (full width), [6,6] (two equal), [4,4,4] (three equal), [8,4] (main + sidebar), [3,9] (sidebar + main)
168
+ COLUMN PROPORTIONS β€” LAYOUT TEMPLATES:
169
+ A row's column proportions must be one of the 11 layout templates offered by the cplace layout
170
+ editor's Templates list:
171
+ [12] [6,6] [4,4,4] [3,3,3,3] [3,3,6] [6,3,3] [3,9] [9,3] [3,6,3] [4,8] [8,4]
172
+ These are ordered shapes: [3,3,6], [6,3,3] and [3,6,3] are three different templates.
173
+ For a column narrower than any template offers, put an embedded layout inside the column.
171
174
 
172
175
  WIDGET FIELDS (for layout.define):
173
176
  - id: Do NOT provide. Ids are assigned by the server and returned in the response.
@@ -180,10 +183,14 @@ Config values that carry a CUSTOM attribute internal name need that name wrapped
180
183
  e.g. table columns [{"name": "'cf.cplace.myType.attr'", ...}], sortColumn / multiSortColumns,
181
184
  groupColumn, the connected* chart attributeName values, and quotedAttributeName. Builtin
182
185
  attributes (name, createdAt, creator, …) and the _name_ pseudo-column take NO inner quotes.
186
+ Whether _name_ may be used at all is widget-specific: cf.cplace.platform.tableWidget requires it
187
+ as the first column, while the legacy cf.platform.embeddedSearchAsTable adds that column itself and
188
+ fails to render on every load if you list it. Check the widget's columns specification via
189
+ cplace_get_widget_definition before putting _name_ in a columns value.
183
190
 
184
191
  Wrap any such config value in a DOUBLE-quoted outer JS string β€” then the inner '…' tokens need
185
192
  no escaping (only the JSON's own " do):
186
- βœ… columns: "[{\\"name\\": \\"_name_\\", \\"visible\\": true}, {\\"name\\": \\"'cf.cplace.myType.attr'\\", \\"visible\\": true}]"
193
+ βœ… columns: "[{\\"name\\": \\"name\\", \\"visible\\": true}, {\\"name\\": \\"'cf.cplace.myType.attr'\\", \\"visible\\": true}]"
187
194
  Do NOT wrap it in a single-quoted outer string with unescaped inner ' β€” the first ' closes the
188
195
  string and throws SyntaxError:
189
196
  ❌ columns: '[{"name": "'cf.cplace.myType.attr'", "visible": true}]'
@@ -1 +1 @@
1
- {"version":3,"file":"layout.js","sourceRoot":"","sources":["../../src/tools/layout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,sBAAsB,EAEtB,yBAAyB,GAC1B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAGzD,MAAM,CAAC,MAAM,mBAAmB,GAAG,kBAAkB,CACnD,CAAC;KACE,KAAK,CAAC;IACL,CAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;QACvB,OAAO,EAAE,CAAC,CAAC,MAA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gB;gBACzC,OAAO;gBACP,kBAAkB,EAChB,kaAAka;gBACpa,GAAG,CAAC,aAAa,CAAC,kBAAkB,IAAI;oBACtC,kBAAkB,EAAE,aAAa,CAAC,kBAAkB;iBACrD,CAAC;gBACF,GAAG,CAAC,aAAa,IAAI;oBACnB,iBAAiB,EACf,4HAA4H;oBAC9H,aAAa;iBACd,CAAC;gBACF,eAAe;aAChB,CAAC;YAEF,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;aACzE,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,eAAe,CACb,aAAa,EACb,UAAU,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CACnE,CAAC;YACF,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,yBAAyB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;qBACxF;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -3,7 +3,7 @@ import { z } from 'zod';
3
3
  import { CplaceApiClient } from '../api.js';
4
4
  export declare const LINTING_TOOL_DEFINITIONS: {
5
5
  readonly cplace_lint_script: {
6
- readonly description: "Lint a cplace low-code script (change listener, validator, or workflow script) using the cplace ESLint rules. Returns errors and warnings. Does not modify the script. Use this to check script quality before or after saving. This is a style/syntax lint only, not a type or correctness check: a clean result means the script parses as valid JavaScript and passes the cplace style rules. It does NOT verify that API/property names, attribute names, or transition names exist, does NOT check argument types or counts, and will NOT flag undefined identifiers (e.g. a typo like `Filtres` instead of `Filters`), since no-undef is disabled.";
6
+ readonly description: "Lint a cplace low-code script (change listener, validator, or workflow script) using the cplace ESLint rules. Returns errors and warnings. Does not modify the script. Use this to check script quality before or after saving. It reports unknown identifiers as errors: any name that is neither declared in the script nor a known cplace runtime global β€” a typo like `Filtres` instead of `Filters`, or a helper such as `updatePage` used without pasting its definition. Host globals that the cplace runtime does not provide, such as `console` and `setTimeout`, are reported the same way. This undefined-name check is a whitelist of names, not a type check: it does not know which globals a given script kind actually receives, and it does not verify that a member exists (`cplace.actions().updtaePage(...)` still passes), nor argument types or counts, nor that attribute or transition names exist. If a real cplace binding is missing from the whitelist, add `/* global myBinding */` at the top of the script to silence the false positive, and report the gap.";
7
7
  readonly inputSchema: {
8
8
  readonly script: z.ZodString;
9
9
  };
@@ -3,7 +3,7 @@ import { lintScript } from '../linter.js';
3
3
  const TOOL_LINT_SCRIPT = 'cplace_lint_script';
4
4
  export const LINTING_TOOL_DEFINITIONS = {
5
5
  [TOOL_LINT_SCRIPT]: {
6
- description: 'Lint a cplace low-code script (change listener, validator, or workflow script) using the cplace ESLint rules. Returns errors and warnings. Does not modify the script. Use this to check script quality before or after saving. This is a style/syntax lint only, not a type or correctness check: a clean result means the script parses as valid JavaScript and passes the cplace style rules. It does NOT verify that API/property names, attribute names, or transition names exist, does NOT check argument types or counts, and will NOT flag undefined identifiers (e.g. a typo like `Filtres` instead of `Filters`), since no-undef is disabled.',
6
+ description: 'Lint a cplace low-code script (change listener, validator, or workflow script) using the cplace ESLint rules. Returns errors and warnings. Does not modify the script. Use this to check script quality before or after saving. It reports unknown identifiers as errors: any name that is neither declared in the script nor a known cplace runtime global β€” a typo like `Filtres` instead of `Filters`, or a helper such as `updatePage` used without pasting its definition. Host globals that the cplace runtime does not provide, such as `console` and `setTimeout`, are reported the same way. This undefined-name check is a whitelist of names, not a type check: it does not know which globals a given script kind actually receives, and it does not verify that a member exists (`cplace.actions().updtaePage(...)` still passes), nor argument types or counts, nor that attribute or transition names exist. If a real cplace binding is missing from the whitelist, add `/* global myBinding */` at the top of the script to silence the false positive, and report the gap.',
7
7
  inputSchema: {
8
8
  script: z.string().describe('The full JavaScript source code of the cplace script to lint'),
9
9
  },
@@ -1 +1 @@
1
- {"version":3,"file":"linting.js","sourceRoot":"","sources":["../../src/tools/linting.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AAE9C,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,CAAC,gBAAgB,CAAC,EAAE;QAClB,WAAW,EACT,0nBAA0nB;QAC5nB,WAAW,EAAE;YACX,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8DAA8D,CAAC;SAC5F;QACD,WAAW,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE;KAC7C;CACO,CAAC;AAEX,MAAM,UAAU,oBAAoB,CAAC,MAAiB,EAAE,OAAwB;IAC9E,MAAM,CAAC,YAAY,CACjB,gBAAgB,EAChB,wBAAwB,CAAC,gBAAgB,CAAC,EAC1C,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;QACnB,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;QAClC,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;SAC3D,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"linting.js","sourceRoot":"","sources":["../../src/tools/linting.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AAE9C,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,CAAC,gBAAgB,CAAC,EAAE;QAClB,WAAW,EACT,8hCAA8hC;QAChiC,WAAW,EAAE;YACX,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8DAA8D,CAAC;SAC5F;QACD,WAAW,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE;KAC7C;CACO,CAAC;AAEX,MAAM,UAAU,oBAAoB,CAAC,MAAiB,EAAE,OAAwB;IAC9E,MAAM,CAAC,YAAY,CACjB,gBAAgB,EAChB,wBAAwB,CAAC,gBAAgB,CAAC,EAC1C,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;QACnB,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;QAClC,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;SAC3D,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -3,7 +3,7 @@ import { z } from 'zod';
3
3
  import { CplaceApiClient } from '../api.js';
4
4
  export declare const PAGE_ACTIONS_TOOL_DEFINITIONS: {
5
5
  readonly cplace_get_page_actions: {
6
- readonly description: "Get all page actions configured on a type. Page actions are low-code scripts attached to a type that users invoke from a page (buttons). Returns identifier, localized name, icon (FontAwesome), success message, enabled status, and script code for each action.";
6
+ readonly description: string;
7
7
  readonly inputSchema: {
8
8
  readonly workspaceId: z.ZodString;
9
9
  readonly typeInternalName: z.ZodString;
@@ -13,7 +13,7 @@ export declare const PAGE_ACTIONS_TOOL_DEFINITIONS: {
13
13
  };
14
14
  };
15
15
  readonly cplace_manage_page_action: {
16
- readonly description: "Create or update a page action on a type. Page actions are buttons on a page that invoke a low-code script when clicked. For create: workspaceId, typeInternalName, identifier, and script are required. For update: workspaceId, typeInternalName, and identifier are required; all other fields are optional. Identifier is immutable.";
16
+ readonly description: string;
17
17
  readonly inputSchema: {
18
18
  readonly operation: z.ZodEnum<["create", "update"]>;
19
19
  readonly workspaceId: z.ZodString;
@@ -31,7 +31,7 @@ export declare const PAGE_ACTIONS_TOOL_DEFINITIONS: {
31
31
  };
32
32
  };
33
33
  readonly cplace_edit_page_action: {
34
- readonly description: "Edit a page action's script using str_replace β€” find an exact text match and replace it. Reads the current script, applies the replacement, and writes back. Use this instead of cplace_manage_page_action when making small changes to avoid reproducing the entire script.";
34
+ readonly description: string;
35
35
  readonly inputSchema: {
36
36
  readonly workspaceId: z.ZodString;
37
37
  readonly typeInternalName: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"page-actions.d.ts","sourceRoot":"","sources":["../../src/tools/page-actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAU5C,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkGhC,CAAC;AAEX,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,QAsQlF"}
1
+ {"version":3,"file":"page-actions.d.ts","sourceRoot":"","sources":["../../src/tools/page-actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAW5C,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqGhC,CAAC;AAEX,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,QAuRlF"}
@@ -1,14 +1,16 @@
1
1
  import { z } from 'zod';
2
2
  import { debugLogWithTag } from '../logger.js';
3
3
  import { applyStrReplace } from '../str-replace-utils.js';
4
- import { CPLACEJS_COMMON_API_CHEAT_SHEET } from './common-schemas.js';
4
+ import { addPayloadIdsToScriptList, scriptPayloadId } from '../utils.js';
5
+ import { CPLACEJS_COMMON_API_CHEAT_SHEET, SCRIPT_PAYLOAD_ID_NOTE } from './common-schemas.js';
5
6
  const TOOL_GET_PAGE_ACTIONS = 'cplace_get_page_actions';
6
7
  const TOOL_MANAGE_PAGE_ACTION = 'cplace_manage_page_action';
7
8
  const TOOL_EDIT_PAGE_ACTION = 'cplace_edit_page_action';
8
9
  const TOOL_DELETE_PAGE_ACTION = 'cplace_delete_page_action';
9
10
  export const PAGE_ACTIONS_TOOL_DEFINITIONS = {
10
11
  [TOOL_GET_PAGE_ACTIONS]: {
11
- description: 'Get all page actions configured on a type. Page actions are low-code scripts attached to a type that users invoke from a page (buttons). Returns identifier, localized name, icon (FontAwesome), success message, enabled status, and script code for each action.',
12
+ description: 'Get all page actions configured on a type. Page actions are low-code scripts attached to a type that users invoke from a page (buttons). Returns identifier, localized name, icon (FontAwesome), success message, enabled status, and script code for each action.' +
13
+ SCRIPT_PAYLOAD_ID_NOTE,
12
14
  inputSchema: {
13
15
  workspaceId: z.string().describe("The workspace ID (e.g., 'abc123')"),
14
16
  typeInternalName: z
@@ -18,7 +20,8 @@ export const PAGE_ACTIONS_TOOL_DEFINITIONS = {
18
20
  annotations: { title: 'Get Page Actions' },
19
21
  },
20
22
  [TOOL_MANAGE_PAGE_ACTION]: {
21
- description: 'Create or update a page action on a type. Page actions are buttons on a page that invoke a low-code script when clicked. For create: workspaceId, typeInternalName, identifier, and script are required. For update: workspaceId, typeInternalName, and identifier are required; all other fields are optional. Identifier is immutable.',
23
+ description: 'Create or update a page action on a type. Page actions are buttons on a page that invoke a low-code script when clicked. For create: workspaceId, typeInternalName, identifier, and script are required. For update: workspaceId, typeInternalName, and identifier are required; all other fields are optional. Identifier is immutable.' +
24
+ SCRIPT_PAYLOAD_ID_NOTE,
22
25
  inputSchema: {
23
26
  operation: z
24
27
  .enum(['create', 'update'])
@@ -56,7 +59,8 @@ export const PAGE_ACTIONS_TOOL_DEFINITIONS = {
56
59
  annotations: { title: 'Manage Page Action' },
57
60
  },
58
61
  [TOOL_EDIT_PAGE_ACTION]: {
59
- description: "Edit a page action's script using str_replace β€” find an exact text match and replace it. Reads the current script, applies the replacement, and writes back. Use this instead of cplace_manage_page_action when making small changes to avoid reproducing the entire script.",
62
+ description: "Edit a page action's script using str_replace β€” find an exact text match and replace it. Reads the current script, applies the replacement, and writes back. Use this instead of cplace_manage_page_action when making small changes to avoid reproducing the entire script." +
63
+ SCRIPT_PAYLOAD_ID_NOTE,
60
64
  inputSchema: {
61
65
  workspaceId: z.string().describe("The workspace ID (e.g., 'abc123')"),
62
66
  typeInternalName: z
@@ -97,7 +101,9 @@ export function registerPageActionsTools(server, client) {
97
101
  typeInternalName,
98
102
  });
99
103
  return {
100
- content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
104
+ content: [
105
+ { type: 'text', text: JSON.stringify(addPayloadIdsToScriptList(result), null, 2) },
106
+ ],
101
107
  };
102
108
  }
103
109
  catch (error) {
@@ -142,8 +148,11 @@ export function registerPageActionsTools(server, client) {
142
148
  requestBody.description = params.description;
143
149
  }
144
150
  const result = await client.makeApiRequest('json/page-action', 'POST', undefined, requestBody);
151
+ const withPayloadId = result && typeof result.id === 'string'
152
+ ? { ...result, payloadId: scriptPayloadId(result.id) }
153
+ : result;
145
154
  return {
146
- content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
155
+ content: [{ type: 'text', text: JSON.stringify(withPayloadId, null, 2) }],
147
156
  };
148
157
  }
149
158
  else {
@@ -171,8 +180,11 @@ export function registerPageActionsTools(server, client) {
171
180
  requestBody.description = params.description;
172
181
  }
173
182
  const result = await client.makeApiRequest('json/page-action', 'PATCH', undefined, requestBody);
183
+ const withPayloadId = result && typeof result.id === 'string'
184
+ ? { ...result, payloadId: scriptPayloadId(result.id) }
185
+ : result;
174
186
  return {
175
- content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
187
+ content: [{ type: 'text', text: JSON.stringify(withPayloadId, null, 2) }],
176
188
  };
177
189
  }
178
190
  }
@@ -233,11 +245,14 @@ export function registerPageActionsTools(server, client) {
233
245
  script: result.newContent,
234
246
  });
235
247
  debugLogWithTag('EDIT_PAGE_ACTION', `Successfully edited page action '${identifier}' (${result.replacementCount} replacement(s))`);
248
+ const pullHint = typeof action.id === 'string'
249
+ ? ` The local repo copy is now the stale pre-change version β€” pull it with: cplace-lowcode-cli get -f <file> -p ${scriptPayloadId(action.id)}`
250
+ : '';
236
251
  return {
237
252
  content: [
238
253
  {
239
254
  type: 'text',
240
- text: `Successfully edited page action '${identifier}'. Replaced ${result.replacementCount} occurrence(s).`,
255
+ text: `Successfully edited page action '${identifier}'. Replaced ${result.replacementCount} occurrence(s).${pullHint}`,
241
256
  },
242
257
  ],
243
258
  };
@@ -1 +1 @@
1
- {"version":3,"file":"page-actions.js","sourceRoot":"","sources":["../../src/tools/page-actions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAEtE,MAAM,qBAAqB,GAAG,yBAAyB,CAAC;AACxD,MAAM,uBAAuB,GAAG,2BAA2B,CAAC;AAC5D,MAAM,qBAAqB,GAAG,yBAAyB,CAAC;AACxD,MAAM,uBAAuB,GAAG,2BAA2B,CAAC;AAE5D,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,CAAC,qBAAqB,CAAC,EAAE;QACvB,WAAW,EACT,oQAAoQ;QACtQ,WAAW,EAAE;YACX,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,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MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,kBAAkB,EAAE,QAAQ,EAAE;gBACvE,WAAW;gBACX,gBAAgB;gBAChB,UAAU;aACX,CAAC,CAAC;YAEH,eAAe,CAAC,oBAAoB,EAAE,qCAAqC,UAAU,GAAG,CAAC,CAAC;YAC1F,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;aACnE,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,+BAA+B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;qBAC9F;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
2
  import { z } from 'zod';
3
3
  import { CplaceApiClient } from '../api.js';
4
+ export declare function buildRetypeNotSupportedMessage(pageUID: string, typeInternalName: string): string;
4
5
  export declare const PAGE_TOOL_DEFINITIONS: {
5
6
  readonly cplace_delete_page: {
6
7
  readonly description: "⚠️ DESTRUCTIVE OPERATION: Permanently delete a single page. Only works for leaf pages (pages without children). For pages with children, use cplace_delete_page_with_children.";
@@ -49,6 +50,19 @@ export declare const PAGE_TOOL_DEFINITIONS: {
49
50
  readonly title: "Edit Page Content";
50
51
  };
51
52
  };
53
+ readonly cplace_edit_richstring_attribute: {
54
+ readonly description: "Edit a single-valued richstring (rich text) attribute of a page using str_replace β€” find an exact text match and replace it. Reads the current attribute markup, applies the replacement, and writes it back. Use this instead of cplace_manage_page when making small changes to a large richstring attribute value, to avoid reproducing the entire markup. Scope: single-valued richstring attributes only β€” multi-valued attributes and attributes of any other type are rejected without writing. For the built-in page content use cplace_edit_page_content instead.\n\nRichString markup is in decoded form: embedded widgets appear as `<decoded-widget id=\"…\" type=\"…\">{\"properties\":{…}}</decoded-widget>` β€” no base64. `old_str` must match the decoded form exactly as returned by reads. Raw base64 `<embeddedwidget>` tags are rejected in both `old_str` and `new_str`.\n\nIMPORTANT: cplace normalizes HTML/CSS on every save (CSS properties are alphabetized, hex colors become rgb(), whitespace is regularized). After this tool completes, the stored markup may differ from what was submitted. The response includes the current stored form β€” use it (not your original input) when constructing the next old_str.";
55
+ readonly inputSchema: {
56
+ readonly pageUID: z.ZodString;
57
+ readonly attributeName: z.ZodString;
58
+ readonly old_str: z.ZodString;
59
+ readonly new_str: z.ZodString;
60
+ readonly replace_all: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
61
+ };
62
+ readonly annotations: {
63
+ readonly title: "Edit RichString Attribute";
64
+ };
65
+ };
52
66
  readonly cplace_manage_page: {
53
67
  readonly description: "Create or update a page. Use operation='create' to create new pages with workspace and type. Use operation='update' to modify existing pages by UID. πŸ” IMPORTANT: Use 'cplace_get_type_datamodel' before creating pages to understand attribute requirements.\n\nRichString content (page content and richstring attributes) uses decoded form: `<decoded-widget id=\"…\" type=\"…\">{\"properties\":{…}}</decoded-widget>` β€” no base64. On writes, decoded tags are auto-encoded to storage form. Raw base64 `<embeddedwidget>` tags are rejected.";
54
68
  readonly inputSchema: {
@@ -1 +1 @@
1
- {"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../../src/tools/pages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAc5C,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuLxB,CAAC;AAEX,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,QAif3E"}
1
+ {"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../../src/tools/pages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAsB5C,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAUhG;AAGD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqNxB,CAAC;AAEX,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,QAmnB3E"}
@@ -8,6 +8,18 @@ const TOOL_DELETE_PAGE_WITH_CHILDREN = 'cplace_delete_page_with_children';
8
8
  const TOOL_COPY_PAGE = 'cplace_copy_page';
9
9
  const TOOL_MANAGE_PAGE = 'cplace_manage_page';
10
10
  const TOOL_EDIT_PAGE_CONTENT = 'cplace_edit_page_content';
11
+ const TOOL_EDIT_RICHSTRING_ATTRIBUTE = 'cplace_edit_richstring_attribute';
12
+ export function buildRetypeNotSupportedMessage(pageUID, typeInternalName) {
13
+ return [
14
+ "Error: typeInternalName is not supported when operation='update'. It is create-only, so this call was rejected and nothing was changed β€” no other field was applied either.",
15
+ '',
16
+ 'To change the type of an existing page, run this with cplace_execute_script_write:',
17
+ ` cplace.actions().updatePage(cplace.utils().getPageById('${pageUID}'), { customType: '${typeInternalName}' });`,
18
+ '',
19
+ `Then confirm with cplace_get_by_uid that type.internalName is now '${typeInternalName}', and check the page's attributes and layout: values of attributes the new type does not define are kept but no longer shown, and the page renders with the new type's layout.`,
20
+ 'Note: cplace_execute_script_write requires low-code edit permission, which is stronger than the page edit permission this tool needs.',
21
+ ].join('\n');
22
+ }
11
23
  export const PAGE_TOOL_DEFINITIONS = {
12
24
  [TOOL_DELETE_PAGE]: {
13
25
  description: '⚠️ DESTRUCTIVE OPERATION: Permanently delete a single page. Only works for leaf pages (pages without children). For pages with children, use cplace_delete_page_with_children.',
@@ -84,6 +96,27 @@ export const PAGE_TOOL_DEFINITIONS = {
84
96
  },
85
97
  annotations: { title: 'Edit Page Content' },
86
98
  },
99
+ [TOOL_EDIT_RICHSTRING_ATTRIBUTE]: {
100
+ description: 'Edit a single-valued richstring (rich text) attribute of a page using str_replace β€” find an exact text match and replace it. Reads the current attribute markup, applies the replacement, and writes it back. Use this instead of cplace_manage_page when making small changes to a large richstring attribute value, to avoid reproducing the entire markup. Scope: single-valued richstring attributes only β€” multi-valued attributes and attributes of any other type are rejected without writing. For the built-in page content use cplace_edit_page_content instead.\n\nRichString markup is in decoded form: embedded widgets appear as `<decoded-widget id="…" type="…">{"properties":{…}}</decoded-widget>` β€” no base64. `old_str` must match the decoded form exactly as returned by reads. Raw base64 `<embeddedwidget>` tags are rejected in both `old_str` and `new_str`.\n\nIMPORTANT: cplace normalizes HTML/CSS on every save (CSS properties are alphabetized, hex colors become rgb(), whitespace is regularized). After this tool completes, the stored markup may differ from what was submitted. The response includes the current stored form β€” use it (not your original input) when constructing the next old_str.',
101
+ inputSchema: {
102
+ pageUID: z.string().describe("The UID of the page to edit (e.g., 'page/abc123def456')"),
103
+ attributeName: z
104
+ .string()
105
+ .describe("The internal name of the richstring attribute to edit (e.g., 'test.description'). Use cplace_get_type_datamodel on the page's type to look up attribute names and their types."),
106
+ old_str: z
107
+ .string()
108
+ .describe('The exact text to find in the attribute markup (must match exactly, including whitespace and line breaks)'),
109
+ new_str: z
110
+ .string()
111
+ .describe('The replacement text. Use empty string to delete the matched text.'),
112
+ replace_all: z
113
+ .boolean()
114
+ .optional()
115
+ .default(false)
116
+ .describe('If true, replace all occurrences of old_str. If false (default), fails when old_str matches more than once.'),
117
+ },
118
+ annotations: { title: 'Edit RichString Attribute' },
119
+ },
87
120
  [TOOL_MANAGE_PAGE]: {
88
121
  description: 'Create or update a page. Use operation=\'create\' to create new pages with workspace and type. Use operation=\'update\' to modify existing pages by UID. πŸ” IMPORTANT: Use \'cplace_get_type_datamodel\' before creating pages to understand attribute requirements.\n\nRichString content (page content and richstring attributes) uses decoded form: `<decoded-widget id="…" type="…">{"properties":{…}}</decoded-widget>` β€” no base64. On writes, decoded tags are auto-encoded to storage form. Raw base64 `<embeddedwidget>` tags are rejected.',
89
122
  inputSchema: {
@@ -102,7 +135,7 @@ export const PAGE_TOOL_DEFINITIONS = {
102
135
  typeInternalName: z
103
136
  .string()
104
137
  .optional()
105
- .describe("Required for create: The type internal name (e.g., 'cf.example.myType')"),
138
+ .describe("Required for create: The type internal name (e.g., 'cf.example.myType'). Create only β€” passing it with operation='update' is rejected, because this tool cannot change an existing page's type; use cplace_execute_script_write with cplace.actions().updatePage(page, { customType: '…' }) instead."),
106
139
  pageUID: z
107
140
  .string()
108
141
  .optional()
@@ -234,6 +267,17 @@ export function registerPageTools(server, client) {
234
267
  isError: true,
235
268
  };
236
269
  }
270
+ if (params.typeInternalName !== undefined) {
271
+ return {
272
+ content: [
273
+ {
274
+ type: 'text',
275
+ text: buildRetypeNotSupportedMessage(params.pageUID, params.typeInternalName),
276
+ },
277
+ ],
278
+ isError: true,
279
+ };
280
+ }
237
281
  const requestBody = {
238
282
  pageUID: params.pageUID,
239
283
  };
@@ -257,6 +301,7 @@ export function registerPageTools(server, client) {
257
301
  text: 'No updates specified. At least one of name, content, parentUID, attributes, or builtinAttributes must be provided.',
258
302
  },
259
303
  ],
304
+ isError: true,
260
305
  };
261
306
  }
262
307
  const result = await client.makeApiRequest('json/page', 'PATCH', undefined, requestBody);
@@ -528,5 +573,90 @@ export function registerPageTools(server, client) {
528
573
  };
529
574
  }
530
575
  });
576
+ server.registerTool(TOOL_EDIT_RICHSTRING_ATTRIBUTE, PAGE_TOOL_DEFINITIONS[TOOL_EDIT_RICHSTRING_ATTRIBUTE], async ({ pageUID, attributeName, old_str, new_str, replace_all = false }) => {
577
+ debugLogWithTag('EDIT_RICHSTRING_ATTRIBUTE', `Editing attribute ${attributeName} of page ${pageUID}`);
578
+ try {
579
+ const page = (await client.makeApiRequest('json/page', 'GET', { pageUID }));
580
+ const value = page.attributes?.[attributeName];
581
+ if (value === undefined || value === null) {
582
+ return {
583
+ content: [
584
+ {
585
+ type: 'text',
586
+ text: `Error: Page ${pageUID} has no value for attribute '${attributeName}'. Either the attribute name is wrong, or the attribute is empty β€” an unset attribute is not returned by the read. Use cplace_get_type_datamodel to check the internal name, and cplace_manage_page to set an initial value.`,
587
+ },
588
+ ],
589
+ isError: true,
590
+ };
591
+ }
592
+ if (Array.isArray(value)) {
593
+ return {
594
+ content: [
595
+ {
596
+ type: 'text',
597
+ text: `Error: Attribute '${attributeName}' is multi-valued (${value.length} value(s)). This tool edits single-valued richstring attributes only. Use cplace_manage_page to write the whole value.`,
598
+ },
599
+ ],
600
+ isError: true,
601
+ };
602
+ }
603
+ if (typeof value !== 'object' || typeof value.markup !== 'string') {
604
+ return {
605
+ content: [
606
+ {
607
+ type: 'text',
608
+ text: `Error: Attribute '${attributeName}' is not a richstring attribute (stored value is of JSON type ${typeof value}). This tool edits richstring (rich text) attributes only. Use cplace_manage_page to set a value of this type.`,
609
+ },
610
+ ],
611
+ isError: true,
612
+ };
613
+ }
614
+ const result = applyStrReplace(value.markup, old_str, new_str, replace_all);
615
+ if (!result.success) {
616
+ return {
617
+ content: [{ type: 'text', text: `Error: ${result.error}` }],
618
+ isError: true,
619
+ };
620
+ }
621
+ await client.makeApiRequest('json/page', 'PATCH', undefined, {
622
+ pageUID,
623
+ attributes: { [attributeName]: result.newContent },
624
+ });
625
+ const reReadPage = (await client.makeApiRequest('json/page', 'GET', { pageUID }));
626
+ const storedValue = reReadPage.attributes?.[attributeName];
627
+ const storedMarkup = storedValue && typeof storedValue === 'object' && typeof storedValue.markup === 'string'
628
+ ? storedValue.markup
629
+ : null;
630
+ const storedPreview = storedMarkup
631
+ ? storedMarkup.length > 500
632
+ ? storedMarkup.substring(0, 500) + '...'
633
+ : storedMarkup
634
+ : null;
635
+ const normalizationNote = storedPreview
636
+ ? `\n\nNote: The stored markup may differ from what was submitted due to server-side CSS normalization (properties alphabetized, hex→rgb, whitespace regularized). Current stored form (first 500 chars):\n${storedPreview}`
637
+ : '';
638
+ debugLogWithTag('EDIT_RICHSTRING_ATTRIBUTE', `Successfully edited attribute ${attributeName} (${result.replacementCount} replacement(s))`);
639
+ return {
640
+ content: [
641
+ {
642
+ type: 'text',
643
+ text: `Successfully edited attribute '${attributeName}'. Replaced ${result.replacementCount} occurrence(s).${normalizationNote}`,
644
+ },
645
+ ],
646
+ };
647
+ }
648
+ catch (error) {
649
+ debugLogWithTag('EDIT_RICHSTRING_ATTRIBUTE', `Error: ${error instanceof Error ? error.message : String(error)}`);
650
+ return {
651
+ content: [
652
+ {
653
+ type: 'text',
654
+ text: `Error editing richstring attribute: ${error instanceof Error ? error.message : String(error)}`,
655
+ },
656
+ ],
657
+ isError: true,
658
+ };
659
+ }
660
+ });
531
661
  }
532
662
  //# sourceMappingURL=pages.js.map