@openengio/cli 0.24.3 → 0.24.4
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/bin/public/openeng.js +13 -13
- package/package.json +1 -1
- package/skill/demo/SKILL.md +130 -103
package/bin/public/openeng.js
CHANGED
|
@@ -1057,7 +1057,7 @@ var CLIENT_SCOPES = Object.freeze({
|
|
|
1057
1057
|
offline_access: Object.freeze({ capabilities: Object.freeze([]), consentLine: "Stay connected when you are away, until you disconnect it." })
|
|
1058
1058
|
});
|
|
1059
1059
|
|
|
1060
|
-
// packages/sdk-
|
|
1060
|
+
// packages/sdk-dispatch/dist/explain.js
|
|
1061
1061
|
function explainKind(kind) {
|
|
1062
1062
|
if (!Object.hasOwn(BY_KIND, kind)) {
|
|
1063
1063
|
throw new Error(`the refusal kind ${JSON.stringify(kind)} has no entry in the refusal catalogue`);
|
|
@@ -1137,10 +1137,10 @@ function unauthenticatedEnvelope() {
|
|
|
1137
1137
|
return { version: PROTOCOL_VERSION, refusal: explainedRefusalOf({ kind: "unauthenticated" }), correlationId: null };
|
|
1138
1138
|
}
|
|
1139
1139
|
|
|
1140
|
-
// packages/sdk-
|
|
1140
|
+
// packages/sdk-dispatch/dist/socket-transport.js
|
|
1141
1141
|
import { request } from "node:http";
|
|
1142
1142
|
|
|
1143
|
-
// packages/sdk-
|
|
1143
|
+
// packages/sdk-dispatch/dist/response.js
|
|
1144
1144
|
function responseOf(status, text, reason) {
|
|
1145
1145
|
let read = false;
|
|
1146
1146
|
const members = {
|
|
@@ -1170,7 +1170,7 @@ function responseOf(status, text, reason) {
|
|
|
1170
1170
|
});
|
|
1171
1171
|
}
|
|
1172
1172
|
|
|
1173
|
-
// packages/sdk-
|
|
1173
|
+
// packages/sdk-dispatch/dist/socket-transport.js
|
|
1174
1174
|
var REQUEST_DEADLINE_MS = 1e4;
|
|
1175
1175
|
var HostOutcomeUnknown = class extends Error {
|
|
1176
1176
|
path;
|
|
@@ -1465,7 +1465,7 @@ function createHostStreamFetch(socketPath, headDeadlineMs = REQUEST_DEADLINE_MS)
|
|
|
1465
1465
|
};
|
|
1466
1466
|
}
|
|
1467
1467
|
|
|
1468
|
-
// packages/sdk-
|
|
1468
|
+
// packages/sdk-dispatch/dist/call.js
|
|
1469
1469
|
function isEnvelope(value) {
|
|
1470
1470
|
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
1471
1471
|
return false;
|
|
@@ -1570,7 +1570,7 @@ async function* callStreamed(transport, origin, route2, body, token, signal) {
|
|
|
1570
1570
|
}
|
|
1571
1571
|
}
|
|
1572
1572
|
|
|
1573
|
-
// packages/sdk-
|
|
1573
|
+
// packages/sdk-dispatch/dist/module-factory.js
|
|
1574
1574
|
function freezeDoc(doc2) {
|
|
1575
1575
|
return Object.freeze({ does: doc2.does, refuses: Object.freeze([...doc2.refuses]) });
|
|
1576
1576
|
}
|
|
@@ -1607,7 +1607,7 @@ function createModuleFactory(entries6, transport, origin, token) {
|
|
|
1607
1607
|
return Object.freeze(Object.fromEntries(Object.entries(byCapability).map(([capability, methods]) => [capability, Object.freeze(methods)])));
|
|
1608
1608
|
}
|
|
1609
1609
|
|
|
1610
|
-
// packages/sdk-
|
|
1610
|
+
// packages/sdk-dispatch/dist/typed-client.js
|
|
1611
1611
|
function createTypedClient(names, entries6, transport, origin, token) {
|
|
1612
1612
|
const factory = createModuleFactory(entries6, transport, origin, token);
|
|
1613
1613
|
const byName = new Map(entries6.map((entry2) => [entry2.name, entry2]));
|
|
@@ -1626,7 +1626,7 @@ function createTypedClient(names, entries6, transport, origin, token) {
|
|
|
1626
1626
|
return Object.freeze(client);
|
|
1627
1627
|
}
|
|
1628
1628
|
|
|
1629
|
-
// packages/sdk-
|
|
1629
|
+
// packages/sdk-dispatch/dist/https-transport.js
|
|
1630
1630
|
import { request as request2 } from "node:https";
|
|
1631
1631
|
function createHttpsTransport(origin, options = {}, deadlineMs = REQUEST_DEADLINE_MS) {
|
|
1632
1632
|
const originUrl = new URL(origin);
|
|
@@ -1698,7 +1698,7 @@ function createHttpsTransport(origin, options = {}, deadlineMs = REQUEST_DEADLIN
|
|
|
1698
1698
|
};
|
|
1699
1699
|
}
|
|
1700
1700
|
|
|
1701
|
-
// packages/sdk-
|
|
1701
|
+
// packages/sdk-dispatch/dist/token-routes.js
|
|
1702
1702
|
async function redeem(transport, origin, body) {
|
|
1703
1703
|
return call(transport, origin, "redeem", body, null, null);
|
|
1704
1704
|
}
|
|
@@ -8531,7 +8531,7 @@ var typesIcons = {
|
|
|
8531
8531
|
}
|
|
8532
8532
|
};
|
|
8533
8533
|
|
|
8534
|
-
// packages/demo-
|
|
8534
|
+
// packages/demo-player/dist/definition.js
|
|
8535
8535
|
var STRING = { kind: "string" };
|
|
8536
8536
|
var NUMBER = { kind: "number" };
|
|
8537
8537
|
var PERSON = { kind: "person" };
|
|
@@ -8846,7 +8846,7 @@ function worldSteps(size, ownerPersonId, data) {
|
|
|
8846
8846
|
}
|
|
8847
8847
|
var DEMO_TYPE_VERSION = 1;
|
|
8848
8848
|
|
|
8849
|
-
// packages/demo-
|
|
8849
|
+
// packages/demo-player/dist/ocgt-world.js
|
|
8850
8850
|
var SYSTEM_TREE = [
|
|
8851
8851
|
{ identifier: "OCGT", name: "Open Cycle Gas Turbine Plant", parent: null },
|
|
8852
8852
|
{ identifier: "GT", name: "Gas Turbine", parent: "OCGT" },
|
|
@@ -9071,7 +9071,7 @@ var OCGT_WORLD = {
|
|
|
9071
9071
|
})
|
|
9072
9072
|
};
|
|
9073
9073
|
|
|
9074
|
-
// packages/demo-
|
|
9074
|
+
// packages/demo-player/dist/player.js
|
|
9075
9075
|
var TRUNK_REF = "main";
|
|
9076
9076
|
var IDEMPOTENCY_PREFIX = "demo-seed";
|
|
9077
9077
|
var DemoRouteRefusedError = class extends Error {
|
|
@@ -10912,7 +10912,7 @@ var CLI_OPTIONS = {
|
|
|
10912
10912
|
};
|
|
10913
10913
|
|
|
10914
10914
|
// packages/cli/src/cli-version.ts
|
|
10915
|
-
var PATCH_VERSION =
|
|
10915
|
+
var PATCH_VERSION = 4;
|
|
10916
10916
|
var CLI_VERSION = `0.${PROTOCOL_VERSION}.${PATCH_VERSION}`;
|
|
10917
10917
|
|
|
10918
10918
|
// packages/cli/src/environment.ts
|
package/package.json
CHANGED
package/skill/demo/SKILL.md
CHANGED
|
@@ -1,112 +1,139 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: demo
|
|
3
|
-
description: Use when a person new to OpenEngineering wants a hands-on tour, or has just signed in and has no task of their own yet.
|
|
3
|
+
description: Use when a person new to OpenEngineering wants a hands-on tour, or has just signed in and has no task of their own yet. Offers the example plant seed, a free-form capability tour around their workflow, or a task they name.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Give a person a tour of OpenEngineering
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
8
|
+
## 1. Offer three paths
|
|
9
|
+
|
|
10
|
+
After sign-in, when the person has no task of their own, offer once:
|
|
11
|
+
|
|
12
|
+
- **Seed demo**: create a project, run `openeng demo seed --project <id>`, then follow the
|
|
13
|
+
[Quickstart](https://docs.openeng.io/get-started/quickstart/) together.
|
|
14
|
+
- **Free-form tour** (the main path): build a small example around their work and explore its
|
|
15
|
+
capabilities together in the app.
|
|
16
|
+
- **Something else**: follow the task the person names. They may decline the tour.
|
|
17
|
+
|
|
18
|
+
Before the tour starts, load every capability below into your own native task or plan tool,
|
|
19
|
+
whatever your harness provides: one item per capability, its Checklist line as the title and its
|
|
20
|
+
Features shown line as the detail. Show the person the list and say they may skip any item.
|
|
21
|
+
Run one item at a time. Tick it only when the person has seen its result in the app and you have
|
|
22
|
+
checked that result with a read. Drop a declined item from the remaining work and mark it skipped,
|
|
23
|
+
never done. If you have no task or plan tool, write the same checklist in the conversation and
|
|
24
|
+
show each item's state again whenever it changes.
|
|
25
|
+
|
|
26
|
+
Offer C1, C3 and C5 first, then the others by the person's interest. Use the chosen playbook or
|
|
27
|
+
the example plant for the stories. All capabilities below are shipped. Leave per-field conflicts
|
|
28
|
+
out of every story.
|
|
29
|
+
|
|
30
|
+
- [ ] C1. Describe your workflow, and use the tool five minutes later
|
|
31
|
+
Checklist: Build a working tool from a description of the person's workflow.
|
|
32
|
+
Features shown: Organisations and projects; Familiar workflow playbooks; Types and the ontology;
|
|
33
|
+
Ontology agent; Rail groups and type icons; Objects; Table of one type; The object card.
|
|
34
|
+
|
|
35
|
+
- [ ] C2. One data model, two ways of working: a CRUD app or a branch-first engineering workflow
|
|
36
|
+
Checklist: Switch one project between direct edits on `main` and branch-only edits.
|
|
37
|
+
Features shown: Objects; Branches; Branch diff and changed-object accents; Proposals; Roles and
|
|
38
|
+
membership; Ref rules.
|
|
39
|
+
|
|
40
|
+
- [ ] C3. Follow one question across every tool
|
|
41
|
+
Checklist: Answer one question that crosses requirements, parts and tests.
|
|
42
|
+
Features shown: Relationships; Structure tree; Graph and Explore; Paths between two objects;
|
|
43
|
+
Counts and rollups; The object card.
|
|
44
|
+
|
|
45
|
+
- [ ] C4. Every record carries its own story
|
|
46
|
+
Checklist: Show who changed a record, why, and what a delete would take with it.
|
|
47
|
+
Features shown: The object card; Object history with per-field attribution; Comments and
|
|
48
|
+
subscribers; Delete preview; Branch history and the audit trail.
|
|
49
|
+
|
|
50
|
+
- [ ] C5. An agent does the work, a person makes the call
|
|
51
|
+
Checklist: Have the in-product agent make a change that a person approves and merges.
|
|
52
|
+
Features shown: Branches; Branch diff and changed-object accents; Proposals; Branch history and
|
|
53
|
+
the audit trail; Object agent; Agent model per organisation; Agent ceiling.
|
|
54
|
+
|
|
55
|
+
- [ ] C6. Freeze what shipped, keep building what comes next
|
|
56
|
+
Checklist: Freeze a released part and keep a read-only release baseline.
|
|
57
|
+
Features shown: Types and the ontology; Objects; Relationships; Organisation refs; Instance
|
|
58
|
+
locks; Type rules.
|
|
59
|
+
|
|
60
|
+
- [ ] C7. Your CAD system stays the source of truth
|
|
61
|
+
Checklist: Mirror Onshape parts and link a requirement to one of them.
|
|
62
|
+
Features shown: Types and the ontology; Relationships; Service identities; Onshape mirror; Type
|
|
63
|
+
rules.
|
|
64
|
+
|
|
65
|
+
- [ ] C8. Build on it: a screen for each team, and your own app
|
|
66
|
+
Checklist: Build a team page from configuration, then a small OAuth app on the same data.
|
|
67
|
+
Features shown: Counts and rollups; Object views and App views; Apps with several pages; Roles
|
|
68
|
+
and membership; OAuth apps.
|
|
69
|
+
|
|
70
|
+
## 2. Agree the workflow and keep its stop points
|
|
71
|
+
|
|
72
|
+
Ask what the person designs or manages and where the work gets hard. Offer a fitting playbook:
|
|
73
|
+
`openeng skill playbook engineering-requirements`, `product-lifecycle` or `project-management`,
|
|
74
|
+
or use their own vocabulary. Agree a small story with a visible result. Create a demo organisation
|
|
75
|
+
with `openeng org create` unless asked to use an existing one; say which data is invented.
|
|
76
|
+
Ask before touching existing data, inviting anyone, connecting Onshape or registering an app.
|
|
77
|
+
Ask at most two questions at a time; do not turn routine commands into permission questions.
|
|
78
|
+
|
|
79
|
+
Whenever the tour designs types, read `openeng skill new-use-case` and follow every stop point
|
|
80
|
+
in order: show the person the work and wait for agreement at each one. Do not skip a stop point
|
|
81
|
+
to speed up the tour. Read `openeng skill conventions` before choosing relationships, properties,
|
|
82
|
+
icons and rail groups. Draft nothing before new-use-case's drafting step; accept a change set
|
|
83
|
+
only on the person's word naming it.
|
|
84
|
+
|
|
85
|
+
## 3. Show one story at a time
|
|
86
|
+
|
|
87
|
+
Use `openeng help <module> <route>` for request shapes. Each story answers a question the person
|
|
88
|
+
cares about; do not explain a primitive in isolation.
|
|
89
|
+
|
|
90
|
+
- C1: agree and publish types from the chosen playbook, write believable data with
|
|
91
|
+
`objects-sdk mutateBatch`, then show the rail, table and object card with `link type`.
|
|
92
|
+
- C2: edit on main, add a merge-only rule, show the same edit refused `protected`, then branch,
|
|
93
|
+
edit, compare and submit a proposal. The person merges; remove the rule and show direct edits.
|
|
94
|
+
- C3: narrow with `objects-sdk readStructure`, show `link explore`, and answer a question
|
|
95
|
+
across requirements, parts and tests with `queryObjects`, `findPaths` and `aggregateObjects`.
|
|
96
|
+
- C4: open a record's history, comment and subscribe; use `objects-sdk previewDelete` before
|
|
97
|
+
any deletion, and read branch history and `admin-sdk listAudit`.
|
|
98
|
+
- C5: show the organisation's agent model and project's `ceiling show`. The person uses
|
|
99
|
+
"Open agent", approves its plan, inspects the branch diff, submits and merges. Read the audit
|
|
100
|
+
naming the person and run; show the agent refused on protected main.
|
|
101
|
+
- C6: use `locks set --lock frozen` on a released part, show an edit refused, create its successor
|
|
102
|
+
and relationship, and keep a baseline with `org-refs create --read-only`. Show an immutable
|
|
103
|
+
test result refusing changes on a branch too.
|
|
104
|
+
- C7: for an Onshape user, agree the import scope; use `connector create`, `set-credential`,
|
|
105
|
+
`draft-types`, publish agreed types, `run` and `runs`. Link a requirement to a mirrored part,
|
|
106
|
+
show it cannot be edited here, and show a repeat import preserves the requirement.
|
|
107
|
+
- C8: read `openeng skill build-ui` and its component catalogue, publish a team page through
|
|
108
|
+
the App draft workflow, and show `link app`. Offer a small local OAuth app reading the same
|
|
109
|
+
data; show consent and how to disconnect it.
|
|
110
|
+
|
|
111
|
+
At each step, say what comes next and why, make the smallest useful change (one atomic batch
|
|
112
|
+
for related writes), validate before publishing, and read the result in the intended organisation,
|
|
113
|
+
project and ref. Give a link from `openeng link`, say what they should see, and leave time to see it.
|
|
114
|
+
Invite an action that matters, then check its result with a read. Keep accepted, validated,
|
|
115
|
+
published and seen in the app distinct. Drive through the CLI; the person operates the app.
|
|
116
|
+
|
|
117
|
+
The person enters Onshape keys themselves at `openeng connector set-credential`'s prompt;
|
|
118
|
+
never ask for keys in conversation or type them. Mirrored objects are owned by the connector.
|
|
119
|
+
For OAuth, read the published client contract and `openeng help admin-sdk registerClient`.
|
|
120
|
+
Register a public client with a `http://127.0.0.1:<port>/callback` redirect; use authorization code
|
|
121
|
+
with PKCE. Keep the local app read-only unless asked for more; it never sees their password.
|
|
122
|
+
|
|
123
|
+
## 4. Handle refusals and finish
|
|
124
|
+
|
|
125
|
+
Read a refusal and fix the input. If help is insufficient, record one minimal command and answer
|
|
126
|
+
and ask the person; do not guess in a loop. For an unknown outcome, read state before writing again.
|
|
127
|
+
Never claim to have contacted the OpenEngineering team.
|
|
128
|
+
|
|
129
|
+
Recap completed and skipped tasks, return links and next steps. Say what remains: types, objects,
|
|
130
|
+
branches, proposals, drafts and any connector or registered client, and how to revoke the connector
|
|
131
|
+
(`openeng connector revoke`) or disconnect the app. Agree before deleting anything.
|
|
132
|
+
Do not imply a short tour proves every feature or permission.
|
|
105
133
|
|
|
106
134
|
## Dogfood mode (only when the person asks for feedback capture)
|
|
107
135
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
priority and the open questions, kept apart from the recap. Never send feedback anywhere yourself.
|
|
136
|
+
Record friction as it happens: command, answer, confidence, and whether it is your omission, a help
|
|
137
|
+
gap, an observed defect, a user-reported issue, a feature request or an open question. Merge later
|
|
138
|
+
corrections into earlier entries. Hand over one file with evidence, proposed priorities and open
|
|
139
|
+
questions, separate from the recap. Never send feedback anywhere yourself.
|