@tinkered/core 0.30.1 → 0.31.0
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.
package/package.json
CHANGED
package/skills/core/SKILL.md
CHANGED
|
@@ -4,8 +4,9 @@ description: >
|
|
|
4
4
|
Use when you add or change an action in a
|
|
5
5
|
Tinker app: its label, input shape, deps, run
|
|
6
6
|
body, how to call it, or how it fails. Also
|
|
7
|
-
when a check prints tinker/plain
|
|
8
|
-
tinker/floating, or for a
|
|
7
|
+
when a check prints tinker/plain,
|
|
8
|
+
tinker/floating or tinker/graph, or for a
|
|
9
|
+
Workflow SDK flow.
|
|
9
10
|
metadata:
|
|
10
11
|
purpose: >
|
|
11
12
|
How to write, call and fail an operation,
|
|
@@ -13,7 +14,7 @@ metadata:
|
|
|
13
14
|
allowed in app code.
|
|
14
15
|
type: sub-skill
|
|
15
16
|
library: '@tinkered/core'
|
|
16
|
-
library_version: '0.
|
|
17
|
+
library_version: '0.31.0'
|
|
17
18
|
requires:
|
|
18
19
|
- core
|
|
19
20
|
sources:
|
|
@@ -212,6 +213,51 @@ scope.run(press, { input: { x: 1, y: 2 } });
|
|
|
212
213
|
Right: `await scope.run(...)`, or keep the
|
|
213
214
|
promise and await it later.
|
|
214
215
|
|
|
216
|
+
### HIGH: the code graph differs from tinker.graph [tinker/graph]
|
|
217
|
+
|
|
218
|
+
`tinker.graph` holds one line per operation: its
|
|
219
|
+
exits, and the cells and operations its `run`
|
|
220
|
+
reads, writes and calls. The lines are facts.
|
|
221
|
+
`tinker check` builds them from the code. Each
|
|
222
|
+
line that differs from the file is a finding.
|
|
223
|
+
|
|
224
|
+
The finding never judges the change. You judge
|
|
225
|
+
it.
|
|
226
|
+
|
|
227
|
+
An empty set means "none". A `?` means the graph
|
|
228
|
+
could not see: a dep handed on (passed to a
|
|
229
|
+
function, put in an array, given another name),
|
|
230
|
+
the deps handed on whole, a call it does not
|
|
231
|
+
know, a dep it cannot name (a capsule or contract
|
|
232
|
+
member, a label not written as a string, an
|
|
233
|
+
`atScope` controller), a tag that holds a unit,
|
|
234
|
+
or a `run` passed by name. A tag that holds a
|
|
235
|
+
union of unit kinds, or a held cell that `run`
|
|
236
|
+
never uses, may show no `?`.
|
|
237
|
+
|
|
238
|
+
The graph reads each op's own body. A resource's
|
|
239
|
+
own code is not read: a write inside a
|
|
240
|
+
resource's value does not show.
|
|
241
|
+
|
|
242
|
+
Wrong: a move now writes a cell it did not, and
|
|
243
|
+
nobody read that.
|
|
244
|
+
|
|
245
|
+
```ts no-check
|
|
246
|
+
list.set({ ...now, state: input.state });
|
|
247
|
+
audit.set({ id: input.id, by: me });
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
```text
|
|
251
|
+
issue.move.do: writes{issues.audit.set,
|
|
252
|
+
issues.list.set}, tinker.graph says
|
|
253
|
+
writes{issues.list.set}
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
Right: read the change. If you meant it, run
|
|
257
|
+
`tinker graph --write` and commit the file. The
|
|
258
|
+
reviewer reads its diff. If you did not mean it,
|
|
259
|
+
fix the code.
|
|
260
|
+
|
|
215
261
|
### MEDIUM: `Date.now()` or `Math.random()` in a run
|
|
216
262
|
|
|
217
263
|
The run then gives a new answer in each test. Use
|
package/skills/core/rpc/SKILL.md
CHANGED