@vention/vention-skills 0.9.11 → 0.9.13
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/.claude-plugin/plugin.json +1 -1
- package/README.md +1 -1
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/skills/vention-design/SKILL.md +1 -1
- package/skills/vention-machine-logic/SKILL.md +13 -1
- package/skills/vention-machine-logic-hmi/SKILL.md +15 -5
- package/skills/vention-machine-logic-hmi/examples/indexing-station-hmi/customui/index.html +5 -0
- package/skills/vention-machine-logic-hmi/examples/indexing-station-hmi/customui/src/app.tsx +2 -2
- package/skills/vention-machine-logic-hmi/examples/indexing-station-hmi/customui/src/pages/run-page.tsx +32 -9
- package/skills/vention-machine-logic-hmi/examples/indexing-station-hmi/customui/src/station.ts +6 -2
- package/skills/vention-machine-logic-hmi/examples/indexing-station-hmi/project.json +1 -1
- package/skills/vention-monitoring/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Vention skills
|
|
2
2
|
|
|
3
|
-
Version 0.9.
|
|
3
|
+
Version 0.9.13. Skills for coding agents that work with Vention machines, packaged as one plugin, `vention`, in the `vention-skills` marketplace.
|
|
4
4
|
|
|
5
5
|
| Skill | What it does |
|
|
6
6
|
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
package/package.json
CHANGED
package/plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "vention",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.13",
|
|
5
5
|
"description": "Vention skills for coding agents: write MachineLogic applications, build machine designs, and diagnose deployed machines.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Vention"
|
|
@@ -3,7 +3,7 @@ name: vention-design
|
|
|
3
3
|
description: Create, build and edit Vention machine designs and design graphs for agentic layout. Use when the user wants to start a new design, lay out an automation cell, add or reposition components in a Vention design, generate a machine layout from a description, add or place a floor plan image under a design, list a design's versions, or inspect an existing design graph. Trigger on MachineBuilder designs, design graphs, assembly graphs, extrusions, actuators, robot mounting, cell footprints, floor plans, or a machine-builder URL.
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.9.
|
|
6
|
+
version: "0.9.13"
|
|
7
7
|
author: Vention
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ name: vention-machine-logic
|
|
|
3
3
|
description: Write, edit, validate, and deploy MachineLogic Python applications for Vention machines with the machine-logic-sdk and the Vention CLI. Load it before writing or changing any Python that talks to a Vention machine, however short, since device names and version-specific SDK calls come from here. Use to program a Vention machine or MachineMotion controller, drive actuators, conveyors, robots, pneumatics, or digital I/O, change an existing application, build a state machine, debug from logs, or pull, push, or link with the Vention CLI (vention or vn). Trigger on MachineLogic, machine-logic-sdk, MachineMotion, MachineBuilder applications, the Vention CLI, or a directory holding .machine-code-app-directory-info.json. Printing what the machine or robot holds now (positions, taught targets, calibration, I/O) is a program: files on disk hold only as-designed values. Not for explaining an existing machine or its configuration in words when no program is asked for, nor for Python that never touches the machine.
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.9.
|
|
6
|
+
version: "0.9.13"
|
|
7
7
|
machine-logic-sdk: ">=3.0,<4"
|
|
8
8
|
author: Vention
|
|
9
9
|
---
|
|
@@ -216,6 +216,8 @@ pose[2] += 20.0
|
|
|
216
216
|
robot.movel(pose, 50.0, 100.0)
|
|
217
217
|
```
|
|
218
218
|
|
|
219
|
+
The scene holds only the design's library-level positions. A Python application cannot read the variables or expression frames a code-free application keeps, and it cannot own scene assets of its own. When a step needs one of those positions, ask the user to teach it as a library target. A pose given as an offset on a frame can instead be computed the way `move_to_target` resolves a cartesian target: `transform_position_between_ref_frames(offset, from_reference_frame=frame.get_calibrated_value() or frame.get_default_value())`, from `machinelogic.machinelogic.utils.robot_transforms`.
|
|
220
|
+
|
|
219
221
|
## Complete examples
|
|
220
222
|
|
|
221
223
|
Each example is a standalone `main.py` whose module docstring names the device names it assumes. Copy the structure, then replace the names with the ones in the user's configuration.
|
|
@@ -244,6 +246,15 @@ Each example is a standalone `main.py` whose module docstring names the device n
|
|
|
244
246
|
5. Read the output with `vention logs`. MachineLogic failures name the device and the reason; read the log before proposing a change.
|
|
245
247
|
6. Show the user the diff before pushing over an application they did not write in this session.
|
|
246
248
|
|
|
249
|
+
## Deploying to a real cell
|
|
250
|
+
|
|
251
|
+
The controller keeps its own scene. Positions re-taught on the pendant and the controller's calibrations live only there, not on the design.
|
|
252
|
+
|
|
253
|
+
- Deploy over the LAN from the application's Deploy menu in MachineBuilder with only the application ticked. "Design-level Scene Assets" replaces the controller's positions with the design's, including every one re-taught on the pendant, and "Configuration" replaces its configuration.
|
|
254
|
+
- When the application needs a position the controller lacks, ask the user to teach it on the pendant under the same name it has on the design.
|
|
255
|
+
- Deploying restarts the application, so deploy only while the cell is idle.
|
|
256
|
+
- `print` what someone reading the controller's log needs, such as a step starting, a part finished or a fault. An HMI's event stream does not reach the log.
|
|
257
|
+
|
|
247
258
|
## Safety
|
|
248
259
|
|
|
249
260
|
This code drives physical machinery that can injure someone.
|
|
@@ -265,6 +276,7 @@ This code drives physical machinery that can injure someone.
|
|
|
265
276
|
- Hard-coding a pose the scene already holds under a taught name.
|
|
266
277
|
- Creating `Machine()` at import time, or twice in one process.
|
|
267
278
|
- Treating a simulation pass as evidence the program is safe on hardware.
|
|
279
|
+
- Ticking "Design-level Scene Assets" on a LAN deploy, which overwrites the positions re-taught on the pendant.
|
|
268
280
|
- `pip install machinelogic`: the package is `machine-logic-sdk`; only the import is `machinelogic`.
|
|
269
281
|
- Calling a blocking SDK method (a wait, `home`, a blocking move) directly inside `async def`, or using `asyncio.TaskGroup` (Python 3.11) on a 3.10 target.
|
|
270
282
|
- Assuming a cancelled task stopped its move.
|
|
@@ -3,7 +3,7 @@ name: vention-machine-logic-hmi
|
|
|
3
3
|
description: Build or edit the custom operator HMI of a MachineLogic application, the React touch screen in customui/ that runs in MachineBuilder and on the MachineMotion pendant, wired to the application's Python process through vention-communication. Use when the user asks for an operator screen, a custom HMI or UI, a touch panel, start and stop buttons, live machine state on screen, or recipes an operator picks, for a Vention machine or inside a directory holding .machine-code-app-directory-info.json. Uses @vention/machine-ui, @vention/machine-apps-components and @vention/machine-logic-ui-sdk. Do not use for the no-code HMI Builder, or for the Python motion logic alone (that is vention-machine-logic).
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.9.
|
|
6
|
+
version: "0.9.13"
|
|
7
7
|
author: Vention
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -25,13 +25,16 @@ Once per session, before any other work, check for a newer version of the Ventio
|
|
|
25
25
|
| --- | --- |
|
|
26
26
|
| `customui/` | The HMI source and its `package.json`. The engine runs `npm install`, then `npm run build`, in it. |
|
|
27
27
|
| `ui/` | Build output only. The build script writes `../ui/index.html` and `../ui/assets/`. Never edit it or read versions from it. |
|
|
28
|
-
| `project.json` | One process under `processes.onPlay`: `{ name, command, port }`. The command sets its own port. |
|
|
28
|
+
| `project.json` | One process under `processes.onPlay`: `{ name, command, port }`. The command sets its own port. `ui.showDefaultBackToControlCenterButton` is `false`, because the `NavigationBar` carries the Control Center button. |
|
|
29
29
|
| `requirements.txt` | Exact pins for `machine-logic-sdk`, `vention-communication`, `vention-state-machine`, `vention-storage` and `uvicorn`. |
|
|
30
30
|
| `proto/app.proto` | Written by `app.finalize()` when `server.py` is imported. Commit it; never edit it. |
|
|
31
31
|
| `customui/src/gen/` | The client `buf generate ../proto` writes before every build. Gitignored; never commit or edit it. |
|
|
32
32
|
|
|
33
33
|
```json
|
|
34
|
-
{
|
|
34
|
+
{
|
|
35
|
+
"processes": { "onPlay": [{ "name": "indexing-station", "command": "python3 -m uvicorn server:app --host 0.0.0.0 --port 8000", "port": 8000 }] },
|
|
36
|
+
"ui": { "showDefaultBackToControlCenterButton": false }
|
|
37
|
+
}
|
|
35
38
|
```
|
|
36
39
|
|
|
37
40
|
## The Python surface
|
|
@@ -148,6 +151,9 @@ The machine-apps-components README is behind its code: `NavigationBar` takes `Na
|
|
|
148
151
|
## Design rules
|
|
149
152
|
|
|
150
153
|
- Wrap the app in `machineUiHmiTheme`.
|
|
154
|
+
- Show each piece of information in one place only. The `StatusTopBar` already shows the state, so a page never repeats it, not even as a status indicator or an alert titled with the same word. A page adds only what the bar cannot say: the cause of a fault, what happens next, what to do.
|
|
155
|
+
- The screen fits the pendant without scrolling: keep `body { margin: 0 }` from the example's `index.html`, or the full-viewport root overflows it. Only the page area between the two bars scrolls.
|
|
156
|
+
- Exactly one way back to Control Center: the `NavigationBar`'s own button, which confirms before leaving. Keep `ui.showDefaultBackToControlCenterButton` `false` in `project.json`, or the pendant lays a second one over the screen.
|
|
151
157
|
- Set `size="x-large"` or `size="xx-large"` on every control that takes a size. The default `"small"` is 24 px, below the 44 px touch minimum.
|
|
152
158
|
- Text uses the `heading*` and `paragraph*` typography variants: `heading24SemiBold` for what the operator must see from a distance, such as the cycle count, `heading18SemiBold` for labels, `paragraph18Medium` for detail. The theme marks `hmiText*` deprecated.
|
|
153
159
|
- Leave at least 16 px between adjacent touch targets and 24 px between buttons with opposite effects, such as Save and Delete. `theme.spacing` is a lookup table, not a multiplier: `gap: 2` is 8 px, `gap: 4` is 16 px, `gap: 5` is 24 px.
|
|
@@ -164,7 +170,7 @@ The machine-apps-components README is behind its code: `NavigationBar` takes `Na
|
|
|
164
170
|
1. In the application directory, with the `requirements.txt` packages installed locally: `python3 -c "import server"` to re-emit `proto/app.proto`, and commit it if `git status` shows a change.
|
|
165
171
|
2. In `customui/`: `npm install`, `npm run build`, then `npx tsc --noEmit`, and check that `ui/index.html` exists and loads its script from `./assets/`, a relative path.
|
|
166
172
|
3. `vention push`, then open the HMI from the MachineLogic tab in MachineBuilder and run it on the digital twin before any hardware run.
|
|
167
|
-
4. Read `vention logs` when a command fails; the server's errors land there.
|
|
173
|
+
4. Read `vention logs` when a command fails; the server's errors land there. On a real controller, read them as the `vention-machine-logic` skill's "Deploying to a real cell" says.
|
|
168
174
|
|
|
169
175
|
## Safety
|
|
170
176
|
|
|
@@ -172,7 +178,8 @@ The HMI drives physical machinery that can injure someone.
|
|
|
172
178
|
|
|
173
179
|
- Start never fires on page load, on reconnect, or from a stream message. Only an operator's tap, confirmed in a modal, starts motion.
|
|
174
180
|
- Start and Stop live in the `StatusTopBar`, so they are on every page. Do not repeat them on a page. Raise the bar above `theme.zIndex.modal`, as the example's `app.tsx` does, or an open `VentionModal` covers Stop.
|
|
175
|
-
- Stop stays enabled unless the station is known to be ready. That includes while the stream is disconnected: a dropped stream may hide a moving machine. Every other command is disabled while disconnected.
|
|
181
|
+
- Stop stays enabled unless the station is known to be ready or already stopping. That includes while the stream is disconnected: a dropped stream may hide a moving machine. Every other command is disabled while disconnected.
|
|
182
|
+
- A tap on Stop shows at once. While the station stops, the Stop button reads "Stopping…", the Run page's progress bar marks where the run now ends (the cycle in progress amber, the cancelled ones hatched and struck through), and a line by the heading says the emergency stop halts at once. Say it on the screen the operator already watches rather than in a separate alert.
|
|
176
183
|
- Send Start with a `timeoutMs` and an abort signal, and abort it when the stream drops. A Start the operator can no longer see must not land later; say it was not confirmed and to check the station.
|
|
177
184
|
- The HMI never offers a way around an emergency stop, safety interlock, light curtain or guard, not even a hidden one for testing.
|
|
178
185
|
- The confirmation for anything that starts motion says what will move. The button itself can just say Start.
|
|
@@ -208,5 +215,8 @@ The HMI drives physical machinery that can injure someone.
|
|
|
208
215
|
- `BrowserRouter`, whose routes miss under `.../index.html`.
|
|
209
216
|
- Reading versions from `ui/package.json`; the manifest is `customui/package.json`.
|
|
210
217
|
- Disabling Stop whenever the stream drops.
|
|
218
|
+
- A Stop that looks the same before and after the tap while the station finishes its move.
|
|
219
|
+
- The state shown in the `StatusTopBar` and again on a page.
|
|
220
|
+
- `severity="warning"` on a `VentionAlert`. It is `"warn"`.
|
|
211
221
|
- `--legacy-peer-deps` to get past a peer dependency conflict. Pin versions whose peers agree, as the example does.
|
|
212
222
|
- A Start still in flight after the connection drops.
|
|
@@ -10,7 +10,7 @@ import type { Event, Recipe } from "./gen/app_pb"
|
|
|
10
10
|
import { LogsPage } from "./pages/logs-page"
|
|
11
11
|
import { RecipesPage } from "./pages/recipes-page"
|
|
12
12
|
import { RunPage } from "./pages/run-page"
|
|
13
|
-
import { canStart, canStop, describeState, errorText } from "./station"
|
|
13
|
+
import { canStart, canStop, describeState, errorText, isStopping } from "./station"
|
|
14
14
|
import { useStream } from "./use-stream"
|
|
15
15
|
|
|
16
16
|
// Events are kept in memory from when the HMI opened, so the cap bounds a long shift.
|
|
@@ -100,7 +100,7 @@ export function App() {
|
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
102
|
id: "stop",
|
|
103
|
-
label: "Stop",
|
|
103
|
+
label: isStopping(status, connected) ? "Stopping…" : "Stop",
|
|
104
104
|
onClick: stop,
|
|
105
105
|
disabled: !canStop(status, connected),
|
|
106
106
|
backgroundColor: COLORS.red[600],
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Box, Typography } from "@mui/material"
|
|
2
|
-
import { VentionAlert, VentionSelect
|
|
2
|
+
import { COLORS, VentionAlert, VentionSelect } from "@vention/machine-ui"
|
|
3
3
|
import { useEffect, useState } from "react"
|
|
4
4
|
import { client } from "../client"
|
|
5
5
|
import type { Recipe, StationStatus } from "../gen/app_pb"
|
|
6
|
-
import { canStart,
|
|
6
|
+
import { canStart, errorText, isStopping } from "../station"
|
|
7
7
|
|
|
8
8
|
interface RunPageProps {
|
|
9
9
|
status: StationStatus | undefined
|
|
@@ -13,9 +13,30 @@ interface RunPageProps {
|
|
|
13
13
|
onError: (message: string) => void
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
const HATCHED = `repeating-linear-gradient(45deg, ${COLORS.slate[100]} 0 8px, ${COLORS.slate[200]} 8px 16px)`
|
|
17
|
+
|
|
18
|
+
/** Done cycles green, the current one amber while stopping, and the cycles Stop cancels hatched. */
|
|
19
|
+
function CycleProgress({ cycle, cycleCount, stopping }: { cycle: number; cycleCount: number; stopping: boolean }) {
|
|
20
|
+
const cancelled = stopping && cycleCount > cycle
|
|
21
|
+
const segment = (count: number, background: string) => <Box sx={{ flex: count, height: 16, borderRadius: 1, background }} />
|
|
22
|
+
return (
|
|
23
|
+
<Box sx={{ display: "flex", flexDirection: "column", gap: 2 }}>
|
|
24
|
+
<Box sx={{ display: "flex", gap: 1 }}>
|
|
25
|
+
{cycle > 1 && segment(cycle - 1, COLORS.green[500])}
|
|
26
|
+
{segment(1, stopping ? COLORS.amber[500] : COLORS.green[200])}
|
|
27
|
+
{cycleCount > cycle && segment(cycleCount - cycle, cancelled ? HATCHED : COLORS.slate[100])}
|
|
28
|
+
</Box>
|
|
29
|
+
<Typography variant="heading18SemiBold">
|
|
30
|
+
Cycle {cycle} of {cancelled ? <s>{cycleCount}</s> : cycleCount}
|
|
31
|
+
{stopping && ", stopping after the move in progress"}
|
|
32
|
+
</Typography>
|
|
33
|
+
</Box>
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
|
|
16
37
|
export function RunPage({ status, connected, recipe, onRecipeChange, onError }: RunPageProps) {
|
|
17
38
|
const [recipes, setRecipes] = useState<Recipe[]>([])
|
|
18
|
-
const
|
|
39
|
+
const stopping = isStopping(status, connected)
|
|
19
40
|
|
|
20
41
|
useEffect(() => {
|
|
21
42
|
if (!connected) return
|
|
@@ -31,21 +52,23 @@ export function RunPage({ status, connected, recipe, onRecipeChange, onError }:
|
|
|
31
52
|
|
|
32
53
|
return (
|
|
33
54
|
<Box sx={{ display: "flex", flexDirection: "column", gap: 6, maxWidth: 960 }}>
|
|
34
|
-
<VentionStatusIndicator size="xx-large" outline dotColor={state.color} label={state.label} />
|
|
35
55
|
{status !== undefined && status.fault !== "" && (
|
|
36
56
|
<VentionAlert
|
|
37
57
|
severity="error"
|
|
38
58
|
size="xx-large"
|
|
39
|
-
title=
|
|
40
|
-
descriptionText={status.fault}
|
|
59
|
+
title={status.fault}
|
|
41
60
|
primaryButtonText={connected && status.state === "fault" ? "Reset" : undefined}
|
|
42
61
|
onPrimaryButtonClick={reset}
|
|
43
62
|
/>
|
|
44
63
|
)}
|
|
45
64
|
<Box sx={{ display: "flex", flexDirection: "column", gap: 2 }}>
|
|
46
|
-
<
|
|
47
|
-
{status?.recipeName
|
|
48
|
-
|
|
65
|
+
<Box sx={{ display: "flex", alignItems: "baseline", justifyContent: "space-between", gap: 4 }}>
|
|
66
|
+
<Typography variant="heading24SemiBold">{status?.recipeName || "No recipe running"}</Typography>
|
|
67
|
+
{stopping && <Typography variant="paragraph18Medium">The emergency stop halts at once.</Typography>}
|
|
68
|
+
</Box>
|
|
69
|
+
{status?.state.startsWith("Station_") && status.cycle > 0 && (
|
|
70
|
+
<CycleProgress cycle={status.cycle} cycleCount={status.cycleCount} stopping={stopping} />
|
|
71
|
+
)}
|
|
49
72
|
<Typography variant="paragraph18Medium">
|
|
50
73
|
Last cycle: {status && status.lastCycleSeconds > 0 ? `${status.lastCycleSeconds.toFixed(1)} s` : "none yet"}
|
|
51
74
|
</Typography>
|
package/skills/vention-machine-logic-hmi/examples/indexing-station-hmi/customui/src/station.ts
CHANGED
|
@@ -24,9 +24,13 @@ export function canStart(status: StationStatus | undefined, connected: boolean):
|
|
|
24
24
|
return connected && status?.state === "ready" && status.fault === ""
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
export function isStopping(status: StationStatus | undefined, connected: boolean): boolean {
|
|
28
|
+
return connected && status?.state === "Station_stopping"
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** Stop is disabled only when the station is known to be ready or already stopping: a dropped stream may hide a moving conveyor. */
|
|
28
32
|
export function canStop(status: StationStatus | undefined, connected: boolean): boolean {
|
|
29
|
-
return !(connected && status?.state === "ready")
|
|
33
|
+
return !(connected && status?.state === "ready") && !isStopping(status, connected)
|
|
30
34
|
}
|
|
31
35
|
|
|
32
36
|
export function errorText(error: unknown): string {
|
|
@@ -3,7 +3,7 @@ name: vention-monitoring
|
|
|
3
3
|
description: Diagnose deployed Vention machines from controller state, history, health, and activity data. Use when the user reports a machine that is down, faulted, offline, slow, or underperforming, asks why a cycle time regressed, wants to interpret MachineMotion event data or drive and brake status, asks about OEE or uptime, or wants to know which machine in a fleet needs attention. Trigger on a MachineMotion serial number plus any complaint.
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.9.
|
|
6
|
+
version: "0.9.13"
|
|
7
7
|
author: Vention
|
|
8
8
|
---
|
|
9
9
|
|