@opencxh/domain 1.286.2 → 1.287.0

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.
@@ -194,6 +194,16 @@ export interface AiToolDescriptor extends AiTool {
194
194
  param: string;
195
195
  kind: string;
196
196
  };
197
+ /**
198
+ * The route permission this tool stands in for, e.g. `{ app: "organization", action:
199
+ * "settings.write" }`. Checked against the grants on the invoke request; a call that carries
200
+ * none (an agent run has no session) is refused. Declare it on any tool that writes beyond one
201
+ * resource, which `scope` cannot authorize.
202
+ */
203
+ permission?: {
204
+ app: string;
205
+ action: string;
206
+ };
197
207
  /**
198
208
  * `"interactive"` = this tool needs a watching user, because it delivers to a client surface (an
199
209
  * SSE to an open window, say) instead of persisting something. Unattended runs are not offered
@@ -0,0 +1,15 @@
1
+ /**
2
+ * A server error message a client can translate: English text first (readable in logs and for API
3
+ * consumers), then a bracketed code and its params — `"Line 3 has no quantity [line_quantity line=3]"`.
4
+ *
5
+ * In the message and not in a separate field because the message is the one part of an error both
6
+ * transports are known to deliver. The client looks up `error_<code>` in the app's translations
7
+ * and falls back to the text; `{name}` placeholders use the same syntax as `t()`.
8
+ */
9
+ export declare function codedMessage(code: string, template: string, params?: Record<string, string | number>): string;
10
+ /** The inverse of {@link codedMessage}. A plain message comes back as `{ text }`. */
11
+ export declare function parseCodedMessage(message: string): {
12
+ text: string;
13
+ code?: string;
14
+ params: Record<string, string>;
15
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -105,6 +105,12 @@ export interface SettingsPageConfig {
105
105
  * fallback is only there for apps that have not caught up.
106
106
  */
107
107
  category?: SettingsCategory;
108
+ /**
109
+ * Pages sharing a collection are one row in the settings nav, opening a page that lists them —
110
+ * for pages you set once and rarely reopen (tax rates, number series). Pages from several apps
111
+ * may share one. The label is the shell's (`global:settings_collection_<key>`), like a category.
112
+ */
113
+ collection?: string;
108
114
  icon?: string;
109
115
  resource: string;
110
116
  order?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencxh/domain",
3
- "version": "1.286.2",
3
+ "version": "1.287.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",