|
1 | 1 | # LAFS: LLM-Agent-First Specification |
2 | 2 |
|
3 | 3 | > 📚 **Documentation:** https://codluv.gitbook.io/lafs-protocol/ |
4 | | -> **Version:** 1.4.1 | **Status:** Production Ready |
| 4 | +> **Version:** 1.5.0 | **Status:** Production Ready |
5 | 5 |
|
6 | 6 | ## 1. Scope |
7 | 7 |
|
@@ -431,16 +431,45 @@ To reduce token and I/O overhead, implementations SHOULD support lazy retrieval |
431 | 431 | - Default list/batch outputs MUST only contain fields required for next action. |
432 | 432 | - Verbose fields SHOULD be omitted by default. |
433 | 433 | - Systems SHOULD publish operation-level MVI budgets. |
| 434 | +- `_meta.mvi` MUST be one of: `minimal`, `standard`, `full`, or `custom`. |
| 435 | +- `_meta` is a structural envelope field and MUST always be present regardless |
| 436 | + of `mvi` level. MVI levels govern the contents of `result` only; they MUST NOT |
| 437 | + affect envelope structural fields (`$schema`, `_meta`, `success`, `error`, |
| 438 | + `page`, `_extensions`). |
| 439 | +- `minimal`: MUST include only fields within `result` sufficient for the next |
| 440 | + agent action (typically identifiers and status). Implementations SHOULD |
| 441 | + document which fields constitute `minimal` per operation. |
| 442 | +- `standard` (default): MUST include all commonly useful fields for the |
| 443 | + operation. |
| 444 | +- `full`: MUST include all available fields including verbose and |
| 445 | + rarely-accessed data. |
| 446 | +- `custom`: MUST be set by the server when `_fields` projection has been |
| 447 | + applied, indicating the result does not conform to any predefined disclosure |
| 448 | + level. `custom` is not a client-requestable level. |
434 | 449 |
|
435 | 450 | ### 9.2 Field selection (`_fields`) |
436 | 451 |
|
437 | | -Clients MAY request a subset of response fields via the `_fields` request parameter. |
438 | | - |
439 | | -- `_fields` MUST be an array of strings identifying top-level result field names. |
440 | | -- When `_fields` is present, the server MUST return only the requested fields plus any MVI-required fields for the declared disclosure level. |
441 | | -- When `_fields` is absent, the server MUST return fields appropriate for the declared `_meta.mvi` disclosure level. |
442 | | -- If a requested field does not exist on the resource, the server SHOULD omit it silently (no error). Servers MAY include a warning in `_meta.warnings` for unknown fields. |
443 | | -- `_fields` MUST NOT affect envelope structural fields (`$schema`, `_meta`, `success`, `error`, `page`, `_extensions`); it applies only to the contents of `result`. |
| 452 | +Clients MAY request a subset of response fields via the `_fields` request |
| 453 | +parameter. |
| 454 | + |
| 455 | +- `_fields` MUST be an array of strings identifying `result` field names. |
| 456 | + Path notation (e.g., `task.title`) is not defined by this specification. |
| 457 | +- When `result` is an array, `_fields` applies to the keys of each element. |
| 458 | +- When `result` is a wrapper object whose values are entities or arrays of |
| 459 | + entities (e.g., `{ "task": { ... } }` or `{ "items": [...] }`), servers |
| 460 | + SHOULD apply `_fields` to the nested entity fields rather than the wrapper's |
| 461 | + own keys. |
| 462 | +- When `_fields` is present, the server MUST return only the requested fields |
| 463 | + plus any MVI-required fields for the declared disclosure level. |
| 464 | + The server MUST set `_meta.mvi` to `custom` in the response. |
| 465 | +- When `_fields` is absent, the server MUST return fields appropriate for the |
| 466 | + declared `_meta.mvi` disclosure level. |
| 467 | +- If a requested field does not exist on the resource, the server SHOULD omit |
| 468 | + it silently (no error). Servers MAY include a warning in `_meta.warnings` |
| 469 | + for unknown fields. |
| 470 | +- `_fields` MUST NOT affect envelope structural fields (`$schema`, `_meta`, |
| 471 | + `success`, `error`, `page`, `_extensions`); it applies only to the contents |
| 472 | + of `result`. |
444 | 473 |
|
445 | 474 | ### 9.3 Expansion mechanism (`_expand`) |
446 | 475 |
|
|
0 commit comments