@oddington/sdk 0.1.77 → 0.1.79

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.
@@ -102,7 +102,13 @@ export type ResponseCapabilities = SharedRoutineCapabilities<{
102
102
  connections: readonly string[];
103
103
  ai: true;
104
104
  publish: readonly ('asks' | 'digests')[];
105
- }>;
105
+ }> & {
106
+ readonly action: {
107
+ progress(value: {
108
+ label: string;
109
+ }): Promise<void>;
110
+ };
111
+ };
106
112
  export type ResponseAction<Input extends JsonValue = JsonValue> = Omit<Handler<Input>, 'run'> & {
107
113
  run(context: HandlerRuntime<Input>, os: ResponseCapabilities): Promise<HandlerTransition>;
108
114
  };
@@ -250,6 +250,7 @@ export type RepositoryReceipt = {
250
250
  repository: string;
251
251
  commit: string;
252
252
  diff: string;
253
+ url?: string;
253
254
  };
254
255
  export type HandlerRuntime<Input extends JsonValue = JsonValue> = {
255
256
  data: {
@@ -40,6 +40,7 @@ export type QuestionStatus = {
40
40
  } | ActionStatus;
41
41
  export interface ResponseConsequence {
42
42
  phase: 'loading' | 'invoking' | 'committing' | null;
43
+ progressLabel?: string | null;
43
44
  updatedAt: string;
44
45
  evidence: Array<RepositoryReceipt | AirtableReceipt>;
45
46
  }
@@ -1,5 +1,6 @@
1
1
  import { type QualifiedRecordRef, type InboxBlock } from './inbox-contract.js';
2
2
  import type { CollectionSchema, SelectedRecord } from './data-contract.js';
3
+ import { type RecordDisplayLinkTitle } from './record-display.js';
3
4
  export type InboxRecord = QualifiedRecordRef & {
4
5
  record: SelectedRecord | null;
5
6
  schema: CollectionSchema | null;
@@ -26,5 +27,5 @@ export declare const recordKey: ({ repository, ref }: QualifiedRecordRef) => str
26
27
  /** Only authored Record blocks disclose bootstrap hydration destinations. */
27
28
  export declare function authoredInboxRecordRefs(body: InboxBlock[]): QualifiedRecordRef[];
28
29
  /** Inbox's existing title policy, shared by full Records and immediate summaries. */
29
- export declare function inboxRecordTitle(entry: InboxRecord): string;
30
+ export declare function inboxRecordTitle(entry: InboxRecord, linkedTitle?: RecordDisplayLinkTitle): string;
30
31
  export declare function parseInboxRecords(value: unknown, maximumRecords?: number): InboxRecords;
@@ -4,8 +4,9 @@ type DisplayField = {
4
4
  readonly kind: string;
5
5
  readonly many: boolean;
6
6
  };
7
+ export type RecordDisplayLinkTitle = (ref: string) => string | undefined;
7
8
  type InvalidDisplay = (message: string) => never;
8
9
  export declare function parseRecordDisplay(value: unknown, definitions: readonly DisplayField[], fail?: InvalidDisplay): RecordDisplay | undefined;
9
10
  /** Resolve the schema-owned short presentation title without changing Record identity. */
10
- export declare function recordDisplayTitle(record: Record<string, unknown>, display?: Readonly<RecordDisplay>): string | undefined;
11
+ export declare function recordDisplayTitle(record: Record<string, unknown>, display: Readonly<RecordDisplay> | undefined, definitions: readonly DisplayField[], linkedTitle?: RecordDisplayLinkTitle): string | undefined;
11
12
  export {};
@@ -0,0 +1,6 @@
1
+ export type RecordLink = {
2
+ ref: string;
3
+ fragment?: string;
4
+ };
5
+ export declare function parseRecordLink(value: unknown): RecordLink | undefined;
6
+ export declare function parseStoredRecordLink(value: unknown): RecordLink | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oddington/sdk",
3
- "version": "0.1.77",
3
+ "version": "0.1.79",
4
4
  "description": "OS routine and response-handler SDK",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",