thing-contract (TS): CommandInvocation gains source and items
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
2df0dfce8c
commit
26d8440f9b
3 changed files with 12 additions and 0 deletions
|
|
@ -273,6 +273,8 @@ export const commandInvocation = codecs.slots<T.CommandInvocation>(
|
|||
6: ["client", text],
|
||||
7: ["issuedAt", text],
|
||||
8: ["delegation", nullable(string)],
|
||||
9: ["source", text],
|
||||
10: ["items", readOnlyList(string)],
|
||||
},
|
||||
named("CommandInvocation"),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -155,6 +155,14 @@ export interface CommandInvocation {
|
|||
readonly client: string;
|
||||
readonly issuedAt: string;
|
||||
readonly delegation: string | null;
|
||||
/**
|
||||
* The activating node's declared id in the resolved tree. For a node inside a Repeat it is the template's
|
||||
* id, never an instance id. A confirmed invocation names the node confirmed; a resumed one carries the
|
||||
* source and items of the invocation whose result carried the effect.
|
||||
*/
|
||||
readonly source: NodeId;
|
||||
/** The key of each Repeat instance enclosing the source, outermost first; empty outside any Repeat. */
|
||||
readonly items: readonly string[];
|
||||
}
|
||||
|
||||
// result.rs
|
||||
|
|
|
|||
|
|
@ -139,6 +139,8 @@ export function invocation(): CommandInvocation {
|
|||
client: "renderer.web",
|
||||
issuedAt: PINNED_CLOCK,
|
||||
delegation: "delegate-1",
|
||||
source: "go-button",
|
||||
items: ["outer", "inner"],
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue