OptionalapplyWrites the entry's return value into the current selection.
The user-invoked macro affordance: a macro run from the UI that returns a value (or an
ICell/ICellRange) puts it where the user is. IScript.executeMacro sets
it; IScript.run does not, because a programmatic caller's return value is its
answer - run("wb.getRange('A1:B2').getValues()") is a read, and pasting its result at the
selection would make every read an edit.
OptionalargsArguments exposed to the script via ctx.args.
OptionalauthorWho authored this change. Recorded on the commit (ICommit.getAuthor).
OptionalautoIf true or set then this will select the affect item after the transaction is complete.
OptionaldefaultThe label to use when neither the caller nor the code names the change — a FLOOR, not an override.
description outranks the entry's JSDoc summary, which is right for a caller naming a specific
change and wrong for a host supplying a generic default: passing "Agent Update" as the
description throws away the summary of every documented script it runs. Hence two options and
one order — description, then the summary, then this, then the entry's name.
OptionaldescriptionA human description.
OptionalexpectedOptimistic concurrency guard. If set, the operation only begins if the store's current commit id matches; otherwise a TransactionConflictError is thrown.
OptionalloggerOutput channel; defaults to a console logger. A host may pass a BufferLogger to capture.
OptionallogHow long a finished run waits for what it logged to settle, in milliseconds. 0 waits
indefinitely.
OptionalreadDeclares the operation read-only: any state update within it throws.
Writes are tracked automatically — a batch that performs no updates never creates a commit (no new commit id, no events, no undo entry) whether or not this is set. The flag is purely an assertion for callers that want the guarantee enforced. Nested transactions inherit it; they cannot opt back out.
OptionalrenderRenders an SDK object logged by the script as its markdown report.
Options for IScript.run.
Remarks
Extends ITransaction.OperationOptions, so a caller can name the resulting transaction (
description) - this is the label the UI shows for undo/redo - and controlautoSelect. Whendescriptionis omitted the label falls to the entry's JSDoc summary, then to defaultDescription, then to the entry's name.