@north-light/crouter-api 0.3.308 → 0.3.309

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.
@@ -69,5 +69,7 @@ export declare function formatCard(kind: string, facts: Record<string, string |
69
69
  export declare function formatDataCard(kind: string, facts: Record<string, string | number | boolean | undefined>, body: string): string;
70
70
  /** Parse a runtime envelope, with pre-envelope customType compatibility. */
71
71
  export declare function parseCard(message: GeneratedContextMessageLike): GeneratedCard | null;
72
+ /** Explain how an inbox entry's ref is read without guessing its filesystem location. */
73
+ export declare function formatInboxRefInstruction(ref: string): string;
72
74
  /** Format a complete inbox card from report bodies resolved by the caller. */
73
75
  export declare function formatInboxCard(sections: readonly InboxCardSection[]): string;
@@ -205,6 +205,12 @@ export function parseCard(message) {
205
205
  senders: [],
206
206
  };
207
207
  }
208
+ /** Explain how an inbox entry's ref is read without guessing its filesystem location. */
209
+ export function formatInboxRefInstruction(ref) {
210
+ return ref.startsWith('/')
211
+ ? `Preview only. Read the full body from file \`${ref}\`.`
212
+ : `Read this report with \`crtr canvas history read ${ref}\`.`;
213
+ }
208
214
  /** Format a complete inbox card from report bodies resolved by the caller. */
209
215
  export function formatInboxCard(sections) {
210
216
  const body = sections.map((section) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@north-light/crouter-api",
3
- "version": "0.3.308",
3
+ "version": "0.3.309",
4
4
  "description": "Typed crtrd /v1 API contract — DTOs, route builders, the error contract, the CrtrClient, and the command-plugin manifest format. Zero runtime dependencies.",
5
5
  "type": "module",
6
6
  "main": "./dist/api/index.js",