(
collName: string,
row: Record<string, unknown>
)
| 422 | } |
| 423 | |
| 424 | const getRowKey = ( |
| 425 | collName: string, |
| 426 | row: Record<string, unknown> |
| 427 | ): string => { |
| 428 | const key = row[getPrimaryKey(collName)] |
| 429 | if (typeof key !== `string`) { |
| 430 | throw new Error( |
| 431 | `[agent-runtime] Shared state "${id}" collection "${collName}" requires string primary keys` |
| 432 | ) |
| 433 | } |
| 434 | return key |
| 435 | } |
| 436 | |
| 437 | const stripVirtualFields = ( |
| 438 | row: Record<string, unknown> | undefined |
no test coverage detected