@aiaiai-pt/frankctl 0.5.0 → 0.7.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/CHANGELOG.md +23 -0
- package/README.md +11 -6
- package/dist/index.js +208 -197
- package/dist/template-packs/cira/01_organization.yaml +68 -0
- package/dist/template-packs/cira/02_freguesia.yaml +73 -0
- package/dist/template-packs/cira/03_transit_route.yaml +70 -0
- package/dist/template-packs/cira/04_transit_stop.yaml +57 -0
- package/dist/template-packs/cira/05_air_quality_station.yaml +83 -0
- package/dist/template-packs/cira/06_air_quality_observed.yaml +99 -0
- package/dist/template-packs/cira/07_transit_trip.yaml +106 -0
- package/dist/template-packs/cira/08_vehicle_position.yaml +81 -0
- package/dist/template-packs/cira/09_transdev_aveirobus_gtfs.yaml +709 -0
- package/dist/template-packs/cira/10_ciclope_emergency.yaml +526 -0
- package/dist/template-packs/cira/cityfy_agenda_events.yaml +156 -0
- package/dist/template-packs/cira/template-pack.yaml +109 -0
- package/package.json +2 -1
- package/skills/frank-cli/SKILL.md +36 -14
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
apiVersion: frank.platform/v1alpha1
|
|
2
|
+
kind: PipelineTemplatePack
|
|
3
|
+
metadata:
|
|
4
|
+
name: cira
|
|
5
|
+
title: CIRA source-to-ontology verticals
|
|
6
|
+
description: >-
|
|
7
|
+
All existing CIRA declarative integrations, rendered for the current
|
|
8
|
+
Frank tenant namespace and an explicitly selected ontology tenant.
|
|
9
|
+
spec:
|
|
10
|
+
ontology_schema_ownership: external
|
|
11
|
+
forbidden_fields:
|
|
12
|
+
- password
|
|
13
|
+
- username
|
|
14
|
+
- api_key
|
|
15
|
+
- access_token
|
|
16
|
+
- auth_token
|
|
17
|
+
- client_secret
|
|
18
|
+
- api_token
|
|
19
|
+
- oauth_token
|
|
20
|
+
- secret
|
|
21
|
+
- secret_key
|
|
22
|
+
- private_key
|
|
23
|
+
- aws_access_key_id
|
|
24
|
+
- aws_secret_access_key
|
|
25
|
+
- aws_session_token
|
|
26
|
+
- sasl_password
|
|
27
|
+
parameters:
|
|
28
|
+
frank_tenant_prefix:
|
|
29
|
+
type: string
|
|
30
|
+
default: "00000000"
|
|
31
|
+
pattern: "^[0-9a-f]{8}$"
|
|
32
|
+
description: Eight-character Frank tenant UUID prefix used by Iceberg namespaces.
|
|
33
|
+
ontology_tenant_id:
|
|
34
|
+
type: string
|
|
35
|
+
default: cira
|
|
36
|
+
pattern: "^[a-z][a-z0-9_-]*$"
|
|
37
|
+
description: Existing ontology tenant targeted by every BackingDataset.
|
|
38
|
+
components:
|
|
39
|
+
cityfy-events:
|
|
40
|
+
title: Cityfy agenda events
|
|
41
|
+
status: live_proven
|
|
42
|
+
manifests:
|
|
43
|
+
- cityfy_agenda_events.yaml
|
|
44
|
+
required_sources: []
|
|
45
|
+
issues:
|
|
46
|
+
- 589
|
|
47
|
+
transdev-gtfs:
|
|
48
|
+
title: Historical Transdev/AveiroBus GTFS
|
|
49
|
+
status: live_proven
|
|
50
|
+
manifests:
|
|
51
|
+
- 09_transdev_aveirobus_gtfs.yaml
|
|
52
|
+
required_sources:
|
|
53
|
+
- cira-transdev-aveirobus-gtfs
|
|
54
|
+
issues:
|
|
55
|
+
- 600
|
|
56
|
+
ciclope-emergency:
|
|
57
|
+
title: CICLOPE emergency and IoT projections
|
|
58
|
+
status: live_proven
|
|
59
|
+
manifests:
|
|
60
|
+
- 10_ciclope_emergency.yaml
|
|
61
|
+
required_sources:
|
|
62
|
+
- cira-ciclope
|
|
63
|
+
issues:
|
|
64
|
+
- 601
|
|
65
|
+
regional-transport-core:
|
|
66
|
+
title: Regional transport organizations, freguesias, routes, and stops
|
|
67
|
+
status: declared_pending
|
|
68
|
+
manifests:
|
|
69
|
+
- 01_organization.yaml
|
|
70
|
+
- 02_freguesia.yaml
|
|
71
|
+
- 03_transit_route.yaml
|
|
72
|
+
- 04_transit_stop.yaml
|
|
73
|
+
required_sources:
|
|
74
|
+
- cira-bdtransportes-rede
|
|
75
|
+
issues:
|
|
76
|
+
- 577
|
|
77
|
+
- 580
|
|
78
|
+
air-quality:
|
|
79
|
+
title: Air-quality stations and observations
|
|
80
|
+
status: declared_pending
|
|
81
|
+
manifests:
|
|
82
|
+
- 05_air_quality_station.yaml
|
|
83
|
+
- 06_air_quality_observed.yaml
|
|
84
|
+
required_sources:
|
|
85
|
+
- Kunak Cloud - Ubiwhere
|
|
86
|
+
- VDL - AirQuality - Monitar
|
|
87
|
+
issues:
|
|
88
|
+
- 579
|
|
89
|
+
- 591
|
|
90
|
+
regional-transport-trips:
|
|
91
|
+
title: Regional transport schedule and trips
|
|
92
|
+
status: declared_pending
|
|
93
|
+
manifests:
|
|
94
|
+
- 07_transit_trip.yaml
|
|
95
|
+
required_sources: []
|
|
96
|
+
issues:
|
|
97
|
+
- 577
|
|
98
|
+
- 580
|
|
99
|
+
- 591
|
|
100
|
+
- 592
|
|
101
|
+
regional-transport-avl:
|
|
102
|
+
title: Regional transport current vehicle positions
|
|
103
|
+
status: declared_pending
|
|
104
|
+
manifests:
|
|
105
|
+
- 08_vehicle_position.yaml
|
|
106
|
+
required_sources: []
|
|
107
|
+
issues:
|
|
108
|
+
- 577
|
|
109
|
+
- 580
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiaiai-pt/frankctl",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Terminal-first client for the Frank Low-Code Pipeline platform",
|
|
5
5
|
"homepage": "https://franksdocs.nomadriver.co",
|
|
6
6
|
"repository": {
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"test": "vitest run",
|
|
44
44
|
"test:watch": "vitest",
|
|
45
45
|
"test:e2e": "FRANK_E2E=1 vitest run --config vitest-e2e.config.ts",
|
|
46
|
+
"test:package": "node scripts/smoke-template-pack.mjs",
|
|
46
47
|
"coverage": "vitest run --coverage",
|
|
47
48
|
"typecheck": "tsc --noEmit",
|
|
48
49
|
"prepack": "node scripts/build.mjs && mkdir -p skills/frank-cli && cp ../skills/frank-cli/SKILL.md skills/frank-cli/SKILL.md"
|
|
@@ -19,6 +19,11 @@ YAML file and `apply` it idempotently. Reach for the imperative subcommands
|
|
|
19
19
|
(`sources`, `transforms`, …) for inspection, one-off actions, and debugging — but let
|
|
20
20
|
YAML be your source of truth.
|
|
21
21
|
|
|
22
|
+
When a curated vertical already exists, start from its packaged template instead of
|
|
23
|
+
scaffolding it again. `templates render` is local and emits the same ordinary
|
|
24
|
+
`frank.platform/v1` YAML consumed by `pipelines apply`; it is not a second execution
|
|
25
|
+
engine.
|
|
26
|
+
|
|
22
27
|
## Install
|
|
23
28
|
|
|
24
29
|
```bash
|
|
@@ -46,8 +51,8 @@ frankctl config set profiles.default.keycloakUrl https://auth.frank.nomadriver.c
|
|
|
46
51
|
|
|
47
52
|
Auth modes:
|
|
48
53
|
- **PKCE (default)** — `frankctl auth login`. Browser-based, best for humans.
|
|
49
|
-
- **Headless** — `frankctl auth login --headless --username … --password
|
|
50
|
-
- **Service account** — `frankctl auth login --service-account --client-id … --client-secret
|
|
54
|
+
- **Headless** — `frankctl auth login --headless --username … --password-stdin`, or inject `FRANKCTL_PASSWORD` without the stdin flag.
|
|
55
|
+
- **Service account** — `frankctl auth login --service-account --client-id … --client-secret-stdin`, or inject `FRANKCTL_CLIENT_SECRET`.
|
|
51
56
|
|
|
52
57
|
Tokens are stored per-profile at `~/.frankctl/credentials.json` (0600) and refresh
|
|
53
58
|
automatically before expiry. In scripts, inject a fresh token instead of reading the
|
|
@@ -62,6 +67,24 @@ curl -H "Authorization: Bearer $TOKEN" https://api.frank.nomadriver.co/api/v1/pi
|
|
|
62
67
|
|
|
63
68
|
## Declarative pipelines — the repeatable path
|
|
64
69
|
|
|
70
|
+
### Curated template packs
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
frankctl templates list
|
|
74
|
+
frankctl --json templates show cira
|
|
75
|
+
frankctl templates render cira -o cira-proven.yaml
|
|
76
|
+
frankctl pipelines apply -f cira-proven.yaml --dry-run-server --live-ontology
|
|
77
|
+
frankctl pipelines apply -f cira-proven.yaml --wait
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
`templates show` lists component status and any pre-existing Source names required by
|
|
81
|
+
that component. The CIRA pack renders its live-proven components by default. Use
|
|
82
|
+
`--all` to include declared-but-pending components, or repeat `--component <name>` for
|
|
83
|
+
an explicit subset. Repeat `--set frank_tenant_prefix=<8-hex>` and
|
|
84
|
+
`--set ontology_tenant_id=<tenant>` to target another Frank namespace and existing
|
|
85
|
+
ontology tenant. The CIRA pack treats ontology schema as externally owned and therefore
|
|
86
|
+
contains no `ensure_schema` mutation.
|
|
87
|
+
|
|
65
88
|
A pipeline is one multi-document YAML file describing three kinds of object under the
|
|
66
89
|
`frank.platform/v1` API version:
|
|
67
90
|
|
|
@@ -72,10 +95,10 @@ A pipeline is one multi-document YAML file describing three kinds of object unde
|
|
|
72
95
|
| `BackingDataset` | Maps a silver table's columns to **ontology** entity properties |
|
|
73
96
|
|
|
74
97
|
Objects reference each other by `metadata.name`, so one file can be self-contained and
|
|
75
|
-
version-controllable. Commit only reviewed, secret-free declarations.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
98
|
+
version-controllable. Commit only reviewed, secret-free declarations. Structurally
|
|
99
|
+
declared Source credentials are stored in Vault and written with `sources credentials
|
|
100
|
+
set|rotate --values-file -`; `source_config` and export contain only ordinary values plus
|
|
101
|
+
the opaque tenant-owned `credential_ref`.
|
|
79
102
|
|
|
80
103
|
### The loop: scaffold → edit → apply
|
|
81
104
|
|
|
@@ -108,8 +131,9 @@ frankctl pipelines apply -f pipeline.yaml --wait --timeout 600
|
|
|
108
131
|
Use `--json` with `--wait` for one evidence object correlated to the exact Source
|
|
109
132
|
workflow/SyncRun, Dagster/TransformRun, and ontology SyncRun started by this invocation.
|
|
110
133
|
Snapshot IDs are decimal strings so JavaScript cannot round them. `status: skipped`
|
|
111
|
-
means the ontology was already converged and no rows were replayed
|
|
112
|
-
|
|
134
|
+
means the ontology was already converged and no rows were replayed. Ontology evidence
|
|
135
|
+
prefers `snapshot_id_exact`; numeric-only evidence fails closed. Use `bd entities` for
|
|
136
|
+
separate target entity readback.
|
|
113
137
|
|
|
114
138
|
### Preflight before you apply
|
|
115
139
|
|
|
@@ -149,16 +173,14 @@ Without these, `apply` is fully idempotent.
|
|
|
149
173
|
### Export existing work back to YAML
|
|
150
174
|
|
|
151
175
|
Already built a pipeline in the UI? Export it — plus its Sources and Backing Datasets —
|
|
152
|
-
to a
|
|
176
|
+
to a file for review:
|
|
153
177
|
|
|
154
178
|
```bash
|
|
155
|
-
|
|
156
|
-
frankctl pipelines export <pipeline-id> > pipeline.private.yaml
|
|
179
|
+
frankctl pipelines export <pipeline-id> > pipeline.yaml
|
|
157
180
|
```
|
|
158
181
|
|
|
159
|
-
The export includes Source configuration
|
|
160
|
-
stream
|
|
161
|
-
remaining declarations.
|
|
182
|
+
The export includes ordinary Source configuration, opaque credential references, and
|
|
183
|
+
config-only stream declarations, but omits credential values and stream runtime state.
|
|
162
184
|
|
|
163
185
|
### Minimal manifest shape
|
|
164
186
|
|